up. ws update.
This commit is contained in:
parent
84e262ebd7
commit
ee08474927
@ -54,7 +54,7 @@ class AuthController extends BaseController
|
|||||||
])->find();
|
])->find();
|
||||||
if($clientModel) {
|
if($clientModel) {
|
||||||
if($clientModel['lock_password'] !== $password) {
|
if($clientModel['lock_password'] !== $password) {
|
||||||
return $this->writeSuccess('密码错误');
|
return $this->writeError('密码错误');
|
||||||
}
|
}
|
||||||
$clientModel->save(['is_lock'=>0,'lock_password'=>'','lock_time'=>null]);
|
$clientModel->save(['is_lock'=>0,'lock_password'=>'','lock_time'=>null]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import request from '@/utils/request';
|
|||||||
import type { ApiResult } from '@/api';
|
import type { ApiResult } from '@/api';
|
||||||
import type { User } from '@/api/system/user/model';
|
import type { User } from '@/api/system/user/model';
|
||||||
import type { UpdatePasswordParam } from './model';
|
import type { UpdatePasswordParam } from './model';
|
||||||
export async function clientScreenUnlock(data) {
|
export async function clientScreenUnlock(data: any) {
|
||||||
const res = await request.post<ApiResult<any>>('/auth/unlock', data);
|
const res = await request.post<ApiResult<any>>('/auth/unlock', data);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const lockPassword = ref('');
|
const lockPassword = ref('');
|
||||||
const confirmUnlock = () => {
|
const confirmUnlock = () => {
|
||||||
clientScreenUnlock({ password: lockPassword });
|
clientScreenUnlock({ password: lockPassword.value });
|
||||||
};
|
};
|
||||||
wsEventManager.subscribe(WsEvent.LOCK_CLIENT_SCREEN, () => {
|
wsEventManager.subscribe(WsEvent.LOCK_CLIENT_SCREEN, () => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user