1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import request from '@/config/axios'
- // 查询{[.FunctionName]}列表
- export const get{[.ClassNameUpper]}Page = async (params: PageParam) => {
- return await request.get({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}/page', params })
- }
- export const get{[.ClassNameUpper]}List = async (params: PageParam) => {
- return await request.get({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}/list', params })
- }
- // 查询{[.FunctionName]}详情
- export const get{[.ClassNameUpper]} = async (id: number) => {
- const params={id:id}
- return await request.get({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}',params })
- }
- // 新增{[.FunctionName]}
- export const create{[.ClassNameUpper]} = async (data: any) => {
- return await request.post({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}', data })
- }
- // 修改{[.FunctionName]}
- export const update{[.ClassNameUpper]} = async (data: any) => {
- return await request.put({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}', data })
- }
- // 修改{[.FunctionName]}状态
- export const update{[.ClassNameUpper]}Status = async (data: any) => {
- return await request.put({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}/updateStatus', data })
- }
- // 删除{[.FunctionName]}
- export const delete{[.ClassNameUpper]} = async (ids: any) => {
- const data={ids:ids}
- return await request.delete({ url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}', data })
- }
- // 导出{[.FunctionName]}
- export const export{[.ClassNameUpper]} = (params) => {
- return request.download({
- url: '/{[toLower .ModuleName]}/{[toLower .ClassNameLower]}/excel',
- params
- })
- }
|