diff --git a/src/api/index.js b/src/api/index.js index 178fe97..08ef546 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,6 +1,5 @@ import Setting from '@/setting' const host = Setting.apiBaseURL -const host1 = 'http://10.10.11.7:10000/' export default { logins: `iasf/sys/user/login`, diff --git a/src/const/modules.js b/src/const/modules.js index d7cc0fc..7ba8f2f 100644 --- a/src/const/modules.js +++ b/src/const/modules.js @@ -4528,7 +4528,7 @@ export default { }, list: [ { - pic: 'http://10.10.11.7/images/news/1.png', + pic: 'http://10.10.11.7/images/sfel/1.png', title: '', link: { linkName: '无', diff --git a/src/pages/column/add/index.vue b/src/pages/column/add/index.vue index acbd387..15fc2f0 100644 --- a/src/pages/column/add/index.vue +++ b/src/pages/column/add/index.vue @@ -626,6 +626,17 @@ export default { // 预览 preview() { + }, + // 更新附件的状态为发布 + updateFile(form, quoteId) { + this.fileId && this.$post(this.api.updateFile, { + id: this.fileId, + isRelease: 1, + quote: form.columnName, + quoteId + }).then(res => { + this.fileId = '' + }).catch(err => {}) }, // 提交 submit(next) { @@ -649,19 +660,12 @@ export default { } } if (form.typeId !== 2 && !form.listStyleId) return Util.errorMsg('请选择列表样式') - // 更新附件的状态为发布 - this.fileId && this.$post(this.api.updateFile, { - id: this.fileId, - isRelease: 1, - quote: this.form.columnName - }).then(res => { - this.fileId = '' - }).catch(err => {}) this.submiting = true if (this.isEdit) { delete form.children form.editorId = this.userId this.$post(this.api.updateColumn, form).then(res => { + this.updateFile(form, form.id) // 编辑前不是长页栏目,则需要重新保存长页模板 // if (this.originTypeId !== 3 && form.typeId === 3) this.savePage(form.id) Util.successMsg("修改成功") @@ -671,6 +675,7 @@ export default { }) } else { this.$post(this.api.saveColumn, form).then(({ data }) => { + this.updateFile(form, data) // 栏目类型选择了长页栏目,才需要保存长页 form.typeId === 3 && this.savePage(data) Util.successMsg("创建成功") diff --git a/src/setting.js b/src/setting.js index d71fbb8..cf9fa79 100644 --- a/src/setting.js +++ b/src/setting.js @@ -7,7 +7,7 @@ let host = `${location.origin}/` if (isDev) { host = 'http://192.168.31.136:10000/' // 测试服 host = 'http://192.168.31.51:10000/' // 榕 - // host = 'http://192.168.31.116:10000/' // 赓 + // host = 'http://192.168.31.116/' // 赓 } const Setting = {