mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 11:09:19 +08:00
feat: 个人信息页和修改密码页支持深色模式,添加独立修改密码功能
- 个人信息页和修改密码页适配 Vben 深色模式 - 头像下拉菜单新增修改密码入口,跳转 /system/change-password - 新增独立修改密码页面(/system/change-password) - 新增 changePasswordApi 调用后端 /user/change-password 接口 - 新增路由文件和相关 locale
This commit is contained in:
@@ -3,6 +3,11 @@ import { useAccessStore } from '@vben/stores';
|
||||
import { baseRequestClient, requestClient } from '#/api/request';
|
||||
|
||||
export namespace AuthApi {
|
||||
/** 修改密码参数 */
|
||||
export interface ChangePasswordParams {
|
||||
oldPassword: string;
|
||||
newPassword: string;
|
||||
}
|
||||
/** 登录接口参数 */
|
||||
export interface LoginParams {
|
||||
account: string;
|
||||
@@ -112,3 +117,10 @@ export async function getAccessCodesApi() {
|
||||
export async function switchAccountApi(userId: number) {
|
||||
return requestClient.post<AuthApi.LoginResult>(`/auth/switch/${userId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
export async function changePasswordApi(data: AuthApi.ChangePasswordParams) {
|
||||
return requestClient.post('/user/change-password', data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user