|
@@ -20,7 +20,7 @@
|
|
|
</view>
|
|
|
<view class="coupon-right flex">
|
|
|
<view class="txt coupon-right-color" v-if="$numberFormat(payInfo.discountAmt) != 0">-¥{{ $numberFormat(payInfo.discountAmt)}}</view>
|
|
|
- <view class="txt" v-else-if="payInfo.listNum != undefined">{{payInfo.listNum}}张可用</view>
|
|
|
+ <view class="txt" v-else-if="total != 0">{{ total }}张可用</view>
|
|
|
<view class="txt" v-else>暂无可用优惠券</view>
|
|
|
<image src="../../static/public/public_right_arrow.png" mode="scaleToFill"></image>
|
|
|
</view>
|
|
@@ -72,10 +72,23 @@
|
|
|
return {
|
|
|
checked: true,
|
|
|
authShow: false,
|
|
|
+ total: 0,
|
|
|
};
|
|
|
},
|
|
|
-
|
|
|
+ created(){
|
|
|
+ this.getTotal()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ getTotal(){
|
|
|
+ $http.post(`/api/v1/mp/user/ticket/order/coupon/listPage`, {}).then(
|
|
|
+ res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.total = res.total
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
changeChecked(e) {
|
|
|
this.checked = e
|
|
|
},
|