点击退出跳回对应的职站页面

20240205
e 3 years ago
parent 97e1da5ddf
commit 6acd7e6579
  1. 7
      src/components/case/index.vue
  2. 5
      src/layouts/header/index.vue
  3. 4
      src/pages/index/list/index.vue

@ -245,7 +245,6 @@ export default {
let stopTime = this.getQueryVariable('stopTime') let stopTime = this.getQueryVariable('stopTime')
let timestamp = +stopTime; let timestamp = +stopTime;
if (timestamp != null){ if (timestamp != null){
sessionStorage.setItem('timestamp', timestamp)
}else{ }else{
sessionStorage.setItem('timestamp', null) sessionStorage.setItem('timestamp', null)
} }
@ -253,16 +252,12 @@ export default {
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid) sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId) sessionStorage.setItem('systemId', systemId)
} sessionStorage.setItem('timestamp', timestamp)
if (projectId){
sessionStorage.setItem('projectId', projectId) sessionStorage.setItem('projectId', projectId)
sessionStorage.setItem('assessmentId', assessmentId) sessionStorage.setItem('assessmentId', assessmentId)
sessionStorage.setItem('classId', classId) sessionStorage.setItem('classId', classId)
this.assessmentId = assessmentId this.assessmentId = assessmentId
this.classId = classId this.classId = classId
}else{
// this.assessmentId = ''
// this.classId = ''
} }
let tokens = sessionStorage.getItem('token') let tokens = sessionStorage.getItem('token')
if(tokens || token){ if(tokens || token){

@ -33,8 +33,9 @@ export default {
}) })
}, },
exit(){ exit(){
let stopTime = sessionStorage.getItem('timestamp') let assessmentId = sessionStorage.getItem('assessmentId')
if (stopTime){ console.log(assessmentId)
if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){
window.location = 'http://39.108.250.202/student/#/ass/list' window.location = 'http://39.108.250.202/student/#/ass/list'
}else{ }else{
let cid = sessionStorage.getItem('cid') let cid = sessionStorage.getItem('cid')

@ -46,11 +46,7 @@ export default {
sessionStorage.setItem('token', token) sessionStorage.setItem('token', token)
sessionStorage.setItem('cid', cid) sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId) sessionStorage.setItem('systemId', systemId)
}
if (timestamp != null){
sessionStorage.setItem('timestamp', timestamp) sessionStorage.setItem('timestamp', timestamp)
}else{
sessionStorage.setItem('timestamp', null)
} }
}, },
methods: { methods: {

Loading…
Cancel
Save