wang-hao-jie
2022-06-06 4e837c1e8c6f8a7252fb95776a1530ab737bb684
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, postBodyRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';
 
// 获取一级数据
export const init${apiName} = (params) => {
    return getRequest('/${vueName}/getByParentId/0', params)
}
// 加载子级数据
export const load${apiName} = (id, params) => {
    return getRequest('/${vueName}/getByParentId/' + id, params)
}
// 添加
export const add${apiName} = (params) => {
    return postRequest('/${vueName}/add', params)
}
// 编辑
export const edit${apiName} = (params) => {
    return postRequest('/${vueName}/edit', params)
}
// 删除
export const delete${apiName} = (params) => {
    return postRequest('/${vueName}/delByIds', params)
}
// 搜索
export const search${apiName} = (params) => {
    return getRequest('/${vueName}/search', params)
}