소스 검색

107版本

wzh 2 년 전
부모
커밋
7b1cca800f
47개의 변경된 파일341개의 추가작업 그리고 34개의 파일을 삭제
  1. 1 1
      config.js
  2. 204 0
      js_sdk/zww-md5/w_md5.js
  3. 7 1
      locale/en.json
  4. 5 3
      manifest.json
  5. 39 4
      pages/bluetooth/index/index.vue
  6. 20 6
      pages/login.vue
  7. 24 3
      pages/weitiandi/bluetooth/index.vue
  8. 11 3
      pages/weitiandi/bluetooth/setting.vue
  9. 4 3
      pages/weitiandi/bluetooth/status.vue
  10. 21 7
      pages/weitiandi/device/index.vue
  11. 5 3
      pages/weitiandi/device/setting.vue
  12. BIN
      static/images/new/code.jpg
  13. BIN
      static/images/new/start/chargedetail/chonging.png
  14. BIN
      static/images/new/start/chargedetail/chongoff.png
  15. BIN
      static/images/new/start/chargedetail/getstatus.png
  16. BIN
      static/images/new/start/chargedetail/start.png
  17. BIN
      static/images/new/start/chargedetail/stop.png
  18. BIN
      static/images/new/start/control/charge.png
  19. BIN
      static/images/new/start/control/control.png
  20. BIN
      static/images/new/start/control/getstatus.png
  21. BIN
      static/images/new/start/control/record.png
  22. BIN
      static/images/new/start/control/restart.png
  23. BIN
      static/images/new/start/control/stop.png
  24. BIN
      static/images/new/start/index/banner-index.png
  25. BIN
      static/images/new/start/index/bluetooth.png
  26. BIN
      static/images/new/start/index/chargeicon.png
  27. BIN
      static/images/new/start/index/clock.png
  28. BIN
      static/images/new/start/index/del.png
  29. BIN
      static/images/new/start/index/device-2.png
  30. BIN
      static/images/new/start/index/device.png
  31. BIN
      static/images/new/start/index/menu.png
  32. BIN
      static/images/new/start/index/mine.png
  33. BIN
      static/images/new/start/index/mingbg.png
  34. BIN
      static/images/new/start/index/planicon.png
  35. BIN
      static/images/new/start/index/record.png
  36. BIN
      static/images/new/start/index/right.png
  37. BIN
      static/images/new/start/index/scan.png
  38. BIN
      static/images/new/start/index/settingicon.png
  39. BIN
      static/images/new/start/index/stop.png
  40. BIN
      static/images/new/start/index/user.png
  41. BIN
      static/images/new/start/login/backImg2.png
  42. BIN
      static/images/new/start/login/blueTeeth.png
  43. BIN
      static/images/new/start/precharge/precharge.png
  44. BIN
      static/images/new/start/reset.png
  45. BIN
      static/images/new/start/seting/mainboard.png
  46. BIN
      static/images/new/start/seting/reset.png
  47. BIN
      static/images/new/start/seting/restart.png

+ 1 - 1
config.js

@@ -3,7 +3,7 @@ module.exports = {
   //baseUrl: 'https://vue.ruoyi.vip/prod-api',
   baseUrl: 'https://ev.weguyun.com',
   socketUrl: 'ws://ev.weguyun.com/websocket',
-  imgUrl:'https://saomawzz.oss-cn-hangzhou.aliyuncs.com/chargerforeign',
+  imgUrl:'/static/images/new/start',
   // 应用信息
   appInfo: {
     // 应用名称

+ 204 - 0
js_sdk/zww-md5/w_md5.js

@@ -0,0 +1,204 @@
+let w_md5 = {}
+function hex_md5(string,bit) {
+    function md5_RotateLeft(lValue, iShiftBits) {
+        return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
+    }
+    function md5_AddUnsigned(lX, lY) {
+        var lX4, lY4, lX8, lY8, lResult;
+        lX8 = (lX & 0x80000000);
+        lY8 = (lY & 0x80000000);
+        lX4 = (lX & 0x40000000);
+        lY4 = (lY & 0x40000000);
+        lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
+        if (lX4 & lY4) {
+            return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
+        }
+        if (lX4 | lY4) {
+            if (lResult & 0x40000000) {
+                return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
+            } else {
+                return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
+            }
+        } else {
+            return (lResult ^ lX8 ^ lY8);
+        }
+    }
+    function md5_F(x, y, z) {
+        return (x & y) | ((~x) & z);
+    }
+    function md5_G(x, y, z) {
+        return (x & z) | (y & (~z));
+    }
+    function md5_H(x, y, z) {
+        return (x ^ y ^ z);
+    }
+    function md5_I(x, y, z) {
+        return (y ^ (x | (~z)));
+    }
+    function md5_FF(a, b, c, d, x, s, ac) {
+        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_F(b, c, d), x), ac));
+        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
+    };
+    function md5_GG(a, b, c, d, x, s, ac) {
+        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_G(b, c, d), x), ac));
+        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
+    };
+    function md5_HH(a, b, c, d, x, s, ac) {
+        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_H(b, c, d), x), ac));
+        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
+    };
+    function md5_II(a, b, c, d, x, s, ac) {
+        a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_I(b, c, d), x), ac));
+        return md5_AddUnsigned(md5_RotateLeft(a, s), b);
+    };
+    function md5_ConvertToWordArray(string) {
+        var lWordCount;
+        var lMessageLength = string.length;
+        var lNumberOfWords_temp1 = lMessageLength + 8;
+        var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
+        var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
+        var lWordArray = Array(lNumberOfWords - 1);
+        var lBytePosition = 0;
+        var lByteCount = 0;
+        while (lByteCount < lMessageLength) {
+            lWordCount = (lByteCount - (lByteCount % 4)) / 4;
+            lBytePosition = (lByteCount % 4) * 8;
+            lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition));
+            lByteCount++;
+        }
+        lWordCount = (lByteCount - (lByteCount % 4)) / 4;
+        lBytePosition = (lByteCount % 4) * 8;
+        lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
+        lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
+        lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
+        return lWordArray;
+    };
+    function md5_WordToHex(lValue) {
+        var WordToHexValue = "", WordToHexValue_temp = "", lByte, lCount;
+        for (lCount = 0; lCount <= 3; lCount++) {
+            lByte = (lValue >>> (lCount * 8)) & 255;
+            WordToHexValue_temp = "0" + lByte.toString(16);
+            WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
+        }
+        return WordToHexValue;
+    };
+    function md5_Utf8Encode(string) {
+        string = string.replace(/\r\n/g, "\n");
+        var utftext = "";
+        for (var n = 0; n < string.length; n++) {
+            var c = string.charCodeAt(n);
+            if (c < 128) {
+                utftext += String.fromCharCode(c);
+            } else if ((c > 127) && (c < 2048)) {
+                utftext += String.fromCharCode((c >> 6) | 192);
+                utftext += String.fromCharCode((c & 63) | 128);
+            } else {
+                utftext += String.fromCharCode((c >> 12) | 224);
+                utftext += String.fromCharCode(((c >> 6) & 63) | 128);
+                utftext += String.fromCharCode((c & 63) | 128);
+            }
+        }
+        return utftext;
+    };
+    var x = Array();
+    var k, AA, BB, CC, DD, a, b, c, d;
+    var S11 = 7, S12 = 12, S13 = 17, S14 = 22;
+    var S21 = 5, S22 = 9, S23 = 14, S24 = 20;
+    var S31 = 4, S32 = 11, S33 = 16, S34 = 23;
+    var S41 = 6, S42 = 10, S43 = 15, S44 = 21;
+    string = md5_Utf8Encode(string);
+    x = md5_ConvertToWordArray(string);
+    a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
+    for (k = 0; k < x.length; k += 16) {
+        AA = a; BB = b; CC = c; DD = d;
+        a = md5_FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
+        d = md5_FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
+        c = md5_FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
+        b = md5_FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
+        a = md5_FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
+        d = md5_FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
+        c = md5_FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
+        b = md5_FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
+        a = md5_FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
+        d = md5_FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
+        c = md5_FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
+        b = md5_FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
+        a = md5_FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
+        d = md5_FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
+        c = md5_FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
+        b = md5_FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
+        a = md5_GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
+        d = md5_GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
+        c = md5_GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
+        b = md5_GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
+        a = md5_GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
+        d = md5_GG(d, a, b, c, x[k + 10], S22, 0x2441453);
+        c = md5_GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
+        b = md5_GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
+        a = md5_GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
+        d = md5_GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
+        c = md5_GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
+        b = md5_GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
+        a = md5_GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
+        d = md5_GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
+        c = md5_GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
+        b = md5_GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
+        a = md5_HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
+        d = md5_HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
+        c = md5_HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
+        b = md5_HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
+        a = md5_HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
+        d = md5_HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
+        c = md5_HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
+        b = md5_HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
+        a = md5_HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
+        d = md5_HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
+        c = md5_HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
+        b = md5_HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
+        a = md5_HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
+        d = md5_HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
+        c = md5_HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
+        b = md5_HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
+        a = md5_II(a, b, c, d, x[k + 0], S41, 0xF4292244);
+        d = md5_II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
+        c = md5_II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
+        b = md5_II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
+        a = md5_II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
+        d = md5_II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
+        c = md5_II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
+        b = md5_II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
+        a = md5_II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
+        d = md5_II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
+        c = md5_II(c, d, a, b, x[k + 6], S43, 0xA3014314);
+        b = md5_II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
+        a = md5_II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
+        d = md5_II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
+        c = md5_II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
+        b = md5_II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
+        a = md5_AddUnsigned(a, AA);
+        b = md5_AddUnsigned(b, BB);
+        c = md5_AddUnsigned(c, CC);
+        d = md5_AddUnsigned(d, DD);
+    }
+    if(bit==32){
+        return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
+    }
+    return (md5_WordToHex(b) + md5_WordToHex(c)).toLowerCase();
+}
+//16位小写
+w_md5.hex_md5_16 = function (string) { 
+	return hex_md5(string,16); 
+}
+//16位大写
+w_md5.hex_md5_16Upper = function (string) { 
+	return  hex_md5(string,16).toUpperCase(); 
+}
+//32位小写
+w_md5.hex_md5_32 = function (string) { 
+	return hex_md5(string,32); 
+}
+//32位大写
+w_md5.hex_md5_32Upper = function (string) { 
+	return hex_md5(string,32).toUpperCase(); 
+}
+export default w_md5

