| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (sessionStorage.getItem('devError') === 'true') { |
| | | sessionStorage.clear() |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login') |
| | | window.location.reload() |
| | | return |
| | | } |
| | | |
| | | if (!sessionStorage.getItem('UserID')) { |
| | | sessionStorage.removeItem('isEditState') |
| | | sessionStorage.removeItem('appType') |
| | | this.props.history.replace('/login') |
| | | return |
| | | } |
| | | |
| | | sessionStorage.setItem('editMenuType', 'menu') // 编辑菜单类型 |
| | | |
| | | window.GLOB.curDate = moment().format('YYYY-MM-DD') |
| | | window.GLOB.UserComponentMap = new Map() // 缓存用户自定义组件 |
| | | window.GLOB.TabsMap = new Map() // 缓存用户操作的标签页 |
| | | window.GLOB.urlFields = [] // url变量 |
| | | window.GLOB.customMenu = null // 保存菜单信息 |
| | | window.GLOB.developing = true |
| | | |
| | | try { |
| | | let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) |
| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | if (!sessionStorage.getItem('UserID')) return |
| | | |
| | | MKEmitter.addListener('changePopview', this.initPopview) |
| | | MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave) |
| | | setTimeout(() => { |
| | |
| | | this.setState({ |
| | | menuloading: false |
| | | }) |
| | | |
| | | if (!error) { |
| | | notification.warning({ |
| | | top: 92, |