king
2024-07-02 0ddf0f980d675d28c41f746b55d0d7cc55007d8a
2024-07-02
4个文件已修改
43 ■■■■■ 已修改文件
src/menu/datasource/verifycard/customscript/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/utils.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.jsx 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/verifycard/customscript/index.jsx
@@ -243,7 +243,7 @@
          </Col>
          <Col span={24}>
            <Form.Item label="可用字段" className="field-able">
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, lang, time_id, typename, datam</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, LoginUID, SessionUid, UserID, Appkey, lang, time_id, typename, datam{window.GLOB.getLocation ? ', mk_longitude, mk_latitude' : ''}</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address</span></Tooltip>,&nbsp;
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。使用@pageSize@、@orderBy@ 或脚本中存在 @mk_total 代表自定义分页,总数请以mk_total返回。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{type === 'calendar' ? ', mk_year' : ''}{hasExtend ? ', mk_time' : ''}</Tooltip>
              <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip>
src/menu/datasource/verifycard/utils.jsx
@@ -76,6 +76,12 @@
    if (type === 'calendar') {
      regs.push({reg: /@mk_year@/ig, value: '2024'})
    }
    if (window.GLOB.getLocation) {
      regs.push(
        {reg: /@mk_longitude@/ig, value: 0},
        {reg: /@mk_latitude@/ig, value: 0}
      )
    }
    // 外联数据库替换
    if (window.GLOB.externalDatabase !== null) {
src/menu/debug/index.jsx
@@ -2063,11 +2063,17 @@
    )
    if (item.hasExtend) {
      regs.push({reg: /@mk_time@/ig, value: '2024-04-29 17:20:00'})
      regoptions.push({reg: /@mk_time@/ig, value: '2024-04-29 17:20:00'})
    }
    if (item.type === 'calendar') {
      regoptions.push({ reg: /@mk_year@/ig, value: '2024' })
    }
    if (window.GLOB.getLocation) {
      regoptions.push(
        {reg: /@mk_longitude@/ig, value: 0},
        {reg: /@mk_latitude@/ig, value: 0}
      )
    }
    regoptions.forEach(cell => {
      sql = sql.replace(cell.reg, cell.value)
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参数时会分享当前页面。">