Browse Source

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

张延森 3 years ago
parent
commit
72f2662dbe

+ 2
- 2
config/dev.js View File

3
     NODE_ENV: '"development"'
3
     NODE_ENV: '"development"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"https://www.newhousehold.cn"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"https://www.newhousehold.cn"',
8
     // HOST: '"http://127.0.0.1:8567"',
8
     // HOST: '"http://127.0.0.1:8567"',
9
     WSS_HOST: '"wss://www.newhousehold.cn"',
9
     WSS_HOST: '"wss://www.newhousehold.cn"',
10
     // WSS_HOST: '"wss://xlk.njyz.tech"',
10
     // WSS_HOST: '"wss://xlk.njyz.tech"',

+ 1
- 1
project.config.json View File

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "miniapp",
3
 	"projectname": "miniapp",
4
 	"description": "",
4
 	"description": "",
5
-	"appid": "wxc96058d57e77f373",
5
+	"appid": "wxe44244d1a5ea3364",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

+ 1
- 1
src/constants/api.js View File

149
 export const API_MANAGE_CUSTOMER_LIST = resolvePath('marking/customers')
149
 export const API_MANAGE_CUSTOMER_LIST = resolvePath('marking/customers')
150
 export const API_TOBE_MANAGER = resolvePath('marketing')
150
 export const API_TOBE_MANAGER = resolvePath('marketing')
151
 export const API_MY_BUILDINGIDS = resolvePath('building/mine')
151
 export const API_MY_BUILDINGIDS = resolvePath('building/mine')
152
-export const API_MARKETING_VISIT = resolvePath('marking//visit')
152
+export const API_MARKETING_VISIT = resolvePath('marking/visit')
153
 
153
 
154
 
154
 
155
 // report
155
 // report

+ 9
- 3
src/pages/index/buildingDetail/components/HouseTypeIntro/index.scss View File

64
         }
64
         }
65
         >.Title {
65
         >.Title {
66
           font-size: 0;
66
           font-size: 0;
67
-          white-space: nowrap;
67
+          overflow: hidden;
68
           margin-top: 20px;
68
           margin-top: 20px;
69
           padding: 0 20px;
69
           padding: 0 20px;
70
           >text {
70
           >text {
71
-            display: inline-block;
72
-            vertical-align: middle;
71
+            max-width: 100%;
72
+            display: block;
73
+            word-break: break-all;
73
             font-size: 32px;
74
             font-size: 32px;
74
             line-height: 44px;
75
             line-height: 44px;
76
+            text-overflow: ellipsis;
77
+            display: -webkit-box;
78
+            -webkit-box-orient: vertical;
79
+            -webkit-line-clamp: 2;
80
+            white-space: pre-line;
75
             &:first-child {
81
             &:first-child {
76
               color: #FA5431;
82
               color: #FA5431;
77
               margin-right: 10px;
83
               margin-right: 10px;

+ 1
- 1
src/pages/index/components/LiveSale/index.jsx View File

23
   }, [city])
23
   }, [city])
24
 
24
 
25
   const GetLiveList = () => {
25
   const GetLiveList = () => {
26
-    fetch({url: API_LIVE_LIST, method: 'get', payload: {cityId: city.curCity.id, pageNum: 1, pageSize: 20}}).then((res) => {
26
+    fetch({url: API_LIVE_LIST, method: 'get', payload: {cityId: city.curCity.id, pageNum: 1, pageSize: 20, isHome: 1}}).then((res) => {
27
       setPageList(res.records || [])
27
       setPageList(res.records || [])
28
       change(!!(res.records || []).length)
28
       change(!!(res.records || []).length)
29
     })
29
     })

+ 9
- 1
src/pages/mine/addCustomer/getSubmitor.jsx View File

6
 export default function getSubmitor(person) {
6
 export default function getSubmitor(person) {
7
   const { personType } = person
7
   const { personType } = person
8
 
8
 
9
-  const builder = (url) => (payload) => fetch({ url, method: 'post', payload })
9
+  const builder = (url) => {
10
+    (payload, callback = () => {}, error = () => {}) => {
11
+      fetch({ url, method: 'post', payload }).then(() => {
12
+        callback()
13
+      }).catch((res) => {
14
+        error(res)
15
+      })
16
+    }
17
+  }
10
   let fn = () => undefined
18
   let fn = () => undefined
11
   switch (personType) {
19
   switch (personType) {
12
     case ROLE_CODE.CONSULTANT:
20
     case ROLE_CODE.CONSULTANT:

+ 10
- 3
src/pages/mine/addCustomer/index.jsx View File

90
     }
90
     }
91
 
91
 
92
     setLoading(true)
92
     setLoading(true)
93
-    postSubmit(payload).then(() => {
93
+    let url = null
94
+    if(personType === ROLE_CODE.CONSULTANT) {
95
+      url = API_REPORT_CUETOMER
96
+    } else if(personType === ROLE_CODE.CHANNEL_AGENT) {
97
+      url = API_CHANNEL_REPORT
98
+    } else if(personType === ROLE_CODE.CUSTOMER) {
99
+      url = API_USER_ADD_CUSTOMER
100
+    }
101
+    fetch({ url, method: 'post', payload }).then(() => {
94
       setLoading(false)
102
       setLoading(false)
95
       Taro.showToast({ title: '操作成功', icon: 'none' })
103
       Taro.showToast({ title: '操作成功', icon: 'none' })
96
       
104
       
98
         Taro.navigateBack({ delta: 1 })
106
         Taro.navigateBack({ delta: 1 })
99
         clearTimeout(t)
107
         clearTimeout(t)
100
       }, 1500)
108
       }, 1500)
101
-    }).catch((err) => {
102
-      console.error(err)
109
+    }).catch(() => {
103
       setLoading(false)
110
       setLoading(false)
104
     })
111
     })
105
   }
112
   }

