diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index 9cced9c..df5d796 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -1,4 +1,4 @@ - + diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index ea2dc9b..b4fd4da 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -14,9 +14,9 @@ Page({ }, onLoad(options) { let that = this; - console.log(options.id); + console.log(options.couponChannelId); that.setData({ - couponChannelId: options.id, + couponChannelId: options.couponChannelId, couponId: options.couponId }) wx.showLoading({ @@ -29,7 +29,7 @@ Page({ Http.get({ url: config.api.couponDetail, data: { - id: options.id, + id: options.couponChannelId, } }).then(res => { console.log(res); @@ -143,7 +143,7 @@ Page({ } }).then(res => { console.log(res); - /* + /// Begin payment ---- var payOrderId = "" + res.data.payOrderId; wx.hideLoading(); @@ -202,10 +202,10 @@ Page({ } }); /// End payment -------- - */ + ///// virtual pay - var payOrderId = "" + res.data.out_trade_no; - that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 + //var payOrderId = "" + res.data.out_trade_no; + //that.payOrderUpdate(that.data.orderId, payOrderId, 1); // 支付成功 ///// end virtual pay }); } else { diff --git a/pages/getphoneInfo/index.js b/pages/getphoneInfo/index.js index 26c69e3..5cc3912 100755 --- a/pages/getphoneInfo/index.js +++ b/pages/getphoneInfo/index.js @@ -34,7 +34,7 @@ Page({ icon: "success", success: function(res) { wx.redirectTo({ - url: '/pages/coupon/detail/index?id='+ that.data.couponChannelId + '&couponId='+ that.data.couponId +'&flag=pay' + url: '/pages/coupon/detail/index?couponChannelId='+ that.data.couponChannelId + '&couponId='+ that.data.couponId +'&flag=pay' }) } }) diff --git a/pages/index/rushToBuy/index.js b/pages/index/rushToBuy/index.js index a135fdc..15a43db 100644 --- a/pages/index/rushToBuy/index.js +++ b/pages/index/rushToBuy/index.js @@ -39,7 +39,7 @@ Component({ console.log(e.currentTarget.dataset.id); console.log(e.currentTarget.dataset.targetad); wx.navigateTo({ - url: `/pages/coupon/detail/index?id=${ + url: `/pages/coupon/detail/index?couponChannelId=${ e.currentTarget.dataset.id }&couponId=${e.currentTarget.dataset.couponId} }&targetAd=${e.currentTarget.dataset.targetad}` diff --git a/pages/phoneinput/phoneinput.js b/pages/phoneinput/phoneinput.js index 4b27171..69d2813 100644 --- a/pages/phoneinput/phoneinput.js +++ b/pages/phoneinput/phoneinput.js @@ -40,7 +40,7 @@ Page({ }) .then(res => { wx.redirectTo({ - url: '/pages/coupon/detail/index?id=' + that.data.couponChannelId + "&flag=pay", + url: '/pages/coupon/detail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId + "&flag=pay", }) }) .catch(error => { diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js index 822fb46..f46deda 100644 --- a/pages/rushToBuy/index.js +++ b/pages/rushToBuy/index.js @@ -116,9 +116,9 @@ Page({ console.log(e.currentTarget.dataset.couponid); console.log(e.currentTarget.dataset.targetad); wx.navigateTo({ - url: `/pages/coupon/detail/index?id=${ + url: `/pages/coupon/detail/index?couponChannelId=${ e.currentTarget.dataset.id - }`, + }&couponId=${e.currentTarget.dataset.couponId}`, success: function(res) { // success },