From 3140152ee1f84803942023a76bd5287e640c1930 Mon Sep 17 00:00:00 2001 From: ruibaby Date: Fri, 5 Apr 2019 20:13:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/theme.js | 14 +++ src/views/interface/ThemeList.vue | 140 +++++++++++++++++------------- src/views/post/PostEdit.vue | 2 +- 3 files changed, 96 insertions(+), 60 deletions(-) diff --git a/src/api/theme.js b/src/api/theme.js index 7581fdae..35dfd2bc 100644 --- a/src/api/theme.js +++ b/src/api/theme.js @@ -4,6 +4,13 @@ const baseUrl = '/admin/api/themes' const themeApi = {} +themeApi.listAll = () => { + return service({ + url: `${baseUrl}`, + method: 'get' + }) +} + themeApi.listFiles = () => { return service({ url: `${baseUrl}/files`, @@ -18,4 +25,11 @@ themeApi.customTpls = () => { }) } +themeApi.active = theme => { + return service({ + url: `${baseUrl}/active?theme=${theme}`, + method: 'get' + }) +} + export default themeApi diff --git a/src/views/interface/ThemeList.vue b/src/views/interface/ThemeList.vue index f7fa30a8..673345bf 100644 --- a/src/views/interface/ThemeList.vue +++ b/src/views/interface/ThemeList.vue @@ -1,73 +1,95 @@ diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index ad4486e9..4153a7c1 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -15,7 +15,7 @@
- +