新增readme
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import request from './request'
|
||||
import { DEPARTMENT_LIST } from '../constants/departments'
|
||||
|
||||
// 获取员工列表
|
||||
export const getEmployeeList = (params, config) => {
|
||||
@@ -29,3 +30,15 @@ export const updateEmployee = (id, data) => {
|
||||
export const deleteEmployeeAPI = (id) => {
|
||||
return request.delete(`/employees/${id}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门列表
|
||||
*
|
||||
* 当前返回本地常量(与后端数据库一致)。
|
||||
* 当后端部署了 GET /api/departments 接口后,将下方注释替换为:
|
||||
*
|
||||
* export const getDepartmentList = () => request.get('/departments')
|
||||
*/
|
||||
export const getDepartmentList = () => {
|
||||
return Promise.resolve({ code: 0, message: 'ok', data: DEPARTMENT_LIST })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user