|  |  | @@ -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) | 
		
	
		
			
			|  |  |  | }) | 
		
	
	
		
			
				|  |  | 
 |