|
@@ -1,20 +1,33 @@
|
|
|
<template>
|
|
|
<view class="main">
|
|
|
- <view class="pre_one">优惠劵({{couponList.length}})</view>
|
|
|
+ <view class="pre_one">优惠劵({{couponList.length}}张)</view>
|
|
|
<view class="pre_two" v-for="(item,index) in couponList" :key="index">
|
|
|
<view class="left">
|
|
|
- <view class="money">¥{{item.money||'0'}}</view>
|
|
|
- <view class="man">满{{item.discount_money||'0'}}可以</view>
|
|
|
+ <view v-if="item.discount_config.limit=='nolimit'" class="money">不限</view>
|
|
|
+ <view v-else class="money">¥{{item.discount_config.limit||'0'}}</view>
|
|
|
+ <view class="man">满{{item.discount_config.min||'0'}}可用</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<view class="other">
|
|
|
- <view class="type"><text>{{item.type||'暂无'}}</text> {{item.coupon.name||'暂无'}}</view>
|
|
|
- <view class="date">有效期{{item.start_time||'暂无'}}-{{item.end_time||'暂无'}}</view>
|
|
|
+ <view class="type"><text>{{item.discount_type_label||'暂无'}}</text>
|
|
|
+ {{item.name||'暂无'}}
|
|
|
+ </view>
|
|
|
+ <view v-if="item.expire_type=='days'" class="date">{{item.expire_time||'暂无'}}天内有效</view>
|
|
|
+ <view v-if="item.expire_type=='fixed'" class="date">{{item.expire_time||'暂无'}}</view>
|
|
|
+ <view v-if="item.get_limit=='max'" class="date">
|
|
|
+ {{item.use_limit_label||'暂无'}}-{{item.expire_type_label}}-{{item.get_limit_label||'暂无'}}领取{{item.get_limit_config.max}}张
|
|
|
+ </view>
|
|
|
+ <view v-if="item.get_limit=='nolimit'" class="date">
|
|
|
+ {{item.use_limit_label||'暂无'}}-{{item.expire_type_label}}-{{item.get_limit_label||'暂无'}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="btn">
|
|
|
<button v-if="Style&&Style.btn||false" type="default" size="mini"
|
|
|
@click="toDiscount(item)">确认</button>
|
|
|
- <button v-else type="default" size="mini">{{item.status=='0'?'未使用':item.status=='1'?'已使用':'已过期'}}</button>
|
|
|
+ <button v-if="Style&&Style.status||false" type="default"
|
|
|
+ size="mini">{{item.status=='0'?'未使用':item.status=='1'?'已使用':'已过期'}}</button>
|
|
|
+ <button v-if="Style&&Style.receive||false" type="default" size="mini"
|
|
|
+ @click="toReceive(item)">领取</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -42,6 +55,11 @@
|
|
|
const that = this;
|
|
|
that.$emit('toDiscount', e)
|
|
|
},
|
|
|
+ // 领取优惠劵
|
|
|
+ toReceive(e) {
|
|
|
+ const that = this;
|
|
|
+ that.$emit('toReceive', e)
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -64,9 +82,10 @@
|
|
|
.left {
|
|
|
text-align: center;
|
|
|
border-radius: 3vw;
|
|
|
- padding: 5vw 3vw;
|
|
|
+ padding: 6vw 3vw;
|
|
|
background-color: #FFFACD;
|
|
|
color: #8B4513;
|
|
|
+ border-right: 0.5vw dashed var(--fcColor);
|
|
|
|
|
|
.money {
|
|
|
font-size: var(--font18Szie);
|
|
@@ -84,13 +103,13 @@
|
|
|
align-items: center;
|
|
|
flex-grow: 1;
|
|
|
border-radius: 3vw;
|
|
|
- padding: 5vw 3vw;
|
|
|
+ padding: 1.5vw 3vw;
|
|
|
background-color: var(--mainColor);
|
|
|
|
|
|
.other {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
- width: 50vw;
|
|
|
+ width: 46vw;
|
|
|
|
|
|
.type {
|
|
|
overflow: hidden;
|
|
@@ -113,6 +132,11 @@
|
|
|
}
|
|
|
|
|
|
.date {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
font-size: var(--font12Size);
|
|
|
color: var(--f99Color);
|
|
|
}
|