+ 7 - 1
locale/en.json

@@ -130,7 +130,13 @@
     "请输入序列号": "Please input the device no",
     "密码将被重置为123456": "The password will be '123456'",
     "序列号有误": "The device no is wrong",
-    "当前密码为初始密码,请修改": "Please change the pawssword"
+    "当前密码为初始密码,请修改": "Please change the pawssword",
+    "设备号": "Device no",
+    "重置设备": "Reset device",
+    "正在重置中,请稍等...": "Reseting pease wait",
+    "查看状态": "Watch status",
+    "忘记序列号": "Forget device no",
+    "请截图该页面联系售后部门": "Please take a screenshot of this page and contact the after-sales department"
   },
   "locale.auto": "System",
   "locale.en": "English",

+ 5 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "WeGoodCharger",
     "appid" : "__UNI__60E8019",
     "description" : "",
-    "versionName" : "1.0.6",
-    "versionCode" : 106,
+    "versionName" : "1.0.7",
+    "versionCode" : 107,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,
@@ -115,5 +115,7 @@
             "mode" : "hash",
             "base" : "./"
         }
-    }
+    },
+    "locale" : "en",
+    "fallbackLocale" : "en"
 }

+ 39 - 4
pages/bluetooth/index/index.vue

@@ -41,7 +41,9 @@
               v-model="inputDeviceNo"
           ></u--input>
         </view>
