Explorar o código

添加一些兼容ios上架需求

wzh %!s(int64=2) %!d(string=hai) anos
pai
achega
7e28518453
Modificáronse 4 ficheiros con 24 adicións e 8 borrados
  1. 7 1
      locale/en.json
  2. 11 1
      manifest.json
  3. 1 1
      pages/bluetooth/index/index.vue
  4. 5 5
      utils/ecBLE/ecBLEApp.js

+ 7 - 1
locale/en.json

@@ -143,7 +143,13 @@
     "登录状态已过期,您可以继续留在该页面,或者重新登录?": "The login session has expired, you can continue staying on this page, or log in again?",
     "无效的会话,或者会话已过期,请重新登录。": "Invalid session, or session has expired, please log in again.",
     "注销账号": "Delete account",
-    "确定删除账号吗?": "Are you sure you want to delete the account?"
+    "确定删除账号吗?": "Are you sure you want to delete the account?",
+    "请打开系统蓝牙开关": "Please turn on the system Bluetooth switch.",
+    "请打开系统定位开关": "Please turn on the system location switch.",
+    "蓝牙适配器不可用": "Bluetooth adapter is not available.",
+    "请打开应用定位权限,允许应用使用您的位置信息": "Please open the app's location permission and allow the app to use your location information."
+
+
   },
   "locale.auto": "System",
   "locale.en": "English",

+ 11 - 1
manifest.json

@@ -46,7 +46,17 @@
             },
             "ios" : {
                 "dSYMs" : false,
-                "idfa" : false
+                "idfa" : false,
+                "privacyDescription" : {
+                    "NSLocationWhenInUseUsageDescription" : "To connect the charging cable",
+                    "NSLocationAlwaysUsageDescription" : "To connect the charging cable",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "To connect the charging cable",
+                    "NSBluetoothPeripheralUsageDescription" : "To connect the charging cable",
+                    "NSBluetoothAlwaysUsageDescription" : "To connect the charging cable",
+                    "NSPhotoLibraryUsageDescription" : "To link the charging gun to your account",
+                    "NSPhotoLibraryAddUsageDescription" : "To link the charging gun to your account",
+                    "NSCameraUsageDescription" : "To link the charging gun to your account"
+                }
             },
             "sdkConfigs" : {
                 "ad" : {},

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

@@ -217,7 +217,7 @@ import i18 from '@/utils/i18.js'
             uni.removeStorageSync('blueid');
 						ecUI.showModal(
                 this.$t('buletooth.tip'),
-							'error,errCode=' + res.errCode + ',errMsg=' + res.errMsg
+							'error,errCode=' + res.errCode + ',errMsg=' + i18(res.errMsg)
 						)
 					}
 				});

+ 5 - 5
utils/ecBLE/ecBLEApp.js

@@ -16,7 +16,7 @@ const ecGattCharacteristicWriteUUIDOption2 = 'FFF2'
 const yiyuancharacterID1 = '0000FF15-0000-1000-8000-00805F9B34FB'
 const yiyuancharacterID2 = 'FF15'
 
-
+import i18 from '@/utils/i18.js'
 const log = data => {
 	if (logEnable) {
 		console.log('[eciot]:' + JSON.stringify(data))
@@ -58,7 +58,7 @@ uni.onBluetoothAdapterStateChange(res => {
 		ecBluetoothAdapterStateChangeCallback({
 			ok: false,
 			errCode: 30005,
-			errMsg: '蓝牙适配器不可用',
+			errMsg: i18('蓝牙适配器不可用'),
 		})
 	}
 })
@@ -78,7 +78,7 @@ const openBluetoothAdapter = async () => {
 	    ecBluetoothAdapterStateChangeCallback({
 	        ok: false,
 	        errCode: 30001,
-	        errMsg: '请打开系统蓝牙开关',
+	        errMsg: i18('请打开系统蓝牙开关'),
 	    })
 	    return
 	}
@@ -86,7 +86,7 @@ const openBluetoothAdapter = async () => {
 	    ecBluetoothAdapterStateChangeCallback({
 	        ok: false,
 	        errCode: 30002,
-	        errMsg: '请打开系统定位开关',
+	        errMsg: i18('请打开系统定位开关'),
 	    })
 	    return
 	}	
@@ -94,7 +94,7 @@ const openBluetoothAdapter = async () => {
 	    ecBluetoothAdapterStateChangeCallback({
 	        ok: false,
 	        errCode: 30003,
-	        errMsg: '请打开应用定位权限,允许应用使用您的位置信息', 
+	        errMsg: i18('请打开应用定位权限,允许应用使用您的位置信息'),
 	    })
 	    return
 	}