diff --git a/src/views/project/ProjectDetails.vue b/src/views/project/ProjectDetails.vue index 5dc0a01..c4fb564 100644 --- a/src/views/project/ProjectDetails.vue +++ b/src/views/project/ProjectDetails.vue @@ -389,17 +389,19 @@ function toFinish(d) { } else { url = types.value.path[d.type][0] + d.targetId; } - import.meta.env.DEV - ? (window.location.href = url) - : (window.parent.location.href = url); + // import.meta.env.DEV + // ? (window.location.href = url) + // : (window.parent.location.href = url); + window.open(url) return; } if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) { //配置文件 const url = types.value.path[d.type] + d.targetId; - import.meta.env.DEV - ? (window.location.href = url) - : (window.parent.location.href = url); + // import.meta.env.DEV + // ? (window.location.href = url) + // : (window.parent.location.href = url); + window.open(url) return; } if (d.type === 7) { @@ -408,9 +410,10 @@ function toFinish(d) { console.log("resssss", res); if (res.code === 200) { const url = res.data.linkAddress; - import.meta.env.DEV - ? (window.location.href = url) - : (window.parent.location.href = url); + // import.meta.env.DEV + // ? (window.location.href = url) + // : (window.parent.location.href = url); + window.open(url) } }); return; diff --git a/src/views/roadmap/LearnPath.vue b/src/views/roadmap/LearnPath.vue index 423fb3e..0680b93 100644 --- a/src/views/roadmap/LearnPath.vue +++ b/src/views/roadmap/LearnPath.vue @@ -177,10 +177,11 @@ async function gofun({routerId, name: routerName}) { // detail.value = data.data // state.showmapdetail = true; // router.push({path: "/pathdetails", query: {routerId}}); - import.meta.env.DEV ? router.push({ - path: "/pathdetails", - query: {routerId, routerName} - }) : window.parent.location.href = `http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails¶ms=${encodeURIComponent(`routerId=${routerId}&routerName=${routerName}`)}` + // import.meta.env.DEV ? router.push({ + // path: "/pathdetails", + // query: {routerId, routerName} + // }) : + window.open(`http://u-pre.boe.com/pc/forward?to=/fe-student/pathdetails¶ms=${encodeURIComponent(`routerId=${routerId}&routerName=${routerName}`)}`) } function toUnTask() { diff --git a/src/views/roadmap/PathDetails.vue b/src/views/roadmap/PathDetails.vue index 6fd68a1..bb8c1c3 100644 --- a/src/views/roadmap/PathDetails.vue +++ b/src/views/roadmap/PathDetails.vue @@ -430,17 +430,19 @@ function toFinish(d, sName) { } else { url = types.value.path[d.type][0] + d.targetId; } - import.meta.env.DEV - ? (window.location.href = url) - : (window.parent.location.href = url); + window.open(url) + // import.meta.env.DEV + // ? (window.location.href = url) + // : (window.parent.location.href = url); return; } if (types.value.path[d.type] && types.value.path[d.type].startsWith("http")) { //配置文件 const url = types.value.path[d.type] + d.targetId; - import.meta.env.DEV - ? (window.location.href = url) - : (window.parent.location.href = url); + // import.meta.env.DEV + // ? (window.location.href = url) + // : (window.parent.location.href = url); + window.open(url) return; } if (d.type === 7) { @@ -449,9 +451,10 @@ function toFinish(d, sName) { console.log("resssss", res); if (res.code === 200) { const url = res.data.linkAddress; - import.meta.env.DEV - ? (window.location.href = url) - : (window.parent.location.href = url); + // import.meta.env.DEV + // ? (window.location.href = url) + // : (window.parent.location.href = url); + window.open(url) } }); return;