|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import {history as umiHistory} from 'umi'
|
|
|
|
|
import { history as umiHistory } from 'umi'
|
|
|
|
|
import localStorageUtil from './localStorageUtil';
|
|
|
|
|
import request from './request';
|
|
|
|
|
import dataUtil from './dataUtil';
|
|
|
|
@ -7,8 +7,14 @@ import timeUtil from './timeUtil';
|
|
|
|
|
const DataUtil = new dataUtil();
|
|
|
|
|
const DateUtil = new timeUtil();
|
|
|
|
|
const LocalStorageUtil = new localStorageUtil();
|
|
|
|
|
export { LocalStorageUtil, request, DataUtil, DateUtil };
|
|
|
|
|
const getLoginId = () => {
|
|
|
|
|
let userInfo: any = LocalStorageUtil.get("user_info")
|
|
|
|
|
return userInfo && userInfo.loginId ? userInfo.loginId : null
|
|
|
|
|
|
|
|
|
|
export const qiankunJump = (url:string,name='页面名称',params = null) =>{
|
|
|
|
|
window.__POWERED_BY_QIANKUN__ ? history.pushState(params,name,url): umiHistory.push(url)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
export { LocalStorageUtil, request, DataUtil, DateUtil, getLoginId };
|
|
|
|
|
|
|
|
|
|
export const qiankunJump = (url: string, name = '页面名称', params = null) => {
|
|
|
|
|
window.__POWERED_BY_QIANKUN__ ? history.pushState(params, name, url) : umiHistory.push(url)
|
|
|
|
|
}
|
|
|
|
|