<template>
|
<view class="padding-bottom">
|
<policyIndexVue v-if="activeNumber == 0"></policyIndexVue>
|
<minePage v-if="activeNumber == 1"></minePage>
|
<tabsCom :activeNumber.sync="activeNumber"></tabsCom>
|
</view>
|
</template>
|
|
<script>
|
import { getInfo } from '@/api/auth.js'
|
import tabsCom from '@/policy/components/tabs.vue'
|
import policyIndexVue from '@/policy/components/index.vue'
|
import minePage from '@/policy/components/mine.vue'
|
export default {
|
components: {
|
tabsCom,
|
policyIndexVue,
|
minePage
|
},
|
data() {
|
return {
|
isJudge: false,
|
activeNumber: 0
|
}
|
},
|
onShow() {
|
this.getInfo()
|
},
|
methods: {
|
getInfo() {
|
getInfo().then(val =>{
|
// console.log()
|
this.isJudge = val.data.roles.some(item => item.includes('check_enforce'))
|
})
|
},
|
applyPulicy() {
|
uni.navigateTo({
|
url: '/policy/policyApply/policyApply'
|
})
|
}
|
}
|
}
|
</script>
|
<style>
|
page{
|
background-color: #F7F7F7;
|
}
|
</style>
|
<style scoped lang="scss">
|
@import "./policyIndex.scss";
|
</style>
|