From d95ed4e6b4067535cd6a90243732500214351c52 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Thu, 11 Apr 2019 22:40:24 +0800 Subject: [PATCH] Link page. --- src/api/link.js | 29 +++++ .../SettingDrawer/SettingDrawer.vue | 12 +- src/views/interface/MenuList.vue | 6 +- src/views/page/PageList.vue | 62 ++++++++- src/views/page/internal/LinkList.vue | 123 +++++++++++++++++- src/views/post/CategoryList.vue | 6 +- src/views/post/TagList.vue | 4 +- 7 files changed, 217 insertions(+), 25 deletions(-) create mode 100644 src/api/link.js 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 @@
@@ -168,17 +164,13 @@ export default { mixins: [mixin, mixinDevice], data() { return { - visible: true, + visible: false, colorList, baseConfig: Object.assign({}, config) } }, watch: {}, mounted() { - const vm = this - setTimeout(() => { - vm.visible = false - }, 16) // 当主题色不是默认色时,才进行主题编译 if (this.primaryColor !== config.primaryColor) { updateTheme(this.primaryColor) diff --git a/src/views/interface/MenuList.vue b/src/views/interface/MenuList.vue index 64486fec..dbc924a0 100644 --- a/src/views/interface/MenuList.vue +++ b/src/views/interface/MenuList.vue @@ -10,10 +10,10 @@ :style="{ 'padding-bottom': '12px' }"> - + - + @@ -24,7 +24,7 @@ - + diff --git a/src/views/page/PageList.vue b/src/views/page/PageList.vue index 0a84365b..7ed46f65 100644 --- a/src/views/page/PageList.vue +++ b/src/views/page/PageList.vue @@ -5,11 +5,20 @@
- 内置页面 - - - 自定义页面 + + + 查看 + + + 编辑 + + + 编辑 + + + + 自定义页面
@@ -18,7 +27,50 @@