mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 02:46:48 +08:00
-- 详情不打开新页面
This commit is contained in:
@@ -94,7 +94,7 @@ export async function request(_url, params) {
|
|||||||
}).then(resp => resp.data).then(response => {
|
}).then(resp => resp.data).then(response => {
|
||||||
if (response.code !== 200 && response.code !== 0) {
|
if (response.code !== 200 && response.code !== 0) {
|
||||||
if (response.code === 1000) {
|
if (response.code === 1000) {
|
||||||
import.meta.env.MODE === 'development' ? router.push({ path: '/login' }) : window.open(import.meta.env.VITE_BASE_LOGIN_URL)
|
import.meta.env.MODE === 'development' ? router.push({ path: '/login' }) : window.open(import.meta.env.VITE_BASE_LOGIN_URL,'_self')
|
||||||
}
|
}
|
||||||
// if (import.meta.env.DEV && response.code === 1000) {
|
// if (import.meta.env.DEV && response.code === 1000) {
|
||||||
// router.push({path: '/login'})
|
// router.push({path: '/login'})
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function toDetail(i) {
|
|||||||
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails¶ms=${encodeURIComponent(
|
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/pathdetails¶ms=${encodeURIComponent(
|
||||||
`routerId=${props.detail.routerId}&routerName=${props.detail.routerName}`
|
`routerId=${props.detail.routerId}&routerName=${props.detail.routerName}`
|
||||||
)}`
|
)}`
|
||||||
);
|
,'_self');
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ function toExamItem(obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("obj", obj.examinationTestId);
|
console.log("obj", obj.examinationTestId);
|
||||||
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId); //测评
|
window.open(import.meta.env.VITE_BOE_EXAM_DETAIL_URL + obj.examinationTestId,'_self'); //测评
|
||||||
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
// router.push({ path: import.meta.env.VITE_BOE_EXAM_DETAIL_URL+ obj.examinationTestId });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ function showClick() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.open(data.value.liveLink);
|
window.open(data.value.liveLink,'_self');
|
||||||
}
|
}
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ const types = ref({
|
|||||||
6: "/livebroadcast",
|
6: "/livebroadcast",
|
||||||
7: ({ courseId }) =>
|
7: ({ courseId }) =>
|
||||||
request(LINK_DETAILS(courseId), {}).then(({ data: { linkAddress } }) =>
|
request(LINK_DETAILS(courseId), {}).then(({ data: { linkAddress } }) =>
|
||||||
window.open(linkAddress)
|
window.open(linkAddress,'_self')
|
||||||
), //外联
|
), //外联
|
||||||
8: "/discusspage",
|
8: "/discusspage",
|
||||||
9: "/moreactive",
|
9: "/moreactive",
|
||||||
@@ -351,7 +351,7 @@ const types = ref({
|
|||||||
(evaType == 0
|
(evaType == 0
|
||||||
? import.meta.env.VITE_BOE_TEST_DETAIL_URL
|
? import.meta.env.VITE_BOE_TEST_DETAIL_URL
|
||||||
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId
|
: import.meta.env.VITE_BOE_TEST_OUT_DETAIL_URL) + targetId
|
||||||
), //测评
|
,'_self'), //测评
|
||||||
11: "/surveydetail",
|
11: "/surveydetail",
|
||||||
12: "/ballotpage",
|
12: "/ballotpage",
|
||||||
13: "/projectdetails",
|
13: "/projectdetails",
|
||||||
@@ -448,7 +448,7 @@ function toFinish(d, sName, chapterOrStageId) {
|
|||||||
if (typeof types.value.path[d.type] === "string") {
|
if (typeof types.value.path[d.type] === "string") {
|
||||||
types.value.path[d.type] &&
|
types.value.path[d.type] &&
|
||||||
types.value.path[d.type].startsWith("http") &&
|
types.value.path[d.type].startsWith("http") &&
|
||||||
window.open(types.value.path[d.type] + d.targetId);
|
window.open(types.value.path[d.type] + d.targetId,'_self');
|
||||||
types.value.path[d.type] &&
|
types.value.path[d.type] &&
|
||||||
types.value.path[d.type].startsWith("/") &&
|
types.value.path[d.type].startsWith("/") &&
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ const goProjectDetails = (value) => {
|
|||||||
: window.open(
|
: window.open(
|
||||||
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails¶ms=${encodeURIComponent(
|
`${import.meta.env.VITE_BOE_PATH_DETAIL_URL}/projectdetails¶ms=${encodeURIComponent(
|
||||||
`projectId=${value.projectId}`
|
`projectId=${value.projectId}`
|
||||||
)}`
|
,'_self')}`
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user