| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { components } = this.props |
| | | const { components, viewType } = this.props |
| | | let options = [] |
| | | |
| | | if (components) { |
| | | options = fromJS(components).toJS() |
| | | } else { |
| | | options = fromJS(menuOptions).toJS() |
| | | let adapters = sessionStorage.getItem('adapter') || '' |
| | | if (adapters.indexOf('wxmini') === -1) { |
| | | options = options.filter(item => item.adapter !== 'mini') |
| | | } |
| | | } |
| | | |
| | | if (viewType === 'popview') { |
| | | options = options.filter(item => !['topbar', 'navbar', 'login', 'officialAccount'].includes(item.component)) |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | content: '', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | Api.getSystemConfig({ |
| | | Api.getCloudConfig({ |
| | | func: 's_custom_components_adduptdel', |
| | | c_id: item.uuid, |
| | | images: '', |
| | | c_name: item.title, |
| | | typename: sessionStorage.getItem('appType') || '', |
| | | long_param: '', |
| | | del_type: 'Y' |
| | | }).then(result => { |