From 7135efa509d1ae612322fead8be5947a1d782581 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期五, 13 十月 2023 18:14:10 +0800
Subject: [PATCH] #

---
 pages/project/ps/home/home.vue |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/pages/project/ps/home/home.vue b/pages/project/ps/home/home.vue
index daab551..bd86edf 100644
--- a/pages/project/ps/home/home.vue
+++ b/pages/project/ps/home/home.vue
@@ -2,7 +2,7 @@
 	<view>
 		<scroll-view scroll-y class="page">
 			<view class="nav-list">
-				<navigator hover-class='none' :url="'/pages/project' + item.url" class="nav-li" navigateTo
+				<navigator hover-class='none' :url="'/pages/project/ps' + item.url" class="nav-li" navigateTo
 					:class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
 					v-for="(item,index) in elements" :key="index">
 					<view class="nav-title">{{item.title}}</view>
@@ -29,7 +29,7 @@
 						name: 'pakin',
 						color: 'cyan',
 						cuIcon: 'pullup',
-						url: '/ps/pakin/pakin'
+						url: '/pakin/pakin'
 					},
 					{
 						title: '鎵樼洏瑙g粦',
@@ -198,7 +198,8 @@
 			};
 		},
 		onShow() {
-			this.baseUrl = uni.getStorageSync('baseUrl');
+			let network = uni.getStorageSync('Network')
+			this.baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}` 
 			this.token = uni.getStorageSync('token');
 			this.getAuth()
 			this.backGroundRepeat()
@@ -216,39 +217,39 @@
 				}
 			},
 			getAuth() {
-				let that = this
+				let _this = this
 				uni.request({
-					url: that.baseUrl + '/menu/pda/auth',
+					url: `${_this.baseUrl}/menu/pda/auth`,
 					data: {},
 					header: { 'token': uni.getStorageSync('token') },
 					method: 'POST',
 					success(res) {
 						console.log(res);
 						if (res.statusCode === 404) {
-							that.elements = that.elements2
+							_this.elements = _this.elements2
 							return 
 						}
  						res = res.data
-						that.elements = []
+						_this.elements = []
 						if (res.code === 200) {
 							if (res.data == undefined || res.data == null || res.data == "") {
-								that.elements = that.elements2
+								_this.elements = _this.elements2
 								return
 							}
 							for (var i = 0; i < res.data.length; i++) {
 								if (res.data.length < 0) {
 									break;
 								}
-								that.getIcon(res.data[i].title)
-								that.elements.unshift({
+								_this.getIcon(res.data[i].title)
+								_this.elements.unshift({
 									title: res.data[i].name,
 									name: res.data[i].title,
-									color: that.colorList[i],
-									cuIcon: that.icon,
+									color: _this.colorList[i],
+									cuIcon: _this.icon,
 									url: res.data[i].action
 								})
 							}
-							that.elements.push({
+							_this.elements.push({
 								title: '閫�鍑虹櫥褰�',
 								name: 'logOut',
 								color: 'grey',
@@ -267,7 +268,7 @@
 								});
 							}, 1000);
 						} else if(res.status === 404) {
-							that.elements = that.elements2
+							_this.elements = _this.elements2
 							// uni.showToast({
 							// 	title: '榛樿涓婚〉',
 							// 	icon: "none",
@@ -283,7 +284,7 @@
 					},
 					fail(err) {
 						console.log(err);
-						that.elements = that.elements2
+						_this.elements = _this.elements2
 					}
 				})
 			},

--
Gitblit v1.9.1