49 lines
1.0 KiB
Vue
49 lines
1.0 KiB
Vue
<!-- 优惠券 -->
|
|
<template>
|
|
<view class="jy-coupon">
|
|
<JyCouponCard v-for="(item, index) in listProperty.list" :key="index" :item="item"></JyCouponCard>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import JyCouponCard from './components/jy-coupon-card'
|
|
import apiMixins from '@/components/public/apiMixins.js'
|
|
|
|
export default {
|
|
components: {
|
|
JyCouponCard
|
|
},
|
|
mixins: [apiMixins],
|
|
data() {
|
|
return {
|
|
checkNum: []
|
|
}
|
|
},
|
|
mounted() {
|
|
this.init();
|
|
},
|
|
methods: {
|
|
init() {
|
|
this.getData({
|
|
api: 'coupon',
|
|
fn: 'list'
|
|
}, {
|
|
userId: null
|
|
}, true);
|
|
},
|
|
onReachBottomHandler() {
|
|
this.listProperty.params.pageNum++;
|
|
this.init();
|
|
},
|
|
onPullDownRefreshHandler() {
|
|
this.listProperty.params.pageNum = 1
|
|
this.init();
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
<style scoped lang="scss">
|
|
.jy-coupon {
|
|
padding: 20rpx;
|
|
}
|
|
</style> |