Commit 7a4b917810ff316902603ee66cd4bc666eb05a04

Authored by yiren
1 parent e3321688

提前点餐、剩余优惠券字段

@@ -99,7 +99,7 @@ Page({ @@ -99,7 +99,7 @@ Page({
99 }, 99 },
100 // 提交订单 100 // 提交订单
101 submitOrder() { 101 submitOrder() {
102 - if(this.data.detail.grant_num=='0'){ 102 + if(this.data.detail.grant_last=='0'){
103 return wx.showToast({ 103 return wx.showToast({
104 title:'您来晚了,当前优惠券已经售罄,请与商家联系!', 104 title:'您来晚了,当前优惠券已经售罄,请与商家联系!',
105 duration:2000, 105 duration:2000,
@@ -107,7 +107,7 @@ Page({ @@ -107,7 +107,7 @@ Page({
107 icon:'none' 107 icon:'none'
108 }) 108 })
109 } 109 }
110 - if(this.data.detail.grant_num && (this.data.detail.grant_num*1)<(this.data.num*1)){ 110 + if(this.data.detail.grant_last && (this.data.detail.grant_last*1)<(this.data.num*1)){
111 return wx.showToast({ 111 return wx.showToast({
112 title:'优惠券剩余数量不足!', 112 title:'优惠券剩余数量不足!',
113 duration:2000, 113 duration:2000,
@@ -59,12 +59,12 @@ @@ -59,12 +59,12 @@
59 <text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info info_right text_info font32r text_info1" > 59 <text wx:if="{{exp_date.is_week=='1' || exp_date.is_week===true}}" class="info info_right text_info font32r text_info1" >
60 {{exp_date.week_show?exp_date.week_show:''}} 60 {{exp_date.week_show?exp_date.week_show:''}}
61 </text> 61 </text>
62 - <view class="info" wx:if="{{detail.grant_num}}"> 62 + <view class="info" wx:if="{{detail.grant_last}}">
63 <view class="info_left font32r"> 63 <view class="info_left font32r">
64 剩余数量: 64 剩余数量:
65 </view> 65 </view>
66 <view class="info_right text_info font32r"> 66 <view class="info_right text_info font32r">
67 - {{detail.grant_num}} 67 + {{detail.grant_last}}
68 </view> 68 </view>
69 </view> 69 </view>
70 <view wx:if="{{detail.explain}}" class="info"> 70 <view wx:if="{{detail.explain}}" class="info">
@@ -82,6 +82,6 @@ @@ -82,6 +82,6 @@
82 <view class="content font24r"> 82 <view class="content font24r">
83 总计:<text>¥{{totalize}}</text>元 83 总计:<text>¥{{totalize}}</text>元
84 </view> 84 </view>
85 - <button class="font32r {{(detail.grant_num=='0' || (this.data.detail.grant_num && (detail.grant_num*1)<(num*1)))?'btns btnsDisabled':'btns'}}" bindtap="submitOrder">提交订单 85 + <button class="font32r {{(detail.grant_last=='0' || (this.data.detail.grant_last && (detail.grant_last*1)<(num*1)))?'btns btnsDisabled':'btns'}}" bindtap="submitOrder">提交订单
86 </button> 86 </button>
87 </view> 87 </view>
@@ -309,8 +309,16 @@ Page({ @@ -309,8 +309,16 @@ Page({
309 }) 309 })
310 } 310 }
311 if (this.data.opt.types == '2') { 311 if (this.data.opt.types == '2') {
  312 + let cookbookObj = {
  313 + sid: this.data.opt.sid,
  314 + sellerName: this.data.opt.sellerName,
  315 + oid: this.data.opt.oid,
  316 + hasSuccess: '1',
  317 + rid: this.data.opt.rid?this.data.opt.rid:''
  318 + }
  319 + let url = `/pack-cookbook/pages/success_new?cookbookObj=${JSON.stringify(cookbookObj)}`;
312 return wx.reLaunch({ 320 return wx.reLaunch({
313 - url: '/pack-cookbook/pages/success_new', 321 + url
314 }) 322 })
315 } 323 }
316 if (this.data.opt.types == '3') { 324 if (this.data.opt.types == '3') {