Sfoglia il codice sorgente

Merge branch 'main' of http://git.ycjcjy.com/marketing/miniapp into main

zlisen 3 anni fa
parent
commit
4fc1c0e543
34 ha cambiato i file con 955 aggiunte e 161 eliminazioni
  1. 1
    1
      project.config.json
  2. BIN
      src/assets/index-icon17.png
  3. BIN
      src/assets/index-icon18.jpg
  4. BIN
      src/assets/index-icon19.jpg
  5. 11
    5
      src/pages/index/buildingDetail/components/HouseTypeIntro/index.jsx
  6. 4
    4
      src/pages/index/buildingDetail/components/LivingActivity/index.jsx
  7. 4
    3
      src/pages/index/buildingDetail/components/News/index.jsx
  8. 68
    26
      src/pages/index/buildingDetail/components/Periphery/index.jsx
  9. 9
    0
      src/pages/index/buildingDetail/components/Periphery/index.scss
  10. 19
    3
      src/pages/index/buildingDetail/components/Pictures/index.jsx
  11. 9
    11
      src/pages/index/buildingDetail/components/ProjectDynamic/index.jsx
  12. 12
    33
      src/pages/index/buildingDetail/components/ProjectDynamic/index.scss
  13. 2
    2
      src/pages/index/buildingDetail/components/PropertyConsultant/index.jsx
  14. 6
    6
      src/pages/index/buildingDetail/components/SpecialPriceHouse/index.jsx
  15. 25
    67
      src/pages/index/buildingDetail/index.jsx
  16. 3
    0
      src/pages/index/buildingInfo/index.config.js
  17. 62
    0
      src/pages/index/buildingInfo/index.jsx
  18. 46
    0
      src/pages/index/buildingInfo/index.scss
  19. 3
    0
      src/pages/index/buildingPictures/index.config.js
  20. 70
    0
      src/pages/index/buildingPictures/index.jsx
  21. 100
    0
      src/pages/index/buildingPictures/index.scss
  22. 3
    0
      src/pages/index/buildingPropertyConsultant/index.config.js
  23. 73
    0
      src/pages/index/buildingPropertyConsultant/index.jsx
  24. 109
    0
      src/pages/index/buildingPropertyConsultant/index.scss
  25. 3
    0
      src/pages/index/buildingRules/index.config.js
  26. 46
    0
      src/pages/index/buildingRules/index.jsx
  27. 92
    0
      src/pages/index/buildingRules/index.scss
  28. 3
    0
      src/pages/index/buildingTakeLook/index.config.js
  29. 18
    0
      src/pages/index/buildingTakeLook/index.jsx
  30. 12
    0
      src/pages/index/buildingTakeLook/index.scss
  31. 3
    0
      src/pages/index/buildingViewsRecords/index.config.js
  32. 55
    0
      src/pages/index/buildingViewsRecords/index.jsx
  33. 54
    0
      src/pages/index/buildingViewsRecords/index.scss
  34. 30
    0
      src/routes.js

+ 1
- 1
project.config.json Vedi File

27
 			"outputPath": ""
27
 			"outputPath": ""
28
 		},
28
 		},
29
 		"useIsolateContext": true,
29
 		"useIsolateContext": true,
30
-		"useCompilerModule": true,
30
+		"useCompilerModule": false,
31
 		"userConfirmedUseCompilerModuleSwitch": false
31
 		"userConfirmedUseCompilerModuleSwitch": false
32
 	},
32
 	},
33
 	"compileType": "miniprogram",
33
 	"compileType": "miniprogram",

BIN
src/assets/index-icon17.png Vedi File


BIN
src/assets/index-icon18.jpg Vedi File


BIN
src/assets/index-icon19.jpg Vedi File


+ 11
- 5
src/pages/index/buildingDetail/components/HouseTypeIntro/index.jsx Vedi File

1
-
1
+import Taro from '@tarojs/taro'
2
 import { ScrollView, Image } from '@tarojs/components'
2
 import { ScrollView, Image } from '@tarojs/components'
3
+import { getImgURL } from '@/utils/image'
3
 import '@/assets/css/iconfont.css'
4
 import '@/assets/css/iconfont.css'
4
 import './index.scss'
5
 import './index.scss'
5
 
6
 
