Explorar el Código

异常退出延迟3s

huangxiaojing hace 2 años
padre
commit
d92ad1d5cb

+ 7 - 3
static/screenAndroid/WXtrialInterface.html

@@ -507,7 +507,9 @@
           } else {
           } else {
             clearInterval(intervaler);
             clearInterval(intervaler);
             $.toast('画面异常,请重新进入', 'text');
             $.toast('画面异常,请重新进入', 'text');
-            quit();
+            setTimeout(() => {
+              quit();
+            }, 3000)
           }
           }
         }, 3000);
         }, 3000);
 
 
@@ -524,8 +526,10 @@
           throttle(doConnectBusiness, 100);
           throttle(doConnectBusiness, 100);
           if (errorTime > 1000) {
           if (errorTime > 1000) {
             $.toast('画面异常,请重新进入', 'text');
             $.toast('画面异常,请重新进入', 'text');
-            wsss.close();
-            quit();
+            setTimeout(() => {
+              wsss.close();
+              quit();
+            }, 3000)
           }
           }
         });
         });
         ws.addEventListener('message', function (event) {
         ws.addEventListener('message', function (event) {

+ 3 - 1
static/screenIos/WXtrialInterface.html

@@ -466,7 +466,9 @@
               }, 3000)
               }, 3000)
             }  else {
             }  else {
               $.toast('画面异常,请重新进入', 'text');
               $.toast('画面异常,请重新进入', 'text');
-              quit();
+              setTimeout(() => {
+                quit();
+              }, 3000)
             }
             }
           },
           },
         });
         });