|
@@ -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 = () => {
|