mirror of https://github.com/halo-dev/halo-admin
Refactor codes.
parent
a4a7d54e7c
commit
4d5d5a5926
|
@ -26,7 +26,10 @@
|
|||
:sm="24"
|
||||
>
|
||||
<a-form-item label="存储位置">
|
||||
<a-select v-model="queryParam.attachmentType">
|
||||
<a-select
|
||||
v-model="queryParam.attachmentType"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="item in Object.keys(attachmentType)"
|
||||
:key="item"
|
||||
|
@ -40,7 +43,10 @@
|
|||
:sm="24"
|
||||
>
|
||||
<a-form-item label="文件类型">
|
||||
<a-select v-model="queryParam.mediaType">
|
||||
<a-select
|
||||
v-model="queryParam.mediaType"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="(item,index) in mediaTypes"
|
||||
:key="index"
|
||||
|
|
|
@ -74,13 +74,15 @@
|
|||
>
|
||||
<analysis-card
|
||||
:loading="countsLoading"
|
||||
title="成立天数"
|
||||
title="建立天数"
|
||||
:number="countsData.establishDays"
|
||||
>
|
||||
<a-tooltip
|
||||
:title="'已成立'+countsData.establishDays+'天了'"
|
||||
slot="action"
|
||||
>
|
||||
<template slot="title">
|
||||
博客建立于 {{ countsData.birthday | moment }}
|
||||
</template>
|
||||
<a href="javascript:void(0);">
|
||||
<a-icon type="info-circle-o" /></a>
|
||||
</a-tooltip>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<a-input v-model="options.blog_url" />
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="LOGO:"
|
||||
label="Logo:"
|
||||
:wrapper-col="wrapperCol"
|
||||
>
|
||||
<a-input v-model="options.blog_logo">
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
:md="24"
|
||||
:style="{ 'padding-bottom': '12px' }"
|
||||
>
|
||||
<a-card
|
||||
:bordered="false"
|
||||
>
|
||||
<a-card :bordered="false">
|
||||
<div class="profile-center-avatarHolder">
|
||||
<a-tooltip
|
||||
placement="right"
|
||||
|
@ -30,19 +28,16 @@
|
|||
</div>
|
||||
<div class="profile-center-detail">
|
||||
<p>
|
||||
<a-icon type="link" />
|
||||
<a
|
||||
href="http://localhost:8090"
|
||||
<a-icon type="link" /><a
|
||||
:href="options.blog_url"
|
||||
target="method"
|
||||
>http://localhost:8090</a>
|
||||
>{{ options.blog_url }}</a>
|
||||
</p>
|
||||
<p>
|
||||
<a-icon type="mail" />
|
||||
{{ user.email }}
|
||||
<a-icon type="mail" />{{ user.email }}
|
||||
</p>
|
||||
<p>
|
||||
<a-icon type="calendar" />
|
||||
{{ counts.establishDays || 0 }} 天
|
||||
<a-icon type="calendar" />{{ counts.establishDays || 0 }} 天
|
||||
</p>
|
||||
</div>
|
||||
<a-divider />
|
||||
|
@ -152,6 +147,7 @@
|
|||
import AttachmentSelectDrawer from '../attachment/components/AttachmentSelectDrawer'
|
||||
import userApi from '@/api/user'
|
||||
import adminApi from '@/api/admin'
|
||||
import optionApi from '@/api/option'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -168,7 +164,9 @@ export default {
|
|||
newPassword: null,
|
||||
confirmPassword: null
|
||||
},
|
||||
attachment: {}
|
||||
attachment: {},
|
||||
options: [],
|
||||
keys: 'blog_url'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -179,6 +177,7 @@ export default {
|
|||
created() {
|
||||
this.loadUser()
|
||||
this.getCounts()
|
||||
this.loadOptions()
|
||||
},
|
||||
methods: {
|
||||
handleShowAttachDrawer() {
|
||||
|
@ -190,6 +189,11 @@ export default {
|
|||
this.profileLoading = false
|
||||
})
|
||||
},
|
||||
loadOptions() {
|
||||
optionApi.listByKeys(this.keys).then(response => {
|
||||
this.options = response.data.data
|
||||
})
|
||||
},
|
||||
getCounts() {
|
||||
adminApi.counts().then(response => {
|
||||
this.counts = response.data.data
|
||||
|
|
Loading…
Reference in New Issue