添加修改课程目标接口字段

develoop
xy 5 months ago
parent 0ffe772345
commit 894c303b9a
  1. 2
      src/api/courseChaptersApi.ts
  2. 6
      src/views/course/CourseObjectives.vue

@ -96,7 +96,7 @@ export const deleteCourse = (params: any) => {
// 获取详情
export const getCourseInfo = (params: any) => {
return request({
url: '/objective_contents/' + params.id,
url: 'api/objective_contents/' + params.id,
method: "get",
// params
})

@ -60,7 +60,7 @@ const handleClose = () => {
const submit = async () => {
if (flog.value) {
await editCourse({
id: activeIndex.value,
...editdata.value,
content: formData.value.description,
})
} else {
@ -114,11 +114,13 @@ const filterTarger = (target) => {
return res.label
}
const editdata = ref({ id: '', objectiveId:'' })
//
const flog = ref(false)
const editBook = async (obj) => {
const res = await getCourseInfo({ id: obj.id })
editdata.value.id = res.data.id
editdata.value.objectiveId = res.data.objectiveId
flog.value = true
console.log(obj)
activeIndex.value = res.data.id

Loading…
Cancel
Save