|
@@ -6,12 +6,16 @@
|
|
|
<view class="money">¥{{item.money||'0'}}</view>
|
|
|
<view class="man">满{{item.discount_money||'0'}}可以</view>
|
|
|
</view>
|
|
|
- <view class="center">
|
|
|
- <view class="type"><text>{{item.type||'暂无'}}</text> {{item.name||'暂无'}}</view>
|
|
|
- <view class="date">有效期{{item.start_time||'暂无'}}-{{item.end_time||'暂无'}}</view>
|
|
|
- </view>
|
|
|
<view class="right">
|
|
|
- <button type="default" size="mini" @click="toDiscount(item)">确认</button>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -23,6 +27,9 @@
|
|
|
couponList: {
|
|
|
type: Array,
|
|
|
},
|
|
|
+ Style: {
|
|
|
+ type: Object,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -33,9 +40,7 @@
|
|
|
// 选择优惠劵
|
|
|
toDiscount(e) {
|
|
|
const that = this;
|
|
|
- that.$emit('toDiscount', {
|
|
|
- e
|
|
|
- })
|
|
|
+ that.$emit('toDiscount', e)
|
|
|
},
|
|
|
}
|
|
|
}
|
|
@@ -52,8 +57,8 @@
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- width: 94vw;
|
|
|
- margin: 0 2vw 1vw 2vw;
|
|
|
+ width: 96vw;
|
|
|
+ margin: 0 2vw 2vw 2vw;
|
|
|
border-radius: 3vw;
|
|
|
|
|
|
.left {
|
|
@@ -73,45 +78,53 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .center {
|
|
|
+ .right {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
flex-grow: 1;
|
|
|
border-radius: 3vw;
|
|
|
- border-top-right-radius: 0;
|
|
|
- border-bottom-right-radius: 0;
|
|
|
- padding: 5vw 2vw;
|
|
|
+ padding: 5vw 3vw;
|
|
|
background-color: var(--mainColor);
|
|
|
|
|
|
- .type {
|
|
|
- margin: 0 0 1vw 0;
|
|
|
+ .other {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ width: 50vw;
|
|
|
|
|
|
- text {
|
|
|
- border: 0.5vw solid red;
|
|
|
- color: red;
|
|
|
- padding: 0 1vw;
|
|
|
- border-radius: 1vw;
|
|
|
- font-size: var(--font12Size);
|
|
|
- margin: 0 1vw 0 0;
|
|
|
- }
|
|
|
+ .type {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ line-height: 6vw;
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ margin: 0 1vw 1vw 0;
|
|
|
|
|
|
- font-size: var(--font16Size);
|
|
|
- }
|
|
|
+ text {
|
|
|
+ margin: 0 1vw 0 0;
|
|
|
+ border: 0.5vw solid red;
|
|
|
+ color: red;
|
|
|
+ padding: 0 1vw;
|
|
|
+ border-radius: 1vw;
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .date {
|
|
|
- font-size: var(--font12Size);
|
|
|
- color: var(--f99Color);
|
|
|
+ .date {
|
|
|
+ font-size: var(--font12Size);
|
|
|
+ color: var(--f99Color);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- .right {
|
|
|
- padding: 7vw 3vw;
|
|
|
- border-radius: 3vw;
|
|
|
- border-top-left-radius: 0;
|
|
|
- border-bottom-left-radius: 0;
|
|
|
- background-color: var(--mainColor);
|
|
|
+ .btn {
|
|
|
+ width: 20vw;
|
|
|
|
|
|
- button {
|
|
|
- background-color: #FFD700;
|
|
|
- font-weight: bold;
|
|
|
+ button {
|
|
|
+ background-color: #FFD700;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|