wzh 2 лет назад
Родитель
Сommit
d0864ce63e

+ 2 - 2
config.js

@@ -1,8 +1,8 @@
 // 应用全局配置
 module.exports = {
   //baseUrl: 'https://vue.ruoyi.vip/prod-api',
-  baseUrl: 'http://192.168.1.102:8090',
-  socketUrl: 'ws://192.168.1.102:8090/websocket',
+  baseUrl: 'http://120.55.183.139:8090',
+  socketUrl: 'ws://120.55.183.139:8090/websocket',
   imgUrl:'https://saomawzz.oss-cn-hangzhou.aliyuncs.com/chargerforeign',
   // 应用信息
   appInfo: {

+ 6 - 6
locale/en.json

@@ -165,18 +165,18 @@
     "planed": " Reserved",
     "connected": "Connected",
     "nocharge": "Idle",
-    "devtemper": "Device temperature",
-    "voltage": "Device voltage",
-    "current": "Device current",
+    "devtemper": "Temperature",
+    "voltage": "Voltage",
+    "current": "Current",
     "chargetime": "Charging time",
-    "power": "Charging power",
+    "power": "Power",
 
 
-    "startcharge": "Start charging",
+    "startcharge": "Start",
     "getinfo": "Get status",
     "oldpwd": "Original password",
     "newpwd": "6-digit new password",
-    "elec": "Charging capacity"
+    "elec": "Capacity"
   },
   "page": {
     "login": "Login",

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "用电助理",
     "appid" : "__UNI__60E8019",
     "description" : "",
-    "versionName" : "1.0.1",
-    "versionCode" : 101,
+    "versionName" : "1.0.3",
+    "versionCode" : 103,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,

+ 1 - 0
pages/login.vue

@@ -180,6 +180,7 @@
       },
       downloadFile(){
         let self = this;
+        let downUrl = self.downloadUrl;
         self.isShowProgress = true;
         const downloadTask = uni.downloadFile({
           url: self.downloadUrl,

+ 4 - 1
pages/weitiandi/bluetooth/index.vue

@@ -343,7 +343,10 @@ export default {
           showCancel:false,
           success: function (res) {
             if (res.confirm) {
-              self.recon()
+              uni.reLaunch({
+                url: '/pages/bluetooth/index/index'
+              });
+              // self.recon()
             } else if (res.cancel) {
               console.log('用户点击取消');
             }

+ 8 - 1
pages/weitiandi/bluetooth/setting.vue

@@ -207,7 +207,10 @@ export default {
           showCancel:false,
           success: function (res) {
             if (res.confirm) {
-              self.recon();
+              // self.recon();
+              uni.reLaunch({
+                url: '/pages/bluetooth/index/index'
+              });
             } else if (res.cancel) {
               console.log('用户点击取消');
             }
@@ -360,6 +363,10 @@ export default {
 .container {
   position: absolute;
   inset: 0;
+  left:0px;
+  top: 0px;
+  right: 0px;
+  bottom:0px;
   background: rgb(249, 252, 255);
 }
 

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

@@ -348,7 +348,10 @@ export default {
           showCancel:false,
           success: function (res) {
             if (res.confirm) {
-              self.recon()
+              uni.reLaunch({
+                url: '/pages/bluetooth/index/index'
+              });
+              // self.recon()
             } else if (res.cancel) {
               console.log('用户点击取消');
             }

+ 3 - 1
utils/ecBLE/ecBLEApp.js

@@ -187,7 +187,7 @@ const getBLEDeviceServices = () => {
 					})
 				},
 			})
-		},800)
+		},1200)//之前是800ms,要休眠到1200ms
 		
 	})
 }
@@ -276,7 +276,9 @@ uni.onBLEConnectionStateChange(async res => {
 	log(res)
 	// {"deviceId":"EC:22:05:13:78:49","connected":true}
 	if (res.connected) {
+		console.log("connected successfully")
 		const servicesResult = await getBLEDeviceServices()
+		console.log(servicesResult)
 		if (!servicesResult.ok) {
 			ecBLEConnectionStateChangeCallback(servicesResult)
 			closeBLEConnection()