+ 5
- 3
src/subpackages/pages/marketing/changeVisit/index.jsx View File

39
   const [CurrnetConsultant, setCurrnetConsultant] = useState({})
39
   const [CurrnetConsultant, setCurrnetConsultant] = useState({})
40
 
40
 
41
   const [SuccessDate, setSuccessDate] = useState(null)
41
   const [SuccessDate, setSuccessDate] = useState(null)
42
+  const [channelCustomerId, setChannelCustomerId] = useState(null)
42
 
43
 
43
   const [StatusList] = useState([
44
   const [StatusList] = useState([
44
     { name: '认筹', id: 3 },
45
     { name: '认筹', id: 3 },
68
       if(CurrentStatusId - 0 === 3) {
69
       if(CurrentStatusId - 0 === 3) {
69
         setFormData({ ...FormData, ...res?.customerPreparatory })
70
         setFormData({ ...FormData, ...res?.customerPreparatory })
70
       }
71
       }
72
+      setChannelCustomerId(res?.channelCustomer?.channelCustomerId)
71
       setRenChouData({ ...RenChouData, ...res?.customerPreparatory })
73
       setRenChouData({ ...RenChouData, ...res?.customerPreparatory })
72
       if((res.customerSignatory || []).length) {
74
       if((res.customerSignatory || []).length) {
73
         let customerSignatory = res.customerSignatory[0]
75
         let customerSignatory = res.customerSignatory[0]
157
 
159
 
158
   const ToSubmit = () => {
160
   const ToSubmit = () => {
159
     if (CurrentStatusId === 3) {
161
     if (CurrentStatusId === 3) {
160
-      fetch({ url: API_SURE_CHIP, method: 'put', payload: { customerId: id, customerPreparatory: { ...FormData, channelId: channelId === 'null' || channelId === null ? '' : channelId } } }).then(() => {
162
+      fetch({ url: API_SURE_CHIP, method: 'put', payload: { customerId: id, customerPreparatory: { ...FormData, channelId: channelId === 'null' || channelId === null ? '' : channelId, channelCustomerId, } } }).then(() => {
161
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
163
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
162
         setTimeout(() => {
164
         setTimeout(() => {
163
           Taro.navigateBack({ delta: 1 })
165
           Taro.navigateBack({ delta: 1 })
171
         }
173
         }
172
       }
174
       }
173
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`
175
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`
174
-      fetch({ url: API_SURE_SIGN, method: 'put', payload: { customerId: id, customerSignatory: { ...params, channelId: channelId === 'null' || channelId === null ? '' : channelId } } }).then(() => {
176
+      fetch({ url: API_SURE_SIGN, method: 'put', payload: { customerId: id, customerSignatory: { ...params, channelId: channelId === 'null' || channelId === null ? '' : channelId, channelCustomerId, } } }).then(() => {
175
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
177
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
176
         setTimeout(() => {
178
         setTimeout(() => {
177
           Taro.navigateBack({ delta: 1 })
179
           Taro.navigateBack({ delta: 1 })
185
         }
187
         }
186
       }
188
       }
187
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`
189
       params.dividendsName = `${FormData.dividendsName}|${FormData.dividendsPer}%`
188
-      fetch({ url: API_SURE_BUY, method: 'put', payload: { customerId: id, customerSignatory: { ...params, channelId: channelId === 'null' || channelId === null ? '' : channelId } } }).then(() => {
190
+      fetch({ url: API_SURE_BUY, method: 'put', payload: { customerId: id, customerSignatory: { ...params, channelId: channelId === 'null' || channelId === null ? '' : channelId, channelCustomerId, } } }).then(() => {
189
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
191
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
190
         setTimeout(() => {
192
         setTimeout(() => {
191
           Taro.navigateBack({ delta: 1 })
193
           Taro.navigateBack({ delta: 1 })

+ 3
- 0
src/subpackages/pages/marketing/sureVisit/index.jsx View File

22
   const [visitDate, setVisitDate] = useState(formatDate(Date.now(), 'yyyy-MM-dd'))
22
   const [visitDate, setVisitDate] = useState(formatDate(Date.now(), 'yyyy-MM-dd'))
23
   const [imageUrl, setImageUrl] = useState()
23
   const [imageUrl, setImageUrl] = useState()
24
   const [remark, setRemark] = useState()
24
   const [remark, setRemark] = useState()
25
+  const [channelCustomerId, setChannelCustomerId] = useState(null)
25
 
26
 
26
   const openAlbum = (e) => {
27
   const openAlbum = (e) => {
27
     e.stopPropagation()
28
     e.stopPropagation()
61
         visitDate: `${visitDate}T12:00:00.000Z`,  // 随便造了一个时刻
62
         visitDate: `${visitDate}T12:00:00.000Z`,  // 随便造了一个时刻
62
         remark,
63
         remark,
63
         channelId: channelCustomer.channelId,
64
         channelId: channelCustomer.channelId,
65
+        channelCustomerId,
64
       }
66
       }
65
     }
67
     }
66
 
68
 
86
         setChannelCustomer(res || {})
88
         setChannelCustomer(res || {})
87
 
89
 
88
         setConsultant(res?.realtyConsultant)
90
         setConsultant(res?.realtyConsultant)
91
+        setChannelCustomerId(res?.channelCustomerId)
89
 
92
 
90
         if (res?.buildingId) {
93
         if (res?.buildingId) {
91
           getCardList({
94
           getCardList({