ruoyi/target/classes/vm/js/api.js.vm

45 lines
910 B
Plaintext
Raw Normal View History

2024-04-22 08:45:46 +08:00
import request from '@/utils/request'
// 查询${functionName}列表
export function list${BusinessName}() {
return request({
url: '/${moduleName}/list',
method: 'get',
})
}
// 查询${functionName}详细
export function get${BusinessName}(${pkColumn.javaField}) {
return request({
url: '/${moduleName}/id=' + ${pkColumn.javaField},
method: 'get'
})
}
// 新增${functionName}
export function add${BusinessName}(data) {
return request({
url: '/${moduleName}/add',
method: 'post',
data: data
})
}
// 修改${functionName}
export function update${BusinessName}(data) {
return request({
url: '/${moduleName}/edit',
method: 'post',
data: data
})
}
// 删除${functionName}
export function del${BusinessName}(${pkColumn.javaField}) {
return request({
url: '/${moduleName}/remove/',
method: 'post',
params: {id:${pkColumn.javaField}}
})
}