|
|
@ -142,7 +142,8 @@ |
|
|
backgroundImg: '', |
|
|
backgroundImg: '', |
|
|
goodShare: '', |
|
|
goodShare: '', |
|
|
s_id: '', |
|
|
s_id: '', |
|
|
isShowButtonCount: 0 |
|
|
|
|
|
|
|
|
isShowButtonCount: 0, |
|
|
|
|
|
userInfo: {} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -155,7 +156,8 @@ |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
this.goods_id = options.id; |
|
|
this.goods_id = options.id; |
|
|
this.pt = options.pt || 1; |
|
|
this.pt = options.pt || 1; |
|
|
this.s_id = options.share_id || '' |
|
|
|
|
|
|
|
|
this.s_id = options.share_id || ''; |
|
|
|
|
|
this.userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
this.getGoodsDetail(); |
|
|
this.getGoodsDetail(); |
|
|
this.getWxCode() |
|
|
this.getWxCode() |
|
|
this.getBackground() |
|
|
this.getBackground() |
|
|
@ -220,13 +222,15 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getWxCode() { |
|
|
getWxCode() { |
|
|
let userInfo = uni.getStorageSync('userinfo') || {}; |
|
|
|
|
|
const token = this.$shared.createToken(); |
|
|
|
|
|
|
|
|
const token = this.$shared.createToken({ |
|
|
|
|
|
user_id: this.userInfo.id, |
|
|
|
|
|
goods_id: this.goods_id |
|
|
|
|
|
}); |
|
|
let options = { |
|
|
let options = { |
|
|
route: 'goods', |
|
|
route: 'goods', |
|
|
pt: 2, |
|
|
pt: 2, |
|
|
id: this.goods_id, |
|
|
id: this.goods_id, |
|
|
share_id: userInfo.id, |
|
|
|
|
|
|
|
|
share_id: this.userInfo.id, |
|
|
scene_code: this.$scene.V2_GOODS_SHAREPOSTER |
|
|
scene_code: this.$scene.V2_GOODS_SHAREPOSTER |
|
|
} |
|
|
} |
|
|
this.generateKooken(token, options); // 谁分享了就生成一个token |
|
|
this.generateKooken(token, options); // 谁分享了就生成一个token |
|
|
@ -514,7 +518,10 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onShareAppMessage() { |
|
|
onShareAppMessage() { |
|
|
const token = this.$shared.createToken(); |
|
|
|
|
|
|
|
|
const token = this.$shared.createToken({ |
|
|
|
|
|
user_id: this.userInfo.id, |
|
|
|
|
|
goods_id: this.goods_id |
|
|
|
|
|
}); |
|
|
let goods = this.goods_detail; |
|
|
let goods = this.goods_detail; |
|
|
let options = { |
|
|
let options = { |
|
|
id: goods.id, |
|
|
id: goods.id, |
|
|
|