fix: 修复火狐重定向时报错

This commit is contained in:
2025-09-23 15:27:16 +08:00
parent f4ead35b0b
commit 2693e2f3a6

View File

@@ -167,8 +167,8 @@
<div
v-if="data.unlockMode === 1"
class="goclass"
@click="
toFinish(el, item.stageName, item.id, item.studyModel)
@click.prevent="
toFinish(el, item.stageName, item.id, item.studyModel, $event)
"
:style="{
background:
@@ -188,7 +188,7 @@
<div
v-else
class="goclass"
@click="
@click.prevent="
toFinish(el, item.stageName, item.id, item.studyModel)
"
:style="{
@@ -550,7 +550,7 @@ function judgeTaskIsEnd(type, endTimes, status) {
return isEnd;
}
function toFinish(d, sName, chapterOrStageId, studyModel) {
function toFinish(d, sName, chapterOrStageId, studyModel,e) {
if (studyModel != 0 && !d.statusName) {
ElMessage.warning("当前未解锁");
return;
@@ -753,8 +753,7 @@ function toFinish(d, sName, chapterOrStageId, studyModel) {
type: PROJECT,
pid: projectId,
name: d.name,
});
}).then(()=>{
if (typeof TASK_TYPES.path[d.type] === "string") {
console.log("TASK_TYPES.path[d.type]", TASK_TYPES.path[d.type]);
TASK_TYPES.path[d.type] &&
@@ -782,8 +781,10 @@ function toFinish(d, sName, chapterOrStageId, studyModel) {
});
} else if (typeof TASK_TYPES.path[d.type] === "function") {
if (d.type == 5) {
// 模拟点击跳转
const url = TASK_TYPES.path[d.type](d) + d.targetId
if (isIOS()){
// 模拟点击跳转
const a = document.createElement("a");
a.href = url;
// a.target = "_blank";
@@ -794,7 +795,7 @@ function toFinish(d, sName, chapterOrStageId, studyModel) {
} else {
TASK_TYPES.path[d.type](d);
}
}
}}})
// if (typeof types.value.path[d.type] === "string") {
// types.value.path[d.type] &&
// types.value.path[d.type].startsWith("http") &&