|
@@ -261,7 +261,7 @@ export default {
|
|
|
getDetail () {
|
|
|
promoTerminalDetail({ sn: this.itemId }).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.isDisabled = res.data.state != 'CLOSE'
|
|
|
+ this.isDisabled = res.data.state === 'PUBLISH'
|
|
|
this.form.promoActiveSn = res.data.promoActiveSn
|
|
|
this.form.title = res.data.title
|
|
|
this.form.contentType = res.data.contentType
|
|
@@ -289,9 +289,7 @@ export default {
|
|
|
if (valid) {
|
|
|
_this.form.promoActiveSn = this.itemId
|
|
|
const formData = JSON.parse(JSON.stringify(_this.form))
|
|
|
- if (this.pageType === 'add' || (this.pageType === 'edit' && !this.isDisabled)) {
|
|
|
- formData.imageSet = formData.imageSet ? formData.imageSet.split(',') : []
|
|
|
- }
|
|
|
+ formData.imageSet = formData.imageSet ? formData.imageSet.split(',') : []
|
|
|
formData.showFlag = formData.enabledFlag == 0 ? '0' : formData.showFlag
|
|
|
_this.spinning = true
|
|
|
saveActive(formData).then(res => {
|
|
@@ -335,7 +333,7 @@ export default {
|
|
|
this.$refs.imageSet.setFileList('')
|
|
|
this.$refs.videoSet.setFileList('')
|
|
|
}
|
|
|
- if (this.form.content) {
|
|
|
+ if (this.$refs.editor) {
|
|
|
this.$refs.editor.setHtml('')
|
|
|
}
|
|
|
this.form = {
|