mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-21 16:56:49 +08:00
--fix bug
This commit is contained in:
@@ -151,16 +151,17 @@ function canStudy(setting,current){
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
function toDetail(i) {
|
function toDetail(i) {
|
||||||
|
const realIndex = props.detail.chapterDtoList.findIndex(e => e.id === showList.value[i].id);
|
||||||
// 预览和学习设置
|
// 预览和学习设置
|
||||||
let isStudy = true;
|
let isStudy = true;
|
||||||
if(current.value !== i && !canStudy(props.detail.previewSetting,i+1) && !canStudy(props.detail.studySetting,i+1)){
|
if(current.value !== i && !canStudy(props.detail.previewSetting,realIndex+1) && !canStudy(props.detail.studySetting,realIndex+1)){
|
||||||
ElMessage.warning("当前关卡不可预览");
|
ElMessage.warning("当前关卡不可预览");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(current.value !== i && canStudy(props.detail.previewSetting,i+1)){
|
if(current.value !== i && canStudy(props.detail.previewSetting,realIndex+1)){
|
||||||
isStudy = false
|
isStudy = false
|
||||||
}
|
}
|
||||||
if(current.value !== i && canStudy(props.detail.studySetting,i+1)){
|
if(current.value !== i && canStudy(props.detail.studySetting,realIndex+1)){
|
||||||
isStudy = true
|
isStudy = true
|
||||||
}
|
}
|
||||||
const chapterId = showList.value[i].id;
|
const chapterId = showList.value[i].id;
|
||||||
|
|||||||
Reference in New Issue
Block a user