控制权限 修改 不需要判断web是否有权限
This commit is contained in:
@@ -166,22 +166,22 @@ export default class DeviceController {
|
||||
wsManager.close();
|
||||
|
||||
try {
|
||||
const res = await getControlRight({
|
||||
userName: this.userInfo.username,
|
||||
sourceType: 1,
|
||||
token: this.userInfo.token,
|
||||
});
|
||||
//const res = await getControlRight({
|
||||
// userName: this.userInfo.username,
|
||||
// sourceType: 1,
|
||||
// token: this.userInfo.token,
|
||||
//});
|
||||
|
||||
this.hasControlRight = res?.code === 200 && res.data == true;
|
||||
this.onHasControlRightChange?.(this.hasControlRight);
|
||||
//this.hasControlRight = res?.code === 200 && res.data == true;
|
||||
//this.onHasControlRightChange?.(this.hasControlRight);
|
||||
|
||||
wsManager.connect(sn, this.wsUrl);
|
||||
this.connectedDeviceSn = sn;
|
||||
|
||||
if (!this.hasControlRight) {
|
||||
this.messageApi.warning(i18n.t('devices.fixed2OthersControlFixed2'));
|
||||
return;
|
||||
}
|
||||
//if (!this.hasControlRight) {
|
||||
// this.messageApi.warning(i18n.t('devices.fixed2OthersControlFixed2'));
|
||||
// return;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user