|
|
@ -35,11 +35,14 @@ |
|
|
|
<image v-if="item._msg == '已过期'" class="left-bg" src="@/static/images/coupon-bg3.png" mode=""></image> |
|
|
|
<image v-if="item._msg == '已过期'" class="left-bg" src="@/static/images/coupon-bg3.png" mode=""></image> |
|
|
|
<image v-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image> |
|
|
|
<image v-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image> |
|
|
|
<view class="text-box"> |
|
|
|
<view class="text-box"> |
|
|
|
<view class="money">¥{{ item.couponPrice }}</view> |
|
|
|
<view v-if="item.image.length>0" class="wrapper acea-row row-middle"> |
|
|
|
|
|
|
|
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view v-else class="money">¥{{ item.couponPrice }}</view> |
|
|
|
<!-- <view class="money">7<text>折</text></view> --> |
|
|
|
<!-- <view class="money">7<text>折</text></view> --> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="line"></view> |
|
|
|
<view class="tip acea-row row-between"> |
|
|
|
<view class="tip acea-row row-between"> |
|
|
|
<view class="">全部商品可用</view> |
|
|
|
<view class="">{{item.cname}}</view> |
|
|
|
<view v-if="item.endTime === 0">不限时</view> |
|
|
|
<view v-if="item.endTime === 0">不限时</view> |
|
|
|
<view v-else>{{navType===0? item.startTime : item.useStartTime }}-{{navType===0? item.endTime:item.useEndTime}}</view> |
|
|
|
<view v-else>{{navType===0? item.startTime : item.useStartTime }}-{{navType===0? item.endTime:item.useEndTime}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -51,7 +54,7 @@ |
|
|
|
<image v-else-if="item.isUse" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""> |
|
|
|
<image v-else-if="item.isUse" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""> |
|
|
|
<image v-else-if="item._msg=='可使用'" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""> |
|
|
|
<image v-else-if="item._msg=='可使用'" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""> |
|
|
|
</image> |
|
|
|
</image> |
|
|
|
<view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{'满减券' || '折扣券'}}</view> |
|
|
|
<view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view> |
|
|
|
<view :class="'tip '+(item._msg == '已过期'?'col-fail':'')">满{{ item.useMinPrice }}可用</view> |
|
|
|
<view :class="'tip '+(item._msg == '已过期'?'col-fail':'')">满{{ item.useMinPrice }}可用</view> |
|
|
|
<view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> |
|
|
|
<view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> |
|
|
|
<view v-else class="btn" @click="getCoupon(item.id,index)">{{navType===0 && item.isUse? '已领取' : (navType===0 ?'立刻领取' :'去使用')}}</view> |
|
|
|
<view v-else class="btn" @click="getCoupon(item.id,index)">{{navType===0 && item.isUse? '已领取' : (navType===0 ?'立刻领取' :'去使用')}}</view> |
|
|
@ -133,6 +136,9 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
setType(i) { |
|
|
|
setType(i) { |
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
|
|
title:'' |
|
|
|
|
|
|
|
}) |
|
|
|
if (this.navType == i) return; |
|
|
|
if (this.navType == i) return; |
|
|
|
this.navType = i; |
|
|
|
this.navType = i; |
|
|
|
this.couponsList=[]; |
|
|
|
this.couponsList=[]; |
|
|
@ -216,6 +222,7 @@ |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// getUseCoupons: function(i) { |
|
|
|
// getUseCoupons: function(i) { |
|
|
|
// if (this.loading) return //阻止下次请求(false可以进行请求); |
|
|
|
// if (this.loading) return //阻止下次请求(false可以进行请求); |
|
|
@ -252,6 +259,24 @@ |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|
|
|
|
|
.coupon-list{ |
|
|
|
|
|
|
|
.wrapper{ |
|
|
|
|
|
|
|
padding: 0 15rpx; |
|
|
|
|
|
|
|
box-sizing: content-box; |
|
|
|
|
|
|
|
height: 100%; |
|
|
|
|
|
|
|
.img{ |
|
|
|
|
|
|
|
width: 110rpx; |
|
|
|
|
|
|
|
height: 110rpx; |
|
|
|
|
|
|
|
border-radius: 16rpx; |
|
|
|
|
|
|
|
margin:33rpx 37rpx 14rpx 0; |
|
|
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.img:nth-child(3){ |
|
|
|
|
|
|
|
margin-right: 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.header { |
|
|
|
.header { |
|
|
|
.tab-title { |
|
|
|
.tab-title { |
|
|
|
font-size: 32rpx; |
|
|
|
font-size: 32rpx; |
|
|
|