From f2c2033ec473c8a08941ab72c58c6922863d9be8 Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Sat, 29 Jun 2019 16:31:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A0=8D=E4=BB=B7][=E4=BF=AE=E6=94=B9]:[?= =?UTF-8?q?=E7=A0=8D=E4=BB=B7=E5=BE=85=E6=94=AF=E4=BB=98=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E8=B7=B3=E8=BD=AC]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/bargain/bargainDatail/bargainDatail.js | 5 -- pages/coupon/detail/index.js | 83 ++++++++++++-------- pages/spellGroup/mySpellGroup/index.wxml | 5 -- 3 files changed, 50 insertions(+), 43 deletions(-) diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js index 63973ee..93c304e 100644 --- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -65,7 +65,6 @@ Page({ }, onShow: function() { let that = this; - console.log("--------------------------------onShow-------------------------------") var todayDate = new Date().getTime(); that.setData({ todayDate: todayDate, @@ -100,8 +99,6 @@ Page({ } }) .then(res => { - console.log(res) - console.log("--------------------------------status------------------------------------------") if (res.data.status == 1) { that.setData({ discountStatus: 1 @@ -757,9 +754,7 @@ Page({ } }, onShareAppMessage: function(options) { - console.log(options) var that = this; - console.log(that.data.data.id) var shareObj = { title: that.data.nickName + '邀请您帮砍' + that.data.data.title, path: `/pages/index/index?orderId=${that.data.data.id}&from=${"discount"}`, diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 8c9d2e7..e18f774 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -80,7 +80,8 @@ Page({ showbutton1: false, limitCondition:"", minLimit:0, - maxLimit:0 + maxLimit:0, + dispressEndDate:false }, /** * 显示分享弹框 @@ -296,16 +297,15 @@ Page({ }, gotopay: function(e) { let that = this; - wx.showLoading({ - title: '', - }) + console.log(e); + wx.showLoading(); if (e.currentTarget.dataset.type == 51 || e.currentTarget.dataset.type == 50){ wx.navigateTo({ url: '/pages/integralmall/payIntegcoupondetail/index?couponChannelId=' + that.data.couponChannelId + '&couponId=' + that.data.couponId, }) }else{ let formId = e.detail.formId; - var discount = e.currentTarget.dataset.discount; + var discount = e.detail.target.dataset.discount; that.setData({ queueData: null, showbutton: true, @@ -765,32 +765,7 @@ Page({ mask: false }); } else if (err.code == 3012) { - if(that.data.data.type == 8){ - that.getUnPaidOrder(that.data.couponId); - // wx.showModal({ - // title: '提示', - // content: "您有未支付订单,请到'我的-我的砍价'进行支付", - // showCancel:false, - // success: function (res) { - // console.log(res.confirm) - // if (res.confirm) { - // } - // } - // }) - }else{ - wx.showModal({ - title: '提示', - content: '您有未支付订单,请先进行支付', - success: function (res) { - console.log(res.confirm) - if(res.confirm){ - wx.navigateTo({ - url: '/pages/order/index/index?id=all', - }) - } - } - }) - } + that.getUnPaidOrder(that.data.couponId, discount); } else if (err.code == 11005) { /** * 将值传到用户手机号授权的页面 @@ -920,7 +895,7 @@ Page({ }) }, // 获得未支付的订单 - getUnPaidOrder(couponId){ + getUnPaidOrder(couponId, discount){ let that = this; Http.get({ url: config.api.getUnPaidOrder, @@ -928,7 +903,49 @@ Page({ couponId: couponId } }).then(res=>{ - console.log(res); + /** + * discount 砍价订单 + * discount1 砍价按原价购买订单 + */ + that.setData({ + disOrderNumber: res.data.orderNumber, + }) + if (res.data&&res.data.pressEndDate){ + that.setData({ + dispressEndDate:true + }) + }else{ + that.setData({ + dispressEndDate: false + }) + } + if (that.data.dispressEndDate){ + wx.showModal({ + title: '提示', + content: "您有未支付砍价订单,请先进行支付", + confirmText:"去支付", + success: function (res) { + if (res.confirm) { + wx.navigateTo({ + url: `/pages/bargain/bargainDatail/bargainDatail?orderId=${that.data.disOrderNumber}`, + }) + } + } + }) + } else{ + wx.showModal({ + title: '提示', + content: '您有未支付订单,请先进行支付', + confirmText: "去支付", + success: function (res) { + if (res.confirm) { + wx.navigateTo({ + url: `/pages/order/detail/index?orderId=${that.data.disOrderNumber}`, + }) + } + } + }) + } }).catch(error=>{ console.log(error) }) diff --git a/pages/spellGroup/mySpellGroup/index.wxml b/pages/spellGroup/mySpellGroup/index.wxml index 5796b7d..f73f7bf 100644 --- a/pages/spellGroup/mySpellGroup/index.wxml +++ b/pages/spellGroup/mySpellGroup/index.wxml @@ -8,11 +8,6 @@ - {{data.title}}