学习课程记录
This commit is contained in:
@@ -312,11 +312,11 @@ async function handleCollect() {
|
||||
try {
|
||||
if (isCollected.value) {
|
||||
// 取消收藏
|
||||
const res = await userCollectionApi.removeCollection(
|
||||
userInfo.value.id,
|
||||
CollectionType.COURSE,
|
||||
props.courseId
|
||||
);
|
||||
const res = await userCollectionApi.removeCollection({
|
||||
userID: userInfo.value.id,
|
||||
collectionType: CollectionType.COURSE,
|
||||
collectionID: props.courseId
|
||||
});
|
||||
if (res.success) {
|
||||
isCollected.value = false;
|
||||
ElMessage.success('已取消收藏');
|
||||
@@ -360,7 +360,8 @@ async function handleStartLearning() {
|
||||
await learningRecordApi.createRecord({
|
||||
userID: userInfo.value.id,
|
||||
resourceType: 2, // 课程
|
||||
resourceID: props.courseId,
|
||||
courseID: props.courseId, // 使用courseID而不是resourceID
|
||||
resourceID: props.courseId, // 保留resourceID以兼容
|
||||
progress: 0,
|
||||
duration: 0,
|
||||
isComplete: false
|
||||
|
||||
Reference in New Issue
Block a user