Showing
33 changed files
with
172 additions
and
93 deletions
| @@ -1005,9 +1005,14 @@ Page({ | @@ -1005,9 +1005,14 @@ Page({ | ||
| 1005 | if (res.data.length > 0) { | 1005 | if (res.data.length > 0) { |
| 1006 | // valid_forever 1永久 0非永久 | 1006 | // valid_forever 1永久 0非永久 |
| 1007 | let list = res.data.filter(item => { | 1007 | let list = res.data.filter(item => { |
| 1008 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 1009 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 1010 | - }) | 1008 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 1009 | + let validForever = data.valid_forever === '1'; | ||
| 1010 | + let isValid = item.is_type === '3' ? | ||
| 1011 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 1012 | + (this.data.dataStr < (item.etime * 1)); | ||
| 1013 | + | ||
| 1014 | + return isValid && item.is_open === '1'; | ||
| 1015 | + }); | ||
| 1011 | list.forEach(detail => { | 1016 | list.forEach(detail => { |
| 1012 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 1017 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 1013 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 1018 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -1060,9 +1060,14 @@ Page({ | @@ -1060,9 +1060,14 @@ Page({ | ||
| 1060 | if (res.data.length > 0) { | 1060 | if (res.data.length > 0) { |
| 1061 | // valid_forever 1永久 0非永久 | 1061 | // valid_forever 1永久 0非永久 |
| 1062 | let list = res.data.filter(item => { | 1062 | let list = res.data.filter(item => { |
| 1063 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 1064 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 1065 | - }) | 1063 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 1064 | + let validForever = data.valid_forever === '1'; | ||
| 1065 | + let isValid = item.is_type === '3' ? | ||
| 1066 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 1067 | + (this.data.dataStr < (item.etime * 1)); | ||
| 1068 | + | ||
| 1069 | + return isValid && item.is_open === '1'; | ||
| 1070 | + }); | ||
| 1066 | list.forEach(detail => { | 1071 | list.forEach(detail => { |
| 1067 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 1072 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 1068 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 1073 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -1075,9 +1075,14 @@ Page({ | @@ -1075,9 +1075,14 @@ Page({ | ||
| 1075 | if (res.data.length > 0) { | 1075 | if (res.data.length > 0) { |
| 1076 | // valid_forever 1永久 0非永久 | 1076 | // valid_forever 1永久 0非永久 |
| 1077 | let list = res.data.filter(item => { | 1077 | let list = res.data.filter(item => { |
| 1078 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 1079 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 1080 | - }) | 1078 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 1079 | + let validForever = data.valid_forever === '1'; | ||
| 1080 | + let isValid = item.is_type === '3' ? | ||
| 1081 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 1082 | + (this.data.dataStr < (item.etime * 1)); | ||
| 1083 | + | ||
| 1084 | + return isValid && item.is_open === '1'; | ||
| 1085 | + }); | ||
| 1081 | list.forEach(detail => { | 1086 | list.forEach(detail => { |
| 1082 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 1087 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 1083 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 1088 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -948,9 +948,14 @@ Page({ | @@ -948,9 +948,14 @@ Page({ | ||
| 948 | if (res.data.length > 0) { | 948 | if (res.data.length > 0) { |
| 949 | // valid_forever 1永久 0非永久 | 949 | // valid_forever 1永久 0非永久 |
| 950 | let list = res.data.filter(item => { | 950 | let list = res.data.filter(item => { |
| 951 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 952 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 953 | - }) | 951 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 952 | + let validForever = data.valid_forever === '1'; | ||
| 953 | + let isValid = item.is_type === '3' ? | ||
| 954 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 955 | + (this.data.dataStr < (item.etime * 1)); | ||
| 956 | + | ||
| 957 | + return isValid && item.is_open === '1'; | ||
| 958 | + }); | ||
| 954 | list.forEach(detail => { | 959 | list.forEach(detail => { |
| 955 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 960 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 956 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 961 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -92,16 +92,16 @@ | @@ -92,16 +92,16 @@ | ||
| 92 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 92 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 93 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 93 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 94 | <view class="priceText" wx:if="{{item.price}}"> | 94 | <view class="priceText" wx:if="{{item.price}}"> |
| 95 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 95 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 96 | </view> | 96 | </view> |
| 97 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 97 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 98 | </view> | 98 | </view> |
| 99 | <view class="couponLine"></view> | 99 | <view class="couponLine"></view> |
| 100 | <view class="itemRight"> | 100 | <view class="itemRight"> |
| 101 | <view class="btns"> | 101 | <view class="btns"> |
| 102 | - <text class="font40r">{{item.aname}}</text> | 102 | + <text class="font32r anameText">{{item.aname}}</text> |
| 103 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 103 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 104 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 104 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 105 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 105 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 106 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 106 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 107 | </view> | 107 | </view> |
| @@ -282,7 +282,7 @@ | @@ -282,7 +282,7 @@ | ||
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | .preferentialCoupon .couponLine{ | 284 | .preferentialCoupon .couponLine{ |
| 285 | - margin: 24rpx 0; | 285 | + margin: 24rpx 0 4rpx 0; |
| 286 | border-right: 2rpx dashed #f6231b; | 286 | border-right: 2rpx dashed #f6231b; |
| 287 | } | 287 | } |
| 288 | 288 | ||
| @@ -339,7 +339,7 @@ | @@ -339,7 +339,7 @@ | ||
| 339 | margin-right: 10rpx; | 339 | margin-right: 10rpx; |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | -.preferentialCoupon .btns text { | 342 | +.preferentialCoupon .btns .anameText { |
| 343 | font-weight: 600; | 343 | font-weight: 600; |
| 344 | } | 344 | } |
| 345 | 345 | ||
| @@ -347,6 +347,7 @@ | @@ -347,6 +347,7 @@ | ||
| 347 | border: 2rpx solid #fa4b20 !important; | 347 | border: 2rpx solid #fa4b20 !important; |
| 348 | background: transparent !important; | 348 | background: transparent !important; |
| 349 | color: #fa4b20 !important; | 349 | color: #fa4b20 !important; |
| 350 | + font-weight: 600; | ||
| 350 | } | 351 | } |
| 351 | 352 | ||
| 352 | .preferentialCoupon .btns text { | 353 | .preferentialCoupon .btns text { |
| @@ -903,9 +903,14 @@ Page({ | @@ -903,9 +903,14 @@ Page({ | ||
| 903 | if (res.data.length > 0) { | 903 | if (res.data.length > 0) { |
| 904 | // valid_forever 1永久 0非永久 | 904 | // valid_forever 1永久 0非永久 |
| 905 | let list = res.data.filter(item => { | 905 | let list = res.data.filter(item => { |
| 906 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 907 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 908 | - }) | 906 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 907 | + let validForever = data.valid_forever === '1'; | ||
| 908 | + let isValid = item.is_type === '3' ? | ||
| 909 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 910 | + (this.data.dataStr < (item.etime * 1)); | ||
| 911 | + | ||
| 912 | + return isValid && item.is_open === '1'; | ||
| 913 | + }); | ||
| 909 | list.forEach(detail => { | 914 | list.forEach(detail => { |
| 910 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 915 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 911 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 916 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -98,16 +98,16 @@ | @@ -98,16 +98,16 @@ | ||
| 98 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 98 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 99 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 99 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 100 | <view class="priceText" wx:if="{{item.price}}"> | 100 | <view class="priceText" wx:if="{{item.price}}"> |
| 101 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 101 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 102 | </view> | 102 | </view> |
| 103 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 103 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 104 | </view> | 104 | </view> |
| 105 | <view class="couponLine"></view> | 105 | <view class="couponLine"></view> |
| 106 | <view class="itemRight"> | 106 | <view class="itemRight"> |
| 107 | <view class="btns"> | 107 | <view class="btns"> |
| 108 | - <text class="font40r">{{item.aname}}</text> | 108 | + <text class="font32r anameText">{{item.aname}}</text> |
| 109 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 109 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 110 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 110 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 111 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 111 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 112 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 112 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 113 | </view> | 113 | </view> |
| @@ -309,7 +309,7 @@ | @@ -309,7 +309,7 @@ | ||
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | .preferentialCoupon .couponLine{ | 311 | .preferentialCoupon .couponLine{ |
| 312 | - margin: 24rpx 0; | 312 | + margin: 24rpx 0 4rpx 0; |
| 313 | border-right: 2rpx dashed #f6231b; | 313 | border-right: 2rpx dashed #f6231b; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| @@ -366,7 +366,7 @@ | @@ -366,7 +366,7 @@ | ||
| 366 | margin-right: 10rpx; | 366 | margin-right: 10rpx; |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | -.preferentialCoupon .btns text { | 369 | +.preferentialCoupon .btns .anameText { |
| 370 | font-weight: 600; | 370 | font-weight: 600; |
| 371 | } | 371 | } |
| 372 | 372 | ||
| @@ -374,6 +374,7 @@ | @@ -374,6 +374,7 @@ | ||
| 374 | border: 2rpx solid #fa4b20 !important; | 374 | border: 2rpx solid #fa4b20 !important; |
| 375 | background: transparent !important; | 375 | background: transparent !important; |
| 376 | color: #fa4b20 !important; | 376 | color: #fa4b20 !important; |
| 377 | + font-weight: 600; | ||
| 377 | } | 378 | } |
| 378 | 379 | ||
| 379 | .preferentialCoupon .btns text { | 380 | .preferentialCoupon .btns text { |
| @@ -904,9 +904,14 @@ Page({ | @@ -904,9 +904,14 @@ Page({ | ||
| 904 | if (res.data.length > 0) { | 904 | if (res.data.length > 0) { |
| 905 | // valid_forever 1永久 0非永久 | 905 | // valid_forever 1永久 0非永久 |
| 906 | let list = res.data.filter(item => { | 906 | let list = res.data.filter(item => { |
| 907 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 908 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 909 | - }) | 907 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 908 | + let validForever = data.valid_forever === '1'; | ||
| 909 | + let isValid = item.is_type === '3' ? | ||
| 910 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 911 | + (this.data.dataStr < (item.etime * 1)); | ||
| 912 | + | ||
| 913 | + return isValid && item.is_open === '1'; | ||
| 914 | + }); | ||
| 910 | list.forEach(detail => { | 915 | list.forEach(detail => { |
| 911 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 916 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 912 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 917 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -81,16 +81,16 @@ | @@ -81,16 +81,16 @@ | ||
| 81 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 81 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 82 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 82 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 83 | <view class="priceText" wx:if="{{item.price}}"> | 83 | <view class="priceText" wx:if="{{item.price}}"> |
| 84 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 84 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 85 | </view> | 85 | </view> |
| 86 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 86 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 87 | </view> | 87 | </view> |
| 88 | <view class="couponLine"></view> | 88 | <view class="couponLine"></view> |
| 89 | <view class="itemRight"> | 89 | <view class="itemRight"> |
| 90 | <view class="btns"> | 90 | <view class="btns"> |
| 91 | - <text class="font40r">{{item.aname}}</text> | 91 | + <text class="font32r anameText">{{item.aname}}</text> |
| 92 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 92 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 93 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 93 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 94 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 94 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 95 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 95 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 96 | </view> | 96 | </view> |
| @@ -299,7 +299,7 @@ | @@ -299,7 +299,7 @@ | ||
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | .preferentialCoupon .couponLine{ | 301 | .preferentialCoupon .couponLine{ |
| 302 | - margin: 24rpx 0; | 302 | + margin: 24rpx 0 4rpx 0; |
| 303 | border-right: 2rpx dashed #f6231b; | 303 | border-right: 2rpx dashed #f6231b; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| @@ -356,7 +356,7 @@ | @@ -356,7 +356,7 @@ | ||
| 356 | margin-right: 10rpx; | 356 | margin-right: 10rpx; |
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | -.preferentialCoupon .btns text { | 359 | +.preferentialCoupon .btns .anameText { |
| 360 | font-weight: 600; | 360 | font-weight: 600; |
| 361 | } | 361 | } |
| 362 | 362 | ||
| @@ -364,6 +364,7 @@ | @@ -364,6 +364,7 @@ | ||
| 364 | border: 2rpx solid #fa4b20 !important; | 364 | border: 2rpx solid #fa4b20 !important; |
| 365 | background: transparent !important; | 365 | background: transparent !important; |
| 366 | color: #fa4b20 !important; | 366 | color: #fa4b20 !important; |
| 367 | + font-weight: 600; | ||
| 367 | } | 368 | } |
| 368 | 369 | ||
| 369 | .preferentialCoupon .btns text { | 370 | .preferentialCoupon .btns text { |
| @@ -902,9 +902,14 @@ Page({ | @@ -902,9 +902,14 @@ Page({ | ||
| 902 | if (res.data.length > 0) { | 902 | if (res.data.length > 0) { |
| 903 | // valid_forever 1永久 0非永久 | 903 | // valid_forever 1永久 0非永久 |
| 904 | let list = res.data.filter(item => { | 904 | let list = res.data.filter(item => { |
| 905 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 906 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 907 | - }) | 905 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 906 | + let validForever = data.valid_forever === '1'; | ||
| 907 | + let isValid = item.is_type === '3' ? | ||
| 908 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 909 | + (this.data.dataStr < (item.etime * 1)); | ||
| 910 | + | ||
| 911 | + return isValid && item.is_open === '1'; | ||
| 912 | + }); | ||
| 908 | list.forEach(detail => { | 913 | list.forEach(detail => { |
| 909 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 914 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 910 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 915 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -79,16 +79,16 @@ | @@ -79,16 +79,16 @@ | ||
| 79 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 79 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 80 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 80 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 81 | <view class="priceText" wx:if="{{item.price}}"> | 81 | <view class="priceText" wx:if="{{item.price}}"> |
| 82 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 82 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 83 | </view> | 83 | </view> |
| 84 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 84 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 85 | </view> | 85 | </view> |
| 86 | <view class="couponLine"></view> | 86 | <view class="couponLine"></view> |
| 87 | <view class="itemRight"> | 87 | <view class="itemRight"> |
| 88 | <view class="btns"> | 88 | <view class="btns"> |
| 89 | - <text class="font40r">{{item.aname}}</text> | 89 | + <text class="font32r anameText">{{item.aname}}</text> |
| 90 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 90 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 91 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 91 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 92 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 92 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 93 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 93 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 94 | </view> | 94 | </view> |
| @@ -298,7 +298,7 @@ | @@ -298,7 +298,7 @@ | ||
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | .preferentialCoupon .couponLine{ | 300 | .preferentialCoupon .couponLine{ |
| 301 | - margin: 24rpx 0; | 301 | + margin: 24rpx 0 4rpx 0; |
| 302 | border-right: 2rpx dashed #f6231b; | 302 | border-right: 2rpx dashed #f6231b; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| @@ -355,7 +355,7 @@ | @@ -355,7 +355,7 @@ | ||
| 355 | margin-right: 10rpx; | 355 | margin-right: 10rpx; |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | -.preferentialCoupon .btns text { | 358 | +.preferentialCoupon .btns .anameText { |
| 359 | font-weight: 600; | 359 | font-weight: 600; |
| 360 | } | 360 | } |
| 361 | 361 | ||
| @@ -363,6 +363,7 @@ | @@ -363,6 +363,7 @@ | ||
| 363 | border: 2rpx solid #fa4b20 !important; | 363 | border: 2rpx solid #fa4b20 !important; |
| 364 | background: transparent !important; | 364 | background: transparent !important; |
| 365 | color: #fa4b20 !important; | 365 | color: #fa4b20 !important; |
| 366 | + font-weight: 600; | ||
| 366 | } | 367 | } |
| 367 | 368 | ||
| 368 | .preferentialCoupon .btns text { | 369 | .preferentialCoupon .btns text { |
| @@ -859,9 +859,14 @@ Page({ | @@ -859,9 +859,14 @@ Page({ | ||
| 859 | if (res.data.length > 0) { | 859 | if (res.data.length > 0) { |
| 860 | // valid_forever 1永久 0非永久 | 860 | // valid_forever 1永久 0非永久 |
| 861 | let list = res.data.filter(item => { | 861 | let list = res.data.filter(item => { |
| 862 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 863 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 864 | - }) | 862 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 863 | + let validForever = data.valid_forever === '1'; | ||
| 864 | + let isValid = item.is_type === '3' ? | ||
| 865 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 866 | + (this.data.dataStr < (item.etime * 1)); | ||
| 867 | + | ||
| 868 | + return isValid && item.is_open === '1'; | ||
| 869 | + }); | ||
| 865 | list.forEach(detail => { | 870 | list.forEach(detail => { |
| 866 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 871 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 867 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 872 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -101,16 +101,16 @@ | @@ -101,16 +101,16 @@ | ||
| 101 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 101 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 102 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 102 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 103 | <view class="priceText" wx:if="{{item.price}}"> | 103 | <view class="priceText" wx:if="{{item.price}}"> |
| 104 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 104 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 105 | </view> | 105 | </view> |
| 106 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 106 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 107 | </view> | 107 | </view> |
| 108 | <view class="couponLine"></view> | 108 | <view class="couponLine"></view> |
| 109 | <view class="itemRight"> | 109 | <view class="itemRight"> |
| 110 | <view class="btns"> | 110 | <view class="btns"> |
| 111 | - <text class="font40r">{{item.aname}}</text> | 111 | + <text class="font32r anameText">{{item.aname}}</text> |
| 112 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 112 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 113 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 113 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 114 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 114 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 115 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 115 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 116 | </view> | 116 | </view> |
| @@ -501,7 +501,7 @@ | @@ -501,7 +501,7 @@ | ||
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | .preferentialCoupon .couponLine{ | 503 | .preferentialCoupon .couponLine{ |
| 504 | - margin: 24rpx 0; | 504 | + margin: 24rpx 0 4rpx 0; |
| 505 | border-right: 2rpx dashed #f6231b; | 505 | border-right: 2rpx dashed #f6231b; |
| 506 | } | 506 | } |
| 507 | 507 | ||
| @@ -558,7 +558,7 @@ | @@ -558,7 +558,7 @@ | ||
| 558 | margin-right: 10rpx; | 558 | margin-right: 10rpx; |
| 559 | } | 559 | } |
| 560 | 560 | ||
| 561 | -.preferentialCoupon .btns text { | 561 | +.preferentialCoupon .btns .anameText { |
| 562 | font-weight: 600; | 562 | font-weight: 600; |
| 563 | } | 563 | } |
| 564 | 564 | ||
| @@ -566,6 +566,7 @@ | @@ -566,6 +566,7 @@ | ||
| 566 | border: 2rpx solid #fa4b20 !important; | 566 | border: 2rpx solid #fa4b20 !important; |
| 567 | background: transparent !important; | 567 | background: transparent !important; |
| 568 | color: #fa4b20 !important; | 568 | color: #fa4b20 !important; |
| 569 | + font-weight: 600; | ||
| 569 | } | 570 | } |
| 570 | 571 | ||
| 571 | .preferentialItems .priceText .icons { | 572 | .preferentialItems .priceText .icons { |
| @@ -903,9 +903,14 @@ Page({ | @@ -903,9 +903,14 @@ Page({ | ||
| 903 | if (res.data.length > 0) { | 903 | if (res.data.length > 0) { |
| 904 | // valid_forever 1永久 0非永久 | 904 | // valid_forever 1永久 0非永久 |
| 905 | let list = res.data.filter(item => { | 905 | let list = res.data.filter(item => { |
| 906 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 907 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 908 | - }) | 906 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 907 | + let validForever = data.valid_forever === '1'; | ||
| 908 | + let isValid = item.is_type === '3' ? | ||
| 909 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 910 | + (this.data.dataStr < (item.etime * 1)); | ||
| 911 | + | ||
| 912 | + return isValid && item.is_open === '1'; | ||
| 913 | + }); | ||
| 909 | list.forEach(detail => { | 914 | list.forEach(detail => { |
| 910 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 915 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 911 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 916 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -94,16 +94,16 @@ | @@ -94,16 +94,16 @@ | ||
| 94 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 94 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 95 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 95 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 96 | <view class="priceText" wx:if="{{item.price}}"> | 96 | <view class="priceText" wx:if="{{item.price}}"> |
| 97 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 97 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 98 | </view> | 98 | </view> |
| 99 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 99 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 100 | </view> | 100 | </view> |
| 101 | <view class="couponLine"></view> | 101 | <view class="couponLine"></view> |
| 102 | <view class="itemRight"> | 102 | <view class="itemRight"> |
| 103 | <view class="btns"> | 103 | <view class="btns"> |
| 104 | - <text class="font40r">{{item.aname}}</text> | 104 | + <text class="font32r anameText">{{item.aname}}</text> |
| 105 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 105 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 106 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 106 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 107 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 107 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 108 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 108 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 109 | </view> | 109 | </view> |
| @@ -292,7 +292,7 @@ | @@ -292,7 +292,7 @@ | ||
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | .preferentialCoupon .couponLine{ | 294 | .preferentialCoupon .couponLine{ |
| 295 | - margin: 24rpx 0; | 295 | + margin: 24rpx 0 4rpx 0; |
| 296 | border-right: 2rpx dashed #f6231b; | 296 | border-right: 2rpx dashed #f6231b; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| @@ -349,7 +349,7 @@ | @@ -349,7 +349,7 @@ | ||
| 349 | margin-right: 10rpx; | 349 | margin-right: 10rpx; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | -.preferentialCoupon .btns text { | 352 | +.preferentialCoupon .btns .anameText { |
| 353 | font-weight: 600; | 353 | font-weight: 600; |
| 354 | } | 354 | } |
| 355 | 355 | ||
| @@ -357,6 +357,7 @@ | @@ -357,6 +357,7 @@ | ||
| 357 | border: 2rpx solid #fa4b20 !important; | 357 | border: 2rpx solid #fa4b20 !important; |
| 358 | background: transparent !important; | 358 | background: transparent !important; |
| 359 | color: #fa4b20 !important; | 359 | color: #fa4b20 !important; |
| 360 | + font-weight: 600; | ||
| 360 | } | 361 | } |
| 361 | 362 | ||
| 362 | .preferentialCoupon .btns text { | 363 | .preferentialCoupon .btns text { |
| @@ -902,9 +902,14 @@ Page({ | @@ -902,9 +902,14 @@ Page({ | ||
| 902 | if (res.data.length > 0) { | 902 | if (res.data.length > 0) { |
| 903 | // valid_forever 1永久 0非永久 | 903 | // valid_forever 1永久 0非永久 |
| 904 | let list = res.data.filter(item => { | 904 | let list = res.data.filter(item => { |
| 905 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 906 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 907 | - }) | 905 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 906 | + let validForever = data.valid_forever === '1'; | ||
| 907 | + let isValid = item.is_type === '3' ? | ||
| 908 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 909 | + (this.data.dataStr < (item.etime * 1)); | ||
| 910 | + | ||
| 911 | + return isValid && item.is_open === '1'; | ||
| 912 | + }); | ||
| 908 | list.forEach(detail => { | 913 | list.forEach(detail => { |
| 909 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 914 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 910 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 915 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -91,16 +91,16 @@ | @@ -91,16 +91,16 @@ | ||
| 91 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 91 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 92 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 92 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 93 | <view class="priceText" wx:if="{{item.price}}"> | 93 | <view class="priceText" wx:if="{{item.price}}"> |
| 94 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 94 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 95 | </view> | 95 | </view> |
| 96 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 96 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 97 | </view> | 97 | </view> |
| 98 | <view class="couponLine"></view> | 98 | <view class="couponLine"></view> |
| 99 | <view class="itemRight"> | 99 | <view class="itemRight"> |
| 100 | <view class="btns"> | 100 | <view class="btns"> |
| 101 | - <text class="font40r">{{item.aname}}</text> | 101 | + <text class="font32r anameText">{{item.aname}}</text> |
| 102 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 102 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 103 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 103 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 104 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 104 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 105 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 105 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 106 | </view> | 106 | </view> |
| @@ -300,7 +300,7 @@ | @@ -300,7 +300,7 @@ | ||
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | .preferentialCoupon .couponLine{ | 302 | .preferentialCoupon .couponLine{ |
| 303 | - margin: 24rpx 0; | 303 | + margin: 24rpx 0 4rpx 0; |
| 304 | border-right: 2rpx dashed #f6231b; | 304 | border-right: 2rpx dashed #f6231b; |
| 305 | } | 305 | } |
| 306 | 306 | ||
| @@ -357,7 +357,7 @@ | @@ -357,7 +357,7 @@ | ||
| 357 | margin-right: 10rpx; | 357 | margin-right: 10rpx; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | -.preferentialCoupon .btns text { | 360 | +.preferentialCoupon .btns .anameText { |
| 361 | font-weight: 600; | 361 | font-weight: 600; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| @@ -365,6 +365,7 @@ | @@ -365,6 +365,7 @@ | ||
| 365 | border: 2rpx solid #fa4b20 !important; | 365 | border: 2rpx solid #fa4b20 !important; |
| 366 | background: transparent !important; | 366 | background: transparent !important; |
| 367 | color: #fa4b20 !important; | 367 | color: #fa4b20 !important; |
| 368 | + font-weight: 600; | ||
| 368 | } | 369 | } |
| 369 | 370 | ||
| 370 | .preferentialCoupon .bottom { | 371 | .preferentialCoupon .bottom { |
| @@ -936,9 +936,14 @@ Page({ | @@ -936,9 +936,14 @@ Page({ | ||
| 936 | if (res.data.length > 0) { | 936 | if (res.data.length > 0) { |
| 937 | // valid_forever 1永久 0非永久 | 937 | // valid_forever 1永久 0非永久 |
| 938 | let list = res.data.filter(item => { | 938 | let list = res.data.filter(item => { |
| 939 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 940 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 941 | - }) | 939 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 940 | + let validForever = data.valid_forever === '1'; | ||
| 941 | + let isValid = item.is_type === '3' ? | ||
| 942 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 943 | + (this.data.dataStr < (item.etime * 1)); | ||
| 944 | + | ||
| 945 | + return isValid && item.is_open === '1'; | ||
| 946 | + }); | ||
| 942 | list.forEach(detail => { | 947 | list.forEach(detail => { |
| 943 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 948 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 944 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 949 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -1147,7 +1152,6 @@ Page({ | @@ -1147,7 +1152,6 @@ Page({ | ||
| 1147 | }, | 1152 | }, |
| 1148 | // 计算免费券有效期的起始、结束日期 | 1153 | // 计算免费券有效期的起始、结束日期 |
| 1149 | setTimeRange(cdate, startOffset, endOffset) { | 1154 | setTimeRange(cdate, startOffset, endOffset) { |
| 1150 | - console.log(cdate, startOffset, endOffset); | ||
| 1151 | const startDate = new Date((cdate + startOffset * 86400) * 1000); | 1155 | const startDate = new Date((cdate + startOffset * 86400) * 1000); |
| 1152 | startDate.setHours(0, 0, 0, 0); | 1156 | startDate.setHours(0, 0, 0, 0); |
| 1153 | const useStime = util.unixtoTime(startDate.getTime() / 1000, 'YYYY-MM-DD'); | 1157 | const useStime = util.unixtoTime(startDate.getTime() / 1000, 'YYYY-MM-DD'); |
| @@ -96,16 +96,16 @@ | @@ -96,16 +96,16 @@ | ||
| 96 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 96 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 97 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 97 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 98 | <view class="priceText" wx:if="{{item.price}}"> | 98 | <view class="priceText" wx:if="{{item.price}}"> |
| 99 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 99 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 100 | </view> | 100 | </view> |
| 101 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 101 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 102 | </view> | 102 | </view> |
| 103 | <view class="couponLine"></view> | 103 | <view class="couponLine"></view> |
| 104 | <view class="itemRight"> | 104 | <view class="itemRight"> |
| 105 | <view class="btns"> | 105 | <view class="btns"> |
| 106 | - <text class="font40r">{{item.aname}}</text> | 106 | + <text class="font32r anameText">{{item.aname}}</text> |
| 107 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 107 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 108 | - <view wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</view> | 108 | + <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 109 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 109 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| 110 | 无限制{{item.desc?','+item.desc+'。':'。'}} | 110 | 无限制{{item.desc?','+item.desc+'。':'。'}} |
| 111 | </view> | 111 | </view> |
| @@ -453,7 +453,7 @@ | @@ -453,7 +453,7 @@ | ||
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | .preferentialCoupon .couponLine{ | 455 | .preferentialCoupon .couponLine{ |
| 456 | - margin: 24rpx 0; | 456 | + margin: 24rpx 0 4rpx 0; |
| 457 | border-right: 2rpx dashed #f6231b; | 457 | border-right: 2rpx dashed #f6231b; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| @@ -510,7 +510,7 @@ | @@ -510,7 +510,7 @@ | ||
| 510 | margin-right: 10rpx; | 510 | margin-right: 10rpx; |
| 511 | } | 511 | } |
| 512 | 512 | ||
| 513 | -.preferentialCoupon .btns text { | 513 | +.preferentialCoupon .btns .anameText { |
| 514 | font-weight: 600; | 514 | font-weight: 600; |
| 515 | } | 515 | } |
| 516 | 516 | ||
| @@ -518,6 +518,7 @@ | @@ -518,6 +518,7 @@ | ||
| 518 | border: 2rpx solid #fa4b20 !important; | 518 | border: 2rpx solid #fa4b20 !important; |
| 519 | background: transparent !important; | 519 | background: transparent !important; |
| 520 | color: #fa4b20 !important; | 520 | color: #fa4b20 !important; |
| 521 | + font-weight: 600; | ||
| 521 | } | 522 | } |
| 522 | 523 | ||
| 523 | .bottom { | 524 | .bottom { |
| @@ -213,9 +213,14 @@ Page({ | @@ -213,9 +213,14 @@ Page({ | ||
| 213 | if (res.data.length > 0) { | 213 | if (res.data.length > 0) { |
| 214 | // valid_forever 1永久 0非永久 | 214 | // valid_forever 1永久 0非永久 |
| 215 | let list = res.data.filter(item => { | 215 | let list = res.data.filter(item => { |
| 216 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 217 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 218 | - }) | 216 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 217 | + let validForever = data.valid_forever === '1'; | ||
| 218 | + let isValid = item.is_type === '3' ? | ||
| 219 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 220 | + (this.data.dataStr < (item.etime * 1)); | ||
| 221 | + | ||
| 222 | + return isValid && item.is_open === '1'; | ||
| 223 | + }); | ||
| 219 | list.forEach(detail => { | 224 | list.forEach(detail => { |
| 220 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 225 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 221 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 226 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -12,14 +12,14 @@ | @@ -12,14 +12,14 @@ | ||
| 12 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 12 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 13 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 13 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 14 | <view class="priceText" wx:if="{{item.price}}"> | 14 | <view class="priceText" wx:if="{{item.price}}"> |
| 15 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 15 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 16 | </view> | 16 | </view> |
| 17 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 17 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 18 | </view> | 18 | </view> |
| 19 | <view class="couponLine"></view> | 19 | <view class="couponLine"></view> |
| 20 | <view class="itemRight"> | 20 | <view class="itemRight"> |
| 21 | <view class="btns"> | 21 | <view class="btns"> |
| 22 | - <text class="font40r">{{item.aname}}</text> | 22 | + <text class="font32r anameText">{{item.aname}}</text> |
| 23 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 23 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 24 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> | 24 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 25 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 25 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| @@ -79,7 +79,7 @@ page { | @@ -79,7 +79,7 @@ page { | ||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | .couponWrap .couponLine{ | 81 | .couponWrap .couponLine{ |
| 82 | - margin: 24rpx 0; | 82 | + margin: 24rpx 0 4rpx 0; |
| 83 | border-right: 2rpx dashed #f6231b; | 83 | border-right: 2rpx dashed #f6231b; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -141,7 +141,7 @@ page { | @@ -141,7 +141,7 @@ page { | ||
| 141 | margin-right: 10rpx; | 141 | margin-right: 10rpx; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | -.couponWrap .btns text { | 144 | +.preferentialCoupon .btns .anameText { |
| 145 | font-weight: 600; | 145 | font-weight: 600; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| @@ -149,12 +149,13 @@ page { | @@ -149,12 +149,13 @@ page { | ||
| 149 | border: 2rpx solid #fa4b20 !important; | 149 | border: 2rpx solid #fa4b20 !important; |
| 150 | background: transparent !important; | 150 | background: transparent !important; |
| 151 | color: #fa4b20 !important; | 151 | color: #fa4b20 !important; |
| 152 | + font-weight: 600; | ||
| 152 | } | 153 | } |
| 153 | .couponWrap .itemLeft { | 154 | .couponWrap .itemLeft { |
| 154 | background: transparent; | 155 | background: transparent; |
| 155 | } | 156 | } |
| 156 | .couponWrap .discountText { | 157 | .couponWrap .discountText { |
| 157 | - background: #F6231B; | 158 | + background: #FD4D59; |
| 158 | } | 159 | } |
| 159 | 160 | ||
| 160 | .couponWrap .discountText1{ | 161 | .couponWrap .discountText1{ |
| @@ -200,7 +201,13 @@ page { | @@ -200,7 +201,13 @@ page { | ||
| 200 | justify-content: center; | 201 | justify-content: center; |
| 201 | } | 202 | } |
| 202 | 203 | ||
| 203 | -.priceText .icons { | 204 | +.couponWrap .priceText .icons { |
| 205 | + margin-left: 18rpx; | ||
| 206 | + color: #E34D59; | ||
| 207 | + font-size: 20rpx; | ||
| 208 | +} | ||
| 209 | + | ||
| 210 | +.preferentialItems .priceText .icons { | ||
| 204 | font-family: 'Abel'; | 211 | font-family: 'Abel'; |
| 205 | color: #fff; | 212 | color: #fff; |
| 206 | font-size: 40rpx; | 213 | font-size: 40rpx; |
| @@ -247,9 +247,14 @@ Page({ | @@ -247,9 +247,14 @@ Page({ | ||
| 247 | if (res.data.length > 0) { | 247 | if (res.data.length > 0) { |
| 248 | // valid_forever 1永久 0非永久 | 248 | // valid_forever 1永久 0非永久 |
| 249 | let list = res.data.filter(item => { | 249 | let list = res.data.filter(item => { |
| 250 | - let data = item.expiration_date ? util.determine(item.expiration_date) : ''; | ||
| 251 | - return ((data.valid_forever == '0' && this.data.dataStr < (data.etime * 1)) || data.valid_forever == '1') && item.is_open == '1' | ||
| 252 | - }) | 250 | + let data = item.expiration_date ? util.determine(item.expiration_date) : {}; |
| 251 | + let validForever = data.valid_forever === '1'; | ||
| 252 | + let isValid = item.is_type === '3' ? | ||
| 253 | + (validForever || (data.valid_forever === '0' && this.data.dataStr < (data.etime * 1))) : | ||
| 254 | + (this.data.dataStr < (item.etime * 1)); | ||
| 255 | + | ||
| 256 | + return isValid && item.is_open === '1'; | ||
| 257 | + }); | ||
| 253 | list.forEach(detail => { | 258 | list.forEach(detail => { |
| 254 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; | 259 | detail.stringifyUse = detail.use ? JSON.stringify(detail.use) : ''; |
| 255 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; | 260 | detail.exp_date = detail.exp_date ? util.determine(detail.exp_date) : ''; |
| @@ -27,14 +27,14 @@ | @@ -27,14 +27,14 @@ | ||
| 27 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> | 27 | <text wx:if="{{item.discount!='0.00' && (item.use.is_cash=='1' || item.use.is_cash) && item.discount}}" class="discountText font24r">{{item.discount}}折</text> |
| 28 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> | 28 | <view class="discountText1 font20r {{item.arule.is_accumulation == '1'?'discountText2':'discountText3'}}" wx:if="{{item.is_type == '3'}}">{{item.arule.is_accumulation == '1' ? '可' : '不可'}}叠加</view> |
| 29 | <view class="priceText" wx:if="{{item.price}}"> | 29 | <view class="priceText" wx:if="{{item.price}}"> |
| 30 | - <view class="icons font24r">¥</view><text class="font40r">{{item.price}}</text> | 30 | + <view class="icons font24r">¥</view><text class="font48r">{{item.price}}</text> |
| 31 | </view> | 31 | </view> |
| 32 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> | 32 | <view class="icons font20r" wx:if="{{item.is_type == '3' && item.desc!='0'}}">消费满{{item.desc}}元可用</view> |
| 33 | </view> | 33 | </view> |
| 34 | <view class="couponLine"></view> | 34 | <view class="couponLine"></view> |
| 35 | <view class="itemRight"> | 35 | <view class="itemRight"> |
| 36 | <view class="btns"> | 36 | <view class="btns"> |
| 37 | - <text class="font40r">{{item.aname}}</text> | 37 | + <text class="font32r anameText">{{item.aname}}</text> |
| 38 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> | 38 | <block wx:if="{{item.is_type == '1' || item.is_type == '2'}}"> |
| 39 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> | 39 | <text wx:if="{{item.exp_date.is_week=='1' || item.exp_date.is_week===true}}" class="bottom font24r">{{item.exp_date.week_show?item.exp_date.week_show+'可用':''}}{{item.desc?','+item.desc+'。':'。'}}</text> |
| 40 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> | 40 | <view wx:if="{{item.exp_date.is_none=='1' || item.exp_date.is_none===true}}" class="bottom font24r"> |
| @@ -278,7 +278,7 @@ | @@ -278,7 +278,7 @@ | ||
| 278 | text-align: center; | 278 | text-align: center; |
| 279 | color: #fff; | 279 | color: #fff; |
| 280 | border-radius: 32rpx; | 280 | border-radius: 32rpx; |
| 281 | - margin: 20rpx 0; | 281 | + margin: 10rpx 0; |
| 282 | line-height: 44rpx; | 282 | line-height: 44rpx; |
| 283 | height: 44rpx; | 283 | height: 44rpx; |
| 284 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); | 284 | background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%); |
| @@ -349,7 +349,7 @@ | @@ -349,7 +349,7 @@ | ||
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | .couponWrap .bottom { | 351 | .couponWrap .bottom { |
| 352 | - margin-top: 10rpx; | 352 | + margin-top: 4rpx; |
| 353 | width: 100%; | 353 | width: 100%; |
| 354 | color: #C36607; | 354 | color: #C36607; |
| 355 | font-family: PingFang SC; | 355 | font-family: PingFang SC; |
| @@ -372,7 +372,7 @@ | @@ -372,7 +372,7 @@ | ||
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | .couponWrap .couponLine{ | 374 | .couponWrap .couponLine{ |
| 375 | - margin: 24rpx 0; | 375 | + margin: 24rpx 0 4rpx 0; |
| 376 | border-right: 2rpx dashed #f6231b; | 376 | border-right: 2rpx dashed #f6231b; |
| 377 | } | 377 | } |
| 378 | 378 | ||
| @@ -427,7 +427,6 @@ | @@ -427,7 +427,6 @@ | ||
| 427 | flex-direction: column; | 427 | flex-direction: column; |
| 428 | align-items: center; | 428 | align-items: center; |
| 429 | color: #C36607; | 429 | color: #C36607; |
| 430 | - margin-top: 10rpx; | ||
| 431 | } | 430 | } |
| 432 | 431 | ||
| 433 | .couponWrap .grantNum text { | 432 | .couponWrap .grantNum text { |
| @@ -435,7 +434,7 @@ | @@ -435,7 +434,7 @@ | ||
| 435 | margin-right: 10rpx; | 434 | margin-right: 10rpx; |
| 436 | } | 435 | } |
| 437 | 436 | ||
| 438 | -.couponWrap .btns text { | 437 | +.couponWrap .btns .anameText { |
| 439 | font-weight: 600; | 438 | font-weight: 600; |
| 440 | } | 439 | } |
| 441 | 440 | ||
| @@ -443,6 +442,7 @@ | @@ -443,6 +442,7 @@ | ||
| 443 | border: 2rpx solid #fa4b20 !important; | 442 | border: 2rpx solid #fa4b20 !important; |
| 444 | background: transparent !important; | 443 | background: transparent !important; |
| 445 | color: #fa4b20 !important; | 444 | color: #fa4b20 !important; |
| 445 | + font-weight: 600; | ||
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | .couponWrap .discountText { | 448 | .couponWrap .discountText { |
-
Please register or login to post a comment