区分基础和挑战

chengdu
yujialong 4 years ago
parent 39656f2f1d
commit ead39d6803
  1. 2
      src/components/page/Assessment.vue
  2. 8
      src/config/index.js
  3. 17
      src/utils/core.js

@ -239,7 +239,7 @@ export default {
}else if(row.status == 3){
return this.$message.warning('该实验已经结束')
}else{
this.core.toSubSystem(row.className,row.id,row.classId)
this.core.toSubSystem(row.className,row.id,row.classId,this.pattern)
}
},
show(row) {

@ -10,7 +10,11 @@ export default {
*/
locale: 'zh',
/**
* @description 跳转子系统链接
* @description 基础模式子系统链接
*/
subSystem: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/first' : 'http://122.9.154.146/first'
subSystem1: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kd/#/Dashboard' : 'http://122.9.154.146/kd/#/Dashboard',
/**
* @description 挑战模式子系统链接
*/
subSystem2: location.host.includes('116.63.168.79') ? 'http://116.63.168.79/kdChallenge/#/Dashboard' : 'http://122.9.154.146/kdChallenge/#/Dashboard'
}

@ -158,7 +158,7 @@ function getCaption(obj){
return obj;
}
function toSubSystem(className = '',id = '',classId = ''){
function toSubSystem(className = '',id = '',classId = '',pattern = ''){
sessionStorage.setItem("token",store.state.token);//token
sessionStorage.setItem("userName",store.state.userName);//用户名
sessionStorage.setItem("class",className);//班级名
@ -182,12 +182,15 @@ function toSubSystem(className = '',id = '',classId = ''){
source:source
}
this.$get(this.api.queryProjectIdAndPattenById,params).then(res => {
let projectId = res.Info.projectId
let pattern = res.Info.pattern
sessionStorage.setItem("id",projectId)
})
}
location.href = config.subSystem
let projectId = res.Info.projectId
let pattern = res.Info.pattern
sessionStorage.setItem("id",projectId)
location.href = pattern === 0 ? config.subSystem1 : config.subSystem2
})
}else{
location.href = config.subSystem1
}
}
function encodeString(str) {

Loading…
Cancel
Save