Feat(商品详情):增加分享朋友圈
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user