loading修复

master
yujialong 3 years ago
parent ec8bea2a73
commit 1958915fc5
  1. 2
      src/utils/http.js
  2. 5
      src/views/Transaction.vue

@ -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';

@ -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
});
}

Loading…
Cancel
Save