|
@@ -1,7 +1,7 @@
|
1
|
1
|
import { View, Image, Text } from "@tarojs/components";
|
2
|
2
|
import { transferImage } from '@/utils/tools'
|
3
|
3
|
import dayjs from 'dayjs'
|
4
|
|
-import emptyImg from '@/assets/empty.png'
|
|
4
|
+import emptyImg from '@/assets/empty.png'
|
5
|
5
|
|
6
|
6
|
import './index.scss'
|
7
|
7
|
|
|
@@ -14,24 +14,29 @@ export default function HouseCard(props) {
|
14
|
14
|
price,
|
15
|
15
|
createDate,
|
16
|
16
|
status,
|
17
|
|
- buildingImgList=[],
|
|
17
|
+ buildingImgList = [],
|
18
|
18
|
} = props.summary || {}
|
19
|
19
|
|
20
|
20
|
const title = `${buildingName} ${blockName} ${unitName} ${roomName}`
|
21
|
|
- const thumb = (buildingImgList || []).length ? transferImage((buildingImgList)[0].url) : emptyImg
|
|
21
|
+ const thumb = (buildingImgList || []).length
|
|
22
|
+ // const thumb = (buildingImgList || []).length ? transferImage((buildingImgList)[0].url) : emptyImg
|
22
|
23
|
const showDT = dayjs(createDate).format('YYYY/MM/DD')
|
|
24
|
+ const wanY = Number(price / 10000).toFixed(0)
|
23
|
25
|
|
24
|
26
|
return (
|
25
|
27
|
<View className="housecard">
|
26
|
28
|
<View className="head">
|
27
|
|
- <Image className="thumb" src={thumb} mode="aspectFit" />
|
|
29
|
+ {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
|
|
30
|
+ <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
|
|
31
|
+ }
|
|
32
|
+ {/* <Image className="thumb" src={thumb} mode="aspectFit" /> */}
|
28
|
33
|
</View>
|
29
|
34
|
<View className="body">
|
30
|
35
|
<View className="badge">已预选</View>
|
31
|
36
|
<View className="title">{title}</View>
|
32
|
37
|
<View className="subtitle">
|
33
|
38
|
<Text>现价</Text>
|
34
|
|
- <Text className="red">{price || '待定'}</Text>
|
|
39
|
+ <Text className="red">{wanY+'万' || '待定'}</Text>
|
35
|
40
|
</View>
|
36
|
41
|
<View className="meta">{showDT}预选</View>
|
37
|
42
|
<View className="sign bg-success"></View>
|