浏览代码

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

Your Name 3 年前
父节点
当前提交
651831ea73

+ 2
- 2
config/dev.js 查看文件

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
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
     WSS_HOST: '"ws://127.0.0.1:8081"',
8
     WSS_HOST: '"ws://127.0.0.1:8081"',
9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 3
- 0
src/constants/api.js 查看文件

18
 export const API_SAVE_CUSTOMER_INFO = resolvePath('customerInfo') // 保存客户信息
18
 export const API_SAVE_CUSTOMER_INFO = resolvePath('customerInfo') // 保存客户信息
19
 export const API_GET_CUSTOMER_INFO = resolvePath('customerInfo/') // 查询客户信息
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
 export const API_COURSE_LIST = resolvePath('curriculum') // 课程列表
25
 export const API_COURSE_LIST = resolvePath('curriculum') // 课程列表
23
 export const API_COURSE_DETAIL = resolvePath('curriculum') // 课程详情
26
 export const API_COURSE_DETAIL = resolvePath('curriculum') // 课程详情

+ 2
- 2
src/pages/mine/addCustomer/index.jsx 查看文件

4
 import '@/assets/css/iconfont.css'
4
 import '@/assets/css/iconfont.css'
5
 import { useSelector } from 'react-redux'
5
 import { useSelector } from 'react-redux'
6
 import { fetch } from '@/utils/request'
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
 import Taro from '@tarojs/taro'
8
 import Taro from '@tarojs/taro'
9
 import './index.scss'
9
 import './index.scss'
10
 
10
 
93
   }, [BuildingId])
93
   }, [BuildingId])
94
 
94
 
