feat:增加主包(tabbar)、system(系统管理)、infra(基础设施)、bpm(工作流程)的页面
This commit is contained in:
48
src/api/system/user/profile/index.ts
Normal file
48
src/api/system/user/profile/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 用户个人中心信息 */
|
||||
export interface UserProfileVO {
|
||||
id: number
|
||||
username: string
|
||||
nickname: string
|
||||
email?: string
|
||||
mobile?: string
|
||||
sex?: number
|
||||
avatar?: string
|
||||
loginIp: string
|
||||
loginDate: string
|
||||
createTime: string
|
||||
roles: { id: number, name: string }[]
|
||||
dept: { id: number, name: string }
|
||||
posts: { id: number, name: string }[]
|
||||
}
|
||||
|
||||
/** 更新个人信息请求 */
|
||||
export interface UpdateProfileReqVO {
|
||||
nickname?: string
|
||||
email?: string
|
||||
mobile?: string
|
||||
sex?: number
|
||||
avatar?: string
|
||||
}
|
||||
|
||||
/** 更新密码请求 */
|
||||
export interface UpdatePasswordReqVO {
|
||||
oldPassword: string
|
||||
newPassword: string
|
||||
}
|
||||
|
||||
/** 获取登录用户个人信息 */
|
||||
export function getUserProfile() {
|
||||
return http.get<UserProfileVO>('/system/user/profile/get')
|
||||
}
|
||||
|
||||
/** 修改用户个人信息 */
|
||||
export function updateUserProfile(data: UpdateProfileReqVO) {
|
||||
return http.put<boolean>('/system/user/profile/update', data)
|
||||
}
|
||||
|
||||
/** 修改用户个人密码 */
|
||||
export function updateUserPassword(data: UpdatePasswordReqVO) {
|
||||
return http.put<boolean>('/system/user/profile/update-password', data)
|
||||
}
|
||||
Reference in New Issue
Block a user