From 465c4fb1a64fd11fa14a37aabf80ee2593ed5341 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Mon, 21 Jan 2019 15:26:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E6=83=A0=E5=88=B8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=A0=81=E8=A7=84=E5=88=99=E7=9A=84=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=A0=81=E7=9A=84=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/bargain/bargainDatail/bargainDatail.js | 26 ++++++++++++------- .../bargain/bargainDatail/bargainDatail.wxml | 4 +-- pages/cardorder/index/index.js | 6 ++--- pages/coupon/detail/index.js | 8 +++--- pages/coupon/detail/index.wxml | 2 +- pages/couponorder/detail/index.wxml | 4 +-- pages/couponorder/detail/index.wxss | 2 +- pages/index/index.js | 6 ++++- pages/order/detail/index.js | 1 + pages/order/index/index.wxml | 2 +- pages/orderquanma/index.js | 3 ++- pages/user/index.js | 6 ++++- pages/user/index.wxss | 9 ++++--- 13 files changed, 50 insertions(+), 29 deletions(-) diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js index 53df755..7f68ce9 100644 --- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -16,7 +16,8 @@ Page({ min: null, sec: null, showPage: false, - discountStatus:null + discountStatus:null, + disabled:false }, /** @@ -39,6 +40,14 @@ Page({ that.pressOrderDetail(options.orderId); } }, + onShow: function () { + let that = this; + console.log("--------------------------------onShow-------------------------------") + var todayDate = new Date().getTime(); + that.setData({ + todayDate: todayDate, + }) + }, /** * 更多砍价商品 */ @@ -59,6 +68,8 @@ Page({ } }) .then(res => { + console.log(res) + console.log("--------------------------status------------------------------------") if (res.data.status == 1) { that.setData({ discountStatus: 1 @@ -75,9 +86,10 @@ Page({ wx.stopPullDownRefresh(); }) .catch(err => { + console.log(err) wx.stopPullDownRefresh(); wx.showToast({ - title: err.message, + title: err.errMsg, icon: "none" }) }) @@ -119,7 +131,6 @@ Page({ }) .then(res => { console.log(res); - that.getPressOrderStatus(orderId); res.data.orderPressList.map(file => { file.createDate = diffTime(file.createDate) }) @@ -130,6 +141,7 @@ Page({ remain: (res.data.pressCurrentValue / 100).toFixed(2), showPage: true }) + that.getPressOrderStatus(orderId); }) .catch(err => { wx.showToast({ @@ -139,13 +151,7 @@ Page({ wx.stopPullDownRefresh(); }) }, - onShow: function() { - let that = this; - var todayDate = new Date().getTime(); - that.setData({ - todayDate: todayDate, - }) - }, + countdown(end_time) { let that = this; var EndTime = end_time; diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml index 9d7ce7c..e376b65 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxml +++ b/pages/bargain/bargainDatail/bargainDatail.wxml @@ -53,7 +53,7 @@ - + {{data.price/100}}元 立即购买 @@ -61,6 +61,6 @@ - + \ No newline at end of file diff --git a/pages/cardorder/index/index.js b/pages/cardorder/index/index.js index 9d44ced..de6b3df 100644 --- a/pages/cardorder/index/index.js +++ b/pages/cardorder/index/index.js @@ -54,12 +54,12 @@ Page({ let that = this; wx.scanCode({ success: (res) => { - console.log(res.result.indexOf('merchant_id_scan')) - if(res.result.indexOf('merchant_id_scan')!=-1){ + let value = JSON.parse(res.result); + if (value.END == 'B' && value.TYPE == 'merchant' && value.ID){ Http.get({ url: config.api.findByCode, data: { - merchantCode: JSON.parse(res.result).merchant_id_scan, + merchantCode:value.ID, } }) .then(res => { diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 8484be7..28ffa8e 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -118,8 +118,9 @@ Page({ /** * gotopay */ - gotopay: function () { + gotopay: function (e) { let that = this; + var discount = e.currentTarget.dataset.discount; that.setData({ queueData: null, showbutton: true @@ -133,7 +134,7 @@ Page({ .then(res => { console.log(res); if (res.data == undefined) { - that.orderFunc(); + that.orderFunc(discount); that.setData({ flag: false }) @@ -338,13 +339,14 @@ Page({ * 发起支付 */ orderFunc(discount) { + console.log(discount) var that = this; Http.post({ url: config.api.checkPhoneStatus, data: {} }) .then(res => { - if (discount == 'discount') { + if (discount == 'discount' || discount == 'discount1') { var data = { couponChannelId: "" + that.data.couponChannelId, couponId: "" + that.data.couponId, diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index 93bb026..81dcb62 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -94,7 +94,7 @@ - diff --git a/pages/couponorder/detail/index.wxml b/pages/couponorder/detail/index.wxml index a9665af..4ce3c25 100644 --- a/pages/couponorder/detail/index.wxml +++ b/pages/couponorder/detail/index.wxml @@ -24,9 +24,9 @@ - + diff --git a/pages/couponorder/detail/index.wxss b/pages/couponorder/detail/index.wxss index e4bd287..71bc511 100644 --- a/pages/couponorder/detail/index.wxss +++ b/pages/couponorder/detail/index.wxss @@ -16,7 +16,7 @@ page { width: 600rpx; display: block; border-radius: 10rpx; - margin: 38rpx auto 0; + margin: 0 auto; padding: 0; z-index: 10000000000; } diff --git a/pages/index/index.js b/pages/index/index.js index 395d90b..ecfb1bc 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -72,7 +72,11 @@ Page({ var st = setTimeout(function () { wx.hideToast() var size = that.setCanvasSize(); - var url = JSON.stringify({ flagid: that.data.memberId }); + var url = JSON.stringify({ + END: "C", + TYPE: "memberCode", + ID: that.data.memberId, + }); that.createQrCode(url, "mycanvas2", size.w, size.h); that.setData({ maskHidden: true diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index cb92770..a9b69f5 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -33,6 +33,7 @@ Page({ }, powerDrawer: function (e) { let that = this; + console.log(e) // couponOrderStatus // 0 未使用 // 1 已使用 diff --git a/pages/order/index/index.wxml b/pages/order/index/index.wxml index 4f32475..a966da3 100644 --- a/pages/order/index/index.wxml +++ b/pages/order/index/index.wxml @@ -48,7 +48,7 @@ 查看详情 - 查看详情 + 砍价详情 去支付 diff --git a/pages/orderquanma/index.js b/pages/orderquanma/index.js index 24a731b..a453146 100644 --- a/pages/orderquanma/index.js +++ b/pages/orderquanma/index.js @@ -50,7 +50,8 @@ Page({ }, onLoad: function (options) { let that = this; - util.barcode("barcode", options.quancode, 500, 100); + let value = JSON.stringify({ END: "C", TYPE: "couponorder", ID: options.quancode}) + util.barcode("barcode", value.ID, 500, 100); util.qrcode("qrcode", options.quancode, 350, 350); that.setData({ code: options.quancode, diff --git a/pages/user/index.js b/pages/user/index.js index b1e8f56..419bd24 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -224,7 +224,11 @@ Page({ var st = setTimeout(function () { wx.hideToast() var size = that.setCanvasSize(); - var url = JSON.stringify({ flagid:that.data.memberId}); + var url = JSON.stringify({ + END:"C", + TYPE:"memberCode", + ID: that.data.memberId, + }) that.createQrCode(url, "mycanvas1", size.w, size.h); that.setData({ maskHidden: true diff --git a/pages/user/index.wxss b/pages/user/index.wxss index d8de0ef..d593a21 100644 --- a/pages/user/index.wxss +++ b/pages/user/index.wxss @@ -105,7 +105,8 @@ page{ position: absolute; right: 0; bottom: 0; - top: 24rpx; + top: 0; + margin: auto; text-align: center; } @@ -251,14 +252,16 @@ page{ width: 26rpx; vertical-align: middle; } - +.qrcode{ + display: none; +} .qrcode image { width: 70rpx; margin-right: 20rpx; } .edits { - margin-top: -20rpx; + margin-top: 44rpx; } .showQrcode {