|
@@ -1,5 +1,5 @@
|
|
|
import http from '@/axios'
|
|
|
-import { UserBO, UserInfo, UserQuery, UserRoleVO, UserVO } from '@/api/interface/system/user'
|
|
|
+import { PasswordBO, UserBO, UserInfo, UserQuery, UserRoleBO, UserRoleVO, UserVO } from '@/api/interface/system/user'
|
|
|
|
|
|
class UserApi {
|
|
|
static getInfo = (): Promise<ResultData<any>> => {
|
|
@@ -38,6 +38,14 @@ class UserApi {
|
|
|
return http.put({ url: '/system/user/edit', data })
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @name 修改密码
|
|
|
+ * @returns returns
|
|
|
+ */
|
|
|
+ static modifyPassword = (data: PasswordBO): Promise<ResultData<any>> => {
|
|
|
+ return http.put({ url: '/system/user/password/modify', data })
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @name 重置密码
|
|
|
* @returns returns
|
|
@@ -53,6 +61,7 @@ class UserApi {
|
|
|
static delete = (data: string[]): Promise<ResultData<any>> => {
|
|
|
return http.delete({ url: '/system/user/delete', data })
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* @name 查询已有角色
|
|
|
* @returns returns
|
|
@@ -60,5 +69,13 @@ class UserApi {
|
|
|
static getRole = (params: string): Promise<ResultData<any>> => {
|
|
|
return http.get<UserRoleVO>({ url: `/system/user/role/${params}` })
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @name 用户添加角色
|
|
|
+ * @returns returns
|
|
|
+ */
|
|
|
+ static addRole = (data: UserRoleBO): Promise<ResultData<any>> => {
|
|
|
+ return http.put<UserRoleVO>({ url: `/system/user/role/add`, data })
|
|
|
+ }
|
|
|
}
|
|
|
export default UserApi
|