king
2021-12-09 b21542ffa283ca3fff2d1d7bdd431eb7722fa5f8
src/views/mobdesign/index.jsx
@@ -70,7 +70,8 @@
    direction: 'vertical',
    settingshow: true,
    controlshow: true,
    comloading: false
    comloading: false,
    adapters: []
  }
  UNSAFE_componentWillMount() {
@@ -85,7 +86,7 @@
        sessionStorage.setItem('role_type', param.role_type || 'true')
        sessionStorage.setItem('login_types', param.login_types || 'false')
        sessionStorage.setItem('typename', param.typename || 'mob')
        sessionStorage.setItem('adapter', param.adapter || 'false')
        sessionStorage.setItem('adapter', param.adapter || '')
        this.setState({
          localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS,
@@ -105,7 +106,15 @@
          window.GLOB.shellHeight = 853
        }
        let adapters = sessionStorage.getItem('adapter')
        if (adapters) {
          adapters = adapters.split(',')
        } else {
          adapters = []
        }
        this.setState({
          adapters,
          MenuId: param.MenuID
        }, () => {
          this.getMenuParam(param)
@@ -908,6 +917,7 @@
  }
  submitConfig = () => {
    const { adapters } = this.state
    let config = fromJS(this.state.config).toJS()
    if (!config.MenuName || !config.MenuNo || (config.cacheUseful === 'true' && !config.cacheTime)) {
@@ -942,7 +952,7 @@
        config.loginview = false
      }
      if (sessionStorage.getItem('adapter') === 'true') {
      if (adapters.includes('wxmini')) {
        config = this.getMiniStyle(config)
      }
@@ -1463,7 +1473,7 @@
  render () {
    const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents } = this.state
    const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters } = this.state
    return (
      <ConfigProvider locale={localedict}>
@@ -1485,6 +1495,7 @@
                      dict={dict}
                      config={config}
                      MenuId={MenuId}
                      adapters={adapters}
                      updateConfig={this.updateConfig}
                    /> : null}
                    {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null}