张延森 3 年前
父节点
当前提交
d596935cf4

+ 28
- 0
src/components/Disclaimer/index.jsx 查看文件

1
+import React from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { View, Text } from '@tarojs/components'
4
+
5
+import './style.scss'
6
+
7
+export default (props) => {
8
+  const gotoFeedback = () => {
9
+    Taro.navigateTo({ url: '/pages/mine/feedBack/index' })
10
+  }
11
+
12
+  return (
13
+    <View className='disclaimer-card' style={props.style}>
14
+      <View>
15
+        <View>
16
+          <Text className='iconfont icon-shengming'></Text>
17
+          <Text>免责声明</Text>
18
+        </View>
19
+        <View>&emsp;&emsp;本平台上所示图片、价格、房屋相关等文字信息,仅供您参考使用,不作为您决策交易的依据。
20
+          实际交易行为、权利义务、房屋信息均以您与开发商签订的商品房买卖合同为准。
21
+          若您对平台上所示图片、价格、房屋相关等文字信息有异议,请点击
22
+          <Text className='active' onClick={gotoFeedback}>意见反馈</Text>
23
+          窗口,平台核实后将会做出相应调整
24
+        </View>
25
+      </View>
26
+    </View>
27
+  )
28
+}

+ 30
- 0
src/components/Disclaimer/style.scss 查看文件

1
+.disclaimer-card {
2
+  padding: 30rpx 40rpx;
3
+  background: #fff;
4
+  color: #999;
5
+  line-height: 34rpx;
6
+  letter-spacing: 2rpx;
7
+  position: relative;
8
+  overflow: hidden;
9
+  font-size: 20rpx;
10
+  box-sizing: border-box;  
11
+
12
+  & > view {
13
+    padding: 30rpx 36rpx;
14
+    background: #F8F8F8;
15
+    border-radius: 8rpx;
16
+    box-sizing: border-box;  
17
+  }
18
+
19
+  .iconfont, text {
20
+    color: #999;
21
+  }
22
+
23
+  .iconfont {
24
+    font-size: 1.1em;
25
+  }
26
+
27
+  .active {
28
+    color: #193C83;
29
+  }
30
+}

+ 5
- 21
src/pages/index/activityDetail/index.jsx 查看文件

2
 import Taro, { useDidShow, useReady } from "@tarojs/taro";
2
 import Taro, { useDidShow, useReady } from "@tarojs/taro";
3
 import withLayout from "@/layout";
3
 import withLayout from "@/layout";
4
 import {
4
 import {
5
-  Text,
6
-  View,
7
-  Picker,
8
-  Input,
9
   ScrollView,
5
   ScrollView,
10
   Image,
6
   Image,
11
   RichText,
7
   RichText,
12
 } from "@tarojs/components";
8
 } from "@tarojs/components";
