Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
refactor: options page. (#89)
Browse files Browse the repository at this point in the history
* refactor: options page.

* fix: option api.
  • Loading branch information
ruibaby authored Mar 7, 2020
1 parent 36e6e50 commit 588a45e
Show file tree
Hide file tree
Showing 16 changed files with 1,680 additions and 1,260 deletions.
13 changes: 9 additions & 4 deletions src/api/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ const baseUrl = '/api/admin/options'

const optionApi = {}

optionApi.listAll = keys => {
optionApi.listAll = () => {
return service({
url: `${baseUrl}/map_view`,
params: {
key: keys
},
method: 'get'
})
}

optionApi.listAllByKeys = keys => {
return service({
url: `${baseUrl}/map_view/keys`,
data: keys,
method: 'post'
})
}

optionApi.query = params => {
return service({
url: `${baseUrl}/list_view`,
Expand Down
4 changes: 2 additions & 2 deletions src/config/router.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ export const asyncRouterMap = [
},
{
path: '/system/options',
name: 'OptionForm',
component: () => import('@/views/system/OptionForm'),
name: 'SystemOptions',
component: () => import('@/views/system/SystemOptions'),
meta: { title: '博客设置', hiddenHeaderContent: false }
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/option.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const option = {
}) {
return new Promise((resolve, reject) => {
optionApi
.listAll(keys)
.listAllByKeys(keys)
.then(response => {
commit('SET_OPTIONS', response.data.data)
resolve(response)
Expand Down
2 changes: 1 addition & 1 deletion src/views/post/TagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</template>
<a-tag
color="blue"
style="margin-bottom: 8px"
style="margin-bottom: 8px;cursor:pointer;"
@click="handleEditTag(tag)"
>{{ tag.name }}</a-tag>
</a-tooltip>
Expand Down
Loading

0 comments on commit 588a45e

Please sign in to comment.