Преглед изворни кода

feature:修改wifi的输入信息的报错问题

zeng.chen пре 6 месеци
родитељ
комит
8c1e3edde2

+ 2 - 2
devices/bluetooth/bt_parse.js

@@ -524,7 +524,7 @@ class BtParse {
 
                 break;
             case CmdBase.heiJiaoOtaData:
-                //0x75 发送url
+                //0x75 
                 {
                     let kind = cmd[9]
                     EventManager.fire(CmdEvent.otaUrl({ value: value, kind: kind }));
@@ -532,7 +532,7 @@ class BtParse {
 
                 break;
             case CmdBase.wallPaperMD5:
-                //0x75 发送url
+                //0x80 
                 {
                     let kind = cmd[9]
                     EventManager.fire(CmdEvent.wallPaperMD5({ value: value, kind: kind }));

+ 2 - 2
pages/deviceDetail/detail.js

@@ -121,8 +121,8 @@ Page({
     const btHelper = BtHelper.getInstance();
     let isShowOta = device.clientType === 'MW-S2'
     if (isShowOta) {
-      // btHelper.getVersion()
-      this.checkOtaVersion(device);
+      btHelper.getVersion()
+      // this.checkOtaVersion(device);
     }
     // btHelper.getPauseSleep()
 

+ 2 - 6
pages/ota/ota.js

@@ -348,9 +348,7 @@ Page({
       showCancel: false,
       success: function (res) {
         if (res.confirm) {
-          wx.navigateBack({
-            delta: 3
-          })
+          route_util.goBackHomePage();
         }
       }
     })
@@ -363,9 +361,7 @@ Page({
       showCancel: false,
       success: function (res) {
         if (res.confirm) {
-          wx.navigateBack({
-            delta: 3
-          })
+          // 
         }
       }
     })

+ 1 - 4
pages/piano/cropper/cropper.js

@@ -377,10 +377,7 @@ Page({
 
     const chunk = chunks[index];
     _this.data._imgNext += (chunk.byteLength ?? chunk.length);
-    // let uint8Array = new Uint8Array(chunk);
-    // let unit16 = uint8Array.map(item => {
-    //   return item.toString(16)
-    // });
+
     // console.log("发送壁纸数据1:", index, ":", _this.data._imgNext, ":", chunk.length, ":", chunk.byteLength, ":", total, chunks.length)
 
     let res = await btHelper.wallPaperSyncData(chunk);

+ 3 - 4
pages/piano/wallpaper/wallpaper.wxml

@@ -1,10 +1,10 @@
 <!-- pages/piano/wallpaper/wallpaper.wxml -->
 <view class="container">
     <nav-bar bind:goBack="_goBack" nav-bgc-class="ex-nav-bgc-class" nav-title-class="ex-nav-title-class" ex-back-pre="ex-back-pre" navbar-data='{{navbarData}}'></nav-bar>
-    <view class="img_section">
-        <image  src="{{topImg.pic}}" class="select_img"></image>
+    <view wx:if="{{topImg.pic}}" class="img_section">
+        <image src="{{topImg.pic}}" class="select_img"></image>
         <!-- <canvas wx:if="{{showCropImg}}" class="canvas_img" canvas-id="imageCanvas"></canvas> -->
-        <image  src="../../../images/common/icon_sel.png" class="select_icon"></image>
+        <image src="../../../images/common/icon_sel.png" class="select_icon"></image>
     </view>
     <view class="grid-container">
         <block wx:for="{{imageList}}" wx:key="index" wx:for-item="item" wx:for-index="index">
@@ -15,5 +15,4 @@
         <image src="../../../images/common/icon_add.png" mode="aspectFill" />
         <view>上传图片</view>
     </view>
-
 </view>

+ 6 - 6
pages/setWifi/setWifi.js

@@ -99,12 +99,12 @@ Page({
       console.log("设置wifi0:", event)
       let kind = event.heiJiaoKind;
       console.log("设置wifi:", name, otaCmd, kind)
-      let toast = "设置wifi:" + name + " value," + otaCmd + "kind ," + kind
-      wx.showToast({
-        title: toast,
-        icon: 'none'
-      })
-      if (name === EnumCmdEvent.otaWifi && value === 1) {
+      // let toast = "设置wifi:" + name + " value," + otaCmd + "kind ," + kind
+      // wx.showToast({
+      //   title: toast,
+      //   icon: 'none'
+      // })
+      if (name === EnumCmdEvent.otaWifi && otaCmd === 1) {
         store.setStore("wifiInfo", {
           wifiName: _this.data.wifiName,
           wifiPassword: _this.data.wifiPassword