Forráskód Böngészése

feat(): 云机挂载时轮询接口

huangxiaojing 2 éve%!(EXTRA string=óta)
szülő
commit
39d509f83a

+ 12 - 4
static/screenAndroid/WXtrialInterface.html

@@ -435,10 +435,18 @@
                 }
               } else {
                 $.toast('网络异常,请稍后重试', 'text');
+                setTimeout(() => {
+                  clearInterval(intervaler);
+                  quit();
+                }, 3000);
               }
             } else if (res.status === 5200) {
               if (timeInterval > 7) {
                 $.toast('网络异常,请稍后重试', 'text');
+                setTimeout(() => {
+                  clearInterval(intervaler);
+                  quit();
+                }, 3000);
                 timerInterval = clearTimeout()
                 return
               }
@@ -448,10 +456,10 @@
               }, 3000)
             } else {
               $.toast('画面异常,请重新进入', 'text');
-              clearInterval(intervaler);
-              quit();
-              ws.close();
-              wsss.close();
+              setTimeout(() => {
+                clearInterval(intervaler);
+                quit();
+              }, 3000);
             }
           },
         });

+ 12 - 3
static/screenIos/WXtrialInterface.html

@@ -446,11 +446,18 @@
                 }
               } else {
                 $.toast('网络异常,请稍后重试', 'text');
+                setTimeout(() => {
+                  clearInterval(intervaler);
+                  quit();
+                }, 3000);
               }
             } else if (res.status === 5200) {
               if (timeInterval > 7) {
                 $.toast('网络异常,请稍后重试', 'text');
                 timerInterval = clearTimeout()
+                setTimeout(() => {
+                  quit();
+                }, 3000)
                 return
               }
               timerInterval = setTimeout(() => {
@@ -1015,9 +1022,11 @@
           }
           if (event.data === 'close') {
             $.toast('画面异常,请重新进入', 'text');
-            decodeWoker.postMessage('close');
-            decodeWoker.terminate();
-            quit();
+            setTimeout(() => {
+              decodeWoker.postMessage('close');
+              decodeWoker.terminate();
+              quit();
+            }, 3000);
           }
         };
       }