king
2024-07-02 bb79c0ec275c3aaafd45c8fae4be44b3cc7db308
src/views/mobdesign/menuform/index.jsx
@@ -20,6 +20,14 @@
  state = {}
  componentDidMount() {
    const { config, adapters } = this.props
    if (adapters.includes('wxmini') && config.getLocation === 'true') {
      window.GLOB.getLocation = true
    }
  }
  // 一二级菜单切换
  selectChange = (key, value, hex) => {
    if (key === 'cacheTime' || key === 'localCacheTime') {
@@ -36,6 +44,8 @@
      } else {
        delete _config.statusBarHexColor
      }
    } else if (key === 'getLocation') {
      window.GLOB.getLocation = value === 'true'
    }
    this.props.updateConfig(_config)
@@ -279,6 +289,23 @@
              )}
            </Form.Item>
          </Col> : null}
          {adapters.includes('wxmini') ? <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="开启时,在小程序中可获取用户所在经纬度。">
                <QuestionCircleOutlined className="mk-form-tip" />
                定位
              </Tooltip>
            }>
              {getFieldDecorator('getLocation', {
                initialValue: config.getLocation || 'false'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('getLocation', e.target.value)}}>
                  <Radio value="true">开启</Radio>
                  <Radio value="false">不开启</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {adapters.includes('weixin') || adapters.includes('wxmini') ? <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用默认时请在子应用设置分享信息,使用url参数会使用上页参数替换相应字段(@field@)。注:使用自定义或url参数时会分享当前页面。">