king
2022-08-02 8d66ff34fae5b048a6b7923cc75d34f13a08be9d
src/views/mobdesign/menuform/index.jsx
@@ -22,10 +22,14 @@
  state = {}
  // 一二级菜单切换
  selectChange = (key, value) => {
    const { config } = this.props
  selectChange = (key, value, hex) => {
    let _config = {...this.props.config, [key]: value}
    this.props.updateConfig({...config, [key]: value})
    if (key === 'statusBarbgColor' && hex) {
      _config.statusBarHexColor = hex
    }
    this.props.updateConfig(_config)
    // if (key === 'cacheUseful') {
    //   this.props.updateConfig({...config, cacheUseful: value})
    // } else if (key === 'timeUnit') {
@@ -203,10 +207,27 @@
            <Form.Item className="status-bar" label={
              <Tooltip placement="topLeft" title="在明科云APP或小程序中,状态栏的背景色。">
                <QuestionCircleOutlined className="mk-form-tip" />
                状态栏
                状态栏背景
              </Tooltip>
            }>
              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} />
              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val, hex) => {this.selectChange('statusBarbgColor', val, hex)}} />
            </Form.Item>
          </Col> : null}
          {adapters.includes('wxmini') ? <Col span={24}>
            <Form.Item className="status-bar-color" label={
              <Tooltip placement="topLeft" title="在使用小程序时,状态栏的字体颜色。">
                <QuestionCircleOutlined className="mk-form-tip" />
                状态栏字体
              </Tooltip>
            }>
              {getFieldDecorator('statusBarColor', {
                initialValue: config.statusBarColor || 'black'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('statusBarColor', e.target.value)}}>
                  <Radio value="black">黑色</Radio>
                  <Radio value="white">白色</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {adapters.includes('app') ? <Col span={24}>
@@ -244,18 +265,24 @@
            </Form.Item>
          </Col> : null}
          {adapters.includes('weixin') || adapters.includes('wxmini') ? <Col span={24}>
            <Form.Item label="分享">
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用默认时请在子应用设置分享信息,使用url参数会使用上页参数替换相应字段(@field@)。注:使用自定义或url参数时会分享当前页面。">
                <QuestionCircleOutlined className="mk-form-tip" />
                分享
              </Tooltip>
            }>
              {getFieldDecorator('share', {
                initialValue: config.share || 'default'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('share', e.target.value)}}>
                <Radio.Group className="mini-radio" onChange={(e) => {this.selectChange('share', e.target.value)}}>
                  <Radio value="default">默认</Radio>
                  <Radio value="custom">自定义</Radio>
                  <Radio value="url">url参数</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}>
          {['custom', 'url'].includes(config.share) && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}>
            <Form.Item label="分享标题">
              {getFieldDecorator('share_title', {
                initialValue: config.share_title || '',
@@ -268,7 +295,7 @@
              })(<Input placeholder="" autoComplete="off" onChange={(e) => {this.selectChange('share_title', e.target.value)}}/>)}
            </Form.Item>
          </Col> : null}
          {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}>
          {['custom', 'url'].includes(config.share) && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}>
            <Form.Item label="分享描述">
              {getFieldDecorator('share_des', {
                initialValue: config.share_des || ''
@@ -284,6 +311,15 @@
              )}
            </Form.Item>
          </Col> : null}
          {config.share === 'url' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}>
            <Form.Item label="分享图片">
              {getFieldDecorator('share_url', {
                initialValue: config.share_url || ''
              })(
                <Input placeholder="" autoComplete="off" onChange={(e) => {this.selectChange('share_url', e.target.value)}}/>
              )}
            </Form.Item>
          </Col> : null}
          <Col span={24}>
            <Form.Item label="备注">
              {getFieldDecorator('Remark', {