Commit 6d08ea3b by 李伟康

commit

1 parent 951ea3c9
...@@ -69,7 +69,7 @@ const actions = { ...@@ -69,7 +69,7 @@ const actions = {
login ({ dispatch }, CORPID) { login ({ dispatch }, CORPID) {
let [redirectUrl] = window.location.href.split('?') let [redirectUrl] = window.location.href.split('?')
const code = getParams('code') const code = getParams('code')
if(CORPID) util.setLocalStorage('dj_scrm_corpId', { corpId: CORPID }) if (CORPID) util.setLocalStorage('dj_scrm_corpId', { corpId: CORPID })
if (code) { if (code) {
const { corpId } = util.getLocalStorage('dj_scrm_corpId') const { corpId } = util.getLocalStorage('dj_scrm_corpId')
ssoApi ssoApi
...@@ -140,14 +140,26 @@ const actions = { ...@@ -140,14 +140,26 @@ const actions = {
navigation ({ dispatch }, to) { navigation ({ dispatch }, to) {
let { redirect_uri, corpId } = getParams() let { redirect_uri, corpId } = getParams()
let userInfo = util.getLocalStorage('dj_scrm_userInfo') let userInfo = util.getLocalStorage('dj_scrm_userInfo')
let loginList = util.getLocalStorage('dj_scrm_accountList')
if (redirect_uri) util.setLocalStorage('dj_scrm_redirect_uri', redirect_uri) if (redirect_uri) util.setLocalStorage('dj_scrm_redirect_uri', redirect_uri)
let dj_scrm = util.getLocalStorage('dj_scrm_corpId') let dj_scrm = util.getLocalStorage('dj_scrm_corpId')
if (!state.testView) state.testView = `${JSON.stringify(userInfo)}`
if (dj_scrm && userInfo) { if (dj_scrm && userInfo) {
if (dj_scrm.corpId != userInfo.entmicroId) { if (dj_scrm.corpId != userInfo.entmicroId) {
util.showLoading() util.showLoading()
removeStoreage() removeStoreage()
} }
} }
try {
if (loginList && dj_scrm) {
loginList.length && loginList.map(e => {
if (e.entmicroId != dj_scrm.corpId) throw false
})
}
} catch (error) {
util.showLoading()
removeStoreage()
}
login({ login({
dispatch, dispatch,
to to
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!