Browse Source

静态页面

1002884655 3 years ago
parent
commit
245728b41c

+ 8
- 2
src/components/ProjectItemCard/index.jsx View File

17
     <view className='components ProjectItemCard'>
17
     <view className='components ProjectItemCard'>
18
       <view className='Img' onClick={() => goto(Data)}>
18
       <view className='Img' onClick={() => goto(Data)}>
19
         <Image mode='scaleToFill' src={getImgURL(Data?.buildingListImg?.length ? Data.buildingListImg[0].url : null)} className='centerLabel'></Image>
19
         <Image mode='scaleToFill' src={getImgURL(Data?.buildingListImg?.length ? Data.buildingListImg[0].url : null)} className='centerLabel'></Image>
20
-        <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
21
-        <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
20
+          {
21
+            Data.panoramaList.length > 0 &&
22
+            <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
23
+          }
24
+          {
25
+            Data.videoUrl !== null &&
26
+            <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
27
+          }
22
       </view>
28
       </view>
23
       <view className='Name flex-h' onClick={() => goto(Data)}>
29
       <view className='Name flex-h' onClick={() => goto(Data)}>
24
         <view className='flex-item'>
30
         <view className='flex-item'>

+ 1
- 1
src/components/ProjectItemCard/style.scss View File

22
       z-index: 2;
22
       z-index: 2;
23
       bottom: 10px;
23
       bottom: 10px;
24
       left: 18px;
24
       left: 18px;
25
-      &.Vr {
25
+      &:nth-child(3) {
26
         left: 58px;
26
         left: 58px;
27
       }
27
       }
28
     }
28
     }

+ 8
- 2
src/components/ProjectListItem/index.jsx View File

13
       <view className='Img'>
13
       <view className='Img'>
14
         <view>
14
         <view>
15
           <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.buildingListImg?.length ? Data.buildingListImg[0].url : null)} />
15
           <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.buildingListImg?.length ? Data.buildingListImg[0].url : null)} />
16
-          <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
17
-          <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
16
+          {
17
+            Data.panoramaList.length > 0 &&
18
+            <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
19
+          }
20
+          {
21
+            Data.videoUrl !== null &&
22
+            <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
23
+          }
18
         </view>
24
         </view>
19
       </view>
25
       </view>
20
       <view className='flex-item'>
26
       <view className='flex-item'>

+ 1
- 1
src/components/ProjectListItem/index.scss View File

26
         z-index: 2;
26
         z-index: 2;
27
         bottom: 10px;
27
         bottom: 10px;
28
         left: 10px;
28
         left: 10px;
29
-        &.Vr {
29
+        &:nth-child(3) {
30
           left: 50px;
30
           left: 50px;
31
         }
31
         }
32
       }
32
       }

+ 32
- 10
src/pages/index/buildingAround/index.jsx View File

15
   const [loc, setLoc] = useState([])
15
   const [loc, setLoc] = useState([])
16
   const [NavList, setNavList] = useState([])
16
   const [NavList, setNavList] = useState([])
17
   const [CurrentNavId, setCurrentNavId] = useState(1)
17
   const [CurrentNavId, setCurrentNavId] = useState(1)
18
-  const [List, setList] = useState([{}, {}, {}, {}, {}, {}, {}, {}, {}])
19
-  const [OtherList, setOtherList] = useState([{}, {}, {}, {}, {}, {}, {}, {}, {}])
18
+  const [List, setList] = useState([])
19
+  const [OtherList, setOtherList] = useState([])
20
   const [markers, setMarkers] = useState([])
20
   const [markers, setMarkers] = useState([])
21
   const mapCtx = useRef()
21
   const mapCtx = useRef()
22
 
22
 
61
     if (mapCtx.current) {
61
     if (mapCtx.current) {
62
       // 缩放地图,显示所有 marker
62
       // 缩放地图,显示所有 marker
63
       const points = [
63
       const points = [
64
-        {longitude: center.longitude, latitude: center.latitude},
65
-        {longitude: marker.longitude, latitude: marker.latitude}
64
+        { longitude: center.longitude, latitude: center.latitude },
65
+        { longitude: marker.longitude, latitude: marker.latitude }
66
       ]
66
       ]
67
       mapCtx.current.includePoints({ points, padding: [32] })
67
       mapCtx.current.includePoints({ points, padding: [32] })
68
     }
68
     }
98
         }])
98
         }])
99
         setDetailInfo(res || {})
99
         setDetailInfo(res || {})
100
         if (res.mapJson) {
100
         if (res.mapJson) {
101
-          const pois = JSON.parse(res.mapJson).map(poi => ({...poi, data: JSON.parse(poi.data)}))
101
+          const pois = JSON.parse(res.mapJson).map(poi => ({ ...poi, data: JSON.parse(poi.data) }))
102
           setNavList(pois)
102
           setNavList(pois)
103
           setCurrentNavId(pois[0].key)
103
           setCurrentNavId(pois[0].key)
104
           setList(pois[0].data)
104
           setList(pois[0].data)
105
         }
105
         }
