优化设备控制,提交后,实时获取设备返回状态信息
This commit is contained in:
@ -145,11 +145,9 @@
|
||||
return false
|
||||
}
|
||||
try {
|
||||
|
||||
uni.showLoading({
|
||||
title: '登录中...'
|
||||
})
|
||||
console.log('44444');
|
||||
// 调用登录接口
|
||||
const res = await login({
|
||||
phonenumber: this.phone,
|
||||
@ -157,7 +155,6 @@
|
||||
tenantId: '894078' //租户ID
|
||||
})
|
||||
if (res.code == 200) {
|
||||
console.log(res, 'ressss');
|
||||
uni.hideLoading()
|
||||
uni.setStorageSync('token', res.data.access_token) // 缓存token
|
||||
uni.setStorageSync('clientID', res.data.client_id) // 缓存token
|
||||
@ -170,19 +167,18 @@
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
title: res.msg || '服务器异常,请稍后重试',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
console.log('捕获错误:', error);
|
||||
uni.showToast({
|
||||
title: error.msg,
|
||||
title: error.msg || '登录失败',
|
||||
icon: 'none'
|
||||
});
|
||||
uni.hideLoading()
|
||||
}
|
||||
|
||||
},
|
||||
// 跳转到协议页面
|
||||
goToPage(type) {
|
||||
|
Reference in New Issue
Block a user