Commit a14f2a0abfe1c22890c2819f30475b885d8107af

Authored by “pengye”
1 parent f4ae71fe

邀请函剩余数量不足,发放剩余数量的券,为0 不在发放券

Showing 26 changed files with 287 additions and 66 deletions
... ... @@ -246,10 +246,7 @@ Page({
discountPrice: '0.00',
actualPrice: '',
})
// 需要延迟获取才能获取到最新的券列表
setTimeout(() => {
that.getCoupon()
}, 8000);
that.getCoupon()
console.log('支付成功', ress);
return wx.showToast({
title: '支付成功',
... ...
... ... @@ -153,7 +153,6 @@
.anameText {
display: flex;
align-items: center;
}
.anameText {
... ... @@ -163,13 +162,18 @@
.anameText text {
font-family: PingFang SC;
font-weight: 600;
line-height: 48rpx;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
word-break: break-all;
}
.discountText1 {
color: #C36607;
font-family: PingFang SC;
font-weight: 500;
margin-left: 40rpx;
margin: 0 20rpx;
}
.bottomTitle {
... ... @@ -209,6 +213,7 @@
.itemRight view {
display: flex;
line-height: 36rpx;
flex-shrink:0;
}
.nodate {
... ...
... ... @@ -61,9 +61,6 @@
<view class="info font24r">
<view class="drop"></view>{{detail.arule.is_share_have == '1'? '分享给好友后继续拥有此券' : '分享给好友后不再拥有此券'}}
</view>
<view class="info font24r" wx:if="{{detail.arule.commission != '0'}}">
<view class="drop"></view>分享给好友领券核销后,获得实际消费{{detail.arule.commission}}%佣金
</view>
</view>
<view class="centerMain" wx:if="{{detail.explain}}">
<view class="title">
... ...
... ... @@ -914,6 +914,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -962,6 +975,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1041,10 +1067,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -955,6 +955,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1015,6 +1028,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1108,10 +1134,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -970,6 +970,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1030,6 +1043,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1123,10 +1149,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -964,6 +964,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1043,10 +1056,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -110,7 +110,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可使用:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -919,6 +919,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -998,10 +1011,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -116,7 +116,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -920,6 +920,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -999,10 +1012,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -99,7 +99,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -918,6 +918,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -997,10 +1010,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -97,7 +97,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -875,6 +875,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -954,10 +967,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -119,7 +119,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -919,6 +919,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -998,10 +1011,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -112,7 +112,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -918,6 +918,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -997,10 +1010,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -109,7 +109,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -952,6 +952,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -1031,10 +1044,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -114,7 +114,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -237,6 +237,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ...
... ... @@ -30,7 +30,7 @@
</view>
</block>
<block wx:if="{{item.is_type == '3' || item.is_type == '4'}}">
<view wx:if="{{item.is_type == '3' && item.aexpiration}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.is_type == '3' && item.aexpiration>0}}" class="bottom font24r">领取后{{item.aexpiration}}天有效</view>
<view wx:if="{{item.noonText || item.noonText}}" class="bottom font24r">不可用日期:</view>
<view wx:if="{{item.noonText}}" class="bottom font24r nodate">{{item.noonText}}</view>
<view wx:if="{{item.nigText}}" class="bottom font24r nodate">{{item.nigText}}</view>
... ...
... ... @@ -281,6 +281,19 @@ Page({
detail.receiveNumText = Math.floor(num / 100) * 100 + '+';
}
}
if(num == 0){
let str = detail.grant_num*1
detail.receiveNumText = ''
if (str >= 0 && str <= 100) {
detail.receiveNumText = str.toString();
} else if (str >= 101 && str <= 199) {
detail.receiveNumText = '100+';
} else if (str >= 200 && str <= 299) {
detail.receiveNumText = '200+';
} else {
detail.receiveNumText = Math.floor(str / 100) * 100 + '+';
}
}
if (detail.exp_date && detail.exp_date.week_data) {
let noon = this.hasConsecutiveSelect(detail.exp_date.week_data, '1').rArr.join('、')
let nig = this.hasConsecutiveSelect(detail.exp_date.week_data, '2').rArr.join('、')
... ... @@ -360,10 +373,10 @@ Page({
if (match) {
item.number = match.number;
}
item.grant_num = item.grant_num*1
if(item.grant_num < 0 || item.grant_num == 0) couponArr.splice(index,1)
if(item.number>item.grant_num){
item.number = item.grant_num
item.grant_last = item.grant_last*1*1
if(item.grant_last < 0 || item.grant_last == 0) couponArr.splice(index,1)
if(item.number>item.grant_last){
item.number = item.grant_last
}
});
if(couponArr.length>0){
... ...
... ... @@ -8,6 +8,20 @@
"miniprogram": {
"list": [
{
"name": "pack-invitation/pages/detail_owner_invitation9",
"pathName": "pages/customer/detail_owner_invitation_new",
"query": "id=1288253",
"launchMode": "default",
"scene": null
},
{
"name": "pack-activity/pack/buyFreeCoupon",
"pathName": "pack-activity/pack/buyFreeCoupon",
"query": "sid=4352",
"launchMode": "default",
"scene": null
},
{
"name": "预订本-商家1",
"pathName": "pack-book/pages/book/b_index",
"query": "seller_id=1001&seller_openid=oGefL4uTmdsQn214CFZTVlHAfhnQ&manager_id=6986",
... ...