/* import router from '@/router'
|
import * as types from './types.js' */
|
import {
|
refreshToken
|
} from '@/server/common/httpFetch'
|
export default {
|
/* isLoginAction(context, info) {
|
// context.commit(IS_LOGIN, info)
|
}, */
|
openNewWindowtab(context, urlStr) {
|
if (!urlStr) {
|
return false
|
}
|
refreshToken().then(result => {
|
if (
|
sessionStorage.getItem('userInfo') &&
|
result.loginedInfo &&
|
result.expires_in
|
) {
|
/* 登陆用户重要信息 */
|
let userInfo =
|
sessionStorage.getItem('userInfo') !== '' &&
|
JSON.parse(sessionStorage.getItem('userInfo'))
|
let basicUserInfo = {}
|
basicUserInfo.officeId = userInfo.officeId
|
basicUserInfo.orgId = userInfo.orgId
|
basicUserInfo.username = userInfo.username
|
/* 信息拼接 */
|
urlStr +=
|
'?loginedInfo=' +
|
JSON.stringify(result.loginedInfo) +
|
'&expires_in=' +
|
JSON.stringify(result.expires_in)
|
/* +
|
'&basicUserInfo=' +
|
JSON.stringify(basicUserInfo) */
|
}
|
window.open(urlStr, '_blank')
|
})
|
}
|
}
|