Commit 6e1e0962 by 李伟康

refactor(shortCourse): 优化短课程详情获取逻辑

- 在获取短课程详情前设置 studyId,确保 studyId 值的准确性
- 修改 getShortCourseDetail 方法调用,使其能够根据实际情况传递正确的参数
- 移除冗余的参数设置,简化代码结构
1 parent 7372bf6b
......@@ -280,8 +280,10 @@ export default {
this.completeStatus = options.completeStatus
if (!this.rowData.taskDeadline) this.rowData.taskDeadline = rowData.finishTime
if (options.from === 'service') {
this.studyId = rowData.detailId
this.getShortCourseDetail(rowData.detailId, rowData.id)
} else {
this.studyId = rowData.id
this.getShortCourseDetail(rowData.id)
}
......@@ -290,7 +292,7 @@ export default {
}
this.getAiAgentList()
uni.$on('refreshStudyList', () => {
this.getShortCourseDetail(rowData.id)
this.getShortCourseDetail()
})
},
onUnload () {
......@@ -343,7 +345,6 @@ export default {
},
async getShortCourseDetail (id, boxId) {
uni.showLoading()
this.studyId = id
const params = { id }
if (boxId) {
params.boxId = boxId
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!