king
2024-10-11 8e003c1a94d26cc4d477e7aa03593ccb4d7e6c61
src/views/mobdesign/menuform/index.jsx
@@ -20,6 +20,14 @@
  state = {}
  componentDidMount() {
    const { config } = this.props
    if (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}
          <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="开启后数据源中将替换 @mk_longitude@、@mk_latitude@,在小程序中将获取用户所在经纬度。">
                <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>
          {adapters.includes('weixin') || adapters.includes('wxmini') ? <Col span={24}>
            <Form.Item label={
              <Tooltip placement="topLeft" title="使用默认时请在子应用设置分享信息,使用url参数会使用上页参数替换相应字段(@field@)。注:使用自定义或url参数时会分享当前页面。">