| | |
| | | Api.getCacheConfig(_param).then(result => { |
| | | if (result.status) { |
| | | if (result.LongParam) { |
| | | this.setState({ |
| | | loading: false, |
| | | view: 'custom' |
| | | }) |
| | | let config = '' |
| | | |
| | | try { // 配置信息解析 |
| | | config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = '' |
| | | } |
| | | |
| | | if (!config || !config.enabled) { |
| | | this.setState({ |
| | | loading: false, |
| | | waitMenu: false, |
| | | waitAction: false, |
| | | view: 'default' |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | loading: false, |
| | | view: 'custom' |
| | | }) |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false, |
| | |
| | | } else { |
| | | this.setState({ |
| | | loading: false, |
| | | waitMenu: false, |
| | | waitAction: false, |
| | | view: 'default' |
| | | }) |
| | | notification.warning({ |