|
|
|
@ -57,8 +57,9 @@ |
|
|
|
|
<text class='font3' v-else>满{{parsePrice(item.use_min_price)}}元可用</text> |
|
|
|
|
</p> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="btn" :class="item.ProductLst.length == 0 ? 'disabled' : ''" v-if="!item.issue" @click="receiveCoupon(item)">立即领取</view> |
|
|
|
|
<navigator :url="'/pages/columnGoods/goods_coupon_list/index?coupon_id='+item.coupon_id" class='btn shiyong' hover-class="none" v-if="item.issue && item.ProductLst.length > 0"> |
|
|
|
|
<view class="btn disabled" v-if="!item.issue&&!canclick" @click="receiveCoupon(item)">该用户已领取</view> |
|
|
|
|
<view class="btn" :class="item.ProductLst.length == 0 ? 'disabled' : ''" v-if="!item.issue&&canclick" @click="receiveCoupon(item)">立即领取</view> |
|
|
|
|
<navigator :url="'/pages/columnGoods/goods_coupon_list/index?coupon_id='+item.coupon_id" class='btn shiyong' hover-class="none" v-if="item.issue && item.ProductLst.length > 0&&canclick"> |
|
|
|
|
去使用 |
|
|
|
|
</navigator> |
|
|
|
|
<view v-if="item.issue && item.ProductLst.length == 0" class='btn shiyong disabled'>去使用</view> |
|
|
|
@ -96,6 +97,7 @@ |
|
|
|
|
loaded: false, |
|
|
|
|
page: 1, |
|
|
|
|
limit: 15, |
|
|
|
|
canclick:false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad: function() { |
|
|
|
@ -152,6 +154,13 @@ |
|
|
|
|
this.loading = false; |
|
|
|
|
this.loaded = res.data.list.length != this.limit; |
|
|
|
|
this.page ++; |
|
|
|
|
setCouponReceive(res.data.list[0].coupon_id).then(result => { |
|
|
|
|
if(result.status==400&&result.message.indexOf('无法重复领取')!=-1){ |
|
|
|
|
this.canclick=false |
|
|
|
|
}else{ |
|
|
|
|
this.canclick=true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url:"/pages/columnGoods/goods_coupon_list/index?coupon_id="+res.data.list[0].coupon_id |
|
|
|
@ -350,7 +359,7 @@ |
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
} |
|
|
|
|
.btn{ |
|
|
|
|
width: 142rpx; |
|
|
|
|
width: 152rpx; |
|
|
|
|
background: linear-gradient(270deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%); |
|
|
|
|
border-radius: 26rpx; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|