mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-13 06:03:50 +08:00
优化h5项目
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { getAxios, postAxios } from '@/lib/http';
|
||||
|
||||
export const crmSchoolApi = {
|
||||
|
||||
// 分校列表 - 分校 by yandanyang
|
||||
querySchoolList: (data) => {
|
||||
return postAxios('/admin/crm/school/list', data);
|
||||
},
|
||||
// 分校跟进详列表 - 分校 by yandanyang
|
||||
querySchoolTrackList: data => {
|
||||
return postAxios('/admin/crm/school/track/list', data);
|
||||
},
|
||||
|
||||
// 分校跟进 - 分校 by yandanyang
|
||||
addSchoolTrack: data => {
|
||||
return postAxios('/admin/crm/school/track/add', data);
|
||||
},
|
||||
// 分校跟进 - 分校 by yandanyang
|
||||
getSchoolTrackDetail: schoolTrackId => {
|
||||
return getAxios(`/admin/crm/school/track/detail/${schoolTrackId}`);
|
||||
}
|
||||
};
|
||||
@@ -2,42 +2,42 @@ import { postAxios, getAxios } from '@/lib/http';
|
||||
export const employeeApi = {
|
||||
// 员工管理查询
|
||||
getEmployeeList: (data) => {
|
||||
return postAxios('/employee/query', data);
|
||||
return postAxios('admin/employee/query', data);
|
||||
},
|
||||
// 添加员工
|
||||
addEmployee: (data) => {
|
||||
return postAxios('/employee/add', data);
|
||||
return postAxios('admin/employee/add', data);
|
||||
},
|
||||
// 更新员工信息
|
||||
updateEmployee: (data) => {
|
||||
return postAxios('/employee/update', data);
|
||||
return postAxios('admin/employee/update', data);
|
||||
},
|
||||
// 禁用启用单个员工
|
||||
updateStatus: (employeeId, status) => {
|
||||
return getAxios('/employee/updateStatus/' + employeeId + '/' + status);
|
||||
return getAxios('admin/employee/updateStatus/' + employeeId + '/' + status);
|
||||
},
|
||||
// 批量禁用
|
||||
updateStatusBatch: (data) => {
|
||||
return postAxios('/employee/batchUpdateStatus', data);
|
||||
return postAxios('admin/employee/batchUpdateStatus', data);
|
||||
},
|
||||
// 单个员工角色授权
|
||||
updateRoles: (data) => {
|
||||
return postAxios('/employee/updateRoles', data);
|
||||
return postAxios('admin/employee/updateRoles', data);
|
||||
},
|
||||
// 修改密码
|
||||
updatePwd: (data) => {
|
||||
return postAxios('/employee/updatePwd', data);
|
||||
return postAxios('admin/employee/updatePwd', data);
|
||||
},
|
||||
// 重置密码
|
||||
resetPassword: (employeeId) => {
|
||||
return getAxios('/employee/resetPasswd/' + employeeId);
|
||||
return getAxios('admin/employee/resetPasswd/' + employeeId);
|
||||
},
|
||||
// 通过部门id获取当前部门的人员&没有部门的人
|
||||
getListEmployeeByDeptId: (departmentId) => {
|
||||
return getAxios('/employee/listEmployeeByDeptId/' + departmentId);
|
||||
return getAxios('admin/employee/listEmployeeByDeptId/' + departmentId);
|
||||
},
|
||||
// 删除员工
|
||||
deleteEmployee: (employeeId) => {
|
||||
return postAxios('/employee/delete/' + employeeId);
|
||||
return postAxios('admin/employee/delete/' + employeeId);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { getAxios, postAxios } from '@/lib/http';
|
||||
|
||||
export const loginApi = {
|
||||
getVerificationCode: () => {
|
||||
return getAxios('/verificationCode');
|
||||
},
|
||||
login: (data) => {
|
||||
return postAxios('/login', data);
|
||||
return postAxios('/session/login', data);
|
||||
},
|
||||
logout: (token) => {
|
||||
return getAxios(`/logout?x-access-token=${token}`);
|
||||
return getAxios(`/session/logOut?x-access-token=${token}`);
|
||||
}
|
||||
};
|
||||
|
||||
7
smart-admin-h5/src/api/user.js
Normal file
7
smart-admin-h5/src/api/user.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { getAxios } from '@/lib/http';
|
||||
|
||||
export const userApi = {
|
||||
getSession: () => {
|
||||
return getAxios('/session/get');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user