From 329ed7b49ceae1ce8bd9664ce5037b8d51f65fe4 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Sat, 2 Apr 2022 17:56:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/case/index.vue | 38 +++++++++++------------------------ 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 70e3acf..7cfa456 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -582,6 +582,16 @@ export default { }).catch((error)=>{ }) }, + // 跳转 + toPage(token, cid, systemId) { + const url = location.href + const host = url.includes('occupationlab.com') ? + `http://www.huorantech.cn/banksystem` : + process.env.NODE_ENV === 'development' ? + `http://192.168.31.155:8093` : + `http://39.108.250.202:9000` + location.href = `${host}/#/index/list?token=${token}&cid=${cid}&systemId=${systemId}` + }, //选择好题目 selectProject(){ this.lockIt = false @@ -632,19 +642,7 @@ export default { this.projectId = data.data.projectManage.projectId; this.projectManage = data.data.projectManage; this.requires = data.data.projectJudgmentVos; - //线上 - // location.href = 'http://124.71.12.62/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId - // location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId - //测试服 - if(process.env.NODE_ENV === 'development') { - location.href = "http://192.168.31.155:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId - - }else { - location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId - } - - //本地 - // location.href = "http://192.168.31.155:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId + this.toPage(token, cid, systemId) } }).catch((error)=>{ }) @@ -871,19 +869,7 @@ export default { this.grade = '00' this.$router.push('/index/list') this.getBeginTime() - //线上git sta - // location.href = 'http://124.71.12.62/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId - // location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId - //测试服 - if(process.env.NODE_ENV === 'development') { - location.href = "http://192.168.31.155:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId - }else { - location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId - } - - //本地 - // location.href = "http://192.168.31.155:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId - console.log(process.env.NODE_ENV) + this.toPage(token, cid, systemId) }, checkVer() { From d04b983b56116f19433c39589ffa229a5e8f510a Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Sat, 2 Apr 2022 18:07:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/case/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 7cfa456..1336873 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -589,7 +589,7 @@ export default { `http://www.huorantech.cn/banksystem` : process.env.NODE_ENV === 'development' ? `http://192.168.31.155:8093` : - `http://39.108.250.202:9000` + `http://39.108.250.202/banksystem` location.href = `${host}/#/index/list?token=${token}&cid=${cid}&systemId=${systemId}` }, //选择好题目 From e2b6ca9f117e0707a22cbc3d7c65c2e4cac89ac1 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Sat, 2 Apr 2022 18:50:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=80=80=E5=87=BA=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/header/index.vue | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index c221eb9..58b41b8 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -33,15 +33,21 @@ export default { }) }, exit(){ - let assessmentId = sessionStorage.getItem('assessmentId') - if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){ - window.location = 'http://39.108.250.202/student/#/ass/list' - // window.location = 'http://www.occupationlab.com/#/ass/list' - }else{ - let cid = sessionStorage.getItem('cid') - window.location = 'http://39.108.250.202/student/#/station/preview?courseId='+cid+'&curriculumName=银行项目' - // window.location = 'http://www.occupationlab.com/#/station/preview?courseId='+cid+'&curriculumName=银行项目' - } + let href = '' + const url = location.href + const host = url.includes('huorantech.cn') ? + `http://www.occupationlab.com` : + process.env.NODE_ENV === 'development' ? + `http://192.168.31.155:8082` : + `http://39.108.250.202/student` + let assessmentId = sessionStorage.getItem('assessmentId') + if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){ + href = `${host}/#/ass/list` + }else{ + const cid = sessionStorage.getItem('cid') + href = `${host}/#/station/preview?courseId=${cid}&curriculumName=银行项目` + } + location.href = href }, }, };