Commit 9ea7ab3a by 李伟康

commit

1 parent 2e9c8b0e
......@@ -78,10 +78,11 @@ const actions = {
code,
corpId
})
.then(({ code, data, message }) => {
.then(({ code, data }) => {
let url = `${redirectUrl.split('#')[0]}#/`
let route = state.lastPath == 'home' ? '' : state.lastPath
state.showWindow = true
console.log(data)
if (code == '0') {
if (data.loginList.length) {
route = route.replace('.', '/')
......@@ -92,6 +93,11 @@ const actions = {
} else {
let redirect_uri = util.getLocalStorage('dj_scrm_redirect_uri')
let [userInfo] = data.loginList
if (userInfo.status == 4) {
/**账号过期 */
window.location.href = `${url}common/overdue`
return
}
util.setLocalStorage('dj_scrm_userInfo', userInfo)
util.setSessionId(userInfo.sessionId)
dispatch('registerHttp', userInfo.sessionId)
......@@ -105,10 +111,7 @@ const actions = {
window.location.href = `${url}common/nothing`
}
} else {
// /**账号过期 (暂时没有字段判断是否过期) */
window.location.href = `${url}common/overdue`
Notify(message)
window.location.href = `${url}common/nothing`
}
})
} else {
......
......@@ -48,8 +48,13 @@ export default {
'',
() => {
let loginToken = this.getLocalStorage('dj_scrm_loginToken')
let { merchantId, accountName } = e
let { merchantId, accountName , status} = e
let loginAccount = accountName
if (status == 4) {
this.hideLoading()
this.showToast('该账户已到期')
return
}
ssoApi
.selectAccount({
loginAccount,
......
......@@ -41,7 +41,6 @@
<script type='text/ecmascript-6'>
const { subsystemInfo } = window.$fetchConfig
import { ssoApi } from '@/api'
import { Notify } from 'vant'
export default {
name: '',
data() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!