-
+        <view style="margin:10px;text-decoration: underline;margin-bottom: 0px" @click="forgetDeviceNo">
+          {{i18('忘记序列号')}}?
+        </view>
       </view>
     </u-modal>
 		<view v-if="deviceListDataShow.length==0" class="notice"> - {{ $t('buletooth.nodevice') }} -</view>
@@ -53,6 +55,8 @@
 
 <script>
 import {getPwd,setPwd,parsePwd,sendPortDetailCmd,getUUID,parseDataObj} from "@/utils/weitiandi/device/device.js";
+import w_md5 from "@/js_sdk/zww-md5/w_md5.js"
+
 // #ifdef APP
 import ecUI from '@/utils/ecUI.js'
 import ecBLE from '@/utils/ecBLE/ecBLE.js'
@@ -65,6 +69,9 @@ import i18 from '@/utils/i18.js'
 	let ctx
 	let deviceListData = []
 	export default {
+    components: {
+      w_md5
+    },
 		data() {
 			return {
         showPwd:false,
@@ -77,7 +84,8 @@ import i18 from '@/utils/i18.js'
         connected:false,
         uuid:"",
         showDeviceNo:false,
-        inputDeviceNo:""
+        inputDeviceNo:"",
+        commonCode:""
 			}
 		},
 		onLoad() {
@@ -90,6 +98,8 @@ import i18 from '@/utils/i18.js'
       this.timer = setInterval(() => {
         ctx.deviceListDataShow = JSON.parse(JSON.stringify(deviceListData))
       }, 800)
+      this.commonCode = this.generateUniqueNumber(this.getBeijingTime());
+      console.log(this.commonCode)
 		},
     onUnload(){
       ecBLE.stopBluetoothDevicesDiscovery();
@@ -104,6 +114,9 @@ import i18 from '@/utils/i18.js'
 			}, 100)
 		},
 		methods: {
+      forgetDeviceNo(){
+        this.$modal.showToast("请截图该页面联系售后部门");
+      },
       i18(text){
         return i18(text)
       },
@@ -118,11 +131,15 @@ import i18 from '@/utils/i18.js'
           self.$modal.showToast("请输入序列号");
           return;
         }
