diff --git a/src/views/course/CourseAdd.vue b/src/views/course/CourseAdd.vue index 77a7f8d..52c4986 100644 --- a/src/views/course/CourseAdd.vue +++ b/src/views/course/CourseAdd.vue @@ -140,14 +140,16 @@ export default { onChange(dataValue) { console.log('changed', dataValue) }, - save(){ + save() { console.log(this.form) - courseAdd(this.form) - .then(res => { - if(res.code == 200){ - this.$message.info("保存成功") + courseAdd(this.form).then((res) => { + if (res.code == 200) { + this.$message.info('保存成功') + //新增完成后直接返回课程列表 + this.$router.push({ path: '/course/CourseList', query: {} }) } - }) } + }) + }, }, }