Kaynağa Gözat

修复重置密码的bug

wzh 2 yıl önce
ebeveyn
işleme
e7db585d47

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "WeGoodCharger",
     "appid" : "__UNI__60E8019",
     "description" : "",
-    "versionName" : "1.0.5",
-    "versionCode" : 105,
+    "versionName" : "1.0.6",
+    "versionCode" : 106,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,

+ 1 - 1
pages/weitiandi/bluetooth/status.vue

@@ -288,7 +288,7 @@ export default {
         }else {
           setPwd(this.pwd);
           this.oldPwd = this.pwd;
-          uni.setStorageSync(this.pwd);
+          uni.removeStorageSync("pwd");
           this.$modal.showToast("密码修改成功");
           this.showPwd = false;
           this.showInitPwd = false;

+ 21 - 2
utils/weitiandi/device/device.js

@@ -102,9 +102,28 @@ const deviceTool = {
     getUUID(){
         let arr =  [85,253,0,253];
         sendData(arr)
+    },
+    sendWifiPwd(wifi,pwd){
+        let arr = buildWifiPwd(wifi,pwd)
+        addLast(arr)
+        sendData(arr)
     }
+}
+function buildWifiPwd(wifi,pwd){
+    let arr = [85,160,wifi.length+pwd.length+1];
+    for (let i = 0; i < wifi.length; i++) {
+        let c =  wifi.charCodeAt(0);
+        arr.push(c);
+    }
+    arr.push(59)
 
+    for (let i = 0; i < pwd.length; i++) {
+        let c =  pwd.charCodeAt(0);
+        arr.push(c);
+    }
+    return arr;
 }
+
 function addLast(arr){
     let total = 0;
     for(let i =1;i<arr.length;i++){
@@ -469,7 +488,7 @@ export function getUUID(){
 }
 
 function test(){
-   console.log( parseDataObj("AA AC 06 01 01 01 01 01 01 B8"))
+    deviceTool.sendWifiPwd("11","11")
 }
-//test()
+// test()