初始化仓库
This commit is contained in:
41
bundle/pages/user_coupon/user_coupon.vue
Normal file
41
bundle/pages/user_coupon/user_coupon.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<view class="user-coupon">
|
||||
<tabs :current="active" @change="onChange" :is-scroll="false">
|
||||
<tab v-for="(item, index) in coupons" :key="index" :name="item.title">
|
||||
<my-coupons :type="item.type" :btn-type="item.btnType" :i="index" :index="active"></my-coupons>
|
||||
</tab>
|
||||
</tabs>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
coupons: [{
|
||||
title: '可使用',
|
||||
btnType: 0,
|
||||
type: 'valid'
|
||||
}, {
|
||||
title: '已使用',
|
||||
btnType: 1,
|
||||
type: 'used'
|
||||
}, {
|
||||
title: '已过期',
|
||||
btnType: 2,
|
||||
type: 'expired'
|
||||
}]
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange(index) {
|
||||
this.active = index
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user