|
@ -4,7 +4,7 @@ import { parseStrEmpty } from "@/utils/ruoyi"; |
|
|
// 查询用户列表
|
|
|
// 查询用户列表
|
|
|
export function listUser(query) { |
|
|
export function listUser(query) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/list', |
|
|
url: '/default-api/system/user/list', |
|
|
method: 'get', |
|
|
method: 'get', |
|
|
params: query |
|
|
params: query |
|
|
}) |
|
|
}) |
|
@ -13,7 +13,7 @@ export function listUser(query) { |
|
|
// 查询用户详细
|
|
|
// 查询用户详细
|
|
|
export function getUser(userId) { |
|
|
export function getUser(userId) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/' + parseStrEmpty(userId), |
|
|
url: '/default-api/system/user/' + parseStrEmpty(userId), |
|
|
method: 'get' |
|
|
method: 'get' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -21,7 +21,7 @@ export function getUser(userId) { |
|
|
// 新增用户
|
|
|
// 新增用户
|
|
|
export function addUser(data) { |
|
|
export function addUser(data) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user', |
|
|
url: '/default-api/system/user', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
data: data |
|
|
data: data |
|
|
}) |
|
|
}) |
|
@ -30,7 +30,7 @@ export function addUser(data) { |
|
|
// 修改用户
|
|
|
// 修改用户
|
|
|
export function updateUser(data) { |
|
|
export function updateUser(data) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user', |
|
|
url: '/default-api/system/user', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
data: data |
|
|
data: data |
|
|
}) |
|
|
}) |
|
@ -39,7 +39,7 @@ export function updateUser(data) { |
|
|
// 删除用户
|
|
|
// 删除用户
|
|
|
export function delUser(userId) { |
|
|
export function delUser(userId) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/' + userId, |
|
|
url: '/default-api/system/user/' + userId, |
|
|
method: 'delete' |
|
|
method: 'delete' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -51,7 +51,7 @@ export function resetUserPwd(userId, password) { |
|
|
password |
|
|
password |
|
|
} |
|
|
} |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/resetPwd', |
|
|
url: '/default-api/system/user/resetPwd', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
data: data |
|
|
data: data |
|
|
}) |
|
|
}) |
|
@ -64,7 +64,7 @@ export function changeUserStatus(userId, status) { |
|
|
status |
|
|
status |
|
|
} |
|
|
} |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/changeStatus', |
|
|
url: '/default-api/system/user/changeStatus', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
data: data |
|
|
data: data |
|
|
}) |
|
|
}) |
|
@ -73,7 +73,7 @@ export function changeUserStatus(userId, status) { |
|
|
// 查询用户个人信息
|
|
|
// 查询用户个人信息
|
|
|
export function getUserProfile() { |
|
|
export function getUserProfile() { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/profile', |
|
|
url: '/default-api/system/user/profile', |
|
|
method: 'get' |
|
|
method: 'get' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -81,7 +81,7 @@ export function getUserProfile() { |
|
|
// 修改用户个人信息
|
|
|
// 修改用户个人信息
|
|
|
export function updateUserProfile(data) { |
|
|
export function updateUserProfile(data) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/profile', |
|
|
url: '/default-api/system/user/profile', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
data: data |
|
|
data: data |
|
|
}) |
|
|
}) |
|
@ -94,7 +94,7 @@ export function updateUserPwd(oldPassword, newPassword) { |
|
|
newPassword |
|
|
newPassword |
|
|
} |
|
|
} |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/profile/updatePwd', |
|
|
url: '/default-api/system/user/profile/updatePwd', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
params: data |
|
|
params: data |
|
|
}) |
|
|
}) |
|
@ -103,7 +103,7 @@ export function updateUserPwd(oldPassword, newPassword) { |
|
|
// 用户头像上传
|
|
|
// 用户头像上传
|
|
|
export function uploadAvatar(data) { |
|
|
export function uploadAvatar(data) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/profile/avatar', |
|
|
url: '/default-api/system/user/profile/avatar', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
|
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
|
|
data: data |
|
|
data: data |
|
@ -113,7 +113,7 @@ export function uploadAvatar(data) { |
|
|
// 查询授权角色
|
|
|
// 查询授权角色
|
|
|
export function getAuthRole(userId) { |
|
|
export function getAuthRole(userId) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/authRole/' + userId, |
|
|
url: '/default-api/system/user/authRole/' + userId, |
|
|
method: 'get' |
|
|
method: 'get' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -121,7 +121,7 @@ export function getAuthRole(userId) { |
|
|
// 保存授权角色
|
|
|
// 保存授权角色
|
|
|
export function updateAuthRole(data) { |
|
|
export function updateAuthRole(data) { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/authRole', |
|
|
url: '/default-api/system/user/authRole', |
|
|
method: 'put', |
|
|
method: 'put', |
|
|
params: data |
|
|
params: data |
|
|
}) |
|
|
}) |
|
@ -130,7 +130,7 @@ export function updateAuthRole(data) { |
|
|
// 查询部门下拉树结构
|
|
|
// 查询部门下拉树结构
|
|
|
export function deptTreeSelect() { |
|
|
export function deptTreeSelect() { |
|
|
return request({ |
|
|
return request({ |
|
|
url: '/system/user/deptTree', |
|
|
url: '/default-api/system/user/deptTree', |
|
|
method: 'get' |
|
|
method: 'get' |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|