From 248ef3ba3de9994dc83d2b36690542893f9fb6e6 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 28 十一月 2024 16:26:06 +0800
Subject: [PATCH] #

---
 pages/home/menuHome.vue |   26 +++++++++++++++++++++++++-
 1 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/pages/home/menuHome.vue b/pages/home/menuHome.vue
index 3ef7711..4a94b2d 100644
--- a/pages/home/menuHome.vue
+++ b/pages/home/menuHome.vue
@@ -90,13 +90,16 @@
 					},
 
 				],
+				menu: [],
 				colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ]
 			};
 		},
 		onShow() {
 			this.baseUrl = uni.getStorageSync('baseUrl');
 			this.token = uni.getStorageSync('token');
-			this.getAuth()
+			this.menu = uni.getStorageSync('menu');
+			// console.log(this.menu);
+			this.getAuth2()
 			// this.backGroundRepeat()
 		},
 		methods: {
@@ -111,6 +114,27 @@
 					i++
 				}
 			},
+			getAuth2() {
+				this.elements = []
+				for (let i in this.menu) {
+					this.getIcon(this.menu[i].title)
+					this.elements.unshift({
+						title: this.menu[i].name,
+						name: this.menu[i].title,
+						color: this.colorList[i],
+						cuIcon: this.icon,
+						id: this.menu[i].id,
+						url: `${this.menu[i].code}`
+					})
+				}
+				this.elements.push({
+					title: '閫�鍑虹櫥褰�',
+					name: 'logOut',
+					color: 'grey',
+					cuIcon: 'exit',
+					url: '/login/logOut'
+				})
+			},
 			getAuth() {
 				let that = this
 				uni.request({

--
Gitblit v1.9.1