evan.liu 07509a2387 迁移uni-app x到uni-app vue3,蓝牙去第三方插件改uni内置BLE API
- uni-app x官方无内置蓝牙API(文档明确见插件市场),为实现去插件化,工程整体迁移为uni-app vue3(vue/ts),App端内置完整BLE API,标准基座即可运行
- 新建src/BluetoothManager.ts:基于uni内置BLE API(createBLEConnection/notifyBLECharacteristicValueChange/writeBLECharacteristicValue(writeNoResponse)/setBLEMTU/getBLEDeviceRSSI等),保持原插件type约定,页面业务逻辑不变
- 删除uni_modules/android-ble及未使用的lime-*、uni-wifi;保留uni-icons、uni-scss
- uts模块全部移植为ts(src/mcm、api、common):UTSJSONObject改Record<string,any>,适配vue3 getStorageSync空值返回空串的差异
- 7个页面uvue转vue:模板不变,显式import ref与生命周期钩子;OTA固件读取由java.io改为plus.io+uni.base64ToArrayBuffer
- manifest.json去uni-app-x改app-plus结构,补Android 12+蓝牙权限;删除platformConfig.json;运行改用标准基座
2026-09-04 06:02:29 +08:00

98 lines
2.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://doc.dcloud.net.cn/uni-app-x/collocation/pagesjson.html
{
"path": "pages/tabbar/home",
"style": {
"navigationBarTitleText": "Device",
"navigationBarBackgroundColor": "#3A6FA1",
"enablePullDownRefresh": true
}
},
{
"path": "pages/tabbar/ota",
"style": {
"navigationBarTitleText": "Firmware Upgrade",
"navigationBarBackgroundColor": "#3A6FA1"
}
},
{
"path": "pages/tabbar/my",
"style": {
"navigationBarTitleText": "my",
"navigationBarBackgroundColor": "#3A6FA1"
}
},
{
"path": "pages/register/register",
"style": {
"navigationBarTitleText": "register",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#3A6FA1"
}
},
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "login",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#3A6FA1"
}
},
{
"path": "pages/displayUserInfo/displayUserInfo",
"style": {
"navigationBarTitleText": "user info",
"navigationBarBackgroundColor": "#3A6FA1"
}
},
{
"path": "pages/bleTest/bluetoothOperation/bluetoothOperation",
"style": {
"navigationBarTitleText": "CLI Terminal",
"navigationBarBackgroundColor": "#3A6FA1"
}
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#3A6FA1",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/tabbar/home",
"text": "Device",
"iconPath": "/static/tabbar/homeDefault.png",
"selectedIconPath": "/static/tabbar/homeActive.png"
},
{
"pagePath": "pages/tabbar/ota",
"text": "OTA",
"iconPath": "/static/tabbar/chargeDefault.png",
"selectedIconPath": "/static/tabbar/chargeActive.png"
},
{
"pagePath": "pages/bleTest/bluetoothOperation/bluetoothOperation",
"text": "CLI",
"iconPath": "/static/tabbar/mapDefault.png",
"selectedIconPath": "/static/tabbar/mapActive.png"
},
{
"pagePath": "pages/tabbar/my",
"text": "my",
"iconPath": "/static/tabbar/myDefault.png",
"selectedIconPath": "/static/tabbar/myActive.png"
}
]
}
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "smartAssister",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "default"
},
"uniIdRouter": {}
}