2022-02-15 10:48:33 +08:00
|
|
|
<template>
|
2022-05-19 17:28:10 +08:00
|
|
|
<section class="AppCreditPoints">
|
|
|
|
|
<AiTabPanes :tabs="tabList" v-model="tabIndex" background="#4181FF"/>
|
|
|
|
|
<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-05-19 17:28:10 +08:00
|
|
|
...mapState(['user', 'token'])
|
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() {
|
|
|
|
|
uni.$emit("reachBottom")
|
2022-02-15 10:48:33 +08:00
|
|
|
},
|
2022-05-19 17:28:10 +08:00
|
|
|
onShow(){
|
|
|
|
|
let index = JSON.parse(JSON.stringify(this.tabIndex))
|
|
|
|
|
this.tabIndex = null
|
|
|
|
|
this.$nextTick(()=>this.tabIndex = index)
|
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;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
background-color: #f3f6f9;
|
|
|
|
|
min-height: 100vh;
|
2022-02-15 10:48:33 +08:00
|
|
|
}
|
|
|
|
|
</style>
|