|
@@ -11,7 +11,7 @@ import { parseStrEmpty } from '@/utils/ruoyi';
|
|
|
*/
|
|
|
export const listUser = (query: UserQuery): AxiosPromise<UserVO[]> => {
|
|
|
return request({
|
|
|
- url: '/system/user/list',
|
|
|
+ url: '/api/user/list',
|
|
|
method: 'get',
|
|
|
params: query
|
|
|
});
|
|
@@ -23,7 +23,7 @@ export const listUser = (query: UserQuery): AxiosPromise<UserVO[]> => {
|
|
|
*/
|
|
|
export const optionSelect = (userIds: (number | string)[]): AxiosPromise<UserVO[]> => {
|
|
|
return request({
|
|
|
- url: '/system/user/optionselect?userIds=' + userIds,
|
|
|
+ url: '/api/user/optionselect?userIds=' + userIds,
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|
|
@@ -34,7 +34,7 @@ export const optionSelect = (userIds: (number | string)[]): AxiosPromise<UserVO[
|
|
|
*/
|
|
|
export const getUser = (userId?: string | number): AxiosPromise<UserInfoVO> => {
|
|
|
return request({
|
|
|
- url: '/system/user/' + parseStrEmpty(userId),
|
|
|
+ url: '/api/user/' + parseStrEmpty(userId),
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|
|
@@ -44,7 +44,7 @@ export const getUser = (userId?: string | number): AxiosPromise<UserInfoVO> => {
|
|
|
*/
|
|
|
export const addUser = (data: UserForm) => {
|
|
|
return request({
|
|
|
- url: '/system/user',
|
|
|
+ url: '/api/user',
|
|
|
method: 'post',
|
|
|
data: data
|
|
|
});
|
|
@@ -55,7 +55,7 @@ export const addUser = (data: UserForm) => {
|
|
|
*/
|
|
|
export const updateUser = (data: UserForm) => {
|
|
|
return request({
|
|
|
- url: '/system/user',
|
|
|
+ url: '/api/user',
|
|
|
method: 'put',
|
|
|
data: data
|
|
|
});
|
|
@@ -67,7 +67,7 @@ export const updateUser = (data: UserForm) => {
|
|
|
*/
|
|
|
export const delUser = (userId: Array<string | number> | string | number) => {
|
|
|
return request({
|
|
|
- url: '/system/user/' + userId,
|
|
|
+ url: '/api/user/' + userId,
|
|
|
method: 'delete'
|
|
|
});
|
|
|
};
|
|
@@ -83,7 +83,7 @@ export const resetUserPwd = (userId: string | number, password: string) => {
|
|
|
password
|
|
|
};
|
|
|
return request({
|
|
|
- url: '/system/user/resetPwd',
|
|
|
+ url: '/api/user/resetPwd',
|
|
|
method: 'put',
|
|
|
headers: {
|
|
|
isEncrypt: true,
|
|
@@ -104,7 +104,7 @@ export const changeUserStatus = (userId: number | string, status: string) => {
|
|
|
status
|
|
|
};
|
|
|
return request({
|
|
|
- url: '/system/user/changeStatus',
|
|
|
+ url: '/api/user/changeStatus',
|
|
|
method: 'put',
|
|
|
data: data
|
|
|
});
|
|
@@ -115,7 +115,7 @@ export const changeUserStatus = (userId: number | string, status: string) => {
|
|
|
*/
|
|
|
export const getUserProfile = (): AxiosPromise<UserInfoVO> => {
|
|
|
return request({
|
|
|
- url: '/system/user/profile',
|
|
|
+ url: '/api/user/profile',
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|
|
@@ -126,7 +126,7 @@ export const getUserProfile = (): AxiosPromise<UserInfoVO> => {
|
|
|
*/
|
|
|
export const updateUserProfile = (data: UserForm) => {
|
|
|
return request({
|
|
|
- url: '/system/user/profile',
|
|
|
+ url: '/api/user/profile',
|
|
|
method: 'put',
|
|
|
data: data
|
|
|
});
|
|
@@ -143,7 +143,7 @@ export const updateUserPwd = (oldPassword: string, newPassword: string) => {
|
|
|
newPassword
|
|
|
};
|
|
|
return request({
|
|
|
- url: '/system/user/profile/updatePwd',
|
|
|
+ url: '/api/user/profile/updatePwd',
|
|
|
method: 'put',
|
|
|
headers: {
|
|
|
isEncrypt: true,
|
|
@@ -159,7 +159,7 @@ export const updateUserPwd = (oldPassword: string, newPassword: string) => {
|
|
|
*/
|
|
|
export const uploadAvatar = (data: FormData) => {
|
|
|
return request({
|
|
|
- url: '/system/user/profile/avatar',
|
|
|
+ url: '/api/user/profile/avatar',
|
|
|
method: 'post',
|
|
|
data: data
|
|
|
});
|
|
@@ -171,7 +171,7 @@ export const uploadAvatar = (data: FormData) => {
|
|
|
*/
|
|
|
export const getAuthRole = (userId: string | number): AxiosPromise<{ user: UserVO; roles: RoleVO[] }> => {
|
|
|
return request({
|
|
|
- url: '/system/user/authRole/' + userId,
|
|
|
+ url: '/api/user/authRole/' + userId,
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|
|
@@ -182,7 +182,7 @@ export const getAuthRole = (userId: string | number): AxiosPromise<{ user: UserV
|
|
|
*/
|
|
|
export const updateAuthRole = (data: { userId: string; roleIds: string }) => {
|
|
|
return request({
|
|
|
- url: '/system/user/authRole',
|
|
|
+ url: '/api/user/authRole',
|
|
|
method: 'put',
|
|
|
params: data
|
|
|
});
|
|
@@ -194,7 +194,7 @@ export const updateAuthRole = (data: { userId: string; roleIds: string }) => {
|
|
|
*/
|
|
|
export const listUserByDeptId = (deptId: string | number): AxiosPromise<UserVO[]> => {
|
|
|
return request({
|
|
|
- url: '/system/user/list/dept/' + deptId,
|
|
|
+ url: '/api/user/list/dept/' + deptId,
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|
|
@@ -204,7 +204,7 @@ export const listUserByDeptId = (deptId: string | number): AxiosPromise<UserVO[]
|
|
|
*/
|
|
|
export const deptTreeSelect = (): AxiosPromise<DeptVO[]> => {
|
|
|
return request({
|
|
|
- url: '/system/user/deptTree',
|
|
|
+ url: '/api/user/deptTree',
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|