Files
snowy/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/Api.js.btl

45 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { baseRequest } from '@/utils/request'
const request = (url, ...arg) => baseRequest(`/${moduleName}/${busName}/` + url, ...arg)
/**
* ${functionName}Api接口管理器
*
* @author ${authorName}
* @date ${genTime}
**/
export default {
// 获取${functionName}分页
${classNameFirstLower}Page(data) {
return request('page', data, 'get')
},
// 提交${functionName}表单 edit为true时为编辑默认为新增
${classNameFirstLower}SubmitForm(data, edit = false) {
return request(edit ? 'edit' : 'add', data)
},
// 删除${functionName}
${classNameFirstLower}Delete(data) {
return request('delete', data)
},
// 获取${functionName}详情
${classNameFirstLower}Detail(data) {
return request('detail', data, 'get')
},
// 下载${functionName}导入模板
${classNameFirstLower}DownloadTemplate(data) {
return request('downloadImportTemplate', data, 'get', {
responseType: 'blob'
})
},
// 导入${functionName}
${classNameFirstLower}Import(data) {
return request('importData', data)
},
// 导出${functionName}
${classNameFirstLower}Export(data) {
return request('exportData', data, 'post', {
responseType: 'blob'
})
}
}