修复设置页面的问题

pull/9/head
ruibaby 2019-04-01 11:12:15 +08:00
parent 359eb1bb84
commit 02dca838a7
5 changed files with 141 additions and 149 deletions

View File

@ -19,7 +19,11 @@
<a-input v-model="options.blog_favicon"/>
</a-form-item>
<a-form-item label="页脚信息:" :wrapper-col="wrapperCol">
<a-input type="textarea" :autosize="{ minRows: 5 }" v-model="options.blog_footer_info"/>
<a-input
type="textarea"
:autosize="{ minRows: 5 }"
v-model="options.blog_footer_info"
/>
</a-form-item>
<a-form-item>
<a-button type="primary" @click="saveOptions"></a-button>
@ -76,77 +80,63 @@
<a-form layout="vertical">
<a-form-item label="评论者头像:" :wrapper-col="wrapperCol">
<a-select defaultValue="mm" v-model="options.comment_gavatar_type">
<a-select-option value="mm">
默认
</a-select-option>
<a-select-option value="identicon">
抽象几何图形
</a-select-option>
<a-select-option value="monsterid">
小怪物
</a-select-option>
<a-select-option value="wavatar">
Wavatar
</a-select-option>
<a-select-option value="retro">
复古
</a-select-option>
<a-select-option value="robohash">
机器人
</a-select-option>
<a-select-option value="blank">
不显示头像
</a-select-option>
<a-select-option value="mm">默认</a-select-option>
<a-select-option value="identicon">抽象几何图形</a-select-option>
<a-select-option value="monsterid">小怪物</a-select-option>
<a-select-option value="wavatar">Wavatar</a-select-option>
<a-select-option value="retro">复古</a-select-option>
<a-select-option value="robohash">机器人</a-select-option>
<a-select-option value="blank">不显示头像</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="评论审核后才显示:" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="true" v-model="options.new_comment_need_check">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="true"
v-model="options.new_comment_need_check"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="新评论通知:" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="true" v-model="options.new_comment_notice">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="true"
v-model="options.new_comment_notice"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="评论审核通过通知对方:" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="false" v-model="options.comment_pass_notice">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="false"
v-model="options.comment_pass_notice"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="评论回复通知对方:" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="false" v-model="options.comment_reply_notice">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="false"
v-model="options.comment_reply_notice"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="API 评论开关:" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="false" v-model="options.comment_api_switch">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="false"
v-model="options.comment_api_switch"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="每页显示条数: " :wrapper-col="wrapperCol">
@ -156,7 +146,11 @@
<a-input v-model="options.native_comment_placeholder"/>
</a-form-item>
<a-form-item label="自定义样式:" :wrapper-col="wrapperCol">
<a-input type="textarea" :autosize="{ minRows: 5 }" v-model="options.comment_custom_style"/>
<a-input
type="textarea"
:autosize="{ minRows: 5 }"
v-model="options.comment_custom_style"
/>
</a-form-item>
<a-form-item>
<a-button type="primary" @click="saveOptions"></a-button>
@ -166,24 +160,26 @@
<a-tab-pane tab="附件设置" key="attachment">
<a-form layout="vertical">
<a-form-item label="存储位置:" :wrapper-col="wrapperCol">
<a-select defaultValue="0" @change="handleAttachChange" v-model="options.attachment_type">
<a-select-option value="0">
本地
</a-select-option>
<a-select-option value="1">
又拍云
</a-select-option>
<a-select-option value="2">
七牛云
</a-select-option>
<a-select-option value="3">
SM.MS
</a-select-option>
<a-select
defaultValue="0"
@change="handleAttachChange"
v-model="options.attachment_type"
>
<a-select-option value="0">本地</a-select-option>
<a-select-option value="1">又拍云</a-select-option>
<a-select-option value="2">七牛云</a-select-option>
<a-select-option value="3">SM.MS</a-select-option>
</a-select>
</a-form-item>
<div class="upyunForm" v-show="upyunFormHidden">
<a-form-item label="域名:" :wrapper-col="wrapperCol">
<a-tooltip
:trigger="['focus']"
placement="right"
title="需要加上 http:// 或者 https://"
>
<a-input v-model="options.upyun_oss_domain"/>
</a-tooltip>
</a-form-item>
<a-form-item label="空间名称:" :wrapper-col="wrapperCol">
<a-input v-model="options.upyun_oss_bucket"/>
@ -204,28 +200,22 @@
<div class="qiniuForm" v-show="qiniuFormHidden">
<a-form-item label="区域:" :wrapper-col="wrapperCol">
<a-select defaultValue="auto" v-model="options.qiniu_zone">
<a-select-option value="auto">
自动选择
</a-select-option>
<a-select-option value="z0">
华东
</a-select-option>
<a-select-option value="z1">
华北
</a-select-option>
<a-select-option value="z2">
华南
</a-select-option>
<a-select-option value="na0">
北美
</a-select-option>
<a-select-option value="as0">
东南亚
</a-select-option>
<a-select-option value="auto">自动选择</a-select-option>
<a-select-option value="z0">华东</a-select-option>
<a-select-option value="z1">华北</a-select-option>
<a-select-option value="z2">华南</a-select-option>
<a-select-option value="na0">北美</a-select-option>
<a-select-option value="as0">东南亚</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="域名:" :wrapper-col="wrapperCol">
<a-tooltip
:trigger="['focus']"
placement="right"
title="需要加上 http:// 或者 https://"
>
<a-input v-model="options.qiniu_domain"/>
</a-tooltip>
</a-form-item>
<a-form-item label="Access Key" :wrapper-col="wrapperCol">
<a-input v-model="options.qiniu_access_key"/>
@ -250,13 +240,13 @@
<a-tab-pane tab="发信设置" key="1">
<a-form layout="vertical">
<a-form-item label="是否启用:" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="false" v-model="options.smtp_email_enable">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="false"
v-model="options.smtp_email_enable"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="SMTP 地址:" :wrapper-col="wrapperCol">
@ -272,7 +262,9 @@
<a-input v-model="options.mail_smtp_username"/>
</a-form-item>
<a-form-item label="邮箱密码:" :wrapper-col="wrapperCol">
<a-tooltip :trigger="['focus']" placement="right" title="部分邮箱可能是授权码">
<a-input v-model="options.mail_smtp_password"/>
</a-tooltip>
</a-form-item>
<a-form-item label="发件人:" :wrapper-col="wrapperCol">
<a-input v-model="options.mail_from_name"/>
@ -303,20 +295,24 @@
<a-tab-pane tab="其他设置" key="other">
<a-form layout="vertical">
<a-form-item label="API服务" :wrapper-col="wrapperCol">
<a-radio-group v-decorator="['radio-group']" defaultValue="false" v-model="options.api_status">
<a-radio value="true">
启用
</a-radio>
<a-radio value="false">
禁用
</a-radio>
<a-radio-group
v-decorator="['radio-group']"
defaultValue="false"
v-model="options.api_status"
>
<a-radio value="true">启用</a-radio>
<a-radio value="false">禁用</a-radio>
</a-radio-group>
</a-form-item>
<a-form-item label="Api Token" :wrapper-col="wrapperCol">
<a-input v-model="options.api_token"/>
</a-form-item>
<a-form-item label="统计代码:" :wrapper-col="wrapperCol">
<a-input type="textarea" :autosize="{ minRows: 5 }" v-model="options.statistics_code"/>
<a-input
type="textarea"
:autosize="{ minRows: 5 }"
v-model="options.statistics_code"
/>
</a-form-item>
<a-form-item>
<a-button type="primary" @click="saveOptions"></a-button>
@ -361,16 +357,16 @@ export default {
},
handleAttachChange(e) {
switch (e) {
case 'LOCAL':
case 'SMMS':
case '0':
case '3':
this.upyunFormHidden = false
this.qiniuFormHidden = false
break
case 'UPYUN':
case '1':
this.upyunFormHidden = true
this.qiniuFormHidden = false
break
case 'QNYUN':
case '2':
this.qiniuFormHidden = true
this.upyunFormHidden = false
break

View File

@ -5,33 +5,29 @@
<a-card :bordered="false">
<div class="profile-center-avatarHolder">
<div class="avatar">
<img :src="user.avatar || 'https://gravatar.loli.net/avatar/?s=256&d=mm'" />
<img :src="user.avatar || 'https://gravatar.loli.net/avatar/?s=256&d=mm'">
</div>
<div class="username">{{ user.nickname }}</div>
<div class="bio">{{ user.description }}</div>
</div>
<div class="profile-center-detail">
<p><a-icon type="mail" /> {{ user.email }} </p>
<p><a-icon type="calendar" /> {{ counts.establishDays || 0 }} </p>
<p>
<a-icon type="mail"/>
{{ user.email }}
</p>
<p>
<a-icon type="calendar"/>
{{ counts.establishDays || 0 }}
</p>
</div>
<a-divider/>
<div class="general-profile">
<a-list itemLayout="horizontal" :loading="countsLoading">
<a-list-item>
累计发表了 {{ counts.postCount || 0 }} 篇文章
</a-list-item>
<a-list-item>
累计创建了 {{ counts.linkCount || 0 }} 个标签
</a-list-item>
<a-list-item>
累计获得了 {{ counts.commentCount || 0 }} 条评论
</a-list-item>
<a-list-item>
累计添加了 {{ counts.linkCount || 0 }} 个友链
</a-list-item>
<a-list-item>
文章总访问 {{ counts.visitCount || 0 }}
</a-list-item>
<a-list-item>累计发表了 {{ counts.postCount || 0 }} 篇文章</a-list-item>
<a-list-item>累计创建了 {{ counts.linkCount || 0 }} 个标签</a-list-item>
<a-list-item>累计获得了 {{ counts.commentCount || 0 }} 条评论</a-list-item>
<a-list-item>累计添加了 {{ counts.linkCount || 0 }} 个友链</a-list-item>
<a-list-item>文章总访问 {{ counts.visitCount || 0 }} </a-list-item>
<a-list-item></a-list-item>
</a-list>
</div>