mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2026-03-17 12:54:36 +08:00
v3.23.0 【新增】TS代码生成和优化;【优化】log日志格式;【优化】数据字典缓存;【优化】职位表结构
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* ${basic.description} api 封装
|
||||
*
|
||||
* @Author: ${basic.frontAuthor}
|
||||
* @Date: ${basic.frontDate}
|
||||
* @Copyright ${basic.copyright}
|
||||
*/
|
||||
import { postRequest, getRequest } from '/@/lib/axios';
|
||||
|
||||
export const ${name.lowerCamel}Api = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author ${basic.frontAuthor}
|
||||
*/
|
||||
queryPage : (param) => {
|
||||
return postRequest('/${name.lowerCamel}/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author ${basic.frontAuthor}
|
||||
*/
|
||||
add: (param) => {
|
||||
return postRequest('/${name.lowerCamel}/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author ${basic.frontAuthor}
|
||||
*/
|
||||
update: (param) => {
|
||||
return postRequest('/${name.lowerCamel}/update', param);
|
||||
},
|
||||
## ------------------ 详情 ------------------
|
||||
|
||||
#if($deleteInfo.isSupportDetail)
|
||||
/**
|
||||
* 获取详情 @author ${basic.frontAuthor}
|
||||
*/
|
||||
getDetail: (id) => {
|
||||
return getRequest(`/${name.lowerCamel}/getDetail/\${id}`);
|
||||
},
|
||||
#end
|
||||
|
||||
## ------------------ 删除 ------------------
|
||||
#if($deleteInfo.isSupportDelete)
|
||||
#if($deleteInfo.deleteEnum == 'Single')
|
||||
/**
|
||||
* 删除 @author ${basic.frontAuthor}
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/${name.lowerCamel}/delete/${id}`);
|
||||
},
|
||||
#end
|
||||
#if($deleteInfo.deleteEnum == 'Batch')
|
||||
/**
|
||||
* 批量删除 @author ${basic.frontAuthor}
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/${name.lowerCamel}/batchDelete', idList);
|
||||
},
|
||||
#end
|
||||
#if($deleteInfo.deleteEnum == 'SingleAndBatch')
|
||||
/**
|
||||
* 删除 @author ${basic.frontAuthor}
|
||||
*/
|
||||
delete: (id) => {
|
||||
return getRequest(`/${name.lowerCamel}/delete/${id}`);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author ${basic.frontAuthor}
|
||||
*/
|
||||
batchDelete: (idList) => {
|
||||
return postRequest('/${name.lowerCamel}/batchDelete', idList);
|
||||
},
|
||||
#end
|
||||
#end
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user