职站河海自动识别

master
yujialong 3 years ago
parent eaf3e74cc1
commit ba64a412a9
  1. BIN
      public/favicon.ico
  2. BIN
      src/assets/img/logo-hh.png
  3. 9
      src/components/codemirror.vue
  4. 11
      src/config/index.js
  5. 10
      src/utils/api.js
  6. 4
      src/utils/http.js
  7. 24
      src/views/Home.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@ -1,6 +1,6 @@
<template>
<div style="display:flex;">
<div style="position:relative;width: 100%;" class="button">
<div class="left">
<codemirror
v-model="exampleData"
:value="codeid"
@ -324,7 +324,8 @@ export default {
}
}
})
.catch(err => {
.catch(res => {
res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。')
this.loadIns.close()
});
clearTimeout(this.timer);
@ -366,6 +367,10 @@ export default {
</script>
<style lang="scss" scoped>
.left{
position: relative;
width: calc(100% - 400px);
}
.text-wrapper {
white-space: pre-wrap;
}

@ -1,8 +1,17 @@
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
*/
title: '量化投资策略建模实验教学系统',
title: isHh ? '智信云量化投资策略建模实验教学系统' : '量化投资策略建模实验教学系统',
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}

@ -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`, //项目选择下拉框+项目信息+判分点信息展示

@ -185,9 +185,7 @@ export function post(url, params) {
);
break;
case 500:
this.$message.error(
res.data.errmessage
);
reject(res.data)
break;
case 404:
this.$message.error(

@ -1,13 +1,15 @@
<template>
<div>
<div class="flex header">
<p>{{$config.title}}</p>
<div class="flex header" :class="{hh: $config.isHh}">
<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