密码混淆
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import http from '@/utils/http';
|
||||
import { encryptPwd } from '@/utils/transform';
|
||||
|
||||
export async function changeLgpwd(newPassword: string, password?: string) {
|
||||
export async function changeLgpwd(newPassword: string, password: string) {
|
||||
const { ok, msg } = await http.post('/user/chpasswd', {
|
||||
password,
|
||||
newPassword,
|
||||
password: encryptPwd(password),
|
||||
newPassword: encryptPwd(newPassword),
|
||||
});
|
||||
if (ok) return;
|
||||
throw Error(msg);
|
||||
|
||||
Reference in New Issue
Block a user