| | |
| | | okText: this.state.dict['header.confirm'], |
| | | cancelText: this.state.dict['header.cancel'], |
| | | onOk() { |
| | | return Api.logoutsystem().then(res => { |
| | | if (res.status) { |
| | | sessionStorage.removeItem('UserID') |
| | | _this.props.resetState() |
| | | _this.props.history.replace('/login') |
| | | } else { |
| | | message.warning(res.message) |
| | | } |
| | | }) |
| | | // return Api.logoutsystem().then(res => { |
| | | // if (res.status) { |
| | | // sessionStorage.removeItem('UserID') |
| | | // _this.props.resetState() |
| | | // _this.props.history.replace('/login') |
| | | // } else { |
| | | // message.warning(res.message) |
| | | // } |
| | | // }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | |
| | | |
| | | async loadmenu () { |
| | | // 获取主菜单 |
| | | let result = await Api.getMainMenuData() |
| | | let result = await Api.getSystemConfig({func: 'sPC_Get_MainMenu'}) |
| | | if (result.status) { |
| | | let _avatar = Utils.getrealurl(result.HeadIcon) // 头像 |
| | | if (_avatar) { |