Support set password to post.

pull/40/head
ruibaby 2019-09-06 16:55:50 +08:00
parent aaa5903aea
commit 887d2c68fb
7 changed files with 64 additions and 15 deletions

View File

@ -46,7 +46,7 @@ journalApi.journalType = {
PUBLIC: {
text: '公开'
},
PRIVATE: {
INTIMATE: {
text: '私密'
}
}

View File

@ -81,6 +81,11 @@ postApi.postStatus = {
color: 'red',
status: 'error',
text: '回收站'
},
INTIMATE: {
color: 'blue',
status: 'success',
text: '私密'
}
}
export default postApi

View File

@ -92,7 +92,7 @@
</a-menu-item>
<a-menu-item
key="2"
v-if="queryParam.status === 'PUBLISHED' || queryParam.status ==='DRAFT'"
v-if="queryParam.status === 'PUBLISHED' || queryParam.status ==='DRAFT' || queryParam.status === 'INTIMATE'"
>
<a
href="javascript:void(0);"
@ -149,7 +149,18 @@
v-if="record.status=='PUBLISHED'"
>
<a-tooltip
placement="topLeft"
placement="top"
:title="'点击访问【'+text+'】'"
>{{ text }}</a-tooltip>
</a>
<a
:href="options.blog_url+'/archives/'+record.url+'/password'"
target="_blank"
style="text-decoration: none;"
v-else-if="record.status == 'INTIMATE'"
>
<a-tooltip
placement="top"
:title="'点击访问【'+text+'】'"
>{{ text }}</a-tooltip>
</a>
@ -250,7 +261,7 @@
<a
href="javascript:;"
@click="handleEditClick(post)"
v-if="post.status === 'PUBLISHED' || post.status === 'DRAFT'"
v-if="post.status === 'PUBLISHED' || post.status === 'DRAFT' || post.status === 'INTIMATE'"
>编辑</a>
<a-popconfirm
:title="'你确定要发布【' + post.title + '】文章?'"
@ -269,7 +280,7 @@
@confirm="handleEditStatusClick(post.id,'RECYCLE')"
okText="确定"
cancelText="取消"
v-if="post.status === 'PUBLISHED' || post.status === 'DRAFT'"
v-if="post.status === 'PUBLISHED' || post.status === 'DRAFT' || post.status === 'INTIMATE'"
>
<a href="javascript:;">回收站</a>
</a-popconfirm>

View File

@ -30,6 +30,12 @@
>
<a-input v-model="selectedPost.url" />
</a-form-item>
<a-form-item label="访问密码:">
<a-input
type="password"
v-model="selectedPost.password"
/>
</a-form-item>
<a-form-item label="发表时间:">
<a-date-picker

View File

@ -89,7 +89,7 @@
v-if="record.status=='PUBLISHED'"
>
<a-tooltip
placement="topLeft"
placement="top"
:title="'点击访问【'+text+'】'"
>{{ text }}</a-tooltip>
</a>

View File

@ -118,8 +118,11 @@
{{ item.commentCount }}
</a>
</span>
<span v-if="item.type=='PRIVATE'">
<a href="javascript:void(0);" disabled>
<span v-if="item.type=='INTIMATE'">
<a
href="javascript:void(0);"
disabled
>
<a-icon type="lock" />
</a>
</span>
@ -399,7 +402,7 @@ export default {
handleEdit(item) {
this.title = '编辑'
this.journal = item
this.isPublic = item.type !== 'PRIVATE'
this.isPublic = item.type !== 'INTIMATE'
this.visible = true
// ,
// this.plusPhotoVisible = false
@ -442,7 +445,15 @@ export default {
createOrUpdateJournal() {
//
// this.journal.photos = this.journalPhotos
this.journal.type = this.isPublic ? 'PUBLIC' : 'PRIVATE'
this.journal.type = this.isPublic ? 'PUBLIC' : 'INTIMATE'
if (!this.journal.content) {
this.$notification['error']({
message: '提示',
description: '发布内容不能为空!'
})
return
}
if (this.journal.id) {
journalApi.update(this.journal.id, this.journal).then(response => {

View File

@ -377,7 +377,10 @@
label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_qiniu_secret_key" />
<a-input
type="password"
v-model="options.oss_qiniu_secret_key"
/>
</a-form-item>
<a-form-item
label="Bucket"
@ -424,7 +427,10 @@
label="Access Secret"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.oss_aliyun_access_secret" />
<a-input
type="password"
v-model="options.oss_aliyun_access_secret"
/>
</a-form-item>
<a-form-item
label="图片处理策略:"
@ -465,7 +471,10 @@
label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.bos_baiduyun_secret_key" />
<a-input
type="password"
v-model="options.bos_baiduyun_secret_key"
/>
</a-form-item>
<a-form-item
label="图片处理策略:"
@ -513,7 +522,10 @@
label="Secret Key"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.cos_tencentyun_secret_key" />
<a-input
type="password"
v-model="options.cos_tencentyun_secret_key"
/>
</a-form-item>
</div>
<a-form-item>
@ -571,6 +583,7 @@
>
<a-input
v-model="options.email_password"
type="password"
placeholder="部分邮箱可能是授权码"
/>
</a-form-item>
@ -660,7 +673,10 @@
label="CDN 加速域名:"
:wrapper-col="wrapperCol"
>
<a-input v-model="options.blog_cdn_domain" placeholder="请确保已经正确配置好了 CDN"/>
<a-input
v-model="options.blog_cdn_domain"
placeholder="请确保已经正确配置好了 CDN"
/>
</a-form-item>
<a-form-item
label="自定义 head"