From 6ff393a6a121591fafa3a48387ebfbae2cdffd72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=99=96?= Date: Thu, 21 Feb 2019 11:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E8=BD=AC=E5=8F=91=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/detail/index.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) 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