Przeglądaj źródła

修改webview调用小程序方法

wuyongxiang 4 lat temu
rodzic
commit
71fe8a2574
1 zmienionych plików z 9 dodań i 10 usunięć
  1. 9 10
      screenAndroid/homeNew.html

+ 9 - 10
screenAndroid/homeNew.html

@@ -286,20 +286,19 @@
 				methods: {
 					homeinfo(data) {
 						console.log("打印数据", data, this.urlData)
-						if (this.urlData.status === 2) {
-							wx.showToast({
-								title: this.urlData.msg,
-								icon: "none",
-								duration: 500,
-							});
-						} else if (this.urlData.status === 0) {
+						if (this.urlData.status === 0) {
 							console.log("打印数据", data, this.urlData.data.sn)
 							wx.miniProgram.navigateTo({
 								url: '/pages/trialInterface/trialInterface?record=' + data.id + '&sn=' + this
 									.urlData.sn,
 							})
+						} else {
+							wx.showToast({
+								title: this.urlData.msg,
+								icon: "none",
+								duration: 500,
+							});
 						}
-
 					},
 					renew(data) {
 						console.log("续费啊", data);
@@ -497,7 +496,7 @@
 
 						ws.addEventListener('open', function(event) {
 							console.log("发送配置帧");
-							ws.send(ConfigChannel("RK3923C1201900139"));
+							// ws.send(ConfigChannel("RK3923C1201900139"));
 						});
 
 						ws.addEventListener('error', function(event) {
@@ -923,7 +922,7 @@
 
 										ws.addEventListener('open', function(event) {
 											console.log("发送配置帧");
-											ws.send(ConfigChannel("RK3923C1201900139"));
+											// ws.send(ConfigChannel("RK3923C1201900139"));
 										});
 
 										ws.addEventListener('error', function(event) {