<template>
<view>
    <u-subsection :list="list" mode="subsection" :current="current" @change="sectionChange"></u-subsection>
    <u-empty mode="coupon" text=" ">
    </u-empty>
	<div class="history" @click="handleToHistoryCoupon">
		查看历史券
	</div>
</view>
</template>

<script>
export default {
    data() {
        return {
            list: ['优惠券', '免房券'],
            current: 0,
        }
    },
	onLoad(options){
		console.log(options);
		if (options.cur) {
			this.current = options.cur
		}
	},
    methods: {
        sectionChange(e) {
            this.current = e
        },
		handleToHistoryCoupon(){
			uni.navigateTo({
				url: '/components/historyCoupon/historyCoupon'
			})
		}
    }
}
</script>

<style lang="scss" scoped>
.history{
	color: #00AAFF;
	text-align: center;
}
</style>
