king
2025-02-08 9a7fd64a5af9d441ef9b92a3d3c8b3b8bc1cd8e2
2025-02-08
1个文件已修改
25 ■■■■■ 已修改文件
src/tabviews/zshare/mutilform/index.jsx 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/index.jsx
@@ -401,7 +401,7 @@
            })
          } else if (item.regular === 'phone') {
            item.rules.push({
              pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
              pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\s?\d{4}\s?\d{4}$/,
              message: item.regularText || dict['phone_error'] || '请正确输入手机号'
            })
          } else if (item.regular === 'email') {
@@ -1551,7 +1551,7 @@
          } else if (['text', 'textarea', 'linkMain'].includes(item.type)) {
            _item.value = _item.value + ''
            _item.value = _item.value.replace(/\t+|\v+/g, '')       // 去除制表符
            if (item.interception !== 'false') {                    // 去除首尾空格
              if (item.interception === 'func') {
                try {
@@ -1581,14 +1581,19 @@
                _item.value = _item.value.replace(/(^\s*|\s*$)/g, '')
              }
            }
            if (item.type === 'text' && /@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 特殊字段替换
              _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || ''))
            }
            if (item.type === 'text' && item.lenControl && item.lenControl !== 'limit') {
              if (item.lenControl === 'left') {
                _item.value = _item.value.substr(0, item.fieldlength)
              } else {
                _item.value = _item.value.slice(-item.fieldlength)
            if (item.type === 'text') {
              if (/@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 特殊字段替换
                _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || ''))
              }
              if (item.lenControl && item.lenControl !== 'limit') {
                if (item.lenControl === 'left') {
                  _item.value = _item.value.substr(0, item.fieldlength)
                } else {
                  _item.value = _item.value.slice(-item.fieldlength)
                }
              }
              if (item.regular === 'phone') {
                _item.value = _item.value.replace(/\s+/g, '')
              }
            }
          } else if (item.type === 'datemonth') {