up. ws update.

This commit is contained in:
扶桑花间 2025-08-28 23:05:40 +08:00
parent 84e262ebd7
commit ee08474927
3 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ class AuthController extends BaseController
])->find();
if($clientModel) {
if($clientModel['lock_password'] !== $password) {
return $this->writeSuccess('密码错误');
return $this->writeError('密码错误');
}
$clientModel->save(['is_lock'=>0,'lock_password'=>'','lock_time'=>null]);
}

View File

@ -2,7 +2,7 @@ import request from '@/utils/request';
import type { ApiResult } from '@/api';
import type { User } from '@/api/system/user/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);
if (res.data.code === 0) {
return res.data.message;

View File

@ -39,7 +39,7 @@
const visible = ref(false);
const lockPassword = ref('');
const confirmUnlock = () => {
clientScreenUnlock({ password: lockPassword });
clientScreenUnlock({ password: lockPassword.value });
};
wsEventManager.subscribe(WsEvent.LOCK_CLIENT_SCREEN, () => {
visible.value = true;