Files
dvcp_v2_wxcp_app/library/apps/AppCreditPoints/AppCreditPoints.vue
2024-10-31 14:34:57 +08:00

57 lines
1.3 KiB
Vue

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