-        if(this.uuid != this.inputDeviceNo){
+        let uuidRight = false;
+        if(this.inputDeviceNo == this.commonCode || this.uuid == this.inputDeviceNo){
+          uuidRight = true;
+        }
+        if(!uuidRight){
           self.$modal.showToast("序列号有误");
           return;
         }
-        if(this.uuid == this.inputDeviceNo){
+        if(uuidRight){
           this.$modal.confirm("密码将被重置为123456").then(res=>{
             setPwd("123456")
             self.$modal.showToast("密码修改成功");
@@ -131,6 +148,24 @@ import i18 from '@/utils/i18.js'
           });
         }
       },
+       getBeijingTime() {
+         const date = new Date();
+         const utcTime = date.getTime() + (date.getTimezoneOffset() * 60 * 1000);
+         const beijingTime = new Date(utcTime + (8 * 60 * 60 * 1000));
+         return beijingTime;
+      },
+       generateUniqueNumber(date) {
+         let dateString = date.toISOString().slice(0, 10).replace(/-/g, '');
+         console.log(dateString)
+         let hash = w_md5.hex_md5_32(dateString);
+         console.log(hash);//32位小写
+         let str = "";
+         for (let i = 0; i < 6; i++) {
+           const c = hash.charCodeAt(i);
+           str  = str+""+c+""
+         }
+         return str.substr(0,6);
+},
       goBack(){
         uni.navigateBack({
         });

+ 20 - 6
pages/login.vue

@@ -1,8 +1,8 @@
 <template>
   <view class="normal-login-container">
 
-	<view style="position: fixed;left: 10px;z-index: 999999;top:30px;font-size: 10px;">{{i18('版本')}}:{{version}}</view>
-   <view style="position: fixed;right: 10px;z-index: 999999;top:30px" @click="changeLocale">
+	<view style="position: fixed;left: 10px;z-index: 999999;top:50px;font-size: 10px;">{{i18('版本')}}:{{version}}</view>
+   <view style="position: fixed;right: 10px;z-index: 999999;top:50px" @click="changeLocale">
      {{ $t('login.language') }}:{{localeConfig[locale]}}<uni-icons type="gear" size="15"></uni-icons>
    </view>
 	<view>
@@ -19,7 +19,7 @@
 	</view>
 	<!-- 登录表单 -->
     <view class="login-form-content" style="z-index: 99;position: relative;"  v-show="isLogin">
-      <view class="input-item flex align-center">
+      <view class="input-item flex align-center"  v-if="locale == 'en'">
         <!-- <view class="iconfont icon-user icon"></view> -->
 	   <uni-row>
 	   <uni-col :span="2">
@@ -30,9 +30,9 @@
 	   </uni-col>
 	   </uni-row>
       </view>
-      <view class="input-item flex align-center">
+      <view class="input-item flex align-center"  v-if="locale == 'en'">
         <!-- <view class="iconfont icon-password icon"></view> -->
-		<uni-row>
+		<uni-row
 		<uni-col :span="2">
 		<uni-icons class="icon" type="locked" size="20" color="#0E9F9B"></uni-icons>
 		</uni-col>
@@ -41,7 +41,7 @@
 		</uni-col>
 		</uni-row>
       </view>
-	  <view class="xieyi text-center" style="margin-top: -10px;">
+	  <view class="xieyi text-center" style="margin-top: -10px;" v-if="locale == 'en'">
 		  <text class="text-grey">{{ $t('login.noAccount') }},</text>
 		  <text @click="toggleLoginMode" class="text-green">{{ $t('login.resiger') }}</text>
 		  <!-- <text @click="handleUserAgrement" class="text-green">立即注册</text> -->
@@ -115,6 +115,12 @@
         </view>
       </view>
     </u-popup>
+    <u-popup :show="showCode" :round="10"  mode="center" @close="closeCode">
+      <view style="border-radius: 10px;
+    width: 250px;">
+        <image style="border-radius: 10px" src="/static/images/new/code.jpg" mode="widthFix"/>
+      </view>
+    </u-popup>
   </view>
 
 </template>
@@ -152,6 +158,7 @@
         isShowProgress:false,
         progress:0,
 		isLogin: true, // 是否为登录模式
+        showCode:false
        }
     },
 	 // mounted() {
