From 722736f9a56cf64b615e37ed1722dd430ad90d2d Mon Sep 17 00:00:00 2001
From: whycq <123456>
Date: 星期三, 26 十月 2022 08:48:31 +0800
Subject: [PATCH] #

---
 pages/basics/matSelect.vue |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/pages/basics/matSelect.vue b/pages/basics/matSelect.vue
index beef27d..d048f4a 100644
--- a/pages/basics/matSelect.vue
+++ b/pages/basics/matSelect.vue
@@ -48,7 +48,7 @@
 				baseHttp:'http://',
 				baseIP:'',
 				basePORT:'',
-				baseUrl:'/jkwms'
+				baseUrl:'/lywms'
 			}
 		},
 		onLoad() {
@@ -90,28 +90,39 @@
 						'token':uni.getStorageSync('token'),
 				    },
 					success(result) {
+						console.log(result)
 						uni.hideLoading();
 						var res = result.data
 						if (res.code === 200 ) {
 							that.data = res.data
+						} else if (res.code == 403) {
+							uni.showToast({title: res.msg, icon: "none", position: 'top'})
+							setTimeout(() => {
+								uni.reLaunch({
+									url: '../login/login'
+								});
+							}, 1000);
+						} else {
+							uni.showToast({title: res.msg, icon: "none",position: 'top'})
 						}
 					}
 				});
 			},
 			showTag(parentId) {
 				let that = this
-				uni.vibrateShort();
+				uni.showLoading();
 				uni.request({
-					// url: "http://localhost:8081/jkwms/tag/list/pda/auth",
 				    url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/tag/list/pda/auth',
+					header: {
+						'token':uni.getStorageSync('token'),
+					},
 				    data: {
 						limit: 100000,
 						parentId: parentId
 				    },
-					method:"GET",
-				    header: {
+					header: {
 						'token':uni.getStorageSync('token'),
-				    },
+					},
 					success(result) {
 						that.tag = null
 						that.data = null
@@ -132,6 +143,7 @@
 						} else {
 							uni.showToast({title: res.msg, icon: "none",position: 'top'})
 						}
+						uni.hideLoading();
 					}
 				});
 			},
@@ -156,7 +168,9 @@
 						var res = result.data
 						if (res.code === 200) {
 							if (res.data != null && res.data.length > 0) {
+								uni.showLoading();
 								that.data = res.data
+								uni.hideLoading();
 							} else {
 								// that.tagId = parentId
 							}
@@ -170,6 +184,7 @@
 						} else {
 							uni.showToast({title: res.msg, icon: "none",position: 'top'})
 						}
+						
 					}
 				});
 			},

--
Gitblit v1.9.1