import Taro from '@tarojs/taro' import { ScrollView, Image } from '@tarojs/components' import AuthRole from '@/components/Auth/AuthRole' import { ROLE_CODE } from '@/constants/user' import classNames from 'classnames' import useFavor from '@/utils/hooks/useFavor' import { formatDate } from '@/utils/chatDate' import '@/assets/css/iconfont.css' import './index.scss' export default function BasicInfo (props) { const { Info = {}, trackData } = props const { buildingId, isSave } = Info const [isSaved, handleFavor] = useFavor(isSave, { id: buildingId, buildingId, ...trackData }) const goto = (url) => Taro.navigateTo({ url }) const handleSubscribeMessage = () => { Taro.showToast({ title: '该功能即将上线!', icon: 'none', }) } return ( {/* 标题名称 */} {Info.buildingName} {isSaved ? '取消收藏' : '收藏'} {/* 标签 */} { (Info.buildingTag || []).map((item, index) => ( {item.tagName} )) } {/* 项目列表 */} { (Info.buildingProjectType || []).length > 0 && { (Info.buildingProjectType || []).map((item, index) => { const priceUnit = item.priceType === 'average' ? '元/㎡' : '万元/套' let price = item.startPrice === item.endPrice ? item.startPrice : `${item.startPrice}-${item.endPrice}` if (!item.startPrice && !item.endPrice) { price = '暂无' } else { price = `约${price}${priceUnit}` } return ( 项目类型: {item.buildingTypeName} 房屋产权: {item.rightsYear}年 装修标准: {item.decoration || '暂无'} 项目参考价格: {price} {item.marketStatus} ) }) } } {/* 隔断 */} {/* 更多信息 */} 楼盘地址 {Info.address} 开盘时间 {formatDate(Info.openingDate, 'yyyy-MM-dd' ) || '待定'} 容积率 {Info.volumeRate || '暂无'} 车位数量 {Info.parkingRate || '暂无'} 绿化率 {Info.greeningRate || '暂无'} 物业费 {Info.serviceFee || '暂无'} 规划户数 {Info.familyNum || '暂无'} 物业 {Info.serviceCompany || '暂无'} {/* 围观 */} {Info.pvNum || 0}人围观 { (Info?.uvList?.records || []).slice(0, 8).map((item, index) => ( )) } { (Info?.uvList?.records || []).length > 8 && ... } {/* 互动 */} goto(`/pages/index/buildingInfo/index?id=${buildingId}`)}>更多楼盘信息 订阅活动通知 {/* 提示 */} goto(`/pages/index/buildingRules/index?buildingId=${buildingId}`)}>查看报备规则? ) }