Browse Source

接口调用顺序和接口超时时间调整

wang_xy 1 year ago
parent
commit
8ae6820a56

+ 1 - 1
src/utils/request.js

@@ -12,7 +12,7 @@ const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分
   baseURL: process.env.VUE_APP_BASE_API,
   // 超时
-  timeout: 10000
+  timeout: 30000
 })
 // request拦截器
 service.interceptors.request.use(config => {

+ 2 - 2
src/views/gas/anjian/index.vue

@@ -375,11 +375,13 @@ export default {
     getBuilding(areaId) {
       getBuilding(areaId).then(response => {
         this.buildingList = response.data;
+        this.getUnit(this.form.buildingId);
       });
     },
     getUnit(buildingId) {
       getUnit(buildingId).then(response => {
         this.unitList = response.data;
+        this.getHouse(this.form.unitId);
       });
     },
     getHouse(unitId) {
@@ -478,8 +480,6 @@ export default {
         this.open = true;
         this.title = "修改";
         this.getBuilding(this.form.areaId);
-        this.getUnit(this.form.buildingId);
-        this.getHouse(this.form.unitId);
       });
     },
     /** 提交按钮 */

+ 2 - 2
src/views/gas/kaishuan/index.vue

@@ -344,11 +344,13 @@ export default {
     getBuilding(areaId) {
       getBuilding(areaId).then(response => {
         this.buildingList = response.data;
+        this.getUnit(this.form.buildingId);
       });
     },
     getUnit(buildingId) {
       getUnit(buildingId).then(response => {
         this.unitList = response.data;
+        this.getHouse(this.form.unitId);
       });
     },
     getHouse(unitId) {
@@ -446,8 +448,6 @@ export default {
         this.open = true;
         this.title = "修改";
         this.getBuilding(this.form.areaId);
-        this.getUnit(this.form.buildingId);
-        this.getHouse(this.form.unitId);
       });
     },
     /** 提交按钮 */

+ 3 - 2
src/views/gas/weixiu/index.vue

@@ -375,11 +375,13 @@ export default {
     getBuilding(areaId) {
       getBuilding(areaId).then(response => {
         this.buildingList = response.data;
+        this.getUnit(this.form.buildingId);
       });
     },
     getUnit(buildingId) {
       getUnit(buildingId).then(response => {
         this.unitList = response.data;
+        this.getHouse(this.form.unitId);
       });
     },
     getHouse(unitId) {
@@ -478,8 +480,7 @@ export default {
         this.open = true;
         this.title = "修改";
         this.getBuilding(this.form.areaId);
-        this.getUnit(this.form.buildingId);
-        this.getHouse(this.form.unitId);
+
       });
     },
     /** 提交按钮 */