Commit 4ef45888 by 李伟康

commit

1 parent 97070218
......@@ -76,7 +76,8 @@
<script type='text/ecmascript-6'>
import { shareMixin, pageMixin, discountTypeMixin } from '@/mixins'
import { couponApi, boutiquecouponApi } from '@/api'
const tabList = ['新车精品礼券', '商城优惠券']
const tabList = [ '商城优惠券']
// const tabList = ['新车精品礼券', '商城优惠券']
export default {
name: 'coupon',
mixins: [shareMixin, pageMixin, discountTypeMixin],
......@@ -88,27 +89,28 @@ export default {
},
mounted() {},
methods: {
// getList_0(pageNum) {
// let { list } = this
// boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
// this.hideLoading()
// console.log('精品礼券', res)
// if (res.total == 0) {
// this.showLoading()
// this.updata = new Date().getTime()
// this.tabList = ['商城优惠券']
// this.getList_1(pageNum)
// return
// } else {
// this.tabList = tabList
// }
// this.flag = true
// this.list = list.concat(res.list)
// this.total = res.total
// })
// },
// getList_1(pageNum) {
getList_0(pageNum) {
let { list } = this
boutiquecouponApi.getBoutiqueCouponList({ pageNum }).then(res => {
this.hideLoading()
console.log('精品礼券', res)
if (res.total == 0) {
this.showLoading()
this.updata = new Date().getTime()
this.tabList = ['商城优惠券']
this.getList_1(pageNum)
return
} else {
this.tabList = tabList
}
this.flag = true
this.list = list.concat(res.list)
this.total = res.total
})
},
getList_1(pageNum) {
let { list } = this
couponApi.getMerchantCouponList({ pageNum }).then(res => {
console.log('商城礼券', res)
this.flag = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!