From e6a7da8a38333e201c95a8f583503ac67c06c56e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 26 六月 2024 10:31:58 +0800
Subject: [PATCH] #

---
 pages/home/menuHome.vue |   51 ++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/pages/home/menuHome.vue b/pages/home/menuHome.vue
index 4a9067f..3ef7711 100644
--- a/pages/home/menuHome.vue
+++ b/pages/home/menuHome.vue
@@ -2,9 +2,9 @@
 	<view>
 		<scroll-view scroll-y class="page">
 			<view class="nav-list">
-				<navigator hover-class='none' :url="'/pages' + item.url" class="nav-li" navigateTo
+				<navigator hover-class='none' :url="'/pages' + item.url + '?id=' + item.id" class="nav-li" navigateTo
 					:class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
-					v-for="(item,index) in elements2" :key="index">
+					v-for="(item,index) in elements" :key="index">
 					<view class="nav-title">{{item.title}}</view>
 					<view class="nav-name">{{item.name}}</view>
 					<text :class="'cuIcon-' + item.cuIcon"></text>
@@ -23,21 +23,42 @@
 				token: '',
 				icon: '',
 				elements: [],
-				project: 'tzsk',
+				project: 'phyz',
 				elements2: [
 					{
-						title: '鍏ュ嚭搴撶鐞�',
-						name: 'inOutManage',
+						title: '绔欑偣鏌ヨ缁存姢',
+						name: 'stationManage',
 						color: 'cyan',
 						// cuIcon: 'pullup',
-						url: `/home/inOutManage`
+						url: `/phyz/stationManage/stationManage`
 					},
+					// {
+					// 	title: '鍏ュ嚭搴撶鐞�',
+					// 	name: 'inOutManage',
+					// 	color: 'purple',
+					// 	// cuIcon: 'pullup',
+					// 	url: `/home/inOutManage`
+					// },
 					{
 						title: '鍗曟嵁绠$悊',
 						name: 'ordeManage',
 						color: 'mauve',
 						// cuIcon: 'pullup',
 						url: `/home/orderManage`
+					},
+					{
+						title: '搴撲綅绠$悊',
+						name: 'locManage',
+						color: 'blue',
+						// cuIcon: 'pullup',
+						url: `/home/locMastManage`
+					},
+					{
+						title: '浠诲姟绠$悊',
+						name: 'ordeManage',
+						color: 'olive',
+						// cuIcon: 'pullup',
+						url: `/home/wrkMastManage`
 					},
 					// {
 					// 	title: '娴嬭瘯',
@@ -75,8 +96,7 @@
 		onShow() {
 			this.baseUrl = uni.getStorageSync('baseUrl');
 			this.token = uni.getStorageSync('token');
-			this.project = uni.getStorageSync('project')
-			// this.getAuth()
+			this.getAuth()
 			// this.backGroundRepeat()
 		},
 		methods: {
@@ -95,18 +115,17 @@
 				let that = this
 				uni.request({
 					url: that.baseUrl + '/menu/pda/auth',
-					data: {},
+					data: {level:1,id: '0'},
 					header: { 'token': uni.getStorageSync('token') },
 					method: 'POST',
 					success(res) {
-						console.log(res);
 						res = res.data
 						that.elements = []
 						if (res.code === 200) {
-							if (res.data == undefined || res.data == null || res.data == "") {
-								that.elements = that.elements2
-								return
-							}
+							// if (res.data == undefined || res.data == null || res.data == "") {
+							// 	that.elements = that.elements2
+							// 	return
+							// }
 							for (var i = 0; i < res.data.length; i++) {
 								if (res.data.length < 0) {
 									break;
@@ -117,9 +136,11 @@
 									name: res.data[i].title,
 									color: that.colorList[i],
 									cuIcon: that.icon,
-									url: `/${that.project}${res.data[i].action}`
+									id: res.data[i].id,
+									url: `${res.data[i].code}`
 								})
 							}
+							console.log(that.elements);
 							that.elements.push({
 								title: '閫�鍑虹櫥褰�',
 								name: 'logOut',

--
Gitblit v1.9.1