6
 export default function HouseTypeIntro (props) {
7
 export default function HouseTypeIntro (props) {
7
-  const { Info = [] } = props
8
+  const { Info } = props
9
+
10
+  const preview = (item) => {
11
+    const current = getImgURL(item.buildingImgList.length ? item.buildingImgList[0].url : null)
12
+    Taro.previewImage({ current, urls: [current] })
13
+  }
8
   
14
   
9
-  return (
15
+  return Info ? (
10
     <view className='components HouseTypeIntro'>
16
     <view className='components HouseTypeIntro'>
11
 
17
 
12
       <view className='Title flex-h'>
18
       <view className='Title flex-h'>
23
             Info.map((item, index) => (
29
             Info.map((item, index) => (
24
               <view className='ListItem' key={`List-${index}`}>
30
               <view className='ListItem' key={`List-${index}`}>
25
                 <view className='Img'>
31
                 <view className='Img'>
26
-                  <Image mode='aspectFill' src={item.buildingImgList.length ? item.buildingImgList[0].url : null}></Image>
32
+                  <Image mode='aspectFill' onClick={() => preview(item)} src={getImgURL(item.buildingImgList.length ? item.buildingImgList[0].url : null)}></Image>
27
                 </view>
33
                 </view>
28
                 <view className='Title'>
34
                 <view className='Title'>
29
                   <text>{item.apartmentName}</text>
35
                   <text>{item.apartmentName}</text>
37
       </view>
43
       </view>
38
 
44
 
39
     </view>
45
     </view>
40
-  )
46
+  ) : null
41
 }
47
 }

+ 4
- 4
src/pages/index/buildingDetail/components/LivingActivity/index.jsx Vedi File

6
 
6
 
7
 export default function LivingActivity (props) {
7
 export default function LivingActivity (props) {
8
   const { List = [] } = props
8
   const { List = [] } = props
9
-  return (
9
+  return List.length > 0 ? (
10
     <view className='components LivingActivity'>
10
     <view className='components LivingActivity'>
11
 
11
 
12
       <view className='Title flex-h'>
12
       <view className='Title flex-h'>
21
         {
21
         {
22
           List.map((item, index) => (
22
           List.map((item, index) => (
23
             <view className='flex-item' key={`ListItem-${index}`}>
23
             <view className='flex-item' key={`ListItem-${index}`}>
24
-              <view style={{display: item.images ? 'block' : 'none'}}>
25
-                <Image mode='aspectFill' src={getImgURL(item.images)} className='centerLabel'></Image>
24
+              <view style={{display: item.listImg ? 'block' : 'none'}}>
25
+                <Image mode='aspectFill' src={getImgURL(item.listImg)} className='centerLabel'></Image>
26
               </view>
26
               </view>
27
             </view>
27
             </view>
28
           ))
28
           ))
30
       </view>
30
       </view>
31
 
31
 
32
     </view>
32
     </view>
33
-  )
33
+  ) : null
34
 }
34
 }

+ 4
- 3
src/pages/index/buildingDetail/components/News/index.jsx Vedi File

1
 
1
 
2
 import { Image } from '@tarojs/components'
2
 import { Image } from '@tarojs/components'
3
+import { getImgURL } from '@/utils/image'
3
 import '@/assets/css/iconfont.css'
4
 import '@/assets/css/iconfont.css'
4
 import './index.scss'
5
 import './index.scss'
5
 
6
 
6
 export default function News (props) {
7
 export default function News (props) {
7
   const { List = [] } = props
8
   const { List = [] } = props
8
-  return (
9
+  return List.length > 0 ? (
9
     <view className='components News'>
10
     <view className='components News'>
10
 
11
 
11
       <view className='Title flex-h'>
12
       <view className='Title flex-h'>
21
           List.map((item, index) => (
22
           List.map((item, index) => (
22
             <view className='flex-item' key={`ListItem-${index}`}>
23
             <view className='flex-item' key={`ListItem-${index}`}>
23
               <view className='Img' style={{display: item.newsImg || item.newsName ? 'block' : 'none'}}>
24
               <view className='Img' style={{display: item.newsImg || item.newsName ? 'block' : 'none'}}>
24
-                <Image mode='aspectFill' src={item.newsImg} className='centerLabel'></Image>
25
+                <Image mode='aspectFill' src={getImgURL(item.newsImg)} className='centerLabel'></Image>
25
               </view>
26
               </view>
26
               <text className='Title'>{item.newsName}</text>
27
               <text className='Title'>{item.newsName}</text>
27
             </view>
28
             </view>
30
       </view>
31
       </view>
31
 
32
 
32
     </view>
33
     </view>
33
-  )
34
+  ) : null;
34
 }
35
 }

+ 68
- 26
src/pages/index/buildingDetail/components/Periphery/index.jsx Vedi File

1
 
1
 
2
-import { Map } from '@tarojs/components'
2
+import { useCallback, useContext, useEffect, useMemo, useState } from 'react'
3
+import { Map, CoverView } from '@tarojs/components'
3
 import '@/assets/css/iconfont.css'
4
 import '@/assets/css/iconfont.css'
4
 import './index.scss'
5
 import './index.scss'
5
 
6
 
7
+const poiTypes = [
8
+  { label: '交通', value: 'Transport', class: 'iconfont icon-jiaotong' },
9
+  { label: '商业', value: 'Mall', class: 'iconfont icon-shangye' },
10
+  { label: '学校', value: 'Edu', class: 'iconfont icon-xuexiao' },
11
+  { label: '医院', value: 'Hospital', class: 'iconfont icon-yiyuan' },
12
+  { label: '银行', value: 'Bank', class: 'iconfont icon-yinhang' },
13
+  { label: '餐饮', value: 'Restaurant', class: 'iconfont icon-canyin' },
14
+]
15
+
6
 export default function Periphery (props) {
16
 export default function Periphery (props) {
7
-  const { List = [] } = props
17
+  const { Info } = props
18
+
19
+  const [pois, setPois] = useState([])
20
+  const [markers, setMarkers] = useState([])
21
+
22
+  const loc = useMemo(() => (Info?.coordinate ? Info.coordinate.split(',') : []), [Info?.coordinate])
23
+
24
+  const countLen = useCallback((type) => {
25
+    if (!Info) return 0;
26
+    const tagLen = (Info[`building${type}`] || '').split(',').filter(Boolean).length
27
+    const poiLen = pois.filter((poi) => poi.key === type).map((it) => (it.data ? it.data.length : 0)).reduce((acc, i) => (acc + i), 0)
28
+
29
+    return tagLen + poiLen
30
+  }, [Info, pois])
8
 
31
 
9
   const CutTab = () => {
32
   const CutTab = () => {
10
     return () => {
33
     return () => {
12
     }
35
     }
13
   }
36
   }
14
 
37
 
15
-  const ClassName = (label) => {
16
-    switch (label) {
17
-      case '交通':
18
-        return 'iconfont icon-jiaotong'
19
-      case '商业':
20
-        return 'iconfont icon-shangye'
21
-      case '学校':
22
-        return 'iconfont icon-xuexiao'
23
-      case '医院':
24
-        return 'iconfont icon-yiyuan'
25
-      case '银行':
26
-        return 'iconfont icon-yinhang'
27
-      case '餐饮':
28
-        return 'iconfont icon-canyin'
29
-      default:
30
-        return ''
38
+  useEffect(() => {
39
+    // 地图 marker
40
+    if (Info?.coordinate) {
41
+      const mks = []
42
+      // 项目位置
43
+      mks.push({
44
+        id: -1,
45
+        longitude: loc[0],
46
+        latitude: loc[1],
47
+        iconPath: '',
48
+        width: 24,
49
+        height: 36,
50
+        customCallout: {
51
+          anchorY: 0,
52
+          anchorX: 0,
53
+          display: 'ALWAYS',
54
+        }
55
+      })
56
+      // pois
57
+      if (Info?.mapJson) {
58
+        const poiArr = JSON.parse(Info.mapJson).map((it) => ({ ...it, data: JSON.parse(it.data) }))
59
+        setPois(poiArr)
60
+      }
61
+  
62
+      setMarkers(mks)
31
     }
63
     }
64
+  }, [Info, loc])
65
+
66
+  if (!Info?.coordinate) {
67
+    return null
32
   }
68
   }
33
 
69
 
34
   return (
70
   return (
46
             id='poi-around'
82
             id='poi-around'
47
             show-location
83
             show-location
48
             scale={12}
84
             scale={12}
49
-            markers={[]}
50
-            enable-enableScroll
51
-            enable-zoom
52
-          ></Map>
85
+            markers={markers}
86
+            longitude={loc[0]}
87
+            latitude={loc[1]}
88
+            // enable-enableScroll
89
+            // enable-zoom
90
+          >
91
+            <CoverView slot='callout' className='marker-callout'>
92
+              <CoverView markerId={-1} className='marker-project'>{Info.buildingName}</CoverView>
93
+            </CoverView>
94
+          </Map>
53
         </view>
95
         </view>
54
       </view>
96
       </view>
55
 
97
 
56
       <view className='List flex-h'>
98
       <view className='List flex-h'>
57
         {
99
         {
58
-          List.map((item, index) => (
59
-            <view className='flex-item' key={`Item-${index}`} onClick={CutTab(index)}>
60
-              <text className={ClassName(item.label)}></text>
61
-              <text>{item.label}({item.data.length})</text>
100
+          poiTypes.map((item) => (
101
+            <view className='flex-item' key={item.value} onClick={CutTab(item.value)}>
102
+              <text className={item.class}></text>
103
+              <text>{item.label}({countLen(item.value)})</text>
62
             </view>
104
             </view>
63
           ))
105
           ))
64
         }
106
         }

+ 9
- 0
src/pages/index/buildingDetail/components/Periphery/index.scss Vedi File

59
       }
59
       }
60
     }
60
     }
61
   }
61
   }
62
+
63
+}
64
+
65
+.marker-callout {
66
+  .marker-project {
67
+    color: #1A3B83;
68
+    font-weight: 700;
69
+    // font-size: 100px;
70
+  }
62
 }
71
 }

+ 19
- 3
src/pages/index/buildingDetail/components/Pictures/index.jsx Vedi File

1
-
2
-import '@/assets/css/iconfont.css'
1
+import Taro from '@tarojs/taro'
3
 import { ScrollView, Image } from '@tarojs/components'
2
 import { ScrollView, Image } from '@tarojs/components'
3
+import { getImgURL } from '@/utils/image'
4
+import '@/assets/css/iconfont.css'
4
 import './index.scss'
5
 import './index.scss'
6
+import { useMemo } from 'react'
5
 
7
 
6
 export default function Pictures (props) {
8
 export default function Pictures (props) {
7
   const { List = [] } = props
9
   const { List = [] } = props
10
+
11
+  const urls = useMemo(() => {
12
+    return List.map((x) => (x.buildingImgList?.length ? x.buildingImgList : undefined))
13
+      .filter(Boolean)
14
+      .reduce((acc, arr) => acc.concat(arr.map((f) => f.url)), [])
15
+      .filter(Boolean)
16
+      .map((x) => getImgURL(x))
17
+  }, [List])
18
+
19
+  const handlePreview = (item) => {
20
+    const current = getImgURL(item.buildingImgList.length ? item.buildingImgList[0].url : null)
21
+    Taro.previewImage({ current, urls })
22
+  }
23
+
8
   return (
24
   return (
9
     <view className='components Pictures'>
25
     <view className='components Pictures'>
10
 
26
 
18
         <ScrollView scroll-x>
34
         <ScrollView scroll-x>
19
           {
35
           {
20
             List.map((item, index) => (
36
             List.map((item, index) => (
21
-              <view className='ListItem' key={`List-${index}`}>
37
+              <view className='ListItem' key={`List-${index}`} onClick={() => handlePreview(item)}>
22
                 <view className='Img'>
38
                 <view className='Img'>
23
                   <Image mode='aspectFill' className='centerLabel' src={item.buildingImgList.length ? item.buildingImgList[0].url : null}></Image>
39
                   <Image mode='aspectFill' className='centerLabel' src={item.buildingImgList.length ? item.buildingImgList[0].url : null}></Image>
24
                 </view>
40
                 </view>

+ 9
- 11
src/pages/index/buildingDetail/components/ProjectDynamic/index.jsx Vedi File

3
 import './index.scss'
3
 import './index.scss'
4
 
4
 
5
 export default function ProjectDynamic (props) {
5
 export default function ProjectDynamic (props) {
6
-  const { Data = {} } = props
7
-  return (
6
+  const { List = [] } = props
7
+
8
+  const info = List[0]
9
+
10
+  return info ? (
8
     <view className='components ProjectDynamic'>
11
     <view className='components ProjectDynamic'>
9
 
12
 
10
       <view className='Title flex-h'>
13
       <view className='Title flex-h'>
15
         <text className='iconfont icon-jiantouright'></text>
18
         <text className='iconfont icon-jiantouright'></text>
16
       </view>
19
       </view>
17
 
20
 
18
-      <view className='Nav'>
19
-        <text>楼盘资讯(8)</text>
20
-        <text>最新活动(1)</text>
21
-      </view>
22
-
23
       <view className='Info'>
21
       <view className='Info'>
24
-        <text className='Time'>2020年5月20日</text>
25
-        <text className='Title'>山和九著府预计5月加推5号楼</text>
26
-        <text className='Desc'>山和九著府预计5月加推5号楼,目前在售房源位于89号楼,均价26400元/㎡,户型建筑面积82、89、112㎡,预计2023年6月交付。</text>
22
+        <text className='Time'>{info.trendTime}</text>
23
+        <text className='Title'>{info.trendTitle}</text>
24
+        <text className='Desc'>{info.trendContent}</text>
27
       </view>
25
       </view>
28
 
26
 
29
     </view>
27
     </view>
30
-  )
28
+  ) : null
31
 }
29
 }

+ 12
- 33
src/pages/index/buildingDetail/components/ProjectDynamic/index.scss Vedi File

7
     >.flex-item {
7
     >.flex-item {
8
       >text {
8
       >text {
9
         display: block;
9
         display: block;
10
-        font-size: 34px;
10
+        font-size: 34rpx;
11
         color: #333;
11
         color: #333;
12
         line-height: 1;
12
         line-height: 1;
13
         letter-spacing: 4px;
13
         letter-spacing: 4px;
14
-        font-weight: bold;
14
+        font-weight: 500;
15
       }
15
       }
16
     }
16
     }
17
     >text {
17
     >text {
18
-      font-size: 26px;
18
+      font-size: 26rpx;
19
       color: #A1A1A1;
19
       color: #A1A1A1;
20
     }
20
     }
21
   }
21
   }
22
-  >.Nav {
23
-    font-size: 0;
24
-    white-space: nowrap;
25
-    margin-top: 30px;
26
-    >text {
27
-      display: inline-block;
28
-      vertical-align: middle;
29
-      font-size: 28px;
30
-      line-height: 56px;
31
-      color: #333;
32
-      border-radius: 56px;
33
-      background: #F8F8F8;
34
-      padding: 0 20px;
35
-      min-width: 148px;
36
-      text-align: center;
37
-      margin-left: 30px;
38
-      &:first-child {
39
-        margin-left: 0;
40
-      }
41
-    }
42
-  }
43
   >.Info {
22
   >.Info {
44
     position: relative;
23
     position: relative;
45
     overflow: hidden;
24
     overflow: hidden;
46
     >text {
25
     >text {
47
       display: block;
26
       display: block;
48
       &.Time {
27
       &.Time {
49
-        font-size: 28px;
50
-        line-height: 40px;
51
-        margin-top: 28px;
28
+        font-size: 28rpx;
29
+        line-height: 40rpx;
30
+        margin-top: 28rpx;
52
         color: #1A3B83;
31
         color: #1A3B83;
53
       }
32
       }
54
       &.Title {
33
       &.Title {
55
-        font-size: 32px;
56
-        line-height: 44px;
57
-        margin-top: 20px;
34
+        font-size: 32rpx;
35
+        line-height: 44rpx;
36
+        margin-top: 20rpx;
58
         font-weight: bold;
37
         font-weight: bold;
59
       }
38
       }
60
       &.Desc {
39
       &.Desc {
61
-        font-size: 28px;
62
-        line-height: 40px;
63
-        margin-top: 20px;
40
+        font-size: 28rpx;
41
+        line-height: 40rpx;
42
+        margin-top: 20rpx;
64
         color: #A1A1A1;
43
         color: #A1A1A1;
65
         text-indent: 2em;
44
         text-indent: 2em;
66
       }
45
       }

+ 2
- 2
src/pages/index/buildingDetail/components/PropertyConsultant/index.jsx Vedi File

18
     Taro.makePhoneCall({ phoneNumber: phone })
18
     Taro.makePhoneCall({ phoneNumber: phone })
19
   }
19
   }
20
 
20
 
21
-  return (
21
+  return List.length > 0 ? (
22
     <view className='components PropertyConsultant'>
22
     <view className='components PropertyConsultant'>
23
 
23
 
24
       <view className='Title flex-h'>
24
       <view className='Title flex-h'>
59
       </view>
59
       </view>
60
 
60
 
61
     </view>
61
     </view>
62
-  )
62
+  ) : null
63
 }
63
 }

+ 6
- 6
src/pages/index/buildingDetail/components/SpecialPriceHouse/index.jsx Vedi File

9
 const itFmt = it => `${it.unitType} ${Number(it.currentPrice / it.area).toFixed(0)}元/㎡`
9
 const itFmt = it => `${it.unitType} ${Number(it.currentPrice / it.area).toFixed(0)}元/㎡`
10
 
10
 
11
 export default function SpecialPriceHouse (props) {
11
 export default function SpecialPriceHouse (props) {
12
-  const { dataSource } = props
13
-  const [leftTime] = useTimer(dataSource)
12
+  const { List } = props
13
+  const [leftTime] = useTimer(List)
14
 
14
 
15
   const handleMore = () => {
15
   const handleMore = () => {
16
     Taro.navigateTo({ url: '/pages/index/specialPriceHouse/index' })
16
     Taro.navigateTo({ url: '/pages/index/specialPriceHouse/index' })
17
   }
17
   }
18
 
18
 
19
-  const len = dataSource ? dataSource.length : 0
19
+  const len = List ? List.length : 0
20
 
20
 
21
-  return len > 0 && (
21
+  return len > 0 ? (
22
     <view className='components SpecialPriceHouse'>
22
     <view className='components SpecialPriceHouse'>
23
       <view className='Title flex-h'>
23
       <view className='Title flex-h'>
24
         <view className='flex-item'>
24
         <view className='flex-item'>
32
       <view className='List'>
32
       <view className='List'>
33
         <ScrollView scrollX>
33
         <ScrollView scrollX>
34
           {
34
           {
35
-            dataSource.map((item, index) => (
35
+            List.map((item, index) => (
36
               <view className='ListItem' key={`List-${index}`}>
36
               <view className='ListItem' key={`List-${index}`}>
37
                 <text className='Tips'>{`${toW(item.thriftPrice)}`}</text>
37
                 <text className='Tips'>{`${toW(item.thriftPrice)}`}</text>
38
                 <view className='Price'>
38
                 <view className='Price'>
49
       </view>
49
       </view>
50
 
50
 
51
     </view>
51
     </view>
52
-  )
52
+  ) : null
53
 }
53
 }

+ 25
- 67
src/pages/index/buildingDetail/index.jsx Vedi File

20
 import Pictures from './components/Pictures/index'
20
 import Pictures from './components/Pictures/index'
21
 
21
 
22
 export default withLayout((props) => {
22
 export default withLayout((props) => {
23
+  const { id } = props.router.params
23
 
24
 
24
-  const user = useSelector(state => state.user)
25
-  const [PersonId, setPersonId] = useState(null)
26
   const [DetailInfo, setDetailInfo] = useState({})
25
   const [DetailInfo, setDetailInfo] = useState({})
27
   const [ActivityList, setActivityList] = useState([])
26
   const [ActivityList, setActivityList] = useState([])
28
   const [PictureList, setPictureList] = useState([])
27
   const [PictureList, setPictureList] = useState([])
29
   const [NewsList, setNewsList] = useState([])
28
   const [NewsList, setNewsList] = useState([])
30
-  const [LiveList, setLiveList] = useState([])
31
-  const [MapList, setMapList] = useState([])
29
+
32
   const [IsPull, setPull] = useState(false)
30
   const [IsPull, setPull] = useState(false)
33
   const [PullTimer, setPullTimer] = useState(null)
31
   const [PullTimer, setPullTimer] = useState(null)
34
 
32
 
35
   useEffect(() => {
33
   useEffect(() => {
36
-    if (user?.userInfo?.person?.personId) {
37
-      setPersonId(user.userInfo.person.personId)
38
-    }
39
-  }, [user])
40
-
41
-  useEffect(() => {
42
-    if (PersonId) {
43
-      GetBuildingDetail()
44
-      GetProjectTrendList()
45
-      GetActivityList()
46
-      GetLiveList()
47
-      GetNewsList()
48
-    }
49
-  }, [PersonId])
50
-
51
-  useEffect(() => {
52
-    if (DetailInfo.buildingApartment) {
53
-      const List = DetailInfo.buildingApartment.filter(item => item.apartmentType === 'photo')
54
-      setPictureList(List.filter(item => item.buildingImgList.length > 0))
55
-    }
56
-    if(DetailInfo.mapJson) {
57
-      setMapList(JSON.parse(DetailInfo.mapJson))
58
-    }
59
-  }, [DetailInfo])
60
-
61
-  const GetBuildingDetail = () => { // 获取楼盘信息
62
-    fetch({ url: `${API_ITEMS_DETAIL}/${props.router.params.id}`, method: 'get' }).then((res) => {
34
+    // 获取楼盘信息
35
+    fetch({ url: `${API_ITEMS_DETAIL}/${id}` }).then((res) => {
63
       setDetailInfo(res || {})
36
       setDetailInfo(res || {})
37
+      
38
+      if (res?.buildingApartment) {
39
+        const List = res.buildingApartment.filter(item => item.apartmentType === 'photo')
40
+        setPictureList(List.filter(item => item.buildingImgList.length > 0))
41
+      }
64
     })
42
     })
65
-  }
66
 
43
 
67
-  const GetProjectTrendList = () => { // 获取项目动态
68
-    fetch({ url: API_PROJECT_TREND_LIST, method: 'get' }).then((res) => {
69
-      console.log(res)
44
+    // 获取资讯列表
45
+    fetch({ url: API_NEWS_LIST, params: { buildingId: id, pageSize: 2, pageNum: 1 } }).then((res) => {
46
+      setNewsList(res.records || [])
70
     })
47
     })
71
-  }
48
+    GetActivityList()
49
+  }, [id])
72
 
50
 
73
   const GetActivityList = () => { // 获取活动列表
51
   const GetActivityList = () => { // 获取活动列表
74
     fetch({ url: `${API_ACTIVITY_GROUP}?buildingId=${props.router.params.id}`, method: 'get' }).then((res) => {
52
     fetch({ url: `${API_ACTIVITY_GROUP}?buildingId=${props.router.params.id}`, method: 'get' }).then((res) => {
77
     })
55
     })
78
   }
56
   }
79
 
57
 
80
-  const GetLiveList = () => { // 获取直播列表
81
-    fetch({ url: `${API_LIVE_LIST}?buildingId=${props.router.params.id}`, method: 'get' }).then((res) => {
82
-      let ResArr = res.records.slice(0, 2)
83
-      if (ResArr.length === 1) {
84
-        ResArr.push({})
85
-      }
86
-      setLiveList(ResArr || [])
87
-    })
88
-  }
89
-
90
-  const GetNewsList = () => { // 获取资讯列表
91
-    fetch({ url: `${API_NEWS_LIST}?buildingId=${props.router.params.id}&pageSize=2&pageNum=1`, method: 'get' }).then((res) => {
92
-      let ResArr = res.records.slice(0, 2)
93
-      if (ResArr.length === 1) {
94
-        ResArr.push({})
95
-      }
96
-      setNewsList(ResArr || [])
97
-    })
98
-  }
99
-
100
   const PageRefresh = () => { // 页面下拉刷新回调
58
   const PageRefresh = () => { // 页面下拉刷新回调
101
     setPull(true)
59
     setPull(true)
102
   }
60
   }
137
 
95
 
138
                 {/* 特价房源 */}
96
                 {/* 特价房源 */}
139
                 <view className='SpecialPriceHouse' style={{minHeight: 0}}>
97
                 <view className='SpecialPriceHouse' style={{minHeight: 0}}>
140
-                  <SpecialPriceHouse dataSource={DetailInfo?.specialRoomList}></SpecialPriceHouse>
98
+                  <SpecialPriceHouse List={DetailInfo?.specialRoomList}></SpecialPriceHouse>
141
                 </view>
99
                 </view>
142
 
100
 
143
                 {/* 项目动态 */}
101
                 {/* 项目动态 */}
144
-                <view className='ProjectDynamic'>
145
-                  <ProjectDynamic></ProjectDynamic>
102
+                <view className='ProjectDynamic' style={{minHeight: 0}}>
103
+                  <ProjectDynamic List={DetailInfo?.trendList}></ProjectDynamic>
146
                 </view>
104
                 </view>
147
 
105
 
148
                 {/* 置业顾问 */}
106
                 {/* 置业顾问 */}
149
-                <view className='PropertyConsultant' style={{ display: DetailInfo?.consultants?.length ? 'block' : 'none' }}>
107
+                <view className='PropertyConsultant' style={{minHeight: 0}}>
150
                   <PropertyConsultant List={DetailInfo?.consultants}></PropertyConsultant>
108
                   <PropertyConsultant List={DetailInfo?.consultants}></PropertyConsultant>
151
                 </view>
109
                 </view>
152
 
110
 
153
                 {/* 位置及周边 */}
111
                 {/* 位置及周边 */}
154
-                <view className='Periphery'>
155
-                  <Periphery List={MapList} Info={DetailInfo}></Periphery>
112
+                <view className='Periphery' style={{minHeight: 0}}>
113
+                  <Periphery Info={DetailInfo}></Periphery>
156
                 </view>
114
                 </view>
157
 
115
 
158
                 {/* 户型介绍 */}
116
                 {/* 户型介绍 */}
159
-                <view className='HouseTypeIntro'>
117
+                <view className='HouseTypeIntro' style={{minHeight: 0}}>
160
                   <HouseTypeIntro Info={DetailInfo?.buildingApartment}></HouseTypeIntro>
118
                   <HouseTypeIntro Info={DetailInfo?.buildingApartment}></HouseTypeIntro>
161
                 </view>
119
                 </view>
162
 
120
 
163
                 {/* 营销活动 */}
121
                 {/* 营销活动 */}
164
-                <view className='MarketingActivity' style={{ display: ActivityList.length ? 'block' : 'none' }}>
122
+                <view className='MarketingActivity' style={{minHeight: 0}}>
165
                   <MarketingActivity List={ActivityList}></MarketingActivity>
123
                   <MarketingActivity List={ActivityList}></MarketingActivity>
166
                 </view>
124
                 </view>
167
 
125
 
168
                 {/* 直播活动 */}
126
                 {/* 直播活动 */}
169
-                <view className='LivingActivity' style={{ display: LiveList.length ? 'block' : 'none' }}>
170
-                  <LivingActivity List={LiveList}></LivingActivity>
127
+                <view className='LivingActivity' style={{minHeight: 0}}>
128
+                  <LivingActivity List={DetailInfo?.liveActivityList}></LivingActivity>
171
                 </view>
129
                 </view>
172
 
130
 
173
                 {/* 新鲜资讯 */}
131
                 {/* 新鲜资讯 */}
174
-                <view className='News' style={{ display: NewsList.length ? 'block' : 'none' }}>
132
+                <view className='News' style={{minHeight: 0}}>
175
                   <News List={NewsList}></News>
133
                   <News List={NewsList}></News>
176
                 </view>
134
                 </view>
177
 
135
 

+ 3
- 0
src/pages/index/buildingInfo/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '楼盘信息'
3
+}

+ 62
- 0
src/pages/index/buildingInfo/index.jsx Vedi File

1
+import { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import { ScrollView } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import './index.scss'
6
+
7
+export default withLayout((props) => {
8
+
9
+  const [InfoList, setInfoList] = useState([
10
+    [
11
+      { name: '项目名称', value: '葛洲坝·南京中国府', key: '' },
12
+      { name: '开发商', value: '暂无', key: '' },
13
+      { name: '均价', value: '待定', key: '' },
14
+      { name: '销售状态', value: '待定', key: '' },
15
+      { name: '开盘日期', value: '2019-08-05', key: '' },
16
+      { name: '楼盘地址', value: '南京建邺区友谊街交汇处南京建邺区友谊街交汇处', key: '' },
17
+    ],
18
+    [
19
+      { name: '装修标准', value: '精装', key: '' },
20
+      { name: '物业公司', value: '葛洲坝物业', key: '' },
21
+      { name: '物业费', value: '2.0元/㎡/月', key: '' },
22
+    ],
23
+    [
24
+      { name: '容积率', value: '2.75', key: '' },
25
+      { name: '供水', value: '民水', key: '' },
26
+      { name: '供电', value: '民电', key: '' },
27
+      { name: '供暖方式', value: '自采暖', key: '' },
28
+      { name: '人车分流', value: '-', key: '' },
29
+      { name: '车位数量', value: '约1000', key: '' },
30
+      { name: '规划户数', value: '300', key: '' },
31
+      { name: '楼栋总数', value: '25', key: '' },
32
+      { name: '绿化率', value: '35.31%', key: '' },
33
+      { name: '项目说明', value: '南京建邺区友谊街交汇处南京建邺区友谊街交汇处', key: '' },
34
+      { name: '备案名', value: '暂无', key: '' },
35
+    ]
36
+  ])
37
+
38
+  return (
39
+    <view className='Page buildingInfo'>
40
+      <ScrollView scrollY>
41
+        <view className='List'>
42
+          {
43
+            InfoList.map((item, index) => (
44
+              <view key={`ListItem-${index}`}>
45
+                {
46
+                  item.map((subItem, subIndex) => (
47
+                    <view className='flex-h' key={`SubListItem-${subIndex}`}>
48
+                      <text>{subItem.name}</text>
49
+                      <view className='flex-item'>
50
+                        <text>{subItem.value}</text>
51
+                      </view>
52
+                    </view>
53
+                  ))
54
+                }
55
+              </view>
56
+            ))
57
+          }
58
+        </view>
59
+      </ScrollView>
60
+    </view>
61
+  )
62
+})

+ 46
- 0
src/pages/index/buildingInfo/index.scss Vedi File

1
+.Page.buildingInfo {
2
+  background: #f8f8f8;
3
+  width: 100%;
4
+  height: 100%;
5
+  > scroll-view {
6
+    width: 100%;
7
+    height: 100%;
8
+    .List {
9
+      position: relative;
10
+      overflow: hidden;
11
+      >view {
12
+        position: relative;
13
+        overflow: hidden;
14
+        background: #fff;
15
+        margin-top: 20px;
16
+        padding: 0 40px;
17
+        &:first-child {
18
+          margin-top: 0;
19
+        }
20
+        >view {
21
+          align-items: center;
22
+          border-top: 2px solid rgba(0, 0, 0, 0.08);
23
+          &:first-child {
24
+            border-top: none;
25
+          }
26
+          >text {
27
+            font-size: 30px;
28
+            color: #999;
29
+            padding: 36px 0;
30
+            min-width: 120px;
31
+            text-align: right;
32
+            margin-right: 80px;
33
+          }
34
+          >view {
35
+            >text {
36
+              display: block;
37
+              font-size: 32px;
38
+              color: #333;
39
+              line-height: 44px;
40
+            }
41
+          }
42
+        }
43
+      }
44
+    }
45
+  }
46
+}

+ 3
- 0
src/pages/index/buildingPictures/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '相册图片'
3
+}

+ 70
- 0
src/pages/index/buildingPictures/index.jsx Vedi File

1
+import { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import './index.scss'
6
+
7
+export default withLayout((props) => {
8
+
9
+  const [IsPull, setPull] = useState(false)
10
+  const [PullTimer, setPullTimer] = useState(null)
11
+  const [NavList, setNavList] = useState([
12
+    { name: '效果图', id: 1 },
13
+    { name: '实景图', id: 2 },
14
+    { name: '户型图', id: 3 },
15
+  ])
16
+  const [CurrentNavId, setCurrentNavId] = useState(1)
17
+  const [PageList, setPageList] = useState([{}, {}, {}, {}, {}, {}])
18
+
19
+  const PageRefresh = () => { // 页面下拉刷新回调
20
+    setPull(true)
21
+  }
22
+
23
+  useEffect(() => { // 下拉刷新触发
24
+    if (IsPull) {
25
+      clearTimeout(PullTimer)
26
+      setPullTimer(setTimeout(() => {
27
+        setPull(false)
28
+      }, 2000))
29
+    }
30
+  }, [IsPull])
31
+
32
+  const CutNav = (id) => {
33
+    return () => {
34
+      setCurrentNavId(id)
35
+    }
36
+  }
37
+
38
+  return (
39
+    <view className='Page buildingPictures flex-v'>
40
+      <view className='Tab flex-h'>
41
+        {
42
+          NavList.map((item, index) => (
43
+            <view className={item.id === CurrentNavId ? 'active flex-item' : 'flex-item'} key={`NavItem-${index}`}>
44
+              <text onClick={CutNav(item.id)}>{item.name}</text>
45
+            </view>
46
+          ))
47
+        }
48
+      </view>
49
+      <view className='flex-item'>
50
+        <view>
51
+          <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
52
+            <view className='List'>
53
+              {
54
+                PageList.map((item, index) => (
55
+                  <view key={`ListItem-${index}`}>
56
+                    <view className='Img'>
57
+                      <Image mode='scaleToFill' className='centerLabel' src={null}></Image>
58
+                    </view>
59
+                    <text>120㎡样板间</text>
60
+                  </view>
61
+                ))
62
+              }
63
+              <text className='Tips'>已经到底了~</text>
64
+            </view>
65
+          </ScrollView>
66
+        </view>
67
+      </view>
68
+    </view>
69
+  )
70
+})

+ 100
- 0
src/pages/index/buildingPictures/index.scss Vedi File

1
+.Page.buildingPictures {
2
+  width: 100%;
3
+  height: 100%;
4
+  >.Tab {
5
+    position: relative;
6
+    overflow: hidden;
7
+    z-index: 2;
8
+    background: #fff;
9
+    box-shadow: 0 0 6px 6px rgba(0, 0, 0, 0.03);
10
+    align-items: center;
11
+    padding: 0 30px;
12
+    >view {
13
+      padding: 22px 0 26px;
14
+      text-align: center;
15
+      font-size: 0;
16
+      position: relative;
17
+      overflow: hidden;
18
+      &.active {
19
+        >text {
20
+          font-size: 34px;
21
+          color: #1A3B83;
22
+          position: relative;
23
+          overflow: visible;
24
+          &::after {
25
+            content: '';
26
+            display: block;
27
+            width: 100%;
28
+            position: absolute;
29
+            left: 0;
30
+            bottom: -26px;
31
+            height: 2px;
32
+            background: #1A3B83;
33
+          }
34
+        }
35
+      }
36
+      >text {
37
+        display: inline-block;
38
+        font-size: 28px;
39
+        color: #666;
40
+        line-height: 40px;
41
+      }
42
+    }
43
+  }
44
+  > .flex-item {
45
+    position: relative;
46
+    overflow: hidden;
47
+    > view {
48
+      width: 100%;
49
+      position: absolute;
50
+      left: 0;
51
+      top: 0;
52
+      bottom: 0;
53
+      overflow: hidden;
54
+      > scroll-view {
55
+        width: 100%;
56
+        height: 100%;
57
+        .List {
58
+          position: relative;
59
+          overflow: hidden;
60
+          padding: 0 30px 0 12px;
61
+          font-size: 0;
62
+          >view {
63
+            display: inline-block;
64
+            vertical-align: middle;
65
+            width: 50%;
66
+            box-sizing: border-box;
67
+            border-left: 18px solid transparent;
68
+            position: relative;
69
+            overflow: hidden;
70
+            margin-top: 18px;
71
+            >.Img {
72
+              width: 100%;
73
+              padding-bottom: 75%;
74
+              position: relative;
75
+              overflow: hidden;
76
+              background: #eee;
77
+              border-radius: 16px;
78
+              >image {
79
+                width: 100%;
80
+                height: 100%;
81
+              }
82
+            }
83
+            >text {
84
+              display: block;
85
+              white-space: nowrap;
86
+              overflow: hidden;
87
+              text-overflow: ellipsis;
88
+              font-size: 28px;
89
+              color: #353535;
90
+              line-height: 40px;
91
+              margin-top: 20px;
92
+              height: 40px;
93
+              text-align: center;
94
+            }
95
+          }
96
+        }
97
+      }
98
+    }
99
+  }
100
+}

+ 3
- 0
src/pages/index/buildingPropertyConsultant/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '置业顾问'
3
+}

+ 73
- 0
src/pages/index/buildingPropertyConsultant/index.jsx Vedi File

1
+import { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import './index.scss'
6
+
7
+export default withLayout((props) => {
8
+
9
+  const [IsPull, setPull] = useState(false)
10
+  const [PullTimer, setPullTimer] = useState(null)
11
+  const [List, setList] = useState([
12
+    { name: '乖戾', icon: '', time: '11:49' },
13
+    { name: '乖戾', icon: '', time: '11:49' },
14
+    { name: '乖戾', icon: '', time: '11:49' },
15
+    { name: '乖戾', icon: '', time: '11:49' },
16
+    { name: '乖戾', icon: '', time: '11:49' },
17
+    { name: '乖戾', icon: '', time: '11:49' },
18
+  ])
19
+
20
+  const PageRefresh = () => { // 页面下拉刷新回调
21
+    setPull(true)
22
+  }
23
+
24
+  useEffect(() => { // 下拉刷新触发
25
+    if (IsPull) {
26
+      clearTimeout(PullTimer)
27
+      setPullTimer(setTimeout(() => {
28
+        setPull(false)
29
+      }, 2000))
30
+    }
31
+  }, [IsPull])
32
+
33
+  return (
34
+    <view className='Page buildingPropertyConsultant'>
35
+      <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
36
+        <text className='TopTips'>有任何买卖房屋的问题,欢迎随时咨询</text>
37
+        <view className='List'>
38
+          {
39
+            List.map((item, index) => (
40
+              <view key={`ListItem-${index}`}>
41
+
42
+                <view className='flex-h'>
43
+
44
+                  <view className='Icon'>
45
+                    <Image mode='scaleToFill' src={item.icon || null}></Image>
46
+                  </view>
47
+
48
+                  <view className='flex-item'>
49
+                    <view className='Name'>
50
+                      <text>陆毅</text>
51
+                      <Image mode='heightFix' src={require('@/assets/index-icon17.png')}></Image>
52
+                    </view>
53
+                    <text>13045678976</text>
54
+                  </view>
55
+
56
+                  <text className='iconfont icon-liaotian'></text>
57
+                  <text className='iconfont icon-dianhua'></text>
58
+                  
59
+                </view>
60
+
61
+                <view className='Desc'>
62
+                  <text>好评经纪人,熟悉楼盘特色</text>
63
+                </view>
64
+
65
+              </view>
66
+            ))
67
+          }
68
+          <text className='BottomTips'>已经到底了~</text>
69
+        </view>
70
+      </ScrollView>
71
+    </view>
72
+  )
73
+})

+ 109
- 0
src/pages/index/buildingPropertyConsultant/index.scss Vedi File

1
+.Page.buildingPropertyConsultant {
2
+  width: 100%;
3
+  height: 100%;
4
+  > scroll-view {
5
+    width: 100%;
6
+    height: 100%;
7
+    .TopTips {
8
+      display: block;
9
+      padding: 0 30px;
10
+      font-size: 28px;
11
+      color: rgba(0, 0, 0, 0.31);
12
+      line-height: 80px;
13
+      background: #F5F5F5;
14
+    }
15
+    .List {
16
+      position: relative;
17
+      overflow: hidden;
18
+      padding: 0 30px;
19
+      >view {
20
+        position: relative;
21
+        overflow: hidden;
22
+        padding: 20px 0 40px;
23
+        border-bottom: 2px solid rgba(0, 0, 0, 0.08);
24
+        margin-top: 20px;
25
+        &:first-child {
26
+          margin-top: 0;
27
+        }
28
+        >.flex-h {
29
+          align-items: center;
30
+          >.Icon {
31
+            width: 92px;
32
+            height: 92px;
33
+            border-radius: 100%;
34
+            background: #eee;
35
+            position: relative;
36
+            overflow: hidden;
37
+            margin-right: 20px;
38
+            >image {
39
+              width: 100%;
40
+              height: 100%;
41
+            }
42
+          }
43
+          >.flex-item {
44
+            >.Name {
45
+              font-size: 0;
46
+              white-space: nowrap;
47
+              >text {
48
+                display: inline-block;
49
+                vertical-align: middle;
50
+                font-size: 32px;
51
+                color: #333;
52
+                line-height: 44px;
53
+              }
54
+              >image {
55
+                height: 32px;
56
+                margin-left: 20px;
57
+                display: inline-block;
58
+                vertical-align: middle;
59
+              }
60
+            }
61
+            >text {
62
+              display: block;
63
+              font-size: 28px;
64
+              color: rgba(0, 0, 0, 0.44);
65
+              line-height: 40px;
66
+              margin-top: 8px;
67
+            }
68
+          }
69
+          >text {
70
+            font-size: 50px;
71
+            line-height: 80px;
72
+            width: 80px;
73
+            text-align: center;
74
+            border-radius: 100%;
75
+            background: rgba(251, 171, 87, 0.12);
76
+            color: #FBAB57;
77
+            margin-left: 40px;
78
+            &:last-child {
79
+              background: rgba(129, 188, 75, 0.12);
80
+              color: #81BC4B;
81
+            }
82
+          }
83
+        }
84
+        >.Desc {
85
+          position: relative;
86
+          overflow: hidden;
87
+          background: #F9F9F9;
88
+          padding: 24px 20px;
89
+          margin-top: 20px;
90
+          >text {
91
+            display: block;
92
+            font-size: 28px;
93
+            color: rgba(0, 0, 0, 0.36);
94
+            line-height: 40px;
95
+          }
96
+        }
97
+      }
98
+      >.BottomTips {
99
+        display: block;
100
+        text-align: center;
101
+        font-size: 28px;
102
+        color: #999;
103
+        line-height: 40px;
104
+        margin-top: 20px;
105
+        margin-bottom: 40px;
106
+      }
107
+    }
108
+  }
109
+}

+ 3
- 0
src/pages/index/buildingRules/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '报备规则'
3
+}

+ 46
- 0
src/pages/index/buildingRules/index.jsx Vedi File

1
+
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import './index.scss'
6
+
7
+export default withLayout(() => {
8
+
9
+  return (
10
+    <view className='Page buildingRules'>
11
+      <ScrollView scroll-y>
12
+        <view className='Content'>
13
+          <Image mode='widthFix' src={require(`@/assets/index-icon18.jpg`)}></Image>
14
+
15
+          <view className='Title'>
16
+            <view>
17
+              <text className='iconfont icon-shoucang'></text>
18
+              <text>报备规则</text>
19
+              <text className='iconfont icon-shoucang'></text>
20
+            </view>
21
+          </view>
22
+
23
+          <view className='Text'>
24
+            <text>南京城际空间站渠道报备客户后,15天内客户到访并确认到访单即客户有效,客户成交相关佣金请咨询驻场管理或所属渠道经理。</text>
25
+            <text>南京城际空间站渠道报备客户后,15天内客户到访并确认到访单即客户有效,客户成交相关佣金请咨询驻场管理或所属渠道经理。</text>
26
+            <text>南京城际空间站渠道报备客户后,15天内客户到访并确认到访单即客户有效,客户成交相关佣金请咨询驻场管理或所属渠道经理。</text>
27
+          </view>
28
+
29
+          <view className='Bottom'>
30
+            <view>
31
+              <view>
32
+                <text className='iconfont icon-shengming'></text>
33
+                <text>免责声明</text>
34
+              </view>
35
+              <view>
36
+                <text>&emsp;&emsp;以上价格仅供参考,具体一房一价的信息以售楼处展示为准。房屋位置交通、医疗、教育、商业等配套信息,来源于第三方不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。本平台对项目周边文化教育的介绍旨在提供相关信息1 意味着信息发布方对就学安排作出承诺。相关教育资首页信息存在调整的可能,应以政府教育主管部门门及办学颁布的政策规定为准。详情请仔细阅读</text>
37
+                <text className='active'>《新联家使用免责条款》</text>
38
+              </view>
39
+            </view>
40
+          </view>
41
+
42
+        </view>
43
+      </ScrollView>
44
+    </view>
45
+  )
46
+})

+ 92
- 0
src/pages/index/buildingRules/index.scss Vedi File

1
+.Page.buildingRules {
2
+  width: 100%;
3
+  height: 100%;
4
+  > scroll-view {
5
+    width: 100%;
6
+    height: 100%;
7
+    .Content {
8
+      position: relative;
9
+      overflow: hidden;
10
+      > image {
11
+        width: 100%;
12
+        display: block;
13
+      }
14
+      > .Title {
15
+        font-size: 0;
16
+        white-space: nowrap;
17
+        text-align: center;
18
+        margin-top: 42px;
19
+        position: relative;
20
+        overflow: hidden;
21
+        &::after {
22
+          content: "";
23
+          width: 80%;
24
+          height: 2px;
25
+          display: block;
26
+          position: absolute;
27
+          z-index: 1;
28
+          left: 10%;
29
+          top: 14px;
30
+          background: #333;
31
+        }
32
+        > view {
33
+          display: inline-block;
34
+          font-size: 0;
35
+          white-space: nowrap;
36
+          position: relative;
37
+          z-index: 2;
38
+          background: #fff;
39
+          padding: 0 10px;
40
+          > text {
41
+            display: inline-block;
42
+            vertical-align: middle;
43
+            font-size: 30px;
44
+            color: #333;
45
+            line-height: 1;
46
+            margin-left: 20px;
47
+            &:first-child {
48
+              margin-left: 0;
49
+            }
50
+          }
51
+        }
52
+      }
53
+      > .Text {
54
+        padding: 0 30px;
55
+        position: relative;
56
+        overflow: hidden;
57
+        margin-top: 30px;
58
+        > text {
59
+          display: block;
60
+          font-size: 30px;
61
+          color: #333;
62
+          line-height: 48px;
63
+          text-indent: 2em;
64
+        }
65
+      }
66
+      >.Bottom {
67
+        padding: 0 30px 30px;
68
+        position: relative;
69
+        overflow: hidden;
70
+        margin-top: 100px;
71
+        >view {
72
+          padding: 30px;
73
+          position: relative;
74
+          overflow: hidden;
75
+          background: #F8F8F8;
76
+          border-radius: 8px;
77
+          >view {
78
+            >text {
79
+              font-size: 20px;
80
+              color: #999;
81
+              line-height: 30px;
82
+              letter-spacing: 2px;
83
+              &.active {
84
+                color: #193C83;
85
+              }
86
+            }
87
+          }
88
+        }
89
+      }
90
+    }
91
+  }
92
+}

+ 3
- 0
src/pages/index/buildingTakeLook/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '一键带看'
3
+}

+ 18
- 0
src/pages/index/buildingTakeLook/index.jsx Vedi File

1
+
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import './index.scss'
6
+
7
+export default withLayout(() => {
8
+
9
+  return (
10
+    <view className='Page buildingTakeLook'>
11
+      <ScrollView scroll-y>
12
+        <view className='Content'>
13
+          
14
+        </view>
15
+      </ScrollView>
16
+    </view>
17
+  )
18
+})

+ 12
- 0
src/pages/index/buildingTakeLook/index.scss Vedi File

1
+.Page.buildingTakeLook {
2
+  width: 100%;
3
+  height: 100%;
4
+  > scroll-view {
5
+    width: 100%;
6
+    height: 100%;
7
+    .Content {
8
+      position: relative;
9
+      overflow: hidden;
10
+    }
11
+  }
12
+}

+ 3
- 0
src/pages/index/buildingViewsRecords/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '围观记录'
3
+}

+ 55
- 0
src/pages/index/buildingViewsRecords/index.jsx Vedi File

1
+import { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import { ScrollView, Image } from '@tarojs/components'
4
+import '@/assets/css/iconfont.css'
5
+import './index.scss'
6
+
7
+export default withLayout((props) => {
8
+
9
+  const [IsPull, setPull] = useState(false)
10
+  const [PullTimer, setPullTimer] = useState(null)
11
+  const [List, setList] = useState([
12
+    { name: '乖戾', icon: '', time: '11:49' },
13
+    { name: '乖戾', icon: '', time: '11:49' },
14
+    { name: '乖戾', icon: '', time: '11:49' },
15
+    { name: '乖戾', icon: '', time: '11:49' },
16
+    { name: '乖戾', icon: '', time: '11:49' },
17
+    { name: '乖戾', icon: '', time: '11:49' },
18
+  ])
19
+
20
+  const PageRefresh = () => { // 页面下拉刷新回调
21
+    setPull(true)
22
+  }
23
+
24
+  useEffect(() => { // 下拉刷新触发
25
+    if (IsPull) {
26
+      clearTimeout(PullTimer)
27
+      setPullTimer(setTimeout(() => {
28
+        setPull(false)
29
+      }, 2000))
30
+    }
31
+  }, [IsPull])
32
+
33
+  return (
34
+    <view className='Page buildingViewsRecords'>
35
+      <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
36
+        <view className='List'>
37
+          {
38
+            List.map((item, index) => (
39
+              <view className='flex-h' key={`ListItem-${index}`}>
40
+                <view className='Icon'>
41
+                  <Image mode='scaleToFill' src={item.icon || null}></Image>
42
+                </view>
43
+                <view className='flex-item'>
44
+                  <text>{item.name}</text>
45
+                </view>
46
+                <text>{item.time}</text>
47
+              </view>
48
+            ))
49
+          }
50
+          <text className='Tips'>仅展示最近50条围观纪录</text>
51
+        </view>
52
+      </ScrollView>
53
+    </view>
54
+  )
55
+})

+ 54
- 0
src/pages/index/buildingViewsRecords/index.scss Vedi File

1
+.Page.buildingViewsRecords {
2
+  width: 100%;
3
+  height: 100%;
4
+  > scroll-view {
5
+    width: 100%;
6
+    height: 100%;
7
+    .List {
8
+      position: relative;
9
+      overflow: hidden;
10
+      padding: 0 30px;
11
+      >view {
12
+        position: relative;
13
+        overflow: hidden;
14
+        padding: 28px 0;
15
+        border-bottom: 2px solid rgba(0, 0, 0, 0.08);
16
+        align-items: center;
17
+        >.Icon {
18
+          width: 124px;
19
+          height: 124px;
20
+          position: relative;
21
+          overflow: hidden;
22
+          border-radius: 100%;
23
+          background: #eee;
24
+          margin-right: 20px;
25
+          >image {
26
+            width: 100%;
27
+            height: 100%;
28
+          }
29
+        }
30
+        >.flex-item {
31
+          >text {
32
+            display: block;
33
+            font-size: 32px;
34
+            white-space: nowrap;
35
+            color: #333;
36
+          }
37
+        }
38
+        >text {
39
+          font-size: 24px;
40
+          color: #999;
41
+        }
42
+      }
43
+      >.Tips {
44
+        display: block;
45
+        text-align: center;
46
+        font-size: 24px;
47
+        color: #999;
48
+        line-height: 34px;
49
+        margin-top: 40px;
50
+        margin-bottom: 40px;
51
+      }
52
+    }
53
+  }
54
+}

+ 30
- 0
src/routes.js Vedi File

67
     pkg: 'main',
67
     pkg: 'main',
68
     type: 'building',
68
     type: 'building',
69
   },
69
   },
70
+  {
71
+    name: '楼盘信息',
72
+    page: 'pages/index/buildingInfo/index',
73
+    pkg: 'main',
74
+    type: 'building',
75
+  },
76
+  {
77
+    name: '围观记录',
78
+    page: 'pages/index/buildingViewsRecords/index',
79
+    pkg: 'main',
80
+    type: 'building',
81
+  },
82
+  {
83
+    name: '置业顾问',
84
+    page: 'pages/index/buildingPropertyConsultant/index',
85
+    pkg: 'main',
86
+    type: 'building',
87
+  },
88
+  {
89
+    name: '相册图片',
90
+    page: 'pages/index/buildingPictures/index',
91
+    pkg: 'main',
92
+    type: 'building',
93
+  },
94
+  {
95
+    name: '报备规则',
96
+    page: 'pages/index/buildingRules/index',
97
+    pkg: 'main',
98
+    type: 'building',
99
+  },
70
   {
100
   {
71
     name: '品牌列表',
101
     name: '品牌列表',
72
     page: 'pages/index/brandList/index',
102
     page: 'pages/index/brandList/index',