河海版本和职站测试正式自动切换

UI_2022-02-10 M1.0
yujialong 4 years ago
parent 381e16a4da
commit ce0f24ebb9
  1. 2
      src/components/common/Header.vue
  2. 105
      src/components/page/Backstage.vue
  3. 16
      src/components/page/Login.vue
  4. 2
      src/components/page/Project.vue
  5. 2
      src/components/page/RegisterForm.vue
  6. 98
      src/components/page/TeachingVideo.vue
  7. 76
      src/config/index.js
  8. 12
      src/utils/api.js

@ -3,7 +3,7 @@
<div v-if="this.$route.path=='/personalcenter'"
class="goBack" v-preventReClick @click="back"><i class="el-icon-arrow-left"></i>返回</div>
<div v-else class="logo">
<img src="../../assets/img/logo.png">
<img v-if="!$config.isHh" src="../../assets/img/logo.png">
</div>
<div class="header-right">
<div class="header-user-con">

@ -4,7 +4,7 @@
<input type="text" placeholder="请输入关键词" v-model="keyword">
<button>搜索</button>
</div>
<div class="wrap">
<div class="wrap" :class="isHh ? 'isHh' : (isBeta ? '' : 'isOccu')">
<template v-for="(item,index) in systemList">
<a class="item" @click="goSubSystem(index)" :key="index" v-if="!keyword || item.name.includes(keyword)">
<img :src="item.imgSrc" alt="">
@ -20,7 +20,9 @@ export default {
name: 'backstage',
data() {
return {
host: location.host.includes('liuwanr.cn') ? 'http://www.liuwanr.cn/' : 'http://www.occupationlab.com/',
host: this.$config.host,
isHh: this.$config.isHh,
isBeta: this.$config.isBeta,
keyword: '',
searchTimer: null,
schoolId: this.$store.state.schoolId,
@ -28,7 +30,20 @@ export default {
userId: this.$store.state.userId,
name: this.$store.state.name,
roleId: this.$store.state.accountRole,
systemList: [{
systemList: this.$config.isHh ? [{
imgSrc: require('../../assets/img/station1.png'),
name: '智信云Python程序设计<br>教学系统'
},{
imgSrc: require('../../assets/img/station2.png'),
name: '智信云经济金融建模<br>实验教学系统'
},
{
imgSrc: require('../../assets/img/station8.png'),
name: '智信云金融随机过程<br>实验教学系统'
},{
imgSrc: require('../../assets/img/station9.png'),
name: '智信云量化投资策略建模<br>实验教学系统'
}] : (this.$config.isBeta ? [{
imgSrc: require('../../assets/img/station1.png'),
name: 'Python程序设计<br>教学系统'
},{
@ -37,8 +52,7 @@ export default {
},{
imgSrc: require('../../assets/img/station3.png'),
name: 'Python可视化<br>实验教学系统'
},
{
},{
imgSrc: require('../../assets/img/station8.png'),
name: '金融随机过程<br>实验教学系统'
},{
@ -47,22 +61,20 @@ export default {
},{
imgSrc: require('../../assets/img/station10.png'),
name: '大数据分析<br>实验教学系统'
},{
imgSrc: require('../../assets/img/station11.png'),
name: 'Python数据清洗<br>教学实验系统'
},{
imgSrc: require('../../assets/img/station12.png'),
name: 'Python数据采集(爬虫)<br>教学实验系统'
},{
imgSrc: require('../../assets/img/station4.png'),
name: '数字货币交易'
},
{
imgSrc: require('../../assets/img/station6.png'),
name: '担保实训教学系统'
},
// {
// imgSrc: require('../../assets/img/station11.png'),
// name: 'Python<br>'
// },{
// imgSrc: require('../../assets/img/station12.png'),
// name: 'Python<br>'
// },
// {
// imgSrc: require('../../assets/img/station4.png'),
// name: ''
// },
// {
// imgSrc: require('../../assets/img/station6.png'),
// name: ''
// },
// {
@ -73,17 +85,27 @@ export default {
// imgSrc: require('../../assets/img/station7.png'),
// name: ''
// },
]
] : [{
imgSrc: require('../../assets/img/station1.png'),
name: 'Python程序设计<br>教学系统'
},{
imgSrc: require('../../assets/img/station2.png'),
name: '经济金融建模<br>实验教学系统'
},{
imgSrc: require('../../assets/img/station3.png'),
name: 'Python可视化<br>实验教学系统'
},{
imgSrc: require('../../assets/img/station8.png'),
name: '金融随机过程<br>实验教学系统'
},{
imgSrc: require('../../assets/img/station9.png'),
name: '量化投资策略建模<br>实验教学系统'
},{
imgSrc: require('../../assets/img/station10.png'),
name: '大数据分析<br>实验教学系统'
}])
};
},
// watch: {
// keyword: function(val) {
// clearTimeout(this.searchTimer)
// this.searchTimer = setTimeout(() => {
// this.initData()
// },500)
// }
// },
mounted() {
this.getToken()
},
@ -95,25 +117,21 @@ export default {
let userName = window.btoa(encodeURIComponent(this.name))
if(type == 0){
href = `${host}pyTrials/#/`
// href = 'http://192.168.31.154:8080/'
if(process.env.NODE_ENV === 'development') href = 'http://192.168.31.154:8080/'
}else if(type == 1){
href = `${host}pyFinance/#/`
// href = 'http://192.168.31.154:8083/'
}else if(type == 2){
href = `${host}pyProjects/#/`
href = this.isHh ? `${host}pyRandom/#/` : `${host}pyProjects/#/`
}else if(type == 3){
href = `${host}pyRandom/#/`
// href = 'http://192.168.31.154:8083/'
href = this.isHh ? `${host}pyQuantification/#/` : `${host}pyRandom/#/`
}else if(type == 4){
href = `${host}pyQuantification/#/`
// href = 'http://192.168.31.154:8084/'
}else if(type == 5){
href = `${host}pyAnalysis/#/`
}else if(type == 6){
href = `${host}pyDataclean/#/`
}else if(type == 7){
href = `${host}pyAcquisition/#/`
// href = 'http://192.168.31.154:8084/'
}else if(type == 8){
window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`)
}else if(type == 9){
@ -153,7 +171,7 @@ export default {
.search{
position: relative;
width: 30%;
margin: 100px auto 100px;
margin: 100px auto 150px;
border-radius: 30px;
border: 1px solid #9076FF;
border-right: 0;
@ -190,8 +208,7 @@ export default {
box-sizing: border-box;
.item{
// width: 16%;
width: 30%;
width: 16%;
margin: 20px;
text-align: center;
cursor: pointer;
@ -209,5 +226,15 @@ export default {
color: #333;
}
}
&.isHh{
.item{
width: 21%;
}
}
&.isOccu{
.item{
width: 30%;
}
}
}
</style>

@ -1,21 +1,17 @@
<template>
<div class="wrap">
<div class="header">
<div class="header" v-if="!$config.isHh">
<div class="logo">
<img src="../../assets/img/logo.png" />
</div>
<p class="header_title">
<!-- <a>方案</a>
<a>活动</a>
<a>社区</a>
<a>关于我们</a> -->
</p>
<p class="nul"></p>
</div>
<div class="bg">
<div class="left">
<div class="text">
<div class="text" v-if="!$config.isHh">
<p>欢迎使用</p>
<p>Occupation Lab</p>
</div>
@ -140,6 +136,7 @@ import register from './RegisterForm';
export default {
data: function() {
return {
schoolId: this.$config.schoolId,
activeName: '0',
isReg: false,
loginForm: {
@ -162,7 +159,6 @@ export default {
},
roleDialog: false,
userId: '',
schoolId: '',
roleId: '',
roleList: [],
forgetVisible: false,
@ -200,7 +196,7 @@ export default {
let data = {
account: this.activeName == '0' ? this.loginForm.username : this.phoneParam.userphone,
password: this.activeName == '0' ? this.loginForm.password : this.phoneParam.phonePassword,
schoolId: 2105,
schoolId: this.schoolId,
source: this.activeName
};
this.$get(this.api.loginSchool, data)
@ -257,10 +253,8 @@ export default {
}
})
if(this.roleList.length > 1) {
console.log('role:true')
this.roleDialog = true
}else{
console.log('role:false')
this.roleId = this.roleList[0].roleId
this.submitForm(form)
}
@ -465,7 +459,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
height: calc(100% - 60px);
height: 100%;
.left{
position: relative;
width: 40%;

@ -101,7 +101,7 @@ export default {
name: 'project',
data() {
return {
host: location.host.includes('liuwanr.cn') ? ' http://www.liuwanr.cn/' : 'http://www.occupationlab.com/',
host: this.$config.host,
userId: this.$store.state.userId,
schoolId: this.$store.state.schoolId,
studentId: this.$store.state.studentId,

@ -91,7 +91,7 @@ export default {
password: '',
rePassword: '',
roleId: 4,
schoolId: 2105
schoolId: this.$config.schoolId
},
regRules: {
userName: [{ required: true, message: '请输入学生姓名', trigger: 'blur' }],

@ -199,81 +199,161 @@ export default {
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/print%28%29%E5%87%BD%E6%95%B0.pptx",
"isdel": 0,
"title": "项目一 print()函数"
},{
"id": 5,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/项目一.mp4",
"isdel": 0,
"title": "项目一 print()函数(操作视频)"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E6%95%B0%E6%8D%AE%E8%BD%AC%E6%8D%A2%E4%B8%8E%E6%8B%BC%E6%8E%A5.pptx",
"isdel": 0,
"title": "项目二 数据转换与拼接"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/程序设计项目二数据转换与拼接.mp4",
"isdel": 0,
"title": "项目二 数据转换与拼接(操作视频)"
}, {
"id": 3,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/if%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD%E8%AF%AD%E5%8F%A5.pptx",
"isdel": 0,
"title": "项目三 if条件判断语句"
},{
"id": 3,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/if.mp4",
"isdel": 0,
"title": "项目三 if条件判断语句(操作视频)"
}, {
"id": 6,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/input%28%29%E5%87%BD%E6%95%B0.pptx",
"isdel": 0,
"title": "项目四 input()函数"
}, {
"id": 6,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/进阶(input)函数.mp4",
"isdel": 0,
"title": "项目四 input()函数(操作视频)"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E5%88%97%E8%A1%A8%E5%85%83%E7%BB%84%E5%AD%97%E5%85%B8.pptx",
"isdel": 0,
"title": "项目五 列表元组字典"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/列表元组字典.mp4",
"isdel": 0,
"title": "项目五 列表元组字典(操作视频)"
},{
"id": 1,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/for%E5%BE%AA%E7%8E%AF.pptx",
"isdel": 0,
"title": "项目六 for循环"
},{
"id": 1,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/for循环.mp4",
"isdel": 0,
"title": "项目六 for循环(操作视频)"
}, {
"id": 2,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/while%E5%BE%AA%E7%8E%AF.pptx",
"isdel": 0,
"title": "项目七 while循环"
},{
"id": 2,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/while循环.mp4",
"isdel": 0,
"title": "项目七 while循环(操作视频)"
}, {
"id": 7,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E5%87%BD%E6%95%B0.pptx",
"isdel": 0,
"title": "项目八 函数"
},{
"id": 7,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/函数.mp4",
"isdel": 0,
"title": "项目八 函数(操作视频)"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E7%B1%BB%E4%B8%8E%E5%AF%B9%E8%B1%A1%E4%B8%80.pptx",
"isdel": 0,
"title": "项目九 类与对象一"
},{
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/类与对象1.mp4",
"isdel": 0,
"title": "项目九 类与对象一(操作视频)"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E7%B1%BB%E4%B8%8E%E5%AF%B9%E8%B1%A1%E4%BA%8C.pptx",
"isdel": 0,
"title": "项目十 类与对象二"
},{
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/类与对象2.mp4",
"isdel": 0,
"title": "项目十 类与对象二(操作视频)"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E6%A8%A1%E5%9D%97.pptx",
"isdel": 0,
"title": "项目十一 模块"
},{
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/模块.mp4",
"isdel": 0,
"title": "项目十一 模块(操作视频)"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E7%BB%BC%E5%90%88%E8%AE%AD%E7%BB%83.pptx",
"isdel": 0,
"title": "项目十二 综合训练"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/综合训练1.mp4",
"isdel": 0,
"title": "项目十二 综合训练(操作视频)"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E5%BA%8F%E5%88%97%E5%BA%94%E7%94%A8.pptx",
"isdel": 0,
"title": "项目十三 序列应用"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/序列应用.mp4",
"isdel": 0,
"title": "项目十三 序列应用(操作视频)"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E6%95%B0%E6%8D%AE%E5%BA%93.pptx",
"isdel": 0,
"title": "项目十四 数据库"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/数据库(1).mp4",
"isdel": 0,
"title": "项目十四 数据库(操作视频)"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E7%88%AC%E8%99%AB.pptx",
"isdel": 0,
"title": "项目十五 爬虫"
},{
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/爬虫.mp4",
"isdel": 0,
"title": "项目十五 爬虫(操作视频)"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E7%A8%8B%E5%BA%8F%E8%AE%BE%E8%AE%A1ppt%281%29/%E6%9C%B4%E7%B4%A0%E8%B4%9D%E5%8F%B6%E6%96%AF%E5%88%86%E7%B1%BB%E7%AE%97%E6%B3%95.pptx",
"isdel": 0,
"title": "项目十六 朴素贝叶斯分类算法"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/programming/贝叶斯.mp4",
"isdel": 0,
"title": "项目十六 朴素贝叶斯分类算法(操作视频)"
}],
videoList4: [{
"id": 9,
@ -647,6 +727,11 @@ export default {
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9/7Python%E9%87%91%E8%9E%8D%E9%9A%8F%E6%9C%BA%E8%BF%87%E7%A8%8B%E5%AE%9E%E9%AA%8C%E6%95%99%E5%AD%A6%E7%B3%BB%E7%BB%9F%EF%BC%88%E7%AC%AC%E4%B8%83%E9%A1%B9%EF%BC%89.pptx",
"isdel": 0,
"title": "项目七 平稳随机过程"
}, {
"id": 9,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/video/系统一 项目七 金融随机过程.mp4",
"isdel": 0,
"title": "项目七 平稳随机过程(操作视频)"
}, {
"id": 4,
"links": "https://huoran.oss-cn-shenzhen.aliyuncs.com/ppt/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9/8%E7%A6%BB%E6%95%A3%E5%8F%82%E6%95%B0Markov%E9%93%BE.pptx",
@ -1047,6 +1132,7 @@ export default {
this.isDone = true
this.$message.warning('测评时间结束');
clearInterval(this.timer)
this.prevQues()
}
},1000)
},
@ -1104,8 +1190,11 @@ export default {
if(res.data){
this.question = res.data
this.selected = this.history[this.question.currentQuestionSortNo-1]
this.handleQues()
this.isDone ? this.submitQues() : this.handleQues()
}
}else if(this.isDone){
if(!this.selected) this.selected = 'A'
this.submitQues()
}
},
async submitQues() {
@ -1143,11 +1232,7 @@ export default {
},
systemChange(){
this.videoSrc = ''
if(this.systemId != 6){
this.preview(this.videoList1[0])
}else{
this.preview(this.videoList6[0])
}
this.preview(this[`videoList${this.systemId}`][0])
},
preview(row){
let url = row.links
@ -1157,7 +1242,6 @@ export default {
this.iframeSrc = ''
this.curLink = row.title
let ext = this.core.getFileExt(url)
console.log(11,ext,url,this.core.isVideo(ext))
if(this.core.isVideo(ext)){
this.videoSrc = url
}else if(ext == 'pdf'){

@ -1,8 +1,26 @@
const isHh = location.host.includes('10.196.131.73') //是否是河海版本
const isBeta = process.env.NODE_ENV === 'development' || location.host.includes('liuwanr.cn') //是否是职站测试
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 是否是职站测试
*/
isBeta,
/**
* @description 配置显示在浏览器标签的title
*/
title: '职站',
title: isHh ? '学生端' : '职站',
/**
* @description 学校id
*/
schoolId: isHh ? 729 : 2105,
/**
* @description 是否使用国际化默认为false
* 如果不使用则需要在路由中给需要在菜单中展示的路由设置meta: {title: 'xxx'}
@ -24,8 +42,52 @@ export default {
/**
* @description 系统列表
*/
systemList: [
systemList: isHh ? [{
id: 1,
label: '智信云Python程序设计教学系统'
},{
id: 4,
label: '智信云经济金融建模实验教学系统'
},
{
id: 6,
label: '智信云金融随机过程实验教学系统'
},{
id: 7,
label: '智信云量化投资策略建模实验教学系统'
},] : (isBeta ? [{
id: 1,
label: 'Python程序设计教学系统'
}
// ,{
// id: 2,
// label: '跨国仿真系统'
// },{
// id: 3,
// label: '期权期货系统'
// }
,{
id: 4,
label: '经济金融建模实验教学系统'
},{
id: 5,
label: 'Python可视化实验教学系统'
},{
id: 6,
label: '金融随机过程实验教学系统'
},{
id: 7,
label: '量化投资策略建模实验教学系统'
},{
id: 8,
label: '大数据分析实验教学系统'
},{
id: 9,
label: 'Python数据清洗教学实验系统'
},{
id: 10,
label: 'Python数据采集(爬虫)教学实验系统'
}] : [{
id: 1,
label: 'Python程序设计教学系统'
},{
@ -43,13 +105,5 @@ export default {
},{
id: 8,
label: '大数据分析实验教学系统'
},
// {
// id: 9,
// label: 'Python数据清洗教学实验系统'
// },{
// id: 10,
// label: 'Python数据采集(爬虫)教学实验系统'
// }
],
}]),
}

@ -1,15 +1,9 @@
import config from '@/config'
// let loginhost = 'http://192.168.31.125:8090/liuwanr'
// let host = 'http://192.168.31.152:9090/evaluation'//榕
// let host = 'http://192.168.31.125:9090/evaluation'//林
let loginhost = ''
let host = ''
if(location.host.includes('liuwanr.cn') || process.env.NODE_ENV === 'development'){
loginhost = 'http://www.liuwanr.cn/liuwanr'
host = 'http://www.liuwanr.cn/evaluation'
}else{
loginhost = 'http://www.occupationlab.com/liuwanr'
host = 'http://www.occupationlab.com/evaluation'
}
let host = `${config.host}evaluation`
let loginhost = `${config.host}liuwanr`
export default {
host,

Loading…
Cancel
Save