From b8544ee0bc7d93762d6ffe2d1765129ecaef46f9 Mon Sep 17 00:00:00 2001 From: whycq <whycq> Date: 星期一, 27 六月 2022 08:44:59 +0800 Subject: [PATCH] # --- pages/basics/matSelect.vue | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/pages/basics/matSelect.vue b/pages/basics/matSelect.vue index beef27d..906007d 100644 --- a/pages/basics/matSelect.vue +++ b/pages/basics/matSelect.vue @@ -48,7 +48,7 @@ baseHttp:'http://', baseIP:'', basePORT:'', - baseUrl:'/jkwms' + baseUrl:'/lywms' } }, onLoad() { @@ -94,24 +94,34 @@ 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 +142,7 @@ } else { uni.showToast({title: res.msg, icon: "none",position: 'top'}) } + uni.hideLoading(); } }); }, @@ -156,7 +167,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 +183,7 @@ } else { uni.showToast({title: res.msg, icon: "none",position: 'top'}) } + } }); }, -- Gitblit v1.9.1