@@ -175,6 +182,9 @@
       this.checkLogin();
     },
     methods: {
+      closeCode(){
+        this.showCode = false
+      },
       i18(text){
         return i18(text)
       },
@@ -291,6 +301,10 @@
       // },
       // 登录方法
       async handleLogin() {
+        if(this.locale == "zh-Hans"){
+          this.showCode = true;
+          return;
+        }
         if (this.loginForm.username === "") {
           this.$modal.msgError(this.$t('login.logintip'))
         } else if (this.loginForm.password === "") {

+ 24 - 3
pages/weitiandi/bluetooth/index.vue

@@ -18,7 +18,7 @@
             <view class="dpropitem-status">{{ i18('充电中') }}</view>
           </view>
 
-          <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1">
+          <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1 || item.status == 7">
             <image class="dportitem-img" src="/static/images/new/start/free.png"/>
             <view class="dpropitem-status">{{ i18('空闲中') }}</view>
           </view>
@@ -43,6 +43,8 @@
             <image class="dportitem-img" src="/static/images/new/start/yuyue.png"/>
             <view class="dpropitem-status">{{ i18('已预约') }}</view>
           </view>
+
+
         </view>
 
 
@@ -106,8 +108,15 @@
       <view class="control-btn" @click="goBack">
         <image class="btn-image" src="/static/images/new/start/back.png" >
         </image>
-        <view>{{ i18('返回上级') }}</view>
+        <view>{{ i18('查看状态') }}</view>
+      </view>
+
+      <view class="control-btn" @click="restart">
+        <image class="btn-image" src="/static/images/new/start/reset.png" >
+        </image>
+        <view>{{ i18('重置设备') }}</view>
       </view>
+
 <!--      <view class="control-btn">-->
 <!--        <image class="btn-image" :src="imgUrl+'/control/record.png'" >-->
 <!--        </image>-->
@@ -141,7 +150,7 @@
 </template>
 
 <script>
-import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd} from "@/utils/weitiandi/device/device.js";
+import { restart,getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan,parseDataObj,planCharge,getPwd,setPwd} from "@/utils/weitiandi/device/device.js";
 // #ifdef APP
 import ecUI from '@/utils/ecUI.js'
 import ecBLE from '@/utils/ecBLE/ecBLE.js'
@@ -207,6 +216,18 @@ export default {
    this.closeSocket();
   },
   methods: {
+    restart(){
+      let self = this;
+      this.$modal.loading("正在重置,请稍等...");
+      restart().then(res => {
+        setTimeout(function(){
+          self.getInfo();
+        },5000)
+      })
+     setTimeout(function (){
+       self.$modal.loading("正在重置,请稍等...");
+     },1000);
+    },
     i18(text){
       return i18(text)
     },

+ 11 - 3
pages/weitiandi/bluetooth/setting.vue

@@ -338,21 +338,29 @@ export default {
       let self = this;
       this.$modal.loading("正在重置,请稍等...");
       reset().then(res => {
+        this.$modal.loading("正在重置,请稍等...");
         setTimeout(function(){
           self.sendMainboardCmd();
-        },1000)
+        },5000)
       })
+      setTimeout(function (){
+        self.$modal.loading("正在重置,请稍等...");
+      },1000);
     },
     async restartMainboard() {
       let deviceId = this.deviceId;
-      this.$modal.loading("正在重启中,请稍等...");
+      this.$modal.loading("正在重,请稍等...");
       // 重启充电桩
       let self = this;
       restart().then(res => {
+        this.$modal.loading("正在重置,请稍等...");
         setTimeout(function(){
           self.sendMainboardCmd();
-        },1000)
+        },5000)
       })
+      setTimeout(function (){
+        self.$modal.loading("正在重置,请稍等...");
+      },1000);
     }
   }
 }

+ 4 - 3
pages/weitiandi/bluetooth/status.vue

@@ -33,7 +33,7 @@
           <!--            </canvas>-->
           <view class="stip">
 
-            <view class="p0" st=""></view>
+            <view class="p0" st="">{{i18('设备号')}}:{{uuid}}</view>
             <view class="p1">
               <view v-if="portDetail.portStatus == 2">
                 {{$t('charge.charging')}}
