From 2693e2f3a6ec9754422a30315727fa53afd93b82 Mon Sep 17 00:00:00 2001 From: huangzhe <3451701311@qq.com> Date: Tue, 23 Sep 2025 15:27:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=81=AB=E7=8B=90?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectdetails/projectDetails.vue | 39 +++++++++++---------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/views/projectdetails/projectDetails.vue b/src/views/projectdetails/projectDetails.vue index be174c4..be26675 100644 --- a/src/views/projectdetails/projectDetails.vue +++ b/src/views/projectdetails/projectDetails.vue @@ -167,8 +167,8 @@
{ + 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] && TASK_TYPES.path[d.type].startsWith("http") && window.open(TASK_TYPES.path[d.type] + d.targetId, "_top"); - TASK_TYPES.path[d.type] && + TASK_TYPES.path[d.type] && TASK_TYPES.path[d.type].startsWith("/") && router.push({ path: TASK_TYPES.path[d.type], @@ -780,21 +779,23 @@ function toFinish(d, sName, chapterOrStageId, studyModel) { quizTaskId: d.quizTaskId, }, }); - } else if (typeof TASK_TYPES.path[d.type] === "function") { - if (d.type == 5) { - // 模拟点击跳转 - const url = TASK_TYPES.path[d.type](d) + d.targetId - const a = document.createElement("a"); - a.href = url; - // a.target = "_blank"; - a.click(); + } 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"; + a.click(); // 保底解决兼容问题 window.open(url, "_top"); } 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") &&