106
-        
106
+
107
       } else {
107
       } else {
108
         Taro.showToast({
108
         Taro.showToast({
109
           title: '当前楼盘未设置位置信息',
109
           title: '当前楼盘未设置位置信息',
116
 
116
 
117
   }, [id])
117
   }, [id])
118
 
118
 
119
+  const TypeCalc = (key) => {
120
+    switch (key) {
121
+      case 'Transport':
122
+        return '交通'
123
+      case 'Mall':
124
+        return '商业'
125
+      case 'Edu':
126
+        return '学校'
127
+      case 'Hospital':
128
+        return '医院'
129
+      case 'Bank':
130
+        return '银行'
131
+      case 'Restaurant':
132
+        return '餐饮'
133
+      default:
134
+        return ''
135
+    }
136
+  }
137
+
119
   return (
138
   return (
120
     <view className='Page buildingAround'>
139
     <view className='Page buildingAround'>
121
 
140
 
153
 
172
 
154
           <view className='Nav flex-h'>
173
           <view className='Nav flex-h'>
155
             {
174
             {
156
-              NavList.map((item, index) => (
175
+              NavList.map((item) => (
157
                 <view className={item.key === CurrentNavId ? 'flex-item active' : 'flex-item'} key={item.key}>
176
                 <view className={item.key === CurrentNavId ? 'flex-item active' : 'flex-item'} key={item.key}>
158
-                  <text onClick={CutNav(item.key)}>{`${item.label}(${item.data.length})`}</text>
177
+                  <text onClick={CutNav(item.key)}>{`${TypeCalc(item.key)}(${item.data.length})`}</text>
159
                 </view>
178
                 </view>
160
               ))
179
               ))
161
             }
180
             }
175
                           <text>{item.name}</text>
194
                           <text>{item.name}</text>
176
                         </view>
195
                         </view>
177
                         <text className='iconfont icon-dingwei'></text>
196
                         <text className='iconfont icon-dingwei'></text>
178
-                        <text className='distance'>{`${item.distance}m`}</text>
197
+                        <text className='distance'>{`${item.distance || '-'}m`}</text>
179
                       </view>
198
                       </view>
180
                     ))
199
                     ))
181
                   }
200
                   }
182
                 </view>
201
                 </view>
183
-                <text>其他</text>
202
+                {
203
+                  OtherList.length > 0 &&
204
+                  <text>其他</text>
205
+                }
184
                 <view className='List'>
206
                 <view className='List'>
185
                   {
207
                   {
186
                     OtherList.map((item, index) => (
208
                     OtherList.map((item, index) => (

+ 8
- 2
src/pages/index/specialPriceHouse/index.jsx View File

97
                     <view className='InfoContent'>
97
                     <view className='InfoContent'>
98
                       <view className='Img' onClick={() => goto(item)}>
98
                       <view className='Img' onClick={() => goto(item)}>
99
                         <Image mode='scaleToFill' src={mainImg} className='centerLabel'></Image>
99
                         <Image mode='scaleToFill' src={mainImg} className='centerLabel'></Image>
100
-                        <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
101
-                        <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
100
+                        {
101
+                          item.panoramaList.length > 0 &&
102
+                          <Image mode='heightFix' className='Tips Vr' src={require('@/assets/index-icon18.png')} />
103
+                        }
104
+                        {
105
+                          item.videoUrl !== null &&
106
+                          <Image mode='heightFix' className='Tips Video' src={require('@/assets/index-icon19.png')} />
107
+                        }
102
                       </view>
108
                       </view>
103
                       <view className='Name flex-h' onClick={() => goto(item)}>
109
                       <view className='Name flex-h' onClick={() => goto(item)}>
104
                         <view className='flex-item'>
110
                         <view className='flex-item'>

+ 1
- 1
src/pages/index/specialPriceHouse/index.scss View File

90
                 z-index: 2;
90
                 z-index: 2;
91
                 bottom: 10px;
91
                 bottom: 10px;
92
                 left: 18px;
92
                 left: 18px;
93
-                &.Vr {
93
+                &:nth-child(3) {
94
                   left: 58px;
94
                   left: 58px;
95
                 }
95
                 }
96
               }
96
               }

+ 2
- 2
src/pages/mine/components/ResidentListItem/index.jsx View File

26
           <text className='Status'>已报备</text>
26
           <text className='Status'>已报备</text>
27
         } */}
27
         } */}
28
         {
28
         {
29
-          data.type === 'report' && (data.channelStatus - 0) === 1 &&
29
+          data.customerStatus - 0 === 1 &&
30
           <text className='Status' onClick={() => { Taro.navigateTo({ url: `/pages/mine/sureVisit/index?id=${data.id}` }) }}>到访确认</text>
30
           <text className='Status' onClick={() => { Taro.navigateTo({ url: `/pages/mine/sureVisit/index?id=${data.id}` }) }}>到访确认</text>
31
         }
31
         }
32
       </view>
32
       </view>
75
       <view className='flex-h'>
75
       <view className='flex-h'>
76
         <text>报备经纪:</text>
76
         <text>报备经纪:</text>
77
         <view className='flex-item'>
77
         <view className='flex-item'>
78
-          <text>{data.recommendPersonName}  {data.recommendPersonPhone}</text>
78
+          <text>{data.recommendPersonName}  {data.recommendPersonPhone}({data.type === 'customer' ? '客户' : data.consultant ? '置业顾问' : data.channelName || '经纪人'})</text>
79
         </view>
79
         </view>
80
       </view>
80
       </view>
81
       <view className='flex-h'>
81
       <view className='flex-h'>

+ 4
- 6
src/pages/mine/residentManager/index.jsx View File

50
   }, [PersonId])
50
   }, [PersonId])
51
 
51
 
52
   useEffect(() => {
52
   useEffect(() => {
53
-    if (FilterData.keywords) {
54
-      if (pageNumber === 1) {
55
-        GetPageList()
56
-      } else {
57
-        setPageNumber(1)
58
-      }
53
+    if (pageNumber === 1) {
54
+      GetPageList()
55
+    } else {
56
+      setPageNumber(1)
59
     }
57
     }
60
   }, [FilterData])
58
   }, [FilterData])
61
 
59