From 1e6bb7fd8acd8110193e61593f38d374ca75604e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 29 十一月 2022 21:21:09 +0800 Subject: [PATCH] 2022-11-29 --- src/tabviews/home/index.jsx | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/tabviews/home/index.jsx b/src/tabviews/home/index.jsx index f79eb7e..23338d0 100644 --- a/src/tabviews/home/index.jsx +++ b/src/tabviews/home/index.jsx @@ -72,10 +72,28 @@ Api.getCacheConfig(_param).then(result => { if (result.status) { if (result.LongParam) { - this.setState({ - loading: false, - view: 'custom' - }) + let config = '' + + try { // 閰嶇疆淇℃伅瑙f瀽 + 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, @@ -87,6 +105,8 @@ } else { this.setState({ loading: false, + waitMenu: false, + waitAction: false, view: 'default' }) notification.warning({ -- Gitblit v1.8.0