diff --git a/src/api/journal.js b/src/api/journal.js index 09786d1e..59472ec8 100644 --- a/src/api/journal.js +++ b/src/api/journal.js @@ -46,7 +46,7 @@ journalApi.journalType = { PUBLIC: { text: '公开' }, - PRIVATE: { + INTIMATE: { text: '私密' } } diff --git a/src/api/post.js b/src/api/post.js index 0d0a1b32..5709a6a0 100644 --- a/src/api/post.js +++ b/src/api/post.js @@ -81,6 +81,11 @@ postApi.postStatus = { color: 'red', status: 'error', text: '回收站' + }, + INTIMATE: { + color: 'blue', + status: 'success', + text: '私密' } } export default postApi diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index a87a6f32..9ef81103 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -92,7 +92,7 @@ {{ text }} + + + {{ text }} @@ -250,7 +261,7 @@ 编辑 回收站 diff --git a/src/views/post/components/PostSetting.vue b/src/views/post/components/PostSetting.vue index 6261e121..bc71cd3c 100644 --- a/src/views/post/components/PostSetting.vue +++ b/src/views/post/components/PostSetting.vue @@ -30,6 +30,12 @@ > + + + {{ text }} diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index 24fd7c3d..e2521a4a 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -118,8 +118,11 @@ {{ item.commentCount }} - - + + @@ -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 => { diff --git a/src/views/system/OptionForm.vue b/src/views/system/OptionForm.vue index 9044f803..440243cf 100644 --- a/src/views/system/OptionForm.vue +++ b/src/views/system/OptionForm.vue @@ -377,7 +377,10 @@ label="Secret Key:" :wrapper-col="wrapperCol" > - + - + - + - + @@ -571,6 +583,7 @@ > @@ -660,7 +673,10 @@ label="CDN 加速域名:" :wrapper-col="wrapperCol" > - +