From cf7e0996b85c2387a0d8ca3409996c909f0858b7 Mon Sep 17 00:00:00 2001 From: gooking Date: Sat, 20 May 2017 08:54:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E8=BD=AC=E5=8F=91=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods-details/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pages/goods-details/index.js b/pages/goods-details/index.js index 9d68866e..8f988903 100644 --- a/pages/goods-details/index.js +++ b/pages/goods-details/index.js @@ -64,6 +64,7 @@ Page({ selectSizePrice:res.data.data.basicInfo.minPrice, }); } + that.data.goodsDetail = res.data.data; that.setData({ goodsDetail:res.data.data, selectSizePrice:res.data.data.basicInfo.minPrice, @@ -256,5 +257,17 @@ Page({ } this.addShopCar(); this.goShopCar(); + }, + onShareAppMessage: function () { + return { + title: this.data.goodsDetail.basicInfo.name, + path: '/pages/goods-details/index?id=' + this.data.goodsDetail.basicInfo.id, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } } })