|
|
@ -2,7 +2,7 @@ |
|
|
|
import Setting from '@/setting' |
|
|
|
import Setting from '@/setting' |
|
|
|
import util from '@/libs/util' |
|
|
|
import util from '@/libs/util' |
|
|
|
import { Message } from 'element-ui' |
|
|
|
import { Message } from 'element-ui' |
|
|
|
import {post,get,del,put} from '@/plugins/requests/index.js' |
|
|
|
import { post, get, del, put } from '@/plugins/requests/index.js' |
|
|
|
import api from '@/api' |
|
|
|
import api from '@/api' |
|
|
|
import Cookie from 'js-cookie' |
|
|
|
import Cookie from 'js-cookie' |
|
|
|
import router from '@/router' |
|
|
|
import router from '@/router' |
|
|
@ -22,15 +22,14 @@ export default { |
|
|
|
SET_MANAGER: (state, isManager) => { |
|
|
|
SET_MANAGER: (state, isManager) => { |
|
|
|
state.isManager = isManager |
|
|
|
state.isManager = isManager |
|
|
|
}, |
|
|
|
}, |
|
|
|
logout() { |
|
|
|
logout () { |
|
|
|
const url = location.href |
|
|
|
const isAdmin = Cookie.get('manager') |
|
|
|
let href = process.env.NODE_ENV === 'development' ? |
|
|
|
let href = process.env.NODE_ENV === 'development' ? |
|
|
|
`http://${location.hostname}:8082/#/` : |
|
|
|
`http://${location.hostname}:8082/#/` : |
|
|
|
`${url.includes('huorantech.cn') ? `https://www.occupationlab.com` : location.origin}${Cookie.get('manager') ? |
|
|
|
`${location.origin}${isAdmin ? '/admin' : ''}/#/` |
|
|
|
'/admin' : |
|
|
|
if (location.origin === 'http://121.37.12.51') { |
|
|
|
(url.includes('huorantech.cn') || url.includes('izhixinyun.com')) ? |
|
|
|
href = `http://121.37.12.51/${isAdmin ? 'admin' : 'student'}/#/` |
|
|
|
'' : |
|
|
|
} |
|
|
|
'/student'}/#/` |
|
|
|
|
|
|
|
let assessmentId = sessionStorage.getItem('assessmentId') |
|
|
|
let assessmentId = sessionStorage.getItem('assessmentId') |
|
|
|
if (assessmentId != 'null' && assessmentId != null && assessmentId != '') { |
|
|
|
if (assessmentId != 'null' && assessmentId != null && assessmentId != '') { |
|
|
|
href += `ass/list` |
|
|
|
href += `ass/list` |
|
|
@ -43,8 +42,8 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
actions: { |
|
|
|
actions: { |
|
|
|
setManager({ state,commit },isManager) { |
|
|
|
setManager ({ state, commit }, isManager) { |
|
|
|
commit('SET_MANAGER',isManager) |
|
|
|
commit('SET_MANAGER', isManager) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |