diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 5c27c0d..6554a06 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -245,7 +245,6 @@ export default { let stopTime = this.getQueryVariable('stopTime') let timestamp = +stopTime; if (timestamp != null){ - sessionStorage.setItem('timestamp', timestamp) }else{ sessionStorage.setItem('timestamp', null) } @@ -253,16 +252,12 @@ export default { sessionStorage.setItem('token', token) sessionStorage.setItem('cid', cid) sessionStorage.setItem('systemId', systemId) - } - if (projectId){ + sessionStorage.setItem('timestamp', timestamp) sessionStorage.setItem('projectId', projectId) sessionStorage.setItem('assessmentId', assessmentId) sessionStorage.setItem('classId', classId) this.assessmentId = assessmentId this.classId = classId - }else{ - // this.assessmentId = '' - // this.classId = '' } let tokens = sessionStorage.getItem('token') if(tokens || token){ diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index bd896cb..0ce171f 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -33,8 +33,9 @@ export default { }) }, exit(){ - let stopTime = sessionStorage.getItem('timestamp') - if (stopTime){ + let assessmentId = sessionStorage.getItem('assessmentId') + console.log(assessmentId) + if (assessmentId != 'null' && assessmentId != null && assessmentId != ''){ window.location = 'http://39.108.250.202/student/#/ass/list' }else{ let cid = sessionStorage.getItem('cid') diff --git a/src/pages/index/list/index.vue b/src/pages/index/list/index.vue index aa00e68..239da81 100644 --- a/src/pages/index/list/index.vue +++ b/src/pages/index/list/index.vue @@ -46,11 +46,7 @@ export default { sessionStorage.setItem('token', token) sessionStorage.setItem('cid', cid) sessionStorage.setItem('systemId', systemId) - } - if (timestamp != null){ sessionStorage.setItem('timestamp', timestamp) - }else{ - sessionStorage.setItem('timestamp', null) } }, methods: {