71 lines
1.1 KiB
JavaScript
Vendored
71 lines
1.1 KiB
JavaScript
Vendored
import http from "@/util/http.js";
|
|
|
|
//用户管理列表请求
|
|
|
|
// 角色列表请求
|
|
export function roleList() {
|
|
return http({
|
|
url: "/api/roles",
|
|
method: "get",
|
|
});
|
|
}
|
|
|
|
//用户列表请求
|
|
export function userList(params) {
|
|
return http({
|
|
url: "/api/users",
|
|
method: "get",
|
|
params,
|
|
});
|
|
}
|
|
|
|
//用户新增请求
|
|
export function userAdd(data) {
|
|
return http({
|
|
url: "/api/users",
|
|
method: "post",
|
|
data,
|
|
});
|
|
}
|
|
|
|
// 用户管理点击编辑请求
|
|
export function userEdit(id) {
|
|
return http({
|
|
url: `/api/users/${id}`,
|
|
method: "get",
|
|
});
|
|
}
|
|
|
|
//编辑完确认请求
|
|
export function userConfirm(id, data) {
|
|
return http({
|
|
url: `/api/users/${id}`,
|
|
method: "patch",
|
|
data,
|
|
});
|
|
}
|
|
|
|
export function websiteMessage(params) {
|
|
return http({
|
|
url: "/api/website_message",
|
|
method: "get",
|
|
params
|
|
})
|
|
}
|
|
|
|
export function messageRead(id, data) {
|
|
return http({
|
|
url: `/api/website_message/${id}`,
|
|
method: "patch",
|
|
data
|
|
})
|
|
}
|
|
|
|
export function messageReadAll(data) {
|
|
return http({
|
|
url: `/api/website_message/batchRead`,
|
|
method: "post",
|
|
data: data
|
|
})
|
|
}
|