Просмотр исходного кода

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

Your Name 3 лет назад
Родитель
Сommit
651831ea73

+ 2
- 2
config/dev.js Просмотреть файл

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"http://127.0.0.1:8081"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"http://127.0.0.1:8081"',
8 8
     WSS_HOST: '"ws://127.0.0.1:8081"',
9 9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10 10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 3
- 0
src/constants/api.js Просмотреть файл

@@ -18,6 +18,9 @@ export const API_CITY_AREA = resolvePath('tdCityList/tdAreaCity') // 城市下
18 18
 export const API_SAVE_CUSTOMER_INFO = resolvePath('customerInfo') // 保存客户信息
19 19
 export const API_GET_CUSTOMER_INFO = resolvePath('customerInfo/') // 查询客户信息
20 20
 
21
+// 获取经纪人绑定楼盘列表
22
+export const API_GET_AGENT_BUILDINGS = resolvePath('buildingChannel/buildings')
23
+
21 24
 // 课程
22 25
 export const API_COURSE_LIST = resolvePath('curriculum') // 课程列表
23 26
 export const API_COURSE_DETAIL = resolvePath('curriculum') // 课程详情

+ 2
- 2
src/pages/mine/addCustomer/index.jsx Просмотреть файл

@@ -4,7 +4,7 @@ import { ScrollView, Input, Image, Picker, Block } from '@tarojs/components'
4 4
 import '@/assets/css/iconfont.css'
5 5
 import { useSelector } from 'react-redux'
6 6
 import { fetch } from '@/utils/request'
7
-import { API_ITEMS_LIST, API_CARDS_LIST, API_REPORT_CUETOMER, API_USER_ADD_CUSTOMER, API_CHANNEL_REPORT } from '@/constants/api'
7
+import { API_GET_AGENT_BUILDINGS, API_CARDS_LIST, API_REPORT_CUETOMER, API_USER_ADD_CUSTOMER, API_CHANNEL_REPORT } from '@/constants/api'
8 8
 import Taro from '@tarojs/taro'
9 9
 import './index.scss'
10 10
 
@@ -93,7 +93,7 @@ export default withLayout((props) => {
93 93
   }, [BuildingId])
94 94
 
