瀏覽代碼

接口请求时间超过30秒,显示暂无数据的BUG

seimin 3 年之前
父節點
當前提交
d2079a0c59
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 5 5
      src/views/AppIndex.vue
  2. 1 1
      vue.config.js

+ 5 - 5
src/views/AppIndex.vue

@@ -1327,27 +1327,27 @@ export default {
1327
       if (this.currentNavIndex == 1) {
1327
       if (this.currentNavIndex == 1) {
1328
         clearTimeout(this.timer);
1328
         clearTimeout(this.timer);
1329
         this.timer = setTimeout(() => {
1329
         this.timer = setTimeout(() => {
1330
-          this.getListSpecimenWorkOrderMsg(false);
1330
+          this.getListSpecimenWorkOrderMsg(this.swiperList.length === 0);
1331
         }, 30000);
1331
         }, 30000);
1332
       } else if (this.currentNavIndex == 2) {
1332
       } else if (this.currentNavIndex == 2) {
1333
         clearTimeout(this.timer2);
1333
         clearTimeout(this.timer2);
1334
         this.timer2 = setTimeout(() => {
1334
         this.timer2 = setTimeout(() => {
1335
-          this.getWorkerMessage(false);
1335
+          this.getWorkerMessage(this.workerMessage.length === 0);
1336
         }, 30000);
1336
         }, 30000);
1337
       } else if (this.currentNavIndex == 3) {
1337
       } else if (this.currentNavIndex == 3) {
1338
         clearTimeout(this.timer4);
1338
         clearTimeout(this.timer4);
1339
         this.timer4 = setTimeout(() => {
1339
         this.timer4 = setTimeout(() => {
1340
-          this.getOnlines(false);
1340
+          this.getOnlines(this.onlines.length === 0);
1341
         }, 30000);
1341
         }, 30000);
1342
       } else if (this.currentNavIndex == 4) {
1342
       } else if (this.currentNavIndex == 4) {
1343
         clearTimeout(this.timer5);
1343
         clearTimeout(this.timer5);
1344
         this.timer5 = setTimeout(() => {
1344
         this.timer5 = setTimeout(() => {
1345
-          this.getListParent(false);
1345
+          this.getListParent(this.parentList.length === 0);
1346
         }, 30000);
1346
         }, 30000);
1347
       } else if (this.currentNavIndex == 5) {
1347
       } else if (this.currentNavIndex == 5) {
1348
         clearTimeout(this.timer6);
1348
         clearTimeout(this.timer6);
1349
         this.timer6 = setTimeout(() => {
1349
         this.timer6 = setTimeout(() => {
1350
-          this.getListDrug(false);
1350
+          this.getListDrug(this.drugList.length === 0);
1351
         }, 30000);
1351
         }, 30000);
1352
       }
1352
       }
1353
     },
1353
     },

+ 1 - 1
vue.config.js

@@ -10,7 +10,7 @@ module.exports = {
10
     hotOnly: true, // 是否开启热更新
10
     hotOnly: true, // 是否开启热更新
11
     proxy: {
11
     proxy: {
12
       '/service': {
12
       '/service': {
13
-        target: 'http://192.168.3.96', // API服务器的地址
13
+        target: 'http://192.168.3.108', // API服务器的地址
14
         ws: true, // 代理websockets
14
         ws: true, // 代理websockets
15
         changeOrigin: true, // 虚拟的站点需要更管origin
15
         changeOrigin: true, // 虚拟的站点需要更管origin
16
         pathRewrite: {
16
         pathRewrite: {