heyang 4 роки тому
батько
коміт
65967d6734
3 змінених файлів з 23 додано та 8 видалено
  1. 15 0
      .vscode/launch.json
  2. 4 4
      screenAndroid/WXdraw.js
  3. 4 4
      screenAndroid/WXtrialInterface.html

+ 15 - 0
.vscode/launch.json

@@ -0,0 +1,15 @@
+{
+    // 使用 IntelliSense 了解相关属性。 
+    // 悬停以查看现有属性的描述。
+    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "pwa-chrome",
+            "request": "launch",
+            "name": "Launch Chrome against localhost",
+            "url": "http://localhost:8080",
+            "webRoot": "${workspaceFolder}"
+        }
+    ]
+}

+ 4 - 4
screenAndroid/WXdraw.js

@@ -68,8 +68,8 @@ function doConnect() {
 	wsss.onclose = function (evt) {
 		console.log(evt);
 		ws.close();
-		throttle(doConnect,500);
-		if(errorTime > 5000){
+		throttle(doConnect,100);
+		if(errorTime > 1000){
 			wx.miniProgram.switchTab({
 				url: '/pages/home/home'
 			})
@@ -78,8 +78,8 @@ function doConnect() {
 	wsss.onerror = function (evt) {
 		console.log(evt);
 		ws.close();
-		throttle(doConnect,500);
-		if(errorTime > 5000){
+		throttle(doConnect,100);
+		if(errorTime > 1000){
 			wx.miniProgram.switchTab({
 				url: '/pages/home/home'
 			})

+ 4 - 4
screenAndroid/WXtrialInterface.html

@@ -211,8 +211,8 @@
 
 			ws.onclose = function (e) {
 				ws.close();
-				throttle(doConnect,500);
-				if(errorTime > 5000){
+				throttle(doConnect,100);
+				if(errorTime > 1000){
 					wx.miniProgram.switchTab({
 						url: '/pages/home/home'
 					})
@@ -225,8 +225,8 @@
 
 			ws.addEventListener('error', function (event) {
 				ws.close();
-				throttle(doConnect,500);
-				if(errorTime > 5000){
+				throttle(doConnect,100);
+				if(errorTime > 1000){
 					wx.miniProgram.switchTab({
 						url: '/pages/home/home'
 					})