https://github.com/work-design/mp
小程序封装代码。
https://github.com/work-design/mp
Last synced: 12 months ago
JSON representation
小程序封装代码。
- Host: GitHub
- URL: https://github.com/work-design/mp
- Owner: work-design
- Created: 2023-04-20T05:11:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T03:44:49.000Z (over 1 year ago)
- Last Synced: 2024-10-24T21:00:11.312Z (over 1 year ago)
- Language: JavaScript
- Size: 116 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 快捷文档
* [project.config.json](https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html)
## ext 配置格式
```json
{
"extAppid": "",
"ext": {
"host": "",
"auth_host": "",
"path": ""
},
"window": {}
}
```
wx.onBLEConnectionStateChange(res => {
console.debug(`${res.deviceId} 状态已改变, 连接状态: ${res.connected}`)
const result = wx.getStorageSync('printer')
if (result.deviceId === res.deviceId && !res.connected) {
Object.assign(result, { connected: false })
wx.setStorageSync('printer', result)
}
})