diff --git a/src/api/link.js b/src/api/link.js new file mode 100644 index 00000000..73774984 --- /dev/null +++ b/src/api/link.js @@ -0,0 +1,29 @@ +import service from '@/utils/service' + +const baseUrl = '/admin/api/links' + +const linkApi = {} + +linkApi.listAll = () => { + return service({ + url: `${baseUrl}`, + method: 'get' + }) +} + +linkApi.create = (link) => { + return service({ + url: baseUrl, + data: link, + method: 'post' + }) +} + +linkApi.delete = linkId => { + return service({ + url: `${baseUrl}/${linkId}`, + method: 'delete' + }) +} + +export default linkApi diff --git a/src/components/SettingDrawer/SettingDrawer.vue b/src/components/SettingDrawer/SettingDrawer.vue index c23fdc9e..331e1186 100644 --- a/src/components/SettingDrawer/SettingDrawer.vue +++ b/src/components/SettingDrawer/SettingDrawer.vue @@ -2,13 +2,9 @@