Bladeren bron

queryInfo

xujing 5 jaren geleden
bovenliggende
commit
5f72432dbc
4 gewijzigde bestanden met toevoegingen van 24 en 13 verwijderingen
  1. 4
    4
      config/dev.js
  2. 1
    1
      src/pages/activity/detail/assemble.js
  3. 18
    7
      src/pages/news/detail/index.js
  4. 1
    1
      src/services/news.js

+ 4
- 4
config/dev.js Bestand weergeven

@@ -3,10 +3,10 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://dev.fangdeal.cn"', //测试
7
-    // WSS_HOST: '"wss://dev.fangdeal.cn"',
8
-    HOST: '"http://192.168.2.43:8080"',
9
-    WSS_HOST: '"ws://192.168.2.43:8080"',
6
+    HOST: '"https://dev.fangdeal.cn"', //测试
7
+    WSS_HOST: '"wss://dev.fangdeal.cn"',
8
+    // HOST: '"http://192.168.1.100:8080"',
9
+    // WSS_HOST: '"ws://192.168.1.100:8080"',
10 10
     OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
11 11
     OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",
12 12
     Version: "V3.5.28"

+ 1
- 1
src/pages/activity/detail/assemble.js Bestand weergeven

@@ -309,7 +309,7 @@ export default class Detail extends Component {
309 309
     // const consultant = this.$router.params.consultant || qrcodeParams.consultant
310 310
     const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
311 311
     const recommender = this.$router.params.recommender || qrcodeParams.recommender || ""
312
-    getGroupDetail(id, recordI, queryInfo).then(res => {
312
+    getGroupDetail(id, recordId, queryInfo).then(res => {
313 313
       this.stopTicker()
314 314
 
315 315
       const recordDetail = res.taShareRecord || {}

+ 18
- 7
src/pages/news/detail/index.js Bestand weergeven

@@ -56,6 +56,7 @@ export default class NewsDetail extends Component {
56 56
     grantPhoneVisible: false, // 授权电话
57 57
     grantAvatarVisible: false, // 授权头像
58 58
     webViewVisible: false,
59
+    queryInfo: {}
59 60
   }
60 61
 
61 62
   componentWillMount(options) {
@@ -71,7 +72,15 @@ export default class NewsDetail extends Component {
71 72
       if (this.$router.params.scene) {
72 73
         getQrCodeParams(this.$router.params.scene).then(res => {
73 74
           console.log(res, "扫码参数")
74
-          this.setState({ newsId: res.id, qrcodeParams: res }, () => {
75
+          this.setState({
76
+            newsId: res.id,
77
+            qrcodeParams: res,
78
+            queryInfo: {
79
+              channelId: res.channelId || '',
80
+              qrCodeId: res.qrCodeId || '',
81
+              scene: this.$router.params.scene,
82
+            }
83
+          }, () => {
75 84
             this.loadDetail()
76 85
             addNewsUv(res.id)
77 86
           })
@@ -204,7 +213,7 @@ export default class NewsDetail extends Component {
204 213
   }
205 214
 
206 215
   onShareAppMessage = () => {
207
-    const { detail: { shareContents, newsName, newsId, newsImg, buildingId } } = this.state
216
+    const { detail: { shareContents, newsName, newsId, newsImg, buildingId }, queryInfo } = this.state
208 217
     const { userInfo: { person: { personId, personType, userId } } } = this.props
209 218
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
210 219
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
@@ -219,7 +228,8 @@ export default class NewsDetail extends Component {
219 228
       sharePersonId: personId,
220 229
       targetId: newsId,
221 230
       buildingId: buildingId || '',
222
-      data: '{}'
231
+      data: '{}',
232
+      ...queryInfo
223 233
     }, 'news')
224 234
 
225 235
     // addNewsShareNum(newsId)
@@ -247,7 +257,7 @@ export default class NewsDetail extends Component {
247 257
   }
248 258
 
249 259
   loadDetail() {
250
-    const { newsId, qrcodeParams } = this.state
260
+    const { newsId, qrcodeParams, queryInfo } = this.state
251 261
     const consultant = Taro.getStorageSync('consultantId') || ''
252 262
     // const consultant = this.$router.params.consultant || qrcodeParams.consultant
253 263
     const consultantId = this.$router.params.consultantId || qrcodeParams.consultantId || ""
@@ -255,7 +265,7 @@ export default class NewsDetail extends Component {
255 265
     const { dispatchProjectDetail } = this.props
256 266
     Taro.showLoading()
257 267
     console.log(newsId, "newsIdnewsIdnewsIdnewsIdnewsId")
258
-    queryNewsDetail(newsId).then(res => {
268
+    queryNewsDetail(newsId, queryInfo).then(res => {
259 269
       Taro.hideLoading()
260 270
       // 埋点
261 271
       savePoint({
@@ -356,14 +366,15 @@ export default class NewsDetail extends Component {
356 366
         posterVisible: !!flag
357 367
       })
358 368
     }
359
-    const { newsId, detail: { buildingId } } = this.state
369
+    const { newsId, detail: { buildingId }, queryInfo } = this.state
360 370
     shareSavePoint({
361 371
       event: 'poster',
362 372
       eventType: 'news',
363 373
       propertyName: '生成资讯详情海报',
364 374
       targetId: newsId,
365 375
       buildingId: buildingId || '',
366
-      data: '{}'
376
+      data: '{}',
377
+      ...queryInfo
367 378
     }, 'news')
368 379
   }
369 380
   toProjectDetail = () => {

+ 1
- 1
src/services/news.js Bestand weergeven

@@ -62,7 +62,7 @@ export const queryNewsList = payload => fetch({ url: API_NEWS_LIST, payload })
62 62
  * 获取资讯详情 
63 63
  * @param {*} id
64 64
  */
65
-export const queryNewsDetail = id => fetch({ url: `${API_NEWS_LIST}/${id}` })
65
+export const queryNewsDetail = (id, payload) => fetch({ url: `${API_NEWS_LIST}/${id}`, payload })
66 66
 
67 67
 /**
68 68
  * 首页获取助力拼团