95
   const GetBuildingList = () => {
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
       setBuildingList((res.records || [].map((item) => { return { id: item.buildingId, name: item.name } })))
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
 import './index.scss'
6
 import './index.scss'
7
 
7
 
8
 export default function EditUserDetailBasicInfo (props) {
8
 export default function EditUserDetailBasicInfo (props) {
9
-  const { Data = {}, close = () => { } } = props
9
+  const { Data = {}, close = () => { }, CustomerId = null } = props
10
 
10
 
11
   const [FormData, setFormData] = useState({ ...Data })
11
   const [FormData, setFormData] = useState({ ...Data })
12
 
12
 
16
   const [CanSubmit, setCanSubmit] = useState(false)
16
   const [CanSubmit, setCanSubmit] = useState(false)
17
 
17
 
18
   useEffect(() => {
18
   useEffect(() => {
19
-    if(CanSubmit) {
19
+    if (CanSubmit) {
20
       setCanSubmit(false)
20
       setCanSubmit(false)
21
       ToSubmit()
21
       ToSubmit()
22
     }
22
     }
23
   }, [CanSubmit])
23
   }, [CanSubmit])
24
 
24
 
25
   const ToSubmit = () => {
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
       Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
29
       Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
29
       close()
30
       close()
30
     }).catch(() => {
31
     }).catch(() => {
36
     let resData = FormData
37
     let resData = FormData
37
     if (key === 'age') {
38
     if (key === 'age') {
38
       resData[key] = AgeRange[e.detail.value]
39
       resData[key] = AgeRange[e.detail.value]
39
-    } else if(key === 'householdIncome') {
40
+    } else if (key === 'householdIncome') {
40
       resData[key] = IncomeRange[e.detail.value]
41
       resData[key] = IncomeRange[e.detail.value]
41
-    } else if(key === 'estimatedPurchaseTime') {
42
+    } else if (key === 'estimatedPurchaseTime') {
42
       resData[key] = BuyTimeRange[e.detail.value]
43
       resData[key] = BuyTimeRange[e.detail.value]
43
     }
44
     }
44
     setFormData(resData)
45
     setFormData(resData)
51
   }
52
   }
52
 
53
 
53
   const Submit = () => {
54
   const Submit = () => {
54
-    if(!CanSubmit) {
55
+    if (!CanSubmit) {
55
       setCanSubmit(true)
56
       setCanSubmit(true)
56
     }
57
     }
57
   }
58
   }
64
           <text>姓名</text>
65
           <text>姓名</text>
65
           <view className='FormLine flex-h'>
66
           <view className='FormLine flex-h'>
66
             <view className='flex-item'>
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
             </view>
69
             </view>
69
           </view>
70
           </view>
70
 
71
 
71
           <text>昵称</text>
72
           <text>昵称</text>
72
           <view className='FormLine flex-h'>
73
           <view className='FormLine flex-h'>
73
             <view className='flex-item'>
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
             </view>
76
             </view>
76
           </view>
77
           </view>
77
 
78
 
78
           <text>手机号码</text>
79
           <text>手机号码</text>
79
           <view className='FormLine flex-h'>
80
           <view className='FormLine flex-h'>
80
             <view className='flex-item'>
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
             </view>
83
             </view>
83
           </view>
84
           </view>
84
 
85
 
85
           <text>家庭住址</text>
86
           <text>家庭住址</text>
86
           <view className='FormLine flex-h'>
87
           <view className='FormLine flex-h'>
87
             <view className='flex-item'>
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
             </view>
90
             </view>
90
           </view>
91
           </view>
91
 
92
 
92
           <text>工作地址</text>
93
           <text>工作地址</text>
93
           <view className='FormLine flex-h'>
94
           <view className='FormLine flex-h'>
94
             <view className='flex-item'>
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
             </view>
97
             </view>
97
           </view>
98
           </view>
98
 
99
 
100
           <view className='FormLine flex-h'>
101
           <view className='FormLine flex-h'>
101
             <view className='flex-item'>
102
             <view className='flex-item'>
102
               <Picker onChange={PickerChange.bind(this, 'age')} value={null} range={AgeRange}>
103
               <Picker onChange={PickerChange.bind(this, 'age')} value={null} range={AgeRange}>
103
-                <text>请选择</text>
104
+                <text>{FormData.age || '请选择'}</text>
104
               </Picker>
105
               </Picker>
105
             </view>
106
             </view>
106
             <text className='iconfont icon-jiantoudown'></text>
107
             <text className='iconfont icon-jiantoudown'></text>
109
           <text>职业</text>
110
           <text>职业</text>
110
           <view className='FormLine flex-h'>
111
           <view className='FormLine flex-h'>
111
             <view className='flex-item'>
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
             </view>
114
             </view>
114
           </view>
115
           </view>
115
 
116
 
117
           <view className='FormLine flex-h'>
118
           <view className='FormLine flex-h'>
118
             <view className='flex-item'>
119
             <view className='flex-item'>
119
               <Picker onChange={PickerChange.bind(this, 'householdIncome')} value={null} range={IncomeRange}>
120
               <Picker onChange={PickerChange.bind(this, 'householdIncome')} value={null} range={IncomeRange}>
120
-                <text>请选择</text>
121
+                <text>{FormData.householdIncome || '请选择'}</text>
121
               </Picker>
122
               </Picker>
122
             </view>
123
             </view>
123
             <text className='iconfont icon-jiantoudown'></text>
124
             <text className='iconfont icon-jiantoudown'></text>
126
           <text>家庭成员数</text>
127
           <text>家庭成员数</text>
127
           <view className='FormLine flex-h'>
128
           <view className='FormLine flex-h'>
128
             <view className='flex-item'>
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
             </view>
131
             </view>
131
           </view>
132
           </view>
132
 
133
 
133
           <text>已有房产数</text>
134
           <text>已有房产数</text>
134
           <view className='FormLine flex-h'>
135
           <view className='FormLine flex-h'>
135
             <view className='flex-item'>
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
             </view>
138
             </view>
138
           </view>
139
           </view>
139
 
140
 
140
           <text>已有车辆数</text>
141
           <text>已有车辆数</text>
141
           <view className='FormLine flex-h'>
142
           <view className='FormLine flex-h'>
142
             <view className='flex-item'>
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
             </view>
145
             </view>
145
           </view>
146
           </view>
146
 
147
 
148
           <view className='FormLine flex-h'>
149
           <view className='FormLine flex-h'>
149
             <view className='flex-item'>
150
             <view className='flex-item'>
150
               <Picker onChange={PickerChange.bind(this, 'estimatedPurchaseTime')} value={null} range={BuyTimeRange}>
151
               <Picker onChange={PickerChange.bind(this, 'estimatedPurchaseTime')} value={null} range={BuyTimeRange}>
151
-                <text>请选择</text>
152
+                <text>{FormData.estimatedPurchaseTime || '请选择'}</text>
152
               </Picker>
153
               </Picker>
153
             </view>
154
             </view>
154
             <text className='iconfont icon-jiantoudown'></text>
155
             <text className='iconfont icon-jiantoudown'></text>
157
           <text>客户咨询重点</text>
158
           <text>客户咨询重点</text>
158
           <view className='FormLine flex-h'>
159
           <view className='FormLine flex-h'>
159
             <view className='flex-item'>
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
             </view>
162
             </view>
162
           </view>
163
           </view>
163
 
164
 
164
           <text>购房动机</text>
165
           <text>购房动机</text>
165
           <view className='FormLine flex-h'>
166
           <view className='FormLine flex-h'>
166
             <view className='flex-item'>
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
             </view>
169
             </view>
169
           </view>
170
           </view>
170
 
171
 
171
           <text>客户抗性分析</text>
172
           <text>客户抗性分析</text>
172
           <view className='FormLine flex-h'>
173
           <view className='FormLine flex-h'>
173
             <view className='flex-item'>
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
             </view>
176
             </view>
176
           </view>
177
           </view>
177
 
178
 
178
           <text>客户对项目认可点</text>
179
           <text>客户对项目认可点</text>
179
           <view className='FormLine flex-h'>
180
           <view className='FormLine flex-h'>
180
             <view className='flex-item'>
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
             </view>
183
             </view>
183
           </view>
184
           </view>
184
 
185
 
185
           <text>备注</text>
186
           <text>备注</text>
186
           <view className='FormLine flex-h'>
187
           <view className='FormLine flex-h'>
187
             <view className='flex-item'>
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
             </view>
190
             </view>
190
           </view>
191
           </view>
191
 
192
 

+ 2
- 2
src/pages/mine/components/StatCustomerListItem/index.jsx 查看文件

9
 
9
 
10
   return (
10
   return (
11
     <view className='components StatCustomerListItem flex-h'>
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
         <Image mode='scaleToFill' src={data.avatarurl}></Image>
13
         <Image mode='scaleToFill' src={data.avatarurl}></Image>
14
       </view>
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
         <view>
16
         <view>
17
           <text>{data.name}</text>
17
           <text>{data.name}</text>
18
           <text className={data.sex === 1 ? 'iconfont icon-nanxing' : 'iconfont icon-nvxing'}></text>
18
           <text className={data.sex === 1 ? 'iconfont icon-nanxing' : 'iconfont icon-nvxing'}></text>

+ 21
- 31
src/pages/mine/components/UserDetailBasicInfo/index.jsx 查看文件

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

+ 18
- 10
src/pages/mine/customerDetail/index.jsx 查看文件

13
 import UserDetailFollowRecord from '../components/UserDetailFollowRecord/index'
13
 import UserDetailFollowRecord from '../components/UserDetailFollowRecord/index'
14
 
14
 
15
 export default withLayout((props) => {
15
 export default withLayout((props) => {
16
+
17
+  const { name, sex, phone, avatarurl, status } = props.router.params
16
   const [CustomerId] = useState(props.router.params.id)
18
   const [CustomerId] = useState(props.router.params.id)
17
   const [CustomerInfo, setCustomerInfo] = useState({})
19
   const [CustomerInfo, setCustomerInfo] = useState({})
18
   const [ShowAddFollow, setShowAddFollow] = useState(false)
20
   const [ShowAddFollow, setShowAddFollow] = useState(false)
28
 
30
 
29
   useEffect(() => {
31
   useEffect(() => {
30
     if (CustomerId) {
32
     if (CustomerId) {
31
-      fetch({ url: `${API_GET_CUSTOMER_INFO}${CustomerId}` }).then((res) => {
32
-        setCustomerInfo(res)
33
-      })
33
+      UpdateCustomerInfo()
34
     }
34
     }
35
   }, [CustomerId])
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
   const CutMenu = (item) => {
45
   const CutMenu = (item) => {
38
     return () => {
46
     return () => {
39
       setCurrentMenuId(item.id)
47
       setCurrentMenuId(item.id)
81
             <view className='centerLabel'>
89
             <view className='centerLabel'>
82
               <view className='flex-h'>
90
               <view className='flex-h'>
83
                 <view className='Icon'>
91
                 <view className='Icon'>
84
-                  <Image mode='aspectFill' src={getImgURL(CustomerInfo.avatarurl)}></Image>
92
+                  <Image mode='aspectFill' src={getImgURL(CustomerInfo.avatarurl || avatarurl)}></Image>
85
                 </view>
93
                 </view>
86
                 <view className='flex-item'>
94
                 <view className='flex-item'>
87
                   <view>
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
                   </view>
98
                   </view>
91
-                  <text>{CustomerInfo.phone}</text>
99
+                  <text>{CustomerInfo.phone || phone}</text>
92
                 </view>
100
                 </view>
93
                 <text className='iconfont icon-liaotian'></text>
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
               </view>
103
               </view>
96
             </view>
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
             <text className='Tips'>NEW</text>
106
             <text className='Tips'>NEW</text>
99
             <text className='Tips'>NEW</text>
107
             <text className='Tips'>NEW</text>
100
           </view>
108
           </view>
117
           {/* 基本信息 */}
125
           {/* 基本信息 */}
118
           {
126
           {
119
             CurrentMenuId === 1 &&
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
   const user = useSelector(state => state.user)
20
   const user = useSelector(state => state.user)
21
   const [UserRole, setUserRole] = useState(null) // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
21
   const [UserRole, setUserRole] = useState(null) // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
22
   const [MenuList, setMenuList] = useState([])
22
   const [MenuList, setMenuList] = useState([])
23
-  const [IsPull, setPull] = useState(false)
24
   const [ShowLogin, setShowLogin] = useState(false)
23
   const [ShowLogin, setShowLogin] = useState(false)
25
-  const [PullTimer, setPullTimer] = useState(null)
26
   const { dispatch } = store
24
   const { dispatch } = store
27
 
25
 
28
   useEffect(() => {
26
   useEffect(() => {
39
     }
37
     }
40
   }, [UserRole])
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
   const MenuClick = (router) => {
40
   const MenuClick = (router) => {
56
     return () => {
41
     return () => {
57
       if (router === 'propertyConsultant') {
42
       if (router === 'propertyConsultant') {
80
   return (
65
   return (
81
     <view className='Page Mine'>
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
         <view className='PageContent'>
69
         <view className='PageContent'>
85
 
70
 
86
           {/* 需要登录 */}
71
           {/* 需要登录 */}

+ 4
- 20
src/pages/video/index.jsx 查看文件

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

+ 9
- 0
src/pages/video/index.scss 查看文件

25
           margin-right: 10px;
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
   > .Menu {
39
   > .Menu {