完善问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="c-coupon">
|
||||
<view :class="type == 1 && status != 0 ? 'coupon-unable' : 'coupon-usable'">
|
||||
<view class="info-type" :style="{ backgroundImage: 'url(' + (status == 0 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||
<view class="coupon-usable">
|
||||
<view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||
<div class="wrap_left_top"></div>
|
||||
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
|
||||
</view>
|
||||
@@ -10,15 +10,12 @@
|
||||
<view class="price">¥<span>{{ couponInfo.vouchertemplate_price }}</span></view>
|
||||
<view class="condition">满{{ couponInfo.vouchertemplate_limit }}使用</view>
|
||||
</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.vouchertemplate_storename }}鞋子商品使用</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.vouchertemplate_storename }}商品使用</view>
|
||||
<view class="info-integral">兑换积分:{{ couponInfo.vouchertemplate_points }}积分</view>
|
||||
<view class="info-date">有效期{{ couponInfo.vouchertemplate_startdate }}-{{ couponInfo.vouchertemplate_enddate }}</view>
|
||||
</view>
|
||||
<view class="coupon-btn">
|
||||
<text v-if="type == 0 && status == 0" @click="exchangeCoupon">立即兑换</text>
|
||||
<text v-if="type == 1 && status == 0" @click="use">立即使用</text>
|
||||
<image v-if="type == 1 && status == 1" src="/static/image/mine/28.png"></image>
|
||||
<image v-if="type == 1 && status == 2" src="/static/image/mine/29.png"></image>
|
||||
<text @click="exchangeCoupon">立即兑换</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -27,10 +24,8 @@
|
||||
/**
|
||||
* coupon 优惠券
|
||||
* @description 优惠券组件
|
||||
* @property {Number} type 优惠券操作方式(可兑换的优惠券: 0 / 自己的优惠券: 1)
|
||||
* @property {Object} coupon-info 优惠券信息
|
||||
* @event {Function} exchange 兑换优惠券
|
||||
* @event {Function} use 使用优惠券
|
||||
*/
|
||||
export default {
|
||||
data() {
|
||||
@@ -38,11 +33,10 @@ export default {
|
||||
},
|
||||
props: {
|
||||
status: Number,
|
||||
type: Number,
|
||||
couponInfo: Object,
|
||||
},
|
||||
created() {
|
||||
console.log(this.couponInfo);
|
||||
// console.log(this.couponInfo);
|
||||
},
|
||||
methods: {
|
||||
exchange() {
|
||||
@@ -54,9 +48,6 @@ export default {
|
||||
if(res.errCode == 0) {}
|
||||
})
|
||||
},
|
||||
use() {
|
||||
this.$emit('use', this.couponInfo.vouchertemplate_id);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -123,6 +114,16 @@ export default {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: rgba(255,255,255,1);
|
||||
position: relative;
|
||||
// 增大按钮点击范围
|
||||
&::after {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top: -30rpx;
|
||||
left: -40rpx;
|
||||
width: 200rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
> image {
|
||||
width: 122rpx;
|
||||
|
||||
Reference in New Issue
Block a user