| | |
| | | |
| | | 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') { |
| | |
| | | } else { |
| | | delete _config.statusBarHexColor |
| | | } |
| | | } else if (key === 'getLocation') { |
| | | window.GLOB.getLocation = value === 'true' |
| | | } |
| | | |
| | | this.props.updateConfig(_config) |
| | |
| | | )} |
| | | </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参数时会分享当前页面。"> |