Files
admin_core/src/api/system/tableServer.js
张成 6be5f7ed4f 1
2025-10-09 18:21:05 +08:00

32 lines
768 B
JavaScript

import http from '@/utils/http'
class TableServer {
async getAll(callback) {
return await window.framework.http.get('/table/index', {})
}
async add(row, callback) {
return await window.framework.http.post('/table/add', row)
}
async edit(row, callback) {
return await window.framework.http.post('/table/edit', row, function(res) {
callback && callback(res)
})
}
async del(row, callback) {
return await window.framework.http.post('/table/del', row)
}
async autoApi(id) {
return await window.framework.http.get('/template/api', { id: id })
}
async autoDb(id) {
return await window.framework.http.get('/template/autoDb', { id: id })
}
}
const tableServer = new TableServer()
export default tableServer