From cc610ef597a4b600b4c48c80026f3a99be171f3b Mon Sep 17 00:00:00 2001
From: yuanhao <yuanhao_2024>
Date: 星期一, 19 五月 2025 18:03:48 +0800
Subject: [PATCH] fix: scss跟背景图

---
 policy/policyIndex/policyIndex.vue |   46 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/policy/policyIndex/policyIndex.vue b/policy/policyIndex/policyIndex.vue
index f7f0383..182a5c4 100644
--- a/policy/policyIndex/policyIndex.vue
+++ b/policy/policyIndex/policyIndex.vue
@@ -1,19 +1,29 @@
 <template>
-	<view>
-		<u-button @click="applyPulicy">鎵ф硶鐢宠</u-button>
-		<u-button v-if="isJudge">鎵ф硶瀹℃壒</u-button>
-		<u-button>鎵ф硶缁撴灉涓婃姤</u-button>
-		<u-button>璁板綍鏌ヨ</u-button>
-		<u-button>鏁版嵁鐪嬫澘</u-button>
+	<view class="padding-bottom">
+		<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>
 
 <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
+				isJudge: false,
+				activeNumber: 0,
+				userInfo: {},
+				roleGroup: '',
+				userAuth: false
 			}
 		},
 		onShow() {
@@ -22,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() {
@@ -34,7 +54,11 @@
 		}
 	}
 </script>
-
 <style>
-
+	page{
+		background-color: #F7F7F7;
+	}
+</style>
+<style scoped lang="scss">
+@import "./policyIndex.scss";
 </style>

--
Gitblit v1.9.1