13
-import "@/assets/css/iconfont.css";
14
-import "./index.scss";
9
+import Disclaimer from '@/components/Disclaimer'
10
+
15
 import {
11
 import {
16
   // addActivityShareNum,
12
   // addActivityShareNum,
17
   signupActivity,
13
   signupActivity,
22
 import { getImgURL } from "@/utils/image";
18
 import { getImgURL } from "@/utils/image";
23
 import getDateFormat from "@/utils/chatDate";
19
 import getDateFormat from "@/utils/chatDate";
24
 
20
 
21
+import "./index.scss";
22
+
25
 const activityStatusDict = {
23
 const activityStatusDict = {
26
   0: {
24
   0: {
27
     text: "立即参与",
25
     text: "立即参与",
237
               {/* <richText nodes={detail.desc} ></richText> */}
235
               {/* <richText nodes={detail.desc} ></richText> */}
238
             </view>
236
             </view>
239
 
237
 
240
-            <view className="Bottom">
241
-              <view>
242
-                <view>
243
-                  <text className="iconfont icon-shengming"></text>
244
-                  <text>免责声明</text>
245
-                </view>
246
-                <view>
247
-                  <text>
248
-                    &emsp;&emsp;以上价格仅供参考,具体一房一价的信息以售楼处展示为准。房屋位置交通、医疗、教育、商业等配套信息,来源于第三方不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。本平台对项目周边文化教育的介绍旨在提供相关信息1
249
-                    意味着信息发布方对就学安排作出承诺。相关教育资首页信息存在调整的可能,应以政府教育主管部门门及办学颁布的政策规定为准。详情请仔细阅读
250
-                  </text>
251
-                  <text className="active">《新联家使用免责条款》</text>
252
-                </view>
253
-              </view>
254
-            </view>
238
+            <Disclaimer />
255
           </view>
239
           </view>
256
         </ScrollView>
240
         </ScrollView>
257
       </view>
241
       </view>

+ 7
- 2
src/pages/index/activityList/index.jsx 查看文件

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
+import { useSelector } from 'react-redux'
2
 import { useDidShow,useRouter } from '@tarojs/taro'
3
 import { useDidShow,useRouter } from '@tarojs/taro'
3
 import { ScrollView } from '@tarojs/components'
4
 import { ScrollView } from '@tarojs/components'
4
-import { useSelector } from 'react-redux'
5
 import { queryActivityList, getActNewList } from '@/services/activity'
5
 import { queryActivityList, getActNewList } from '@/services/activity'
6
-import './index.scss'
6
+import Disclaimer from '@/components/Disclaimer'
7
+
7
 import ActivityListItem from '../components/ActivityListItem/index'
8
 import ActivityListItem from '../components/ActivityListItem/index'
8
 
9
 
10
+import './index.scss'
11
+
9
 export default function MyCollectForActivity (props) {
12
 export default function MyCollectForActivity (props) {
10
  const router=useRouter()
13
  const router=useRouter()
11
 
14
 
65
             <text>已经到底了~</text>
68
             <text>已经到底了~</text>
66
           </view>
69
           </view>
67
         </view>
70
         </view>
71
+
72
+        <Disclaimer />
68
       </ScrollView>
73
       </ScrollView>
69
     </view>
74
     </view>
70
   )
75
   )

+ 13
- 8
src/pages/index/buildingDetail/components/DetailBottom/index.jsx 查看文件

1
 import React from 'react'
1
 import React from 'react'
2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
+import { useSelector } from 'react-redux'
3
 import { Image } from '@tarojs/components'
4
 import { Image } from '@tarojs/components'
4
-import useConsultant from '@/utils/hooks/useConsultant'
5
 import './index.scss'
5
 import './index.scss'
6
 
6
 
7
 export default function DetailBottom (props) {
7
 export default function DetailBottom (props) {
8
   const { Info = {} } = props
8
   const { Info = {} } = props
9
 
9
 
10
   // 当前推荐置业
10
   // 当前推荐置业
11
-  const { consultant } = useConsultant(Info?.buildingId)
11
+  const { consultant } = useSelector(s => s.system)
12
 
12
 
13
   const handleCall = () => {
13
   const handleCall = () => {
14
-    if (consultant) {
15
-      Taro.makePhoneCall({ phoneNumber: consultant.phone })
16
-      return
17
-    }
18
-
19
     if (Info.tel) {
14
     if (Info.tel) {
20
       Taro.makePhoneCall({ phoneNumber: Info.tel })
15
       Taro.makePhoneCall({ phoneNumber: Info.tel })
21
       return
16
       return
25
   }
20
   }
26
 
21
 
27
   const handleChat = () => {
22
   const handleChat = () => {
28
-    
23
+    // TODO 订阅消息
24
+
25
+    if (consultant?.id) {
26
+      Taro.navigateTo({
27
+        url: `/pages/chat/detail?targetPerson=${consultant.id}}`
28
+      })
29
+    } else {
30
+      Taro.navigateTo({
31
+        url: `/pages/index/buildingPropertyConsultant/index?buldingId=${Info?.buildingId}`
32
+      })
33
+    }
29
   }
34
   }
30
 
35
 
31
   return (
36
   return (

+ 0
- 14
src/pages/index/buildingDetail/components/Pictures/index.jsx 查看文件

44
           }
44
           }
45
         </ScrollView>
45
         </ScrollView>
46
       </view>
46
       </view>
47
-
48
-      <view className='Bottom'>
49
-        <view>
50
-          <view>
51
-            <text className='iconfont icon-shengming'></text>
52
-            <text>免责声明</text>
53
-          </view>
54
-          <view>
55
-            <text>&emsp;&emsp;以上价格仅供参考,具体一房一价的信息以售楼处展示为准。房屋位置交通、医疗、教育、商业等配套信息,来源于第三方不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。本平台对项目周边文化教育的介绍旨在提供相关信息1 意味着信息发布方对就学安排作出承诺。相关教育资首页信息存在调整的可能,应以政府教育主管部门门及办学颁布的政策规定为准。详情请仔细阅读</text>
56
-            <text className='active'>《新联家使用免责条款》</text>
57
-          </view>
58
-        </view>
59
-      </view>
60
-
61
     </view>
47
     </view>
62
   )
48
   )
63
 }
49
 }

+ 4
- 3
src/pages/index/buildingDetail/index.jsx 查看文件

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
 import withLayout from '@/layout'
2
 import withLayout from '@/layout'
3
 import { ScrollView } from '@tarojs/components'
3
 import { ScrollView } from '@tarojs/components'
4
-import '@/assets/css/iconfont.css'
5
-import Spin from '@/components/Spin/Spin2'
4
+import Disclaimer from '@/components/Disclaimer'
6
 import { fetch } from '@/utils/request'
5
 import { fetch } from '@/utils/request'
7
-import { API_ITEMS_DETAIL, API_PROJECT_TREND_LIST, API_ACTIVITY_GROUP, API_LIVE_LIST, API_NEWS_LIST } from '@/constants/api'
6
+import { API_ITEMS_DETAIL, API_NEWS_LIST } from '@/constants/api'
8
 import DetailBottom from './components/DetailBottom/index'
7
 import DetailBottom from './components/DetailBottom/index'
9
 import Banner from './components/Banner/index'
8
 import Banner from './components/Banner/index'
10
 import BasicInfo from './components/BasicInfo/index'
9
 import BasicInfo from './components/BasicInfo/index'
131
                   <Pictures List={PictureList}></Pictures>
130
                   <Pictures List={PictureList}></Pictures>
132
                 </view>
131
                 </view>
133
 
132
 
133
+                {/* 免责声明 */}
134
+                <Disclaimer />
134
               </view>
135
               </view>
135
 
136
 
136
             </view>
137
             </view>

+ 4
- 1
src/pages/index/buildingInfo/index.jsx 查看文件

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
 import withLayout from '@/layout'
2
 import withLayout from '@/layout'
3
 import { ScrollView } from '@tarojs/components'
3
 import { ScrollView } from '@tarojs/components'
4
+import Disclaimer from '@/components/Disclaimer'
4
 import { fetch } from '@/utils/request'
5
 import { fetch } from '@/utils/request'
5
 import { API_ITEMS_DETAIL } from '@/constants/api'
6
 import { API_ITEMS_DETAIL } from '@/constants/api'
6
-import '@/assets/css/iconfont.css'
7
+
7
 import './index.scss'
8
 import './index.scss'
8
 
9
 
9
 const formateDate = dt => dt ? dt.substring(0, 10) : undefined
10
 const formateDate = dt => dt ? dt.substring(0, 10) : undefined
72
             ))
73
             ))
73
           }
74
           }
