Add tag api

pull/9/head
johnniang 2019-03-21 11:16:00 +08:00
parent ce70dcd199
commit cccfe19ac7
1 changed files with 28 additions and 0 deletions

28
src/api/tag.js Normal file
View File

@ -0,0 +1,28 @@
import service from '@/utils/service'
const baseUrl = '/admin/api/tags'
const tagApi = {}
tagApi.listAll = () => {
return service({
url: baseUrl,
method: 'get'
})
}
tagApi.listAllAddition = () => {
return service({
url: `${baseUrl}/addition`,
method: 'get'
})
}
tagApi.create = tag => {
return service({
url: `${baseUrl}`,
method: 'post'
})
}
export default tagApi