瀏覽代碼

add timeout send request

haojianlong 5 年之前
父節點
當前提交
b08003608f
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/views/point/dynamicdata/index.vue

+ 5 - 3
src/views/point/dynamicdata/index.vue

@@ -193,16 +193,18 @@ export default {
     getExecuteFeedback() {
     getExecuteFeedback() {
       dynamicExecuteFeedback('', res => {
       dynamicExecuteFeedback('', res => {
         this.allApplyClose()
         this.allApplyClose()
-        this.isPending = false;
         let response = res.Content[0]
         let response = res.Content[0]
         if (response.Completed == 'Processing') {
         if (response.Completed == 'Processing') {
           this.isPending = true;
           this.isPending = true;
           this.tipsType = 0;
           this.tipsType = 0;
           setTimeout(() => {
           setTimeout(() => {
             this.getExecuteFeedback()
             this.getExecuteFeedback()
-          }, 2000)
+          }, 2500)
         } else {
         } else {
-          this.getPrompt()
+          setTimeout(() => {
+            this.isPending = false;
+            this.getPrompt()
+          }, 2500)
         }
         }
       })
       })
     }
     }