Commit b72b9db8 by 李伟康

commit

1 parent 5ae8c7d9
......@@ -2,7 +2,7 @@
<div class="index">
<template v-if="$route.meta.isTab">
<tab
:list="['新车精品礼券','商城优惠券']"
:list="tabList"
@change="change"
:index="tabIndex"
sticky
......@@ -35,7 +35,7 @@
<div class="info">
<div class="top">
<div class="title">{{i.couponName}}</div>
<div class="num">剩余:{{i.remainAmount || i.residueAmount}}张</div>
<div class="num">剩余:{{i.remainAmount || i.residueAmount || 0}}张</div>
<div
:class="['btn', 'y-center', 'text-center', {'disabled-btn':tabIndex == 0?i.remainAmount<1:i.residueAmount<1}]"
@click="showShareModel(i)"
......@@ -75,22 +75,33 @@
<script type='text/ecmascript-6'>
import { shareMixin, pageMixin, discountTypeMixin } from '@/mixins'
import { couponApi, boutiquecouponApi } from '@/api'
const tabList = ['新车精品礼券', '商城优惠券']
export default {
name: 'coupon',
mixins: [shareMixin, pageMixin, discountTypeMixin],
data() {
return {}
return {
tabList
}
},
mounted() {},
methods: {
getList_0(pageNum) {
let { list } = this
boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
this.hideLoading()
console.log('精品礼券', res)
this.flag = true
if (res.total == 0) {
this.showLoading()
this.tabList = ['商城优惠券']
this.getList_1(pageNum)
return
}else{
this.tabList = tabList
}
this.flag = true
this.list = list.concat(res.list)
this.total = res.total
this.hideLoading()
})
},
getList_1(pageNum) {
......@@ -130,11 +141,11 @@ export default {
padding: 0 14px;
flex-shrink: 0;
text-align: center;
span{
span {
font-size: 10px;
}
}
.clear-padding{
.clear-padding {
padding: 0;
}
.info {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!