diff --git a/src/views/modules/commonNews/course-add-or-update.vue b/src/views/modules/commonNews/course-add-or-update.vue new file mode 100644 index 0000000..2a818f7 --- /dev/null +++ b/src/views/modules/commonNews/course-add-or-update.vue @@ -0,0 +1,459 @@ + + + + + diff --git a/src/views/modules/commonNews/newsList.vue b/src/views/modules/commonNews/newsList.vue new file mode 100644 index 0000000..603f646 --- /dev/null +++ b/src/views/modules/commonNews/newsList.vue @@ -0,0 +1,378 @@ + + + diff --git a/src/views/modules/courseSettings/chapter-add-or-update.vue b/src/views/modules/courseSettings/chapter-add-or-update.vue index d855d64..dfede43 100644 --- a/src/views/modules/courseSettings/chapter-add-or-update.vue +++ b/src/views/modules/courseSettings/chapter-add-or-update.vue @@ -24,7 +24,9 @@ - 保存 + 保存 @@ -62,7 +64,7 @@ const toolbarOptions = [ ["link", "image"] // 上传图片、上传视频 ]; export default { - props:['dataInfo'], + props: ["dataInfo", "type"], data() { return { baseUrl: global.baseUrl, @@ -90,7 +92,7 @@ export default { } } }, - placeholder: "请输入"+this.dataInfo.label + placeholder: "请输入" + this.dataInfo.label }, visible: false, props: { @@ -107,12 +109,9 @@ export default { dialogImageUrl: "", dialogVisible: false, dataForm: { - courseId: 0, - catalogueId: 0, - title: "", - imgUrl: "", + content: "", - sort: 1 + }, splitsTypeList: [], dataRule: {} @@ -152,61 +151,37 @@ export default { onEditorReady(quill) { // console.log('editor ready!', quill) }, - init(row, catalogue_id, courseid) { - console.log("row21", row); - this.dataForm = row ? JSON.parse(JSON.stringify(row)) : {}; - this.dataForm.courseId = courseid ? courseid : ""; - this.dataForm.catalogueId = catalogue_id ? catalogue_id : ""; - this.visible = true; - if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") { - var img = { - name: "", - url: this.dataForm.imgUrl - }; - var attr = []; - attr.push(img); - this.fileList = attr; - } else { - this.fileList = []; - } + init(content) { + console.log("row21", content); + this.dataForm.content=content + + }, + getContent(){ + }, // 表单提交 dataFormSubmit() { - this.$refs["dataForm"].validate(valid => { - if (valid) { - this.$http({ - url: this.$http.adornUrl( - `${ - !this.dataForm.id - ? "/master/course/addCourseCatalogueChapter" - : "/master/course/editCourseCatalogueChapter" - }` - ), - method: "post", - data: this.$http.adornData({ - id: this.dataForm.id || undefined, - courseId: this.dataForm.courseId || undefined, - catalogueId: this.dataForm.catalogueId || undefined, - title: this.dataForm.title, - imgUrl: this.dataForm.imgUrl, - content: this.dataForm.content, - sort: this.dataForm.sort - }) - }).then(({ data }) => { - if (data && data.code === 0) { - this.$message({ - message: "操作成功", - type: "success", - duration: 1500, - onClose: () => { - this.visible = false; - this.$emit("refreshDataList"); - } - }); - } else { - this.$message.error(data.msg); + this.$http({ + url: this.$http.adornUrl("/master/course/editCourseRecord"), + method: "post", + data: this.$http.adornData({ + type: this.type, + recordType: this.dataInfo.id, //0 buy_record , 1 use_record , 2 study_record, 3 vip_record + content: this.dataForm.content + }) + }).then(({ data }) => { + if (data && data.code === 0) { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.visible = false; + this.$emit("refreshDataList"); } }); + } else { + this.$message.error(data.msg); } }); }, diff --git a/src/views/modules/courseSettings/medicalCourseDescription.vue b/src/views/modules/courseSettings/medicalCourseDescription.vue index 2fd9282..e008687 100644 --- a/src/views/modules/courseSettings/medicalCourseDescription.vue +++ b/src/views/modules/courseSettings/medicalCourseDescription.vue @@ -1,11 +1,18 @@