import "@/assets/css/iconfont.css"; import Taro from "@tarojs/taro"; import { Image } from "@tarojs/components"; import { getImgURL } from "@/utils/image"; import BrokerShare from "@/components/brokerShare"; import "./index.scss"; import { useSelector } from "react-redux"; import { ROLE_CODE } from "@/constants/user"; export default function ProjectListItem(props) { const person = useSelector(({user}) => user.userInfo?.person); const { Data = {}, ShowImgIcon = true } = props; const { uvList = [] } = Data; const LinkTo = () => { if (Data.eventType === "news") { // 资讯 Taro.navigateTo({ url: `/pages/index/newsDetail/index?id=${Data.targetId}&eventType=${Data.type}`, }); } else if (Data.eventType === "activity") { // 活动 Taro.navigateTo({ url: `/pages/index/activityDetail/index?id=${Data.targetId}&eventType=${Data.type}`, }); } else { // 楼盘 Taro.navigateTo({ url: `/pages/index/buildingDetail/index?id=${ Data.buildingId || Data.targetId }`, }); } }; return ( {(Data?.panoramaList || []).length > 0 && ShowImgIcon && ( )} {Data.videoUrl !== null && ShowImgIcon && ( )} {Data.buildingName} {Data.price} {Data.address} {(Data.buildingTag || []).map((item, index) => ( {item.tagName} ))} {299 + (Data.shareNum || 0)}次分享 {(uvList?.records || []).slice(0, 3).map((item, index) => ( ))} {(uvList?.records || []).length > 0 ? "..." : ""} {299 + (Data.pvNum || 0)}人围观 {Data?.isBroker && person?.personType === ROLE_CODE.BROKER && ( )} ); }