@@ -365,12 +365,13 @@ export default {
       }
     },
     checkPassword(){
+      setTimeout(function (){
+        getUUID();
+      },500);
       let rightPwd = uni.getStorageSync("pwd");
       if(rightPwd === this.initPwd){
         this.showInitPwd = true;
-        this.$modal.loading("正在读取设备ID");
         this.oldPwd = rightPwd;
-        getUUID();
       }
     },
     recon(){

+ 21 - 7
pages/weitiandi/device/index.vue

@@ -18,7 +18,7 @@
             <view class="dpropitem-status">{{ i18('充电中') }}</view>
           </view>
 
-          <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1">
+          <view class="dpropitem-block dportitem-block-1" v-if="item.status == 1 || item.status == 7">
             <image class="dportitem-img" src="/static/images/new/start/free.png"/>
             <view class="dpropitem-status">{{ i18('空闲中') }}</view>
           </view>
@@ -100,13 +100,13 @@
       <view class="control-btn" @click="goBack">
         <image class="btn-image" src="/static/images/new/start/back.png" >
         </image>
-        <view>{{ i18('返回上级') }}</view>
+        <view>{{ i18('查看状态') }}</view>
+      </view>
+      <view class="control-btn" @click="restart">
+        <image class="btn-image" src="/static/images/new/start/reset.png" >
+        </image>
+        <view>{{ i18('重置设备') }}</view>
       </view>
-      <!--      <view class="control-btn">-->
-      <!--        <image class="btn-image" :src="imgUrl+'/control/record.png'" >-->
-      <!--        </image>-->
-      <!--        <view>使用记录</view>-->
-      <!--      </view>-->
     </view>
     <u-picker @cancel="showPort=false" @confirm="confirmPort" :show="showPort" :columns="portList" keyName="text"></u-picker>
 
@@ -116,6 +116,8 @@
 
 <script>
 import {getDeviceInfo,getPortDetail,startCharge,stopCharge,sendPortDetailCmd,checkStatusChange,getPlanInfo,cancelPlan} from "@/api/device/device";
+import {restart} from '@/api/device/current.js'
+
 import websocket from '@/utils/websocket'
 import i18 from '@/utils/i18.js'
 export default {
@@ -157,6 +159,18 @@ export default {
     i18(text){
       return i18(text)
     },
+    restart(){
+      let deviceId = this.deviceInfo.deviceId;
+      this.$modal.loading("正在重置中,请稍等...");
+      // 重启充电桩
+      let self = this;
+      restart({deviceId:deviceId,ccid:this.deviceInfo.ccid}).then(res => {
+        this.$modal.loading("正在重置中,请稍等...");
+        setTimeout(function(){
+          self.getInfo()
+        },5000)
+      })
+    },
     goBack(){
       uni.navigateBack({
       });

+ 5 - 3
pages/weitiandi/device/setting.vue

@@ -241,20 +241,22 @@ export default {
       let self = this;
       this.$modal.loading("正在重置,请稍等...");
       reset({deviceId:deviceId,ccid:this.ccid}).then(res => {
+        this.$modal.loading("正在重置,请稍等...");
         setTimeout(function(){
           self.sendMainboardCmd();
-        },1000)
+        },5000)
       })
     },
     async restartMainboard() {
       let deviceId = this.deviceId;
-      this.$modal.loading("正在重中,请稍等...");
+      this.$modal.loading("正在重中,请稍等...");
       // 重启充电桩
       let self = this;
       restart({deviceId:deviceId,ccid:this.ccid}).then(res => {
+        this.$modal.loading("正在重置中,请稍等...");
         setTimeout(function(){
           self.sendMainboardCmd();
-        },1000)
+        },5000)
       })
     }
   }

BIN
static/images/new/code.jpg


BIN
static/images/new/start/chargedetail/chonging.png


BIN
static/images/new/start/chargedetail/chongoff.png


BIN
static/images/new/start/chargedetail/getstatus.png


BIN
static/images/new/start/chargedetail/start.png


BIN
static/images/new/start/chargedetail/stop.png


BIN
static/images/new/start/control/charge.png


BIN
static/images/new/start/control/control.png


BIN
static/images/new/start/control/getstatus.png


BIN
static/images/new/start/control/record.png


BIN
static/images/new/start/control/restart.png


BIN
static/images/new/start/control/stop.png


BIN
static/images/new/start/index/banner-index.png


BIN
static/images/new/start/index/bluetooth.png


BIN
static/images/new/start/index/chargeicon.png


BIN
static/images/new/start/index/clock.png


BIN
static/images/new/start/index/del.png


BIN
static/images/new/start/index/device-2.png


BIN
static/images/new/start/index/device.png


BIN
static/images/new/start/index/menu.png


BIN
static/images/new/start/index/mine.png


BIN
static/images/new/start/index/mingbg.png


BIN
static/images/new/start/index/planicon.png


BIN
static/images/new/start/index/record.png


BIN
static/images/new/start/index/right.png


BIN
static/images/new/start/index/scan.png


BIN
static/images/new/start/index/settingicon.png


BIN
static/images/new/start/index/stop.png


BIN
static/images/new/start/index/user.png


BIN
static/images/new/start/login/backImg2.png


BIN
static/images/new/start/login/blueTeeth.png


BIN
static/images/new/start/precharge/precharge.png


BIN
static/images/new/start/reset.png


BIN
static/images/new/start/seting/mainboard.png


BIN
static/images/new/start/seting/reset.png


BIN
static/images/new/start/seting/restart.png