95 95
   const GetBuildingList = () => {
96
-    fetch({ url: API_ITEMS_LIST, method: 'get', params: { pageNumber: 1, pageSize: 1000, buildingId: BuildingId } }).then((res) => {
96
+    fetch({ url: API_GET_AGENT_BUILDINGS, method: 'get' }).then((res) => {
97 97
       setBuildingList((res.records || [].map((item) => { return { id: item.buildingId, name: item.name } })))
98 98
     })
99 99
   }

+ 25
- 24
src/pages/mine/components/EditUserDetailBasicInfo/index.jsx Просмотреть файл

@@ -6,7 +6,7 @@ import Taro from '@tarojs/taro'
6 6
 import './index.scss'
7 7
 
8 8
 export default function EditUserDetailBasicInfo (props) {
9
-  const { Data = {}, close = () => { } } = props
9
+  const { Data = {}, close = () => { }, CustomerId = null } = props
10 10
 
11 11
   const [FormData, setFormData] = useState({ ...Data })
12 12
 
@@ -16,15 +16,16 @@ export default function EditUserDetailBasicInfo (props) {
16 16
   const [CanSubmit, setCanSubmit] = useState(false)
17 17
 
18 18
   useEffect(() => {
19
-    if(CanSubmit) {
19
+    if (CanSubmit) {
20 20
       setCanSubmit(false)
21 21
       ToSubmit()
22 22
     }
23 23
   }, [CanSubmit])
24 24
 
25 25
   const ToSubmit = () => {
26
-    let params = {}
27
-    fetch({ API_SAVE_CUSTOMER_INFO, method: 'post', payload: params }).then(() => {
26
+    let params = { ...FormData, customerId: CustomerId }
27
+    let url = Data.customerId ? `${API_SAVE_CUSTOMER_INFO}/${Data.customerId}` : API_SAVE_CUSTOMER_INFO
28
+    fetch({ url, method: Data.customerId ? 'put' : 'post', payload: params }).then(() => {
28 29
       Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
29 30
       close()
30 31
     }).catch(() => {
@@ -36,9 +37,9 @@ export default function EditUserDetailBasicInfo (props) {
36 37
     let resData = FormData
37 38
     if (key === 'age') {
38 39
       resData[key] = AgeRange[e.detail.value]
39
-    } else if(key === 'householdIncome') {
40
+    } else if (key === 'householdIncome') {
40 41
       resData[key] = IncomeRange[e.detail.value]
41
-    } else if(key === 'estimatedPurchaseTime') {
42
+    } else if (key === 'estimatedPurchaseTime') {
42 43
       resData[key] = BuyTimeRange[e.detail.value]
43 44
     }
44 45
     setFormData(resData)
@@ -51,7 +52,7 @@ export default function EditUserDetailBasicInfo (props) {
51 52
   }
52 53
 
53 54
   const Submit = () => {
54
-    if(!CanSubmit) {
55
+    if (!CanSubmit) {
55 56
       setCanSubmit(true)
56 57
     }
57 58
   }
@@ -64,35 +65,35 @@ export default function EditUserDetailBasicInfo (props) {
64 65
           <text>姓名</text>
65 66
           <view className='FormLine flex-h'>
66 67
             <view className='flex-item'>
67
-              <Input placeholder='请输入姓名' onInput={InputChange.bind(this, 'name')}></Input>
68
+              <Input placeholder='请输入姓名' value={FormData.name} onInput={InputChange.bind(this, 'name')}></Input>
68 69
             </view>
69 70
           </view>
70 71
 
71 72
           <text>昵称</text>
72 73
           <view className='FormLine flex-h'>
73 74
             <view className='flex-item'>
74
-              <Input placeholder='请输入昵称' onInput={InputChange.bind(this, 'nickname')}></Input>
75
+              <Input placeholder='请输入昵称' value={FormData.nickname} onInput={InputChange.bind(this, 'nickname')}></Input>
75 76
             </view>
76 77
           </view>
77 78
 
78 79
           <text>手机号码</text>
79 80
           <view className='FormLine flex-h'>
80 81
             <view className='flex-item'>
81
-              <Input placeholder='请输入手机号码' onInput={InputChange.bind(this, 'phone')}></Input>
82
+              <Input placeholder='请输入手机号码' value={FormData.phone} onInput={InputChange.bind(this, 'phone')}></Input>
82 83
             </view>
83 84
           </view>
84 85
 
85 86
           <text>家庭住址</text>
86 87
           <view className='FormLine flex-h'>
87 88
             <view className='flex-item'>
88
-              <Input placeholder='请输入家庭住址' onInput={InputChange.bind(this, 'homeAddress')}></Input>
89
+              <Input placeholder='请输入家庭住址' value={FormData.homeAddress} onInput={InputChange.bind(this, 'homeAddress')}></Input>
89 90
             </view>
90 91
           </view>
91 92
 
92 93
           <text>工作地址</text>
93 94
           <view className='FormLine flex-h'>
94 95
             <view className='flex-item'>
95
-              <Input placeholder='请输入工作地址' onInput={InputChange.bind(this, 'firmAddress')}></Input>
96
+              <Input placeholder='请输入工作地址' value={FormData.firmAddress} onInput={InputChange.bind(this, 'firmAddress')}></Input>
96 97
             </view>
97 98
           </view>
98 99
 
@@ -100,7 +101,7 @@ export default function EditUserDetailBasicInfo (props) {
100 101
           <view className='FormLine flex-h'>
101 102
             <view className='flex-item'>
102 103
               <Picker onChange={PickerChange.bind(this, 'age')} value={null} range={AgeRange}>
103
-                <text>请选择</text>
104
+                <text>{FormData.age || '请选择'}</text>
104 105
               </Picker>
105 106
             </view>
106 107
             <text className='iconfont icon-jiantoudown'></text>
@@ -109,7 +110,7 @@ export default function EditUserDetailBasicInfo (props) {
109 110
           <text>职业</text>
110 111
           <view className='FormLine flex-h'>
111 112
             <view className='flex-item'>
112
-              <Input placeholder='请输入职业' onInput={InputChange.bind(this, 'career')}></Input>
113
+              <Input placeholder='请输入职业' value={FormData.career} onInput={InputChange.bind(this, 'career')}></Input>
113 114
             </view>
114 115
           </view>
115 116
 
@@ -117,7 +118,7 @@ export default function EditUserDetailBasicInfo (props) {
117 118
           <view className='FormLine flex-h'>
118 119
             <view className='flex-item'>
119 120
               <Picker onChange={PickerChange.bind(this, 'householdIncome')} value={null} range={IncomeRange}>
120
-                <text>请选择</text>
121
+                <text>{FormData.householdIncome || '请选择'}</text>
121 122
               </Picker>
122 123
             </view>
123 124
             <text className='iconfont icon-jiantoudown'></text>
@@ -126,21 +127,21 @@ export default function EditUserDetailBasicInfo (props) {
126 127
           <text>家庭成员数</text>
127 128
           <view className='FormLine flex-h'>
128 129
             <view className='flex-item'>
129
-              <Input placeholder='请输入家庭成员数' onInput={InputChange.bind(this, 'familyNumber')}></Input>
130
+              <Input placeholder='请输入家庭成员数' value={FormData.familyNumber} onInput={InputChange.bind(this, 'familyNumber')}></Input>
130 131
             </view>
131 132
           </view>
132 133
 
133 134
           <text>已有房产数</text>
134 135
           <view className='FormLine flex-h'>
135 136
             <view className='flex-item'>
136
-              <Input placeholder='请输入已有房产数' onInput={InputChange.bind(this, 'houseNumber')}></Input>
137
+              <Input placeholder='请输入已有房产数' value={FormData.houseNumber} onInput={InputChange.bind(this, 'houseNumber')}></Input>
137 138
             </view>
138 139
           </view>
139 140
 
140 141
           <text>已有车辆数</text>
141 142
           <view className='FormLine flex-h'>
142 143
             <view className='flex-item'>
143
-              <Input placeholder='请输入已有车辆数' onInput={InputChange.bind(this, 'carNumber')}></Input>
144
+              <Input placeholder='请输入已有车辆数' value={FormData.carNumber} onInput={InputChange.bind(this, 'carNumber')}></Input>
144 145
             </view>
145 146
           </view>
146 147
 
@@ -148,7 +149,7 @@ export default function EditUserDetailBasicInfo (props) {
148 149
           <view className='FormLine flex-h'>
149 150
             <view className='flex-item'>
150 151
               <Picker onChange={PickerChange.bind(this, 'estimatedPurchaseTime')} value={null} range={BuyTimeRange}>
151
-                <text>请选择</text>
152
+                <text>{FormData.estimatedPurchaseTime || '请选择'}</text>
152 153
               </Picker>
153 154
             </view>
154 155
             <text className='iconfont icon-jiantoudown'></text>
@@ -157,35 +158,35 @@ export default function EditUserDetailBasicInfo (props) {
157 158
           <text>客户咨询重点</text>
158 159
           <view className='FormLine flex-h'>
159 160
             <view className='flex-item'>
160
-              <Input placeholder='请填写  如:地段、交通、社区配套、户型、价格等' onInput={InputChange.bind(this, 'consultation')}></Input>
161
+              <Input value={FormData.consultation} placeholder='请填写  如:地段、交通、社区配套、户型、价格等' onInput={InputChange.bind(this, 'consultation')}></Input>
161 162
             </view>
162 163
           </view>
163 164
 
164 165
           <text>购房动机</text>
165 166
           <view className='FormLine flex-h'>
166 167
             <view className='flex-item'>
167
-              <Input placeholder='请填写 如结婚、养老、二孩、改善、学区、投资等' onInput={InputChange.bind(this, 'motivation')}></Input>
168
+              <Input value={FormData.motivation} placeholder='请填写 如结婚、养老、二孩、改善、学区、投资等' onInput={InputChange.bind(this, 'motivation')}></Input>
168 169
             </view>
169 170
           </view>
170 171
 
171 172
           <text>客户抗性分析</text>
172 173
           <view className='FormLine flex-h'>
173 174
             <view className='flex-item'>
174
-              <Input placeholder='请填写  如:地段、交通、社区配套、户型、价格等' onInput={InputChange.bind(this, 'resistanceAnalysis')}></Input>
175
+              <Input value={FormData.resistanceAnalysis} placeholder='请填写  如:地段、交通、社区配套、户型、价格等' onInput={InputChange.bind(this, 'resistanceAnalysis')}></Input>
175 176
             </view>
176 177
           </view>
177 178
 
178 179
           <text>客户对项目认可点</text>
179 180
           <view className='FormLine flex-h'>
180 181
             <view className='flex-item'>
181
-              <Input placeholder='请填写  如:地段、交通、社区配套、户型、价格等' onInput={InputChange.bind(this, 'approval')}></Input>
182
+              <Input value={FormData.approval} placeholder='请填写  如:地段、交通、社区配套、户型、价格等' onInput={InputChange.bind(this, 'approval')}></Input>
182 183
             </view>
183 184
           </view>
184 185
 
185 186
           <text>备注</text>
186 187
           <view className='FormLine flex-h'>
187 188
             <view className='flex-item'>
188
-              <Input placeholder='补充说明(选填)' onInput={InputChange.bind(this, 'remark')}></Input>
189
+              <Input value={FormData.remark} placeholder='补充说明(选填)' onInput={InputChange.bind(this, 'remark')}></Input>
189 190
             </view>
190 191
           </view>
191 192
 

+ 2
- 2
src/pages/mine/components/StatCustomerListItem/index.jsx Просмотреть файл

@@ -9,10 +9,10 @@ export default function StatCustomerListItem (props) {
9 9
 
10 10
   return (
11 11
     <view className='components StatCustomerListItem flex-h'>
12
-      <view className='Icon' onClick={() => { Taro.navigateTo({ url: `/pages/mine/customerDetail/index?id=${data.customerId}` }) }}>
12
+      <view className='Icon' onClick={() => { Taro.navigateTo({ url: `/pages/mine/customerDetail/index?id=${data.customerId}&name=${data.name}&sex=${data.sex}&phone=${data.phone}&avatarurl=${data.avatarurl}&status=${data.status}` }) }}>
13 13
         <Image mode='scaleToFill' src={data.avatarurl}></Image>
14 14
       </view>
15
-      <view className='flex-item' onClick={() => { Taro.navigateTo({ url: `/pages/mine/customerDetail/index?id=${data.customerId}` }) }}>
15
+      <view className='flex-item' onClick={() => { Taro.navigateTo({ url: `/pages/mine/customerDetail/index?id=${data.customerId}&name=${data.name}&sex=${data.sex}&phone=${data.phone}&avatarurl=${data.avatarurl}&status=${data.status}` }) }}>
16 16
         <view>
17 17
           <text>{data.name}</text>
18 18
           <text className={data.sex === 1 ? 'iconfont icon-nanxing' : 'iconfont icon-nvxing'}></text>

+ 21
- 31
src/pages/mine/components/UserDetailBasicInfo/index.jsx Просмотреть файл

@@ -1,30 +1,20 @@
1
-import { useState, useEffect } from 'react'
1
+import { useState } from 'react'
2 2
 import { ScrollView } from '@tarojs/components'
3 3
 import './index.scss'
4 4
 import EditUserDetailBasicInfo from '../EditUserDetailBasicInfo/index'
5 5
 
6 6
 export default function UserDetailBasicInfo (props) {
7
-  const { CustomerInfo = {}, AddFollow = () => {} } = props
7
+  const { CustomerInfo = {}, AddFollow = () => {}, CustomerId = null, Update = () => {} } = props
8 8
   const [ShowEditPopup, setShowEditPopup] = useState(false)
9
-  const [IsPull, setPull] = useState(false)
10
-  const [PullTimer, setPullTimer] = useState(null)
11 9
 
12
-  const PageRefresh = () => { // 页面下拉刷新回调
13
-    setPull(true)
10
+  const Close = () => {
11
+    Update()
12
+    setShowEditPopup(false)
14 13
   }
15 14
 
16
-  useEffect(() => { // 下拉刷新触发
17
-    if (IsPull) {
18
-      clearTimeout(PullTimer)
19
-      setPullTimer(setTimeout(() => {
20
-        setPull(false)
21
-      }, 2000))
22
-    }
23
-  }, [IsPull])
24
-
25 15
   return (
26 16
     <view className='components UserDetailBasicInfo'>
27
-      <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
17
+      <ScrollView scroll-y>
28 18
         <view className='PageContent'>
29 19
 
30 20
           <view className='Content'>
@@ -55,21 +45,21 @@ export default function UserDetailBasicInfo (props) {
55 45
               <text>性别</text>
56 46
               <text>:</text>
57 47
               <view className='flex-item'>
58
-                <text>{CustomerInfo.sex === 1 ? '男' : '女'}</text>
48
+                <text>{CustomerInfo.sex - 0 === 1 ? '男' : '女'}</text>
59 49
               </view>
60 50
             </view>
61 51
             <view className='flex-h'>
62 52
               <text>家庭住址</text>
63 53
               <text>:</text>
64 54
               <view className='flex-item'>
65
-                <text>{CustomerInfo.address || '-'}</text>
55
+                <text>{CustomerInfo.homeAddress || '-'}</text>
66 56
               </view>
67 57
             </view>
68 58
             <view className='flex-h'>
69 59
               <text>工作地址</text>
70 60
               <text>:</text>
71 61
               <view className='flex-item'>
72
-                <text>{CustomerInfo.company || '-'}</text>
62
+                <text>{CustomerInfo.firmAddress || '-'}</text>
73 63
               </view>
74 64
             </view>
75 65
             <view className='flex-h'>
@@ -83,77 +73,77 @@ export default function UserDetailBasicInfo (props) {
83 73
               <text>职业</text>
84 74
               <text>:</text>
85 75
               <view className='flex-item'>
86
-                <text>{CustomerInfo.work || '-'}</text>
76
+                <text>{CustomerInfo.career || '-'}</text>
87 77
               </view>
88 78
             </view>
89 79
             <view className='flex-h'>
90 80
               <text>家庭年收入</text>
91 81
               <text>:</text>
92 82
               <view className='flex-item'>
93
-                <text>10万以下</text>
83
+                <text>{CustomerInfo.householdIncome || '-'}</text>
94 84
               </view>
95 85
             </view>
96 86
             <view className='flex-h'>
97 87
               <text>家庭成员数</text>
98 88
               <text>:</text>
99 89
               <view className='flex-item'>
100
-                <text>5人</text>
90
+                <text>{CustomerInfo.familyNumber || '-'}人</text>
101 91
               </view>
102 92
             </view>
103 93
             <view className='flex-h'>
104 94
               <text>已有房产数</text>
105 95
               <text>:</text>
106 96
               <view className='flex-item'>
107
-                <text>2</text>
97
+                <text>{CustomerInfo.houseNumber || '-'}</text>
108 98
               </view>
109 99
             </view>
110 100
             <view className='flex-h'>
111 101
               <text>已有车辆数</text>
112 102
               <text>:</text>
113 103
               <view className='flex-item'>
114
-                <text>2</text>
104
+                <text>{CustomerInfo.carNumber || '-'}</text>
115 105
               </view>
116 106
             </view>
117 107
             <view className='flex-h'>
118 108
               <text>预计购房时间</text>
119 109
               <text>:</text>
120 110
               <view className='flex-item'>
121
-                <text>1月以内</text>
111
+                <text>{CustomerInfo.estimatedPurchaseTime || '-'}</text>
122 112
               </view>
123 113
             </view>
124 114
             <view className='flex-h'>
125 115
               <text>咨询重点</text>
126 116
               <text>:</text>
127 117
               <view className='flex-item'>
128
-                <text>江苏省南京市雨花台区</text>
118
+                <text>{CustomerInfo.consultation || '-'}</text>
129 119
               </view>
130 120
             </view>
131 121
             <view className='flex-h'>
132 122
               <text>购房动机</text>
133 123
               <text>:</text>
134 124
               <view className='flex-item'>
135
-                <text>结婚</text>
125
+                <text>{CustomerInfo.motivation || '-'}</text>
136 126
               </view>
137 127
             </view>
138 128
             <view className='flex-h'>
139 129
               <text>抗性分析</text>
140 130
               <text>:</text>
141 131
               <view className='flex-item'>
142
-                <text>交通</text>
132
+                <text>{CustomerInfo.resistanceAnalysis || '-'}</text>
143 133
               </view>
144 134
             </view>
145 135
             <view className='flex-h'>
146 136
               <text>项目认可点</text>
147 137
               <text>:</text>
148 138
               <view className='flex-item'>
149
-                <text>户型</text>
139
+                <text>{CustomerInfo.approval || '-'}</text>
150 140
               </view>
151 141
             </view>
152 142
             <view className='flex-h'>
153 143
               <text>备注</text>
154 144
               <text>:</text>
155 145
               <view className='flex-item'>
156
-                <text>暂无</text>
146
+                <text>{CustomerInfo.remark || '-'}</text>
157 147
               </view>
158 148
             </view>
159 149
           </view>
@@ -170,7 +160,7 @@ export default function UserDetailBasicInfo (props) {
170 160
         <view className='EditUserInfo'>
171 161
           <view>
172 162
             <view>
173
-              <EditUserDetailBasicInfo close={() => {setShowEditPopup(false)}}></EditUserDetailBasicInfo>
163
+              <EditUserDetailBasicInfo Data={CustomerInfo} CustomerId={CustomerId} close={() => {Close()}}></EditUserDetailBasicInfo>
174 164
             </view>
175 165
           </view>
176 166
         </view>

+ 18
- 10
src/pages/mine/customerDetail/index.jsx Просмотреть файл

@@ -13,6 +13,8 @@ import UserDetailActivityInfo from '../components/UserDetailActivityInfo/index'
13 13
 import UserDetailFollowRecord from '../components/UserDetailFollowRecord/index'
14 14
 
15 15
 export default withLayout((props) => {
16
+
17
+  const { name, sex, phone, avatarurl, status } = props.router.params
16 18
   const [CustomerId] = useState(props.router.params.id)
17 19
   const [CustomerInfo, setCustomerInfo] = useState({})
18 20
   const [ShowAddFollow, setShowAddFollow] = useState(false)
@@ -28,12 +30,18 @@ export default withLayout((props) => {
28 30
 
29 31
   useEffect(() => {
30 32
     if (CustomerId) {
31
-      fetch({ url: `${API_GET_CUSTOMER_INFO}${CustomerId}` }).then((res) => {
32
-        setCustomerInfo(res)
33
-      })
33
+      UpdateCustomerInfo()
34 34
     }
35 35
   }, [CustomerId])
36 36
 
37
+  const UpdateCustomerInfo = () => {
38
+    fetch({ url: `${API_GET_CUSTOMER_INFO}${CustomerId}` }).then((res) => {
39
+      if (res) {
40
+        setCustomerInfo(res)
41
+      }
42
+    })
43
+  }
44
+
37 45
   const CutMenu = (item) => {
38 46
     return () => {
39 47
       setCurrentMenuId(item.id)
@@ -81,20 +89,20 @@ export default withLayout((props) => {
81 89
             <view className='centerLabel'>
82 90
               <view className='flex-h'>
83 91
                 <view className='Icon'>
84
-                  <Image mode='aspectFill' src={getImgURL(CustomerInfo.avatarurl)}></Image>
92
+                  <Image mode='aspectFill' src={getImgURL(CustomerInfo.avatarurl || avatarurl)}></Image>
85 93
                 </view>
86 94
                 <view className='flex-item'>
87 95
                   <view>
88
-                    <text>{CustomerInfo.name}</text>
89
-                    <text className={CustomerInfo.sex === 1 ? 'iconfont icon-nanxing' : 'iconfont icon-nvxing'}></text>
96
+                    <text>{CustomerInfo.name || name}</text>
97
+                    <text className={CustomerInfo.sex - 0 === 1 || sex - 0 === 1 ? 'iconfont icon-nanxing' : 'iconfont icon-nvxing'}></text>
90 98
                   </view>
91
-                  <text>{CustomerInfo.phone}</text>
99
+                  <text>{CustomerInfo.phone || phone}</text>
92 100
                 </view>
93 101
                 <text className='iconfont icon-liaotian'></text>
94
-                <text className='iconfont icon-dianhua' onClick={() => { Taro.makePhoneCall({ phoneNumber: CustomerInfo.phone }) }}></text>
102
+                <text className='iconfont icon-dianhua' onClick={() => { Taro.makePhoneCall({ phoneNumber: CustomerInfo.phone || phone }) }}></text>
95 103
               </view>
96 104
             </view>
97
-            <text className='Status'>{CustomerInfo.status === 1 || CustomerInfo.status === 0 ? '已报备' : CustomerInfo.status === 2 ? '已到访' : CustomerInfo.status === 3 ? '已认筹' : '已签约'}</text>
105
+            <text className='Status'>{status - 0 === 1 || status - 0 === 0 ? '已报备' : status - 0 === 2 ? '已到访' : status - 0 === 3 ? '已认筹' : '已签约'}</text>
98 106
             <text className='Tips'>NEW</text>
99 107
             <text className='Tips'>NEW</text>
100 108
           </view>
@@ -117,7 +125,7 @@ export default withLayout((props) => {
117 125
           {/* 基本信息 */}
118 126
           {
119 127
             CurrentMenuId === 1 &&
120
-            <UserDetailBasicInfo CustomerId={CustomerId} CustomerInfo={CustomerInfo} AddFollow={AddFollow}></UserDetailBasicInfo>
128
+            <UserDetailBasicInfo CustomerId={CustomerId} CustomerInfo={CustomerInfo} AddFollow={AddFollow} Update={UpdateCustomerInfo}></UserDetailBasicInfo>
121 129
           }
122 130
 
123 131
           {/* 访问记录 */}

+ 1
- 16
src/pages/mine/index.jsx Просмотреть файл

@@ -20,9 +20,7 @@ export default withLayout(() => {
20 20
   const user = useSelector(state => state.user)
21 21
   const [UserRole, setUserRole] = useState(null) // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
22 22
   const [MenuList, setMenuList] = useState([])
23
-  const [IsPull, setPull] = useState(false)
24 23
   const [ShowLogin, setShowLogin] = useState(false)
25
-  const [PullTimer, setPullTimer] = useState(null)
26 24
   const { dispatch } = store
27 25
 
28 26
   useEffect(() => {
@@ -39,19 +37,6 @@ export default withLayout(() => {
39 37
     }
40 38
   }, [UserRole])
41 39
 
42
-  const PageRefresh = () => { // 页面下拉刷新回调
43
-    setPull(true)
44
-  }
45
-
46
-  useEffect(() => { // 下拉刷新触发
47
-    if (IsPull) {
48
-      clearTimeout(PullTimer)
49
-      setPullTimer(setTimeout(() => {
50
-        setPull(false)
51
-      }, 2000))
52
-    }
53
-  }, [IsPull])
54
-
55 40
   const MenuClick = (router) => {
56 41
     return () => {
57 42
       if (router === 'propertyConsultant') {
@@ -80,7 +65,7 @@ export default withLayout(() => {
80 65
   return (
81 66
     <view className='Page Mine'>
82 67
 
83
-      <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
68
+      <ScrollView scroll-y>
84 69
         <view className='PageContent'>
85 70
 
86 71
           {/* 需要登录 */}

+ 4
- 20
src/pages/video/index.jsx Просмотреть файл

@@ -1,17 +1,15 @@
1 1
 import { useState, useEffect } from 'react'
2
-import { ScrollView } from '@tarojs/components'
2
+import { ScrollView, Input } from '@tarojs/components'
3 3
 import withLayout from '@/layout'
4
-import { useSelector } from 'react-redux'
5 4
 import { fetch } from '@/utils/request'
5
+import '@/assets/css/iconfont.css'
6 6
 import { API_LIVE_LIST, API_VIDEO_LIST } from '@/constants/api'
7 7
 import './index.scss'
8
-import '@/assets/css/iconfont.css'
9 8
 import VideoListItem from './components/VideoListItem/index'
10 9
 
11 10
 export default withLayout((props) => {
12 11
   const { city } = props
13 12
 
14
-  const [IsPull, setPull] = useState(false)
15 13
   const [CurrnetMenuId, setCurrnetMenuId] = useState('all')
16 14
   const [MenuList] = useState([
17 15
     { name: '全部', id: 'all' },
@@ -20,7 +18,6 @@ export default withLayout((props) => {
20 18
     { name: '新房推荐', id: 'new' },
21 19
     { name: '视频', id: 'video' }
22 20
   ])
23
-  const [PullTimer, setPullTimer] = useState(null)
24 21
   // 全部或者新房的列表
25 22
   const [activityList, setActivityList] = useState([])
26 23
   // 预告与直播的列表
@@ -55,19 +52,6 @@ export default withLayout((props) => {
55 52
     }
56 53
   }
57 54
 
58
-  const PageRefresh = () => { // 页面下拉刷新回调
59
-    setPull(true)
60
-  }
61
-
62
-  useEffect(() => { // 下拉刷新触发
63
-    if (IsPull) {
64
-      clearTimeout(PullTimer)
65
-      setPullTimer(setTimeout(() => {
66
-        setPull(false)
67
-      }, 2000))
68
-    }
69
-  }, [IsPull])
70
-
71 55
   const CutMenu = (id) => {
72 56
     return () => {
73 57
       if (id !== CurrnetMenuId) {
@@ -82,7 +66,7 @@ export default withLayout((props) => {
82 66
       <view className='Search'>
83 67
         <view>
84 68
           <text className='iconfont icon-sousuo'></text>
85
-          <text>输入项目名称或直播标题</text>
69
+          <Input placeholder='请输入直播标题'></Input>
86 70
         </view>
87 71
       </view>
88 72
 
@@ -100,7 +84,7 @@ export default withLayout((props) => {
100 84
 
101 85
       <view className='flex-item'>
102 86
         <view>
103
-          <ScrollView scroll-y refresher-enabled refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#f8f8f8'>
87
+          <ScrollView scroll-y>
104 88
             <view className='PageContent'>
105 89
               {
106 90
                 /* 全部 与 新房 */

+ 9
- 0
src/pages/video/index.scss Просмотреть файл

@@ -25,6 +25,15 @@
25 25
           margin-right: 10px;
26 26
         }
27 27
       }
28
+      >input {
29
+        display: inline-block;
30
+        vertical-align: middle;
31
+        width: 150px;
32
+        font-size: 20px;
33
+        margin-left: 10px;
34
+        height: 78px;
35
+        text-align: left;
36
+      }
28 37
     }
29 38
   }
30 39
   > .Menu {