|
@@ -1,125 +1,125 @@
|
|
|
-import { $get, $post } from "@/plugins/axios";
|
|
|
+import { $postParam, $post } from "@/plugins/axios";
|
|
|
|
|
|
// user-manage
|
|
|
export const userListPage = datas => {
|
|
|
- return $get("/api/sys/user/list", datas);
|
|
|
+ return $postParam("/api/admin/sys/user/list", datas);
|
|
|
};
|
|
|
export const updateUser = datas => {
|
|
|
- return $post("/api/sys/user/save", datas);
|
|
|
+ return $post("/api/admin/sys/user/save", datas);
|
|
|
};
|
|
|
export const ableUser = ({ id, enable }) => {
|
|
|
- return $post("/api/sys/user/enable", { id, enable });
|
|
|
+ return $post("/api/admin/sys/user/enable", { id, enable });
|
|
|
};
|
|
|
export const resetPwd = id => {
|
|
|
- return $post("/api/sys/user/reset_password", { id });
|
|
|
+ return $post("/api/admin/sys/user/reset_password", { id });
|
|
|
};
|
|
|
export const updatePwd = datas => {
|
|
|
- return $post("/api/sys/user/update_password", datas);
|
|
|
+ return $post("/api/admin/sys/user/update_password", datas);
|
|
|
};
|
|
|
export const userBindRoles = ({ id, roleIds }) => {
|
|
|
- return $post("/api/sys/user/bind_roles", { id, roleIds });
|
|
|
+ return $post("/api/admin/sys/user/bind_roles", { id, roleIds });
|
|
|
};
|
|
|
|
|
|
// role-manage
|
|
|
export const roleListPage = datas => {
|
|
|
- return $get("/api/sys/role/list", datas);
|
|
|
+ return $postParam("/api/admin/sys/role/list", datas);
|
|
|
};
|
|
|
export const ableRole = ({ id, enable }) => {
|
|
|
- return $post("/api/sys/role/enable", { id, enable });
|
|
|
+ return $post("/api/admin/sys/role/enable", { id, enable });
|
|
|
};
|
|
|
export const updateRole = datas => {
|
|
|
- return $post("/api/sys/role/save", datas);
|
|
|
+ return $post("/api/admin/sys/role/save", datas);
|
|
|
};
|
|
|
export const deleteRole = id => {
|
|
|
- return $post("/api/sys/role/remove", { id });
|
|
|
+ return $post("/api/admin/sys/role/remove", { id });
|
|
|
};
|
|
|
export const userBoundRoles = userId => {
|
|
|
- return $get("/api/sys/role/get_user_roles", { userId });
|
|
|
+ return $postParam("/api/admin/sys/role/get_user_roles", { userId });
|
|
|
};
|
|
|
// menu-manage
|
|
|
export const menuList = datas => {
|
|
|
- return $get("/api/sys/privilege/list", datas);
|
|
|
+ return $postParam("/api/admin/sys/privilege/list", datas);
|
|
|
};
|
|
|
export const updateMenu = datas => {
|
|
|
- return $post("/api/sys/privilege/save", datas);
|
|
|
+ return $post("/api/admin/sys/privilege/save", datas);
|
|
|
};
|
|
|
export const deleteMenu = id => {
|
|
|
- return $post("/api/sys/privilege/remove", { id });
|
|
|
+ return $post("/api/admin/sys/privilege/remove", { id });
|
|
|
};
|
|
|
export const roleBoundPrivileges = roleId => {
|
|
|
- return $get("/api/sys/privilege/get_role_privileges", { roleId });
|
|
|
+ return $postParam("/api/admin/sys/privilege/get_role_privileges", { roleId });
|
|
|
};
|
|
|
// organization-manage
|
|
|
export const organizationList = datas => {
|
|
|
- return $get("/api/sys/org/list", datas);
|
|
|
+ return $postParam("/api/admin/sys/org/list", datas);
|
|
|
};
|
|
|
export const updateOrganization = datas => {
|
|
|
- return $post("/api/sys/org/save", datas);
|
|
|
+ return $post("/api/admin/sys/org/save", datas);
|
|
|
};
|
|
|
export const ableOrganization = ({ id, enable }) => {
|
|
|
- return $post("/api/sys/org/enable", { id, enable });
|
|
|
+ return $post("/api/admin/sys/org/enable", { id, enable });
|
|
|
};
|
|
|
export const deleteOrganization = id => {
|
|
|
- return $post("/api/sys/org/remove", { id });
|
|
|
+ return $post("/api/admin/sys/org/remove", { id });
|
|
|
};
|
|
|
|
|
|
// --------------------------------->
|
|
|
// common-rule
|
|
|
export const commonRuleDetail = schoolId => {
|
|
|
- return $get("/api/basic/exam_rule/list", { schoolId });
|
|
|
+ return $postParam("/api/admin/basic/exam_rule/list", { schoolId });
|
|
|
};
|
|
|
export const saveCommonBusinessRule = datas => {
|
|
|
- return $post("/api/basic/exam_rule/save", datas);
|
|
|
+ return $post("/api/admin/basic/exam_rule/save", datas);
|
|
|
};
|
|
|
// card-rule
|
|
|
export const cardRuleListPage = datas => {
|
|
|
- return $get("/api/basic/card_rule/list", datas);
|
|
|
+ return $postParam("/api/admin/basic/card_rule/list", datas);
|
|
|
};
|
|
|
export const cardRuleQuery = param => {
|
|
|
- return $get("/api/basic/card_rule/query", { param });
|
|
|
+ return $postParam("/api/admin/basic/card_rule/query", { param });
|
|
|
};
|
|
|
export const cardRuleDetail = id => {
|
|
|
- return $get("/api/basic/card_rule/get_one", { id });
|
|
|
+ return $postParam("/api/admin/basic/card_rule/get_one", { id });
|
|
|
};
|
|
|
export const saveCardRule = datas => {
|
|
|
- return $post("/api/basic/card_rule/save", datas);
|
|
|
+ return $post("/api/admin/basic/card_rule/save", datas);
|
|
|
};
|
|
|
export const ableCardRule = ({ id, enable }) => {
|
|
|
- return $post("/api/basic/card_rule/enable", { id, enable });
|
|
|
+ return $post("/api/admin/basic/card_rule/enable", { id, enable });
|
|
|
};
|
|
|
// common-card-template / common-print-template / param-print-template
|
|
|
export const templateListPage = datas => {
|
|
|
- return $get("/api/basic/template/list", datas);
|
|
|
+ return $postParam("/api/admin/basic/template/list", datas);
|
|
|
};
|
|
|
export const updateTemplate = datas => {
|
|
|
- return $post("/api/basic/template/save", datas);
|
|
|
+ return $post("/api/admin/basic/template/save", datas);
|
|
|
};
|
|
|
export const ableTemplate = ({ id, enable }) => {
|
|
|
- return $post("/api/basic/template/enable", { id, enable });
|
|
|
+ return $post("/api/admin/basic/template/enable", { id, enable });
|
|
|
};
|
|
|
export const templateCategoryList = type => {
|
|
|
- return $get("/api/basic/template/list", type);
|
|
|
+ return $postParam("/api/admin/basic/template/list", type);
|
|
|
};
|
|
|
// course-manage
|
|
|
export const courseListPage = datas => {
|
|
|
- return $get("/api/basic/course/list", datas);
|
|
|
+ return $postParam("/api/admin/basic/course/list", datas);
|
|
|
};
|
|
|
export const courseQuery = param => {
|
|
|
- return $get("/api/basic/course/query", { param });
|
|
|
+ return $postParam("/api/admin/basic/course/query", { param });
|
|
|
};
|
|
|
export const courseList = datas => {
|
|
|
- return $get("/api/basic/course/list", datas);
|
|
|
+ return $postParam("/api/admin/basic/course/list", datas);
|
|
|
};
|
|
|
export const deleteCourse = id => {
|
|
|
- return $post("/api/basic/course/remove", { id });
|
|
|
+ return $post("/api/admin/basic/course/remove", { id });
|
|
|
};
|
|
|
export const updateCourse = datas => {
|
|
|
- return $post("/api/basic/course/save", datas);
|
|
|
+ return $post("/api/admin/basic/course/save", datas);
|
|
|
};
|
|
|
|
|
|
// common
|
|
|
export const uploadFile = datas => {
|
|
|
- return $post("/api/common/file/upload", datas);
|
|
|
+ return $post("/api/admin/common/file/upload", datas);
|
|
|
};
|
|
|
|
|
|
// system
|