Commit 13f1e746 by 李伟康

commit

1 parent 0f2379b5
......@@ -141,8 +141,7 @@ const actions = {
let userInfo = util.getLocalStorage('dj_scrm_userInfo')
if (redirect_uri) util.setLocalStorage('dj_scrm_redirect_uri', redirect_uri)
let dj_scrm = util.getLocalStorage('dj_scrm_corpId')
if (corpId) util.setLocalStorage('dj_scrm_corpId', { corpId })
state.testView = `${JSON.stringify(dj_scrm)}_\n__${corpId}____\n____${JSON.stringify(getParams())}`
if (!state.testView) state.testView = `${JSON.stringify(dj_scrm)}_\n__${corpId}____\n____${JSON.stringify(getParams())}`
if (dj_scrm && userInfo) {
if (dj_scrm.corpId != userInfo.entmicroId) {
util.showLoading()
......@@ -152,14 +151,15 @@ const actions = {
login({
dispatch,
to
})
}, corpId)
},
}
const login = ({ dispatch, to }) => {
const login = ({ dispatch, to }, corpId) => {
let loginToken = util.getLocalStorage('dj_scrm_loginToken')
let userInfo = util.getLocalStorage('dj_scrm_userInfo')
let sessionId = util.getSessionId()
if (corpId) util.setLocalStorage('dj_scrm_corpId', { corpId })
dispatch('registerHttp', sessionId || '')
if (!userInfo || !sessionId) {
if (loginToken) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!