|
|
@@ -336,7 +336,6 @@ export default {
|
|
|
return {
|
|
|
statusBarHeight: 44,
|
|
|
deviceId: '',
|
|
|
- deviceCode: '',
|
|
|
deviceName: '',
|
|
|
rssi: '',
|
|
|
isShowDrawer2: false,
|
|
|
@@ -368,16 +367,8 @@ export default {
|
|
|
this.statusBarHeight = sysInfo.statusBarHeight || 44
|
|
|
|
|
|
this.deviceId = options.deviceId || ''
|
|
|
- this.deviceCode = options.deviceCode || ''
|
|
|
this.deviceName = options.name || ''
|
|
|
this.rssi = options.rssi || ''
|
|
|
- const currentDevice = uni.getStorageSync('current_device') || {}
|
|
|
- if (currentDevice.deviceCode && !this.deviceCode) {
|
|
|
- this.deviceCode = currentDevice.deviceCode
|
|
|
- }
|
|
|
- if (currentDevice.name && !this.deviceName) {
|
|
|
- this.deviceName = currentDevice.name
|
|
|
- }
|
|
|
|
|
|
// TODO: 后续接口确定后实现 - 下载穴位列表
|
|
|
// TODO: 后续接口确定后实现 - 下载专业模式推荐方案
|
|
|
@@ -405,14 +396,9 @@ export default {
|
|
|
},
|
|
|
/** 加载当前用户信息 */
|
|
|
loadCurrentUser() {
|
|
|
- const currentDevice = uni.getStorageSync('current_device') || {}
|
|
|
const user = uni.getStorageSync('current_manage_user')
|
|
|
if (user && user.name) {
|
|
|
this.currentUserName = user.name
|
|
|
- } else if (currentDevice.profile && currentDevice.profile.name) {
|
|
|
- uni.setStorageSync('current_manage_user', currentDevice.profile)
|
|
|
- uni.setStorageSync('current_manage_user_id', currentDevice.profile.profileId || currentDevice.profile.id)
|
|
|
- this.currentUserName = currentDevice.profile.name
|
|
|
} else {
|
|
|
this.currentUserName = ''
|
|
|
}
|