Преглед изворни кода

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

张延森 пре 3 година
родитељ
комит
72f2662dbe

+ 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: '"https://www.newhousehold.cn"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"https://www.newhousehold.cn"',
8 8
     // HOST: '"http://127.0.0.1:8567"',
9 9
     WSS_HOST: '"wss://www.newhousehold.cn"',
10 10
     // WSS_HOST: '"wss://xlk.njyz.tech"',

+ 1
- 1
project.config.json Прегледај датотеку

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

+ 1
- 1
src/constants/api.js Прегледај датотеку

@@ -149,7 +149,7 @@ export const API_CHANNEL_REPORT = resolvePath('channel/report')
149 149
 export const API_MANAGE_CUSTOMER_LIST = resolvePath('marking/customers')
150 150
 export const API_TOBE_MANAGER = resolvePath('marketing')
151 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 155
 // report

+ 9
- 3
src/pages/index/buildingDetail/components/HouseTypeIntro/index.scss Прегледај датотеку

@@ -64,14 +64,20 @@
64 64
         }
65 65
         >.Title {
66 66
           font-size: 0;
67
-          white-space: nowrap;
67
+          overflow: hidden;
68 68
           margin-top: 20px;
69 69
           padding: 0 20px;
70 70
           >text {
71
-            display: inline-block;
72
-            vertical-align: middle;
71
+            max-width: 100%;
72
+            display: block;
73
+            word-break: break-all;
73 74
             font-size: 32px;
74 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 81
             &:first-child {
76 82
               color: #FA5431;
77 83
               margin-right: 10px;

+ 1
- 1
src/pages/index/components/LiveSale/index.jsx Прегледај датотеку

@@ -23,7 +23,7 @@ export default function LiveSale (props) {
23 23
   }, [city])
24 24
 
25 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 27
       setPageList(res.records || [])
28 28
       change(!!(res.records || []).length)
29 29
     })

+ 9
- 1
src/pages/mine/addCustomer/getSubmitor.jsx Прегледај датотеку

@@ -6,7 +6,15 @@ import { API_REPORT_CUETOMER, API_USER_ADD_CUSTOMER, API_CHANNEL_REPORT } from '
6 6
 export default function getSubmitor(person) {
7 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 18
   let fn = () => undefined
11 19
   switch (personType) {
12 20
     case ROLE_CODE.CONSULTANT:

+ 10
- 3
src/pages/mine/addCustomer/index.jsx Прегледај датотеку

@@ -90,7 +90,15 @@ export default withLayout((props) => {
90 90
     }
91 91
 
92 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 102
       setLoading(false)
95 103
       Taro.showToast({ title: '操作成功', icon: 'none' })
96 104
       
@@ -98,8 +106,7 @@ export default withLayout((props) => {
98 106
         Taro.navigateBack({ delta: 1 })
99 107
         clearTimeout(t)
100 108
       }, 1500)
101
-    }).catch((err) => {
102
-      console.error(err)
109
+    }).catch(() => {
103 110
       setLoading(false)
104 111
     })
105 112
   }

+ 5
- 3
src/subpackages/pages/marketing/changeVisit/index.jsx Прегледај датотеку

@@ -39,6 +39,7 @@ export default withLayout((props) => {
39 39
   const [CurrnetConsultant, setCurrnetConsultant] = useState({})
40 40
 
41 41
   const [SuccessDate, setSuccessDate] = useState(null)
42
+  const [channelCustomerId, setChannelCustomerId] = useState(null)
42 43
 
43 44
   const [StatusList] = useState([
44 45
     { name: '认筹', id: 3 },
@@ -68,6 +69,7 @@ export default withLayout((props) => {
68 69
       if(CurrentStatusId - 0 === 3) {
69 70
         setFormData({ ...FormData, ...res?.customerPreparatory })
70 71
       }
72
+      setChannelCustomerId(res?.channelCustomer?.channelCustomerId)
71 73
       setRenChouData({ ...RenChouData, ...res?.customerPreparatory })
72 74
       if((res.customerSignatory || []).length) {
73 75
         let customerSignatory = res.customerSignatory[0]
@@ -157,7 +159,7 @@ export default withLayout((props) => {
157 159
 
158 160
   const ToSubmit = () => {
159 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 163
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
162 164
         setTimeout(() => {
163 165
           Taro.navigateBack({ delta: 1 })
@@ -171,7 +173,7 @@ export default withLayout((props) => {
171 173
         }
172 174
       }
173 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 177
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
176 178
         setTimeout(() => {
177 179
           Taro.navigateBack({ delta: 1 })
@@ -185,7 +187,7 @@ export default withLayout((props) => {
185 187
         }
186 188
       }
187 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 191
         Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
190 192
         setTimeout(() => {
191 193
           Taro.navigateBack({ delta: 1 })

+ 3
- 0
src/subpackages/pages/marketing/sureVisit/index.jsx Прегледај датотеку

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