1
This commit is contained in:
31
demo/src/api/system/tableServer.js
Normal file
31
demo/src/api/system/tableServer.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import http from '@/libs/http'
|
||||
class TableServer {
|
||||
async getAll(callback) {
|
||||
return await http.get('/table/index', {})
|
||||
}
|
||||
|
||||
async add(row, callback) {
|
||||
return await http.post('/table/add', row)
|
||||
}
|
||||
|
||||
async edit(row, callback) {
|
||||
return await http.post('/table/edit', row, function(res) {
|
||||
callback && callback(res)
|
||||
})
|
||||
}
|
||||
|
||||
async del(row, callback) {
|
||||
return await http.post('/table/del', row)
|
||||
}
|
||||
|
||||
async autoApi(id) {
|
||||
return await http.get('/template/api', { id: id })
|
||||
}
|
||||
|
||||
async autoDb(id) {
|
||||
return await http.get('/template/autoDb', { id: id })
|
||||
}
|
||||
}
|
||||
|
||||
const tableServer = new TableServer()
|
||||
export default tableServer
|
||||
Reference in New Issue
Block a user