diff --git a/src/assets/images/style/55.png b/src/assets/images/style/55.png new file mode 100644 index 0000000..634a3a4 Binary files /dev/null and b/src/assets/images/style/55.png differ diff --git a/src/pages/column/add/index.vue b/src/pages/column/add/index.vue index f5c6f96..6e76ffc 100644 --- a/src/pages/column/add/index.vue +++ b/src/pages/column/add/index.vue @@ -493,11 +493,12 @@ export default { }, // 根据模板id获取样式 getStyle(set = 1) { - this.$post(`${this.api.theTemplateIdGetsTheStyle}?templateId=${this.form.templateId}`).then(({ data }) => { + const { templateId } = this.form + this.$post(`${this.api.theTemplateIdGetsTheStyle}?templateId=${templateId}`).then(({ data }) => { this.listStyle = data.listingTemplateTypes this.detailStyleId = data.detailsTypeOfTheTemplate if (set) { - this.form.listStyleId = this.listStyle[1].id + this.form.listStyleId = this.listStyle[templateId === 1 ? 1 : 0].id this.form.detailStyleId = this.detailStyleId[0].id } }).catch(err => {})