From 449f77b9b89d4f44b4af72aaea55a4ed3a6b2c77 Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Tue, 28 Aug 2018 10:33:45 +0800 Subject: [PATCH] =?UTF-8?q?id=E4=BF=AE=E6=94=B9=E4=B8=BAcouponChannelId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/coupons/index.wxml | 2 +- pages/coupon/detail/index.js | 14 +++++++------- pages/getphoneInfo/index.js | 2 +- pages/index/rushToBuy/index.js | 2 +- pages/phoneinput/phoneinput.js | 2 +- pages/rushToBuy/index.js | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) 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 },