Files
dvcp_v2_wxcp_app/library/apps/AppCreditPoints/AppCreditPoints.vue

57 lines
1.3 KiB
Vue
Raw Normal View History

2022-02-15 10:48:33 +08:00
<template>
2022-05-19 17:28:10 +08:00
<section class="AppCreditPoints">
2022-05-20 14:10:10 +08:00
<AiTabPanes :tabs="tabList" v-model="tabIndex"/>
2022-05-19 17:28:10 +08:00
<family-rank v-if="tabIndex == 0" :showDetail="showDetail"/>
<user-rank v-if="tabIndex == 1" :showDetail="showDetail"/>
<sys-user-integral v-if="tabIndex==2"/>
</section>
2022-02-15 10:48:33 +08:00
</template>
<script>
2022-05-19 17:28:10 +08:00
import {mapState} from 'vuex'
import userRank from './components/userRank.vue'
import familyRank from './components/familyRank.vue'
import SysUserIntegral from "./components/sysUserIntegral";
2022-02-15 10:48:33 +08:00
export default {
name: "AppCreditPoints",
2022-05-19 17:28:10 +08:00
appName: "我的积分",
2022-02-15 10:48:33 +08:00
computed: {
2022-07-19 18:06:22 +08:00
...mapState(['user'])
2022-02-15 10:48:33 +08:00
},
2022-05-19 17:28:10 +08:00
components: {SysUserIntegral, userRank, familyRank},
2022-02-15 10:48:33 +08:00
data() {
return {
2022-05-19 17:28:10 +08:00
tabList: ['家庭积分', '个人积分', "员工积分"],
2022-02-15 10:48:33 +08:00
tabIndex: 0,
2022-05-19 17:28:10 +08:00
showDetail: true
}
},
onLoad(options) {
if (options.type == 'detail') {
this.showDetail = true
}
uni.setNavigationBarTitle({
title: options.title
})
2022-02-15 10:48:33 +08:00
},
2022-05-19 17:28:10 +08:00
onReachBottom() {
2022-06-22 17:59:43 +08:00
uni.$emit("reachBottom" + this.tabIndex)
2022-02-15 10:48:33 +08:00
},
2022-05-20 15:03:36 +08:00
onShow() {
uni.$emit("onShow")
2022-02-17 11:41:48 +08:00
},
2022-02-15 10:48:33 +08:00
methods: {
tabClick(index) {
2022-05-19 17:28:10 +08:00
this.tabIndex = index
}
2022-02-15 10:48:33 +08:00
},
2022-05-19 17:28:10 +08:00
}
2022-02-15 10:48:33 +08:00
</script>
<style scoped lang="scss">
2022-05-19 17:28:10 +08:00
.AppCreditPoints {
width: 100vw;
background-color: #f3f6f9;
min-height: 100vh;
2022-02-15 10:48:33 +08:00
}
</style>