king
2023-12-12 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a
src/tabviews/home/index.jsx
@@ -39,7 +39,7 @@
  check = (times) => {
    times++
    if ((window.GLOB.mkThdMenus.length > 0 && window.GLOB.mkActions.loaded) || times > 50) {
    if ((window.GLOB.mkThdMenus.size > 0 && window.GLOB.mkActions.loaded) || times > 50) {
      this.setState({
        waiting: false
      })
@@ -56,42 +56,36 @@
      MenuID: this.props.MenuID
    }
    Api.getCacheConfig(_param).then(result => {
      if (result.status) {
        if (result.LongParam) {
          let config = ''
      let view = 'default'
      if (result.status && result.LongParam) {
        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,
              waiting: false,
              view: 'default'
            })
          } else {
            this.setState({
              loading: false,
              view: 'custom'
            })
          }
        } else {
          this.setState({
            loading: false,
            waiting: false,
            view: 'default'
          })
        try { // 配置信息解析
          config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
        } catch (e) {
          console.warn('Parse Failure')
          config = ''
        }
      } else {
        if (config && config.enabled) {
          view = 'custom'
        }
      }
      if (view === 'default') {
        this.setState({
          loading: false,
          waiting: false,
          view: 'default'
        })
      } else {
        this.setState({
          loading: false,
          view: 'custom'
        })
      }
      if (!result.status) {
        notification.warning({
          top: 92,
          message: result.message,