You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
import request from "@/api/request"
|
|
|
|
|
import BASE from './baseUrl'
|
|
|
|
|
|
|
|
|
|
export const baseUrl = `${BASE}/resource`
|
|
|
|
|
|
|
|
|
|
export function getAll() {
|
|
|
|
|
return request.get(`${baseUrl}/getAll`).then(({data}) => data.data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function add(data) {
|
|
|
|
|
return request.post(`${baseUrl}/add`, data).then(({data}) => data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function update(data) {
|
|
|
|
|
return request.post(`${baseUrl}/update`, data).then(({data}) => data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function del(id) {
|
|
|
|
|
return request.get(`${baseUrl}/del?id=${id}`).then(({data}) => data)
|
|
|
|
|
}
|