瀏覽代碼

phone consultant

xujing 5 年之前
父節點
當前提交
31af7e63c5
共有 3 個檔案被更改,包括 27 行新增18 行删除
  1. 7
    3
      src/pages/activity/detail/index.js
  2. 6
    3
      src/pages/news/detail/index.js
  3. 14
    12
      src/pages/project/detail/index.js

+ 7
- 3
src/pages/activity/detail/index.js 查看文件

@@ -126,7 +126,7 @@ export default class Detail extends Component {
126 126
   }
127 127
   onShareAppMessage = () => {
128 128
     const { detail: { shareContents, title, dynamicId, url } } = this.state
129
-    const { userInfo: { person: { personId, personType,userId } } } = this.props
129
+    const { userInfo: { person: { personId, personType, userId } } } = this.props
130 130
     console.log(dynamicId, "path")
131 131
     console.log(personId, "personId")
132 132
 
@@ -221,12 +221,16 @@ export default class Detail extends Component {
221 221
       }
222 222
 
223 223
       const { userInfo: { person, miniApp } } = this.props
224
-      const { avatarurl, nickname, personId } = person
224
+      const { avatarurl, nickname, personId, personType, phone, tel } = person
225 225
       const { detail: { dynamicId, posters, createDate } } = this.state
226
+      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
227
+      const phoneNum = phone || tel
228
+      
226 229
       const payload = {
227
-        "scene": `id=${dynamicId}&from=dynamic_share&recommender=${personId}`,
230
+        "scene": `id=${dynamicId}&from=dynamic_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
228 231
         "page": 'pages/activity/detail/index',
229 232
       }
233
+   
230 234
       // debugger
231 235
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
232 236
       getMiniQrcode(payload).then(qrcode => {

+ 6
- 3
src/pages/news/detail/index.js 查看文件

@@ -121,7 +121,7 @@ export default class NewsDetail extends Component {
121 121
   }
122 122
   onShareAppMessage = () => {
123 123
     const { detail: { shareContents, newsName, newsId, newsImg } } = this.state
124
-    const { userInfo: { person: { personId, personType,userId } } } = this.props
124
+    const { userInfo: { person: { personId, personType, userId } } } = this.props
125 125
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
126 126
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
127 127
 
@@ -189,10 +189,12 @@ export default class NewsDetail extends Component {
189 189
         return
190 190
       }
191 191
       const { userInfo: { person, miniApp } } = this.props
192
-      const { avatarurl, nickname, personId } = person
192
+      const { avatarurl, nickname, personId, personType, phone, tel } = person
193 193
       const { newsId, detail: { posters, newsName, createDate } } = this.state
194
+      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
195
+      const phoneNum = phone || tel
194 196
       const payload = {
195
-        "scene": `id=${newsId}&from=news_share&recommender=${personId}`,
197
+        "scene": `id=${newsId}&from=news_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
196 198
         "page": 'pages/news/detail/index',
197 199
       }
198 200
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');
@@ -207,6 +209,7 @@ export default class NewsDetail extends Component {
207 209
           createDate: createDate,//资讯时间
208 210
           poster: posters[0].posterImg,
209 211
           miniAppName: miniApp.name,
212
+
210 213
         }
211 214
         resolve(data)
212 215
       })

+ 14
- 12
src/pages/project/detail/index.js 查看文件

@@ -299,16 +299,16 @@ export default class Index extends Component {
299 299
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
300 300
     // 分享埋点
301 301
     addItemShareNum(buildingId)
302
-        savePoint({
303
-          event: 'share',
304
-          eventType: 'building',
305
-          propertyName: '项目详情分享',
306
-          consultantId: consultantId,
307
-          sharePersonId: personId,
308
-          data: '{}'
309
-        }).then(res => {
310
-          console.log('项目详情分享')
311
-        })
302
+    savePoint({
303
+      event: 'share',
304
+      eventType: 'building',
305
+      propertyName: '项目详情分享',
306
+      consultantId: consultantId,
307
+      sharePersonId: personId,
308
+      data: '{}'
309
+    }).then(res => {
310
+      console.log('项目详情分享')
311
+    })
312 312
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
313 313
     return {
314 314
       title: shareContents[0].shareContentTitle,//分享内容
@@ -334,12 +334,14 @@ export default class Index extends Component {
334 334
         return
335 335
       }
336 336
       const {
337
-        userInfo: { person: { avatarurl, nickname, personId }, miniApp },
337
+        userInfo: { person: { avatarurl, nickname, personId, personType, phone, tel }, miniApp },
338 338
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
339 339
       } = this.props
340 340
       const { total = 0 } = uvList
341
+      const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
342
+      const phoneNum = phone || tel
341 343
       const payload = {
342
-        "scene": `id=${buildingId}&from=building_share&recommender=${personId}`,
344
+        "scene": `id=${buildingId}&from=building_share&recommender=${personId}&consultant=${consultant}&phoneNum=${phoneNum}`,
343 345
         "page": 'pages/project/detail/index',
344 346
       }
345 347
       const _avatarurl = getDownloadURL(avatarurl, 'avatar');