From b46de49b14769a0d06d1cb02c57c36aa386a87c9 Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期六, 22 六月 2024 19:24:18 +0800
Subject: [PATCH] Merge branch 'master' of http://218.28.192.34:9999/r/sqys/sqys_xcx

---
 policy/policyIndex/policyIndex.vue |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/policy/policyIndex/policyIndex.vue b/policy/policyIndex/policyIndex.vue
index 0a89f1b..182a5c4 100644
--- a/policy/policyIndex/policyIndex.vue
+++ b/policy/policyIndex/policyIndex.vue
@@ -1,7 +1,7 @@
 <template>
 	<view class="padding-bottom">
-		<policyIndexVue v-if="activeNumber == 0"></policyIndexVue>
-		<minePage v-if="activeNumber == 1"></minePage>
+		<policyIndexVue v-if="activeNumber == 0" :isJudge="isJudge" :userType="userInfo.data.userType" :userAuth="userAuth"></policyIndexVue>
+		<minePage v-if="activeNumber == 1" :userInfo="userInfo" :roleGroup="roleGroup"></minePage>
 		<tabsCom :activeNumber.sync="activeNumber"></tabsCom>
 	</view>
 </template>
@@ -20,7 +20,10 @@
 		data() {
 			return {
 				isJudge: false,
-				activeNumber: 0
+				activeNumber: 0,
+				userInfo: {},
+				roleGroup: '',
+				userAuth: false
 			}
 		},
 		onShow() {
@@ -29,8 +32,18 @@
 		methods: {
 			getInfo() {
 				getInfo().then(val =>{
-					// console.log()
-					this.isJudge = val.data.roles.some(item => item.includes('check_enforce'))
+					
+					this.userInfo = val.data
+					
+					if(val.data.roles) {
+						this.isJudge = val.data.roles.some(item => item.includes('check_enforce'))
+						const value = val.data.roles.filter(item => !item.includes('check_enforce'))
+						if(value.length) {
+							this.userAuth = true
+						} else {
+							this.userAuth = false
+						}
+					}
 				})
 			},
 			applyPulicy() {

--
Gitblit v1.9.1