diff --git a/src/views/course/components/addCourse.vue b/src/views/course/components/addCourse.vue index f98b977..2294644 100644 --- a/src/views/course/components/addCourse.vue +++ b/src/views/course/components/addCourse.vue @@ -215,12 +215,12 @@ form: { step: '', // 控制课程 课表 name: '', - type: 1, + type: '', dateRange: '', total: '', - status: 0, - is_arrange: 1, - is_fee: 1, + status: '', + is_arrange: '', + is_fee: '', image_id: '', publicize_ids: [], content: '', @@ -243,10 +243,6 @@ required: true, message: '请输入课程简介' }], - // image_id: [{ - // required: true, - // message: '请上传课程封面' - // }], dateRange: [{ required: true, message: '请选择开课日期' @@ -280,7 +276,6 @@ if (e) { this.form.start_date = e[0] this.form.end_date = e[1] - console.log(e, this.form) } else { this.form.start_date = '' this.form.end_date = '' @@ -299,7 +294,6 @@ return isImage && isLt2M; }, onExceed(file, fileList) { - console.log("file", file, fileList) this.$Message.warning("课程封面只需上传一张") }, uploadSuccess(response, file, fileList) { @@ -342,7 +336,6 @@ }) } this.form.publicize_ids = pubFiles - console.log("form", this.form) save({ ...this.form }).then(res => { @@ -363,7 +356,6 @@ getDetail() { show({ id: this.id, - // show_relation:['image','publicize'] }).then(res => { this.form = this.base.requestToForm(res, this.form) if (res.image) { @@ -372,7 +364,8 @@ this.form.dateRange = [res.start_date, res.end_date] this.showTinymce = true }) - }, + }, + // 下一步 next() { if (this.id) { this.active = 1 @@ -420,12 +413,12 @@ this.form = { step: '', // 控制课程 课表 name: '', - type: 1, + type: '', dateRange: '', total: '', - status: 0, - is_arrange: 1, - is_fee: 1, + status: '', + is_arrange: '', + is_fee: '', image_id: '', publicize_ids: [], content: '',