diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 75e87c9..1ca3ad7 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -56,17 +56,23 @@ Page({ }) }, onShareAppMessage: function (res) { - let _this = this; - return { - title: '领取卡', - path: '/pages/index/index?couponChannelId=' + this.data.order.couponChannelId + '&cuserId=' + this.data.order.cuserId + '&couponId=' + this.data.order.productId + '&coverImg=' + this.data.order.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.order.couponOrderId + '&updateDate=' + this.data.order.updateDate, - imageUrl: this.data.order.coverImg, - success: function (res) { - // 转发成功 - }, - fail: function (res) { - // 转发失败 + if (res.from === 'button') { + console.log(res, 3333333333333333333333) + // 来自页面内转发按钮 + let _this = this; + return { + title: '领取卡', + path: '/pages/index/index?couponChannelId=' + this.data.order.couponChannelId + '&cuserId=' + this.data.order.cuserId + '&couponId=' + this.data.order.productId + '&coverImg=' + this.data.order.coverImg + '&userName=' + this.data.userName + '&avatarUrl=' + this.data.avatarUrl + '&couponOrderId=' + this.data.order.couponOrderId + '&updateDate=' + this.data.order.updateDate, + imageUrl: this.data.order.coverImg, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } } + } else { + console.log(res, 444444444444444444) } }, powerDrawer: function (e) { @@ -141,6 +147,7 @@ Page({ this.setData({ orderId: options.orderId }); + wx.hideShareMenu() if(options.cardIf){ this.setData({ cardIf:true