|
@@ -6,13 +6,26 @@
|
|
|
description="同类型优惠券只显示一张"></u-alert-tips>
|
|
|
|
|
|
|
|
|
- <view class="list-item" v-for="(item,index) in myCouponList" :key="item.id">
|
|
|
+ <view class="list-item"
|
|
|
+
|
|
|
+ v-for="(item,index) in myCouponList"
|
|
|
+ :style="item.chooseStatus == '0' ? 'opacity: 0.5':'' "
|
|
|
+ @click="ckselectObj(item)"
|
|
|
+ :key="item.id">
|
|
|
+
|
|
|
+ <view
|
|
|
+ :style="item.chooseStatus == '0' ? 'background-color:#9F9F9F':'' "
|
|
|
+
|
|
|
+ class="voucher" v-if="item.classify == '1'">优惠券</view>
|
|
|
+ <view
|
|
|
+ :style="item.chooseStatus == '0' ? 'background-color:#9F9F9F':'' "
|
|
|
|
|
|
- <view class="voucher" v-if="item.classify == '1'">优惠券</view>
|
|
|
- <view class="voucher" v-if="item.classify == '2'">折扣卷</view>
|
|
|
- <view class="checked">
|
|
|
+ class="voucher" v-if="item.classify == '2'">折扣卷</view>
|
|
|
+ <view class="checked" v-if="selectObj.id==item.id">
|
|
|
<img src="../../../static/img/选中.png" alt="">
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
<view class="item-left">
|
|
|
<view class="title">
|
|
|
{{item.couponName}}
|
|
@@ -23,14 +36,20 @@
|
|
|
</view>
|
|
|
<view class="item-right">
|
|
|
|
|
|
- <view class="price" v-if="item.classify == '1'">¥{{item.value}}</view>
|
|
|
- <view class="price" v-if="item.classify == '2'">{{item.value*10}}折</view>
|
|
|
+ <view class="price"
|
|
|
+ :style="item.chooseStatus == '0' ? 'color:#666':'' "
|
|
|
+
|
|
|
+ v-if="item.classify == '1'">¥{{item.value}}</view>
|
|
|
+ <view class="price"
|
|
|
+ :style="item.chooseStatus == '0' ? 'color:#666':'' "
|
|
|
+
|
|
|
+ v-if="item.classify == '2'">{{item.value*10}}折</view>
|
|
|
|
|
|
<view class="contidion">
|
|
|
- {{item.threshold == 0 ? '无门槛' : '满'+item.threshold+'可用'}}
|
|
|
+ {{item.threshold == 0 ? '无门槛' : '满'+item.threshold+'元可用'}}
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
</view>
|
|
|
<u-divider v-if="myCouponList.length > 0" style="padding-bottom: 80px;margin-top: 10px;">已经到底了</u-divider>
|
|
|
|
|
@@ -41,12 +60,18 @@
|
|
|
|
|
|
<view class="bottom">
|
|
|
<view class="text">
|
|
|
- 已选1张,预计可减
|
|
|
+
|
|
|
<view class="num">
|
|
|
- <text style="font-size: 14px;">¥</text><text>6</text>
|
|
|
+
|
|
|
+ <view class="price" v-if="selectObj.classify == '1'">抵扣¥{{selectObj.value}}元</view>
|
|
|
+ <view class="price" v-if="selectObj.classify == '2'">可享{{selectObj.value*10}}折</view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
- <u-button class="confirm" >
|
|
|
+ <u-button
|
|
|
+ :style="selectObj.id ?'' : 'background-color:#9F9F9F'"
|
|
|
+ @click="submitBtn"
|
|
|
+ class="confirm" >
|
|
|
<span>确定</span>
|
|
|
</u-button>
|
|
|
</view>
|
|
@@ -63,6 +88,7 @@
|
|
|
export default{
|
|
|
data(){
|
|
|
return{
|
|
|
+ selectObj:{},
|
|
|
amount:0,
|
|
|
uuid:0,
|
|
|
myCouponList: [],
|
|
@@ -86,6 +112,27 @@
|
|
|
this.getCouponList();
|
|
|
},
|
|
|
methods:{
|
|
|
+ submitBtn(){
|
|
|
+ if(this.selectObj.id){
|
|
|
+ this.carhelp.set("chooseCoupons",{
|
|
|
+ uuid:this.uuid,
|
|
|
+ selectObj:this.selectObj
|
|
|
+ })
|
|
|
+ uni.navigateBack({
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ckselectObj(item){
|
|
|
+ if(item.chooseStatus==1){
|
|
|
+ this.selectObj=item;
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:"不满足使用条件"
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
toConversion() {
|
|
|
uni.navigateTo({
|
|
|
url: '/pages/user/coupon/conversion'
|
|
@@ -207,6 +254,18 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .have-used{
|
|
|
+
|
|
|
+ width: 54px;
|
|
|
+ height: 54px;
|
|
|
+ position: absolute;
|
|
|
+ top: -12px;
|
|
|
+ right: 0;
|
|
|
+ img{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
.bottom{
|
|
|
position: fixed;
|
|
|
bottom: 0;
|