From af59223f6504971f1bbd083ed5bbb6ec93211164 Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期三, 28 九月 2022 09:48:42 +0800 Subject: [PATCH] # --- pages/basics/matSelect.vue | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pages/basics/matSelect.vue b/pages/basics/matSelect.vue index d98b6a2..5f00086 100644 --- a/pages/basics/matSelect.vue +++ b/pages/basics/matSelect.vue @@ -46,10 +46,6 @@ condition:null, tag: [], data: [], - baseHttp:'http://', - baseIP:'', - basePORT:'', - baseUrl:'/lywms' } }, onLoad() { @@ -58,7 +54,7 @@ const eventChannel = this.getOpenerEventChannel(); // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - eventChannel.on('acceptDataFromOpenerPage', function(data) { + eventChannel.on('commonUrl', function(data) { that.commonUrl = data.commonUrl that.showTag(1) }) @@ -109,7 +105,7 @@ }, showTag(parentId) { let that = this - uni.showLoading(); + uni.request({ url: that.commonUrl + '/tag/list/pda/auth', header: { @@ -123,7 +119,7 @@ 'token':uni.getStorageSync('token'), }, success(result) { - console.log(result) + uni.showLoading(); that.tag = null that.data = null var res = result.data @@ -149,6 +145,7 @@ }, showMat(tagId) { uni.vibrateShort(); + uni.showLoading(); let that = this if (tagId == null || tagId == '' || tagId == undefined) { return; @@ -163,14 +160,13 @@ 'token':uni.getStorageSync('token'), }, success(result) { - console.log(result) + that.tag = null 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 } @@ -184,7 +180,7 @@ } else { uni.showToast({title: res.msg, icon: "none",position: 'top'}) } - + uni.hideLoading(); } }); }, -- Gitblit v1.9.1