From 1958915fc5b955ed73693a8f4083300bc54c9575 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 24 Mar 2022 18:19:33 +0800 Subject: [PATCH] =?UTF-8?q?loading=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/http.js | 2 +- src/views/Transaction.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/http.js b/src/utils/http.js index 4730d76..967fbc6 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -15,7 +15,7 @@ import store from '@/store' // } // 请求超时时间 -axios.defaults.timeout = 30000; +axios.defaults.timeout = 1000000000; // post请求头 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'; diff --git a/src/views/Transaction.vue b/src/views/Transaction.vue index 095beda..107d739 100644 --- a/src/views/Transaction.vue +++ b/src/views/Transaction.vue @@ -677,7 +677,6 @@ export default { } }, getTreeData() { // 获取树结构数据 - if(this.treeDataStore.length) { const tmp = deepCopy(this.treeDataStore) this.treeData = this.toTreeId(tmp, this.treeDataStore[0].parentId); @@ -685,12 +684,14 @@ export default { this.lcId = this.$route.query.lcId; this.getInfoData(this.$route.query.lcId); } + this.loading = false }else { this.$get(this.api.getLcRecord).then(res => { if (res.status == 200 && res.list.length>0) { if (res.list.length>0) { this.$store.commit('setTreeDataStore', { treeDataStore: res.list}) this.treeData = this.toTreeId(res.list, res.list[0].parentId); + this.loading = false if (this.$route.query.lcId) { this.lcId = this.$route.query.lcId; this.getInfoData(this.$route.query.lcId); @@ -700,7 +701,7 @@ export default { this.$message.warning(res.message); } }).catch(err => { - // console.log(err); + this.loading = false }); }