mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-13 06:03:50 +08:00
smart-admin-h5
This commit is contained in:
22
smart-admin-h5/src/api/crm-school.js
Normal file
22
smart-admin-h5/src/api/crm-school.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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}`);
|
||||
}
|
||||
};
|
||||
43
smart-admin-h5/src/api/employee.js
Normal file
43
smart-admin-h5/src/api/employee.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import { postAxios, getAxios } from '@/lib/http';
|
||||
export const employeeApi = {
|
||||
// 员工管理查询
|
||||
getEmployeeList: (data) => {
|
||||
return postAxios('/employee/query', data);
|
||||
},
|
||||
// 添加员工
|
||||
addEmployee: (data) => {
|
||||
return postAxios('/employee/add', data);
|
||||
},
|
||||
// 更新员工信息
|
||||
updateEmployee: (data) => {
|
||||
return postAxios('/employee/update', data);
|
||||
},
|
||||
// 禁用启用单个员工
|
||||
updateStatus: (employeeId, status) => {
|
||||
return getAxios('/employee/updateStatus/' + employeeId + '/' + status);
|
||||
},
|
||||
// 批量禁用
|
||||
updateStatusBatch: (data) => {
|
||||
return postAxios('/employee/batchUpdateStatus', data);
|
||||
},
|
||||
// 单个员工角色授权
|
||||
updateRoles: (data) => {
|
||||
return postAxios('/employee/updateRoles', data);
|
||||
},
|
||||
// 修改密码
|
||||
updatePwd: (data) => {
|
||||
return postAxios('/employee/updatePwd', data);
|
||||
},
|
||||
// 重置密码
|
||||
resetPassword: (employeeId) => {
|
||||
return getAxios('/employee/resetPasswd/' + employeeId);
|
||||
},
|
||||
// 通过部门id获取当前部门的人员&没有部门的人
|
||||
getListEmployeeByDeptId: (departmentId) => {
|
||||
return getAxios('/employee/listEmployeeByDeptId/' + departmentId);
|
||||
},
|
||||
// 删除员工
|
||||
deleteEmployee: (employeeId) => {
|
||||
return postAxios('/employee/delete/' + employeeId);
|
||||
}
|
||||
};
|
||||
14
smart-admin-h5/src/api/file.js
Normal file
14
smart-admin-h5/src/api/file.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { postAxios, getAxios } from '@/lib/http';
|
||||
import config from '@/config';
|
||||
import Cookies from '@/lib/cookie';
|
||||
const baseUrl = config.baseUrl.apiUrl;
|
||||
|
||||
export const fileApi = {
|
||||
// 文件上传
|
||||
fileUpload: (folder, data) => {
|
||||
const url = baseUrl + '/common/file/upload/' + folder + '?x-access-token=' + Cookies.getToken();
|
||||
return postAxios(url, data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
});
|
||||
}
|
||||
};
|
||||
13
smart-admin-h5/src/api/login.js
Normal file
13
smart-admin-h5/src/api/login.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { getAxios, postAxios } from '@/lib/http';
|
||||
|
||||
export const loginApi = {
|
||||
getVerificationCode: () => {
|
||||
return getAxios('/verificationCode');
|
||||
},
|
||||
login: (data) => {
|
||||
return postAxios('/login', data);
|
||||
},
|
||||
logout: (token) => {
|
||||
return getAxios(`/logout?x-access-token=${token}`);
|
||||
}
|
||||
};
|
||||
31
smart-admin-h5/src/api/system-config.js
Normal file
31
smart-admin-h5/src/api/system-config.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// 系统参数API
|
||||
import {
|
||||
postAxios,
|
||||
getAxios
|
||||
} from '@/lib/http';
|
||||
export const systemConfigApi = {
|
||||
// 查询系统参数列表
|
||||
getSystemConfigList: (data) => {
|
||||
return postAxios('/admin/systemConfig/getListPage', data);
|
||||
},
|
||||
// 添加系统参数
|
||||
addSystemConfig: (data) => {
|
||||
return postAxios('/admin/systemConfig/add', data);
|
||||
},
|
||||
// 更新单条系统参数
|
||||
updateSystemConfig: (data) => {
|
||||
return postAxios('/admin/systemConfig/update', data);
|
||||
},
|
||||
// 通过key获取对应的信息
|
||||
getConfigListByKey: (key) => {
|
||||
return getAxios(`/admin/systemConfig/selectByKey?configKey=${key}`);
|
||||
},
|
||||
// 根据分组查询所有系统配置
|
||||
getListByGroup: (group) => {
|
||||
return getAxios(`/admin/systemConfig/getListByGroup?group=${group}`);
|
||||
},
|
||||
// 获取系统版本信息
|
||||
getCodeVersion: () => {
|
||||
return getAxios('/admin/codeVersion');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user