diff --git a/pages/shop/GoodsCon/index.vue b/pages/shop/GoodsCon/index.vue index 03e485f..e3d6b4e 100644 --- a/pages/shop/GoodsCon/index.vue +++ b/pages/shop/GoodsCon/index.vue @@ -688,6 +688,43 @@ export default { } }) }, + onShareTimeline() { + uni.updateShareMenu({ + isPrivateMessage: false, + withShareTicket: false + }) + const storeName = this.storeInfo.storeName + const promise = new Promise(async (resolve, reject) => { + let result = null + let query = `id=${this.id}&partnerId=${this.userInfo.uid}` + if (this.source === 'famous') { + result = await famousGoodsShareImage(this.id) + } + if (this.source === 'kill') { + result = await secKillGoodsShareImage(this.activityId) + query += `&activityId=${this.activityId}` + } + if (result && result.status === 200) { + resolve({ + title: storeName, + query, + imageUrl: result.data + }) + } else { + resolve({ + title: storeName, + query, + imageUrl: this.storeInfo.image + }) + } + }) + return { + title: storeName, + query: `id=${this.id}&partnerId=${this.userInfo.uid}`, + imageUrl: this.storeInfo.image, + promise + } + }, onLoad(options) { // test data console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())