74
         </view>
75
         </view>
76
+
77
+        <Disclaimer />
75
       </ScrollView>
78
       </ScrollView>
76
     </view>
79
     </view>
77
   )
80
   )

+ 7
- 18
src/pages/index/index.jsx 查看文件

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
-import withLayout from '@/layout'
3
-import { ScrollView } from '@tarojs/components'
4
-import Taro from '@tarojs/taro'
5
 import { useSelector } from 'react-redux'
2
 import { useSelector } from 'react-redux'
3
+import Taro from '@tarojs/taro'
4
+import { ScrollView } from '@tarojs/components'
5
+import withLayout from '@/layout'
6
+import ProjectListItem from '@/components/ProjectListItem/index'
6
 import { fetch } from '@/utils/request'
7
 import { fetch } from '@/utils/request'
7
 import { API_BANNER_LIST, API_INDEX_PROJECTS } from '@/constants/api'
8
 import { API_BANNER_LIST, API_INDEX_PROJECTS } from '@/constants/api'
8
-import './index.scss'
9
+
9
 import Location from './components/Location/index'
10
 import Location from './components/Location/index'
10
 import Banner from './components/Banner/index'
11
 import Banner from './components/Banner/index'
11
 import Menu from './components/Menu/index'
12
 import Menu from './components/Menu/index'
12
 import HotRecommend from './components/HotRecommend/index'
13
 import HotRecommend from './components/HotRecommend/index'
13
 import LiveSale from './components/LiveSale/index'
14
 import LiveSale from './components/LiveSale/index'
14
 import ColumnTitle from './components/ColumnTitle/index'
15
 import ColumnTitle from './components/ColumnTitle/index'
15
-import ProjectListItem from '../../components/ProjectListItem/index'
16
+
17
+import './index.scss'
16
 
18
 
17
 export default withLayout(() => {
19
 export default withLayout(() => {
18
 
20
 
108
             <text>已经到底了~</text>
110
             <text>已经到底了~</text>
109
           </view>
111
           </view>
110
 
112
 
111
-          <view className='Bottom'>
112
-            <view>
113
-              <view>
114
-                <text className='iconfont icon-shengming'></text>
115
-                <text>免责声明</text>
116
-              </view>
117
-              <view>
118
-                <text>&emsp;&emsp;以上价格仅供参考,具体一房一价的信息以售楼处展示为准。房屋位置交通、医疗、教育、商业等配套信息,来源于第三方不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。本平台对项目周边文化教育的介绍旨在提供相关信息1 意味着信息发布方对就学安排作出承诺。相关教育资首页信息存在调整的可能,应以政府教育主管部门门及办学颁布的政策规定为准。详情请仔细阅读</text>
119
-                <text className='active'>《新联家使用免责条款》</text>
120
-              </view>
121
-            </view>
122
-          </view>
123
-
124
         </view>
113
         </view>
125
       </ScrollView>
114
       </ScrollView>
126
 
115
 

+ 0
- 18
src/utils/hooks/useConsultant.js 查看文件

1
-import { useSelector } from 'react-redux'
2
-
3
-/**
4
- * 获取当前推荐置业
5
- * @param {*} buildingId 
6
- * @returns 
7
- */
8
-export default function useConsultant(buildingId) {
9
-  const { consultant } = useSelector(s => s.system)
10
-
11
-  if (consultant?.id) {
12
-    if (consultant.projects && consultant.projects.indexOf(buildingId) > -1) {
13
-      return { consultant }
14
-    }
15
-  }
16
-
17
-  return {}
18
-}