fix: wear-check page stuck spinning in vendor_33 mode
- vendor_33 mode skips BLE wear detection (protocol doesn't support it) and passes check immediately if device is connected - Show error message if device is not connected - Retry button navigates back if disconnected instead of re-checking
这个提交包含在:
@@ -38,6 +38,17 @@ Page({
|
||||
var self = this
|
||||
self.setData({ checking: true, result: null, error: '' })
|
||||
|
||||
if (!ble.isConnected()) {
|
||||
self.setData({ checking: false, result: 'fail', error: '设备未连接,请返回重新连接' })
|
||||
return
|
||||
}
|
||||
|
||||
var protocol = require('../../services/ble/protocol')
|
||||
if (protocol.PROTOCOL_MODE === 'vendor_33') {
|
||||
self.setData({ checking: false, result: 'ok', connected: true })
|
||||
return
|
||||
}
|
||||
|
||||
if (this._onStatus) ble.off('status', this._onStatus)
|
||||
this._onStatus = function (status) {
|
||||
self.setData({ checking: false })
|
||||
@@ -66,6 +77,10 @@ Page({
|
||||
},
|
||||
|
||||
onRetry: function () {
|
||||
if (!ble.isConnected()) {
|
||||
wx.navigateBack()
|
||||
return
|
||||
}
|
||||
this.checkWearing()
|
||||
},
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户