소스 검색

component

xujing 5 년 전
부모
커밋
6f090a1741
2개의 변경된 파일111개의 추가작업 그리고 0개의 파일을 삭제
  1. 46
    0
      src/onlineSelling/components/RaiseHouse/index.js
  2. 65
    0
      src/onlineSelling/components/RaiseHouse/index.scss

+ 46
- 0
src/onlineSelling/components/RaiseHouse/index.js 파일 보기

@@ -0,0 +1,46 @@
1
+import { View, Image, Text } from "@tarojs/components";
2
+import { transferImage } from '@/utils/tools'
3
+import dayjs from 'dayjs'
4
+
5
+import './index.scss'
6
+
7
+export default function RaiseHouse(props) {
8
+  const {
9
+    buildingName,
10
+    termname,
11
+    blockName,
12
+    unitName,
13
+    roomName,
14
+    price,
15
+    createDate,
16
+    buildingImgList = [],
17
+  } = props.summary || {}
18
+
19
+  const title = `${buildingName} ${termname||''} ${blockName} ${unitName} ${roomName}`
20
+  const thumb = (buildingImgList || []).length
21
+  const showDT = dayjs(createDate).format('YYYY/MM/DD')
22
+  const wanY = Number(price)
23
+
24
+  return (
25
+    <View className="raisehouse">
26
+      <View className="head">
27
+        {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
28
+          <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
29
+        }
30
+      </View>
31
+      <View className="body">
32
+        <View className="apartment">A户型</View>
33
+        <View className="price">现价234万</View>
34
+        <View className="title">XX嘉苑 1号楼 2单元 3楼 303号</View>
35
+        <View className="subtitle">
36
+          <Text>建筑面积约</Text>
37
+          <Text className="red">{wanY + 'm²' || '待定'}</Text>
38
+        </View>
39
+        <View className="subtitle">
40
+          <Text>使用面积约</Text>
41
+          <Text className="red">{wanY + 'm²' || '待定'}</Text>
42
+        </View>
43
+      </View>
44
+    </View>
45
+  )
46
+}

+ 65
- 0
src/onlineSelling/components/RaiseHouse/index.scss 파일 보기

@@ -0,0 +1,65 @@
1
+.raisehouse {
2
+  width: 690px;
3
+  height: 250px;
4
+  background:#fff;
5
+  border-radius: 8px;
6
+  display: flex;
7
+  margin: 16px 30px;
8
+  box-shadow: 0 4px 15px 1px rgba(0, 0, 0, 0.12);
9
+  font-weight: 400;
10
+
11
+  .head {
12
+    width: 250px;
13
+    flex: none;
14
+    border-right: 2px solid rgba(0, 0, 0, 0.04);
15
+    padding: 20px;
16
+    display: flex;
17
+    align-items: center;
18
+    justify-content: center;
19
+
20
+    .thumb {
21
+      width: 100%;
22
+      height: 100%;
23
+    }
24
+  }
25
+
26
+  .body {
27
+    width: 438px;
28
+    flex: none;
29
+    position: relative;
30
+    line-height: 40px;
31
+    padding: 20px 16px;
32
+
33
+    .apartment {
34
+      font-size: 26px;
35
+      color: #FE1C1C;
36
+      font-weight: 700;
37
+    }
38
+
39
+    .price {
40
+      font-size: 24px;
41
+      font-weight: 700;
42
+      color: #FE1C1C;
43
+      line-height: 1.8;
44
+    }
45
+    .title {
46
+      font-size: 26px;
47
+      font-weight: bold;
48
+      color: #333;
49
+      line-height: 1.8;
50
+    }
51
+
52
+    .subtitle {
53
+      font-size: 28px;
54
+      color:#333;
55
+      line-height: 1.6;
56
+
57
+    }
58
+  }
59
+
60
+  .red {
61
+    color: #FF3C3C;
62
+    margin: 0 6px;
63
+  }
64
+
65
+}