|
|
@ -1366,11 +1366,11 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
// 文章名称判重 |
|
|
|
// 文章名称判重 |
|
|
|
nameChange () { |
|
|
|
nameChange () { |
|
|
|
const { title, level, id } = this.form |
|
|
|
const { title, id } = this.form |
|
|
|
if (title && title !== this.originalName) { |
|
|
|
if (title && title !== this.originalName) { |
|
|
|
this.$post(this.api.checkIfTheTitleIsRepeat, Util.rsa({ |
|
|
|
this.$post(this.api.checkIfTheTitleIsRepeat, { |
|
|
|
siteId: this.site.id, |
|
|
|
siteId: this.site.id, |
|
|
|
title: encodeURI(title), |
|
|
|
title, |
|
|
|
id: id || '' |
|
|
|
id: id || '' |
|
|
|
})).then(res => { |
|
|
|
})).then(res => { |
|
|
|
this.repeatMsg = '' |
|
|
|
this.repeatMsg = '' |
|
|
@ -1576,7 +1576,7 @@ export default { |
|
|
|
if (this.submiting) return false |
|
|
|
if (this.submiting) return false |
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
const form = JSON.parse(JSON.stringify(this.form)) |
|
|
|
if (!form.title) return Util.errorMsg('请填写标题') |
|
|
|
if (!form.title) return Util.errorMsg('请填写标题') |
|
|
|
if (this.nameRepeat) return Util.errorMsg(this.repeatMsg) |
|
|
|
if (this.nameRepeat) return Util.errorMsg('该标题已重复!') |
|
|
|
if (typeof form.fatherId === 'object') form.fatherId = form.fatherId[form.fatherId.length - 1] |
|
|
|
if (typeof form.fatherId === 'object') form.fatherId = form.fatherId[form.fatherId.length - 1] |
|
|
|
const tId = form.articleTemplate |
|
|
|
const tId = form.articleTemplate |
|
|
|
// 如果是发布 |
|
|
|
// 如果是发布 |
|
|
|