master
yujialong 3 years ago
parent 7e2d8cfccb
commit 81b911f1cd
  1. BIN
      src/assets/img/logo-hh.png
  2. 9
      src/config/index.js
  3. 10
      src/utils/api.js
  4. 22
      src/views/Home.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -1,4 +1,13 @@
const isHh = location.host.includes('10.196.131.73') //是否是河海版本
export default {
/**
* @description 域名切换liuwan职站测试环境occupationlab.com职站正式环境10.196.131.73河海版本
*/
host: (process.env.NODE_ENV === 'development' || location.host.includes('liuwanr.cn')) ? 'http://www.liuwanr.cn/' : (location.host.includes('10.196.131.73') ? 'http://10.196.131.73/' : 'http://www.occupationlab.com/'),
/**
* @description 是否是河海版本
*/
isHh,
/**
* @description 配置显示在浏览器标签的title
*/

@ -1,11 +1,5 @@
// let host = 'http://192.168.31.125:8081/python'//林
// let host = 'http://192.168.31.152:8081/python'//榕
let host = ''
if(location.host.includes('liuwanr.cn') || process.env.NODE_ENV === 'development'){
host = 'http://www.liuwanr.cn/python'
}else{
host = 'http://www.occupationlab.com/python'
}
import config from '@/config'
let host = `${config.host}python`
export default {
QueryProject: `${host}/python/queryProject`, //项目选择下拉框+项目信息+判分点信息展示

@ -1,13 +1,15 @@
<template>
<div>
<div class="flex header">
<p>{{$config.title}}</p>
<img v-if="$config.isHh" src="../assets/img/logo-hh.png" alt="" class="logo">
<p v-else>{{$config.title}}</p>
<div class="bt">
<el-button type="primary" @click="back()">退出实验</el-button>
</div>
</div>
<div class="flex center">
<p v-if="$config.isHh" style="font-size: 18px">{{$config.title}}</p>
<p>编程语言</p>
<el-input placeholder="请输入内容" v-model="value" :disabled="true"></el-input>
</div>
@ -111,7 +113,7 @@ export default {
? parseInt(sessionStorage.getItem("timer"))
: 0,
codeKey: 1,
host: location.host.includes('liuwanr.cn') ? 'http://www.liuwanr.cn/' : 'http://www.occupationlab.com/'
host: this.$config.host
};
},
components: {
@ -187,17 +189,9 @@ export default {
back() {
this.leavePage()
if(this.projectPermissions){
if(location.host.includes('liuwanr.cn')){
location.href = `http://www.liuwanr.cn/#/dashboard#2`
location.href = `${this.host}#/dashboard#2`
}else{
location.href = `http://www.occupationlab.com/#/dashboard#2`
}
}else{
if(location.host.includes('liuwanr.cn')){
location.href = `http://www.liuwanr.cn/#/dashboard#1`
}else{
location.href = `http://www.occupationlab.com/#/dashboard#1`
}
location.href = `${this.host}#/dashboard#1`
}
this.$refs.mainindex.getClearTime();
},
@ -363,6 +357,10 @@ export default {
justify-content: space-between;
height: 58px;
line-height: 58px;
.logo{
width: 200px;
margin-left: 10px;
}
}
//
p {

Loading…
Cancel
Save