Commit 9ea7ab3a by 李伟康

commit

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