From ba4d6e414fbb37121e80815d3f5ab1aca7a60b08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 28 十月 2024 13:59:34 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/zshare/verifycard/index.jsx | 56 +++++++++++++++++++++++++++++++------------------------- 1 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 9113732..18ded34 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -754,13 +754,14 @@ let formfields = [] _fields = _fields.filter(_f => _f.field) _fields.forEach(_f => { - if (_f.field.toLowerCase() === 'bid') { + let key = _f.field.toLowerCase() + if (key === 'bid') { hasBid = true } - if (fieldArr.includes(_f.field.toLowerCase())) return + if (fieldArr.includes(key)) return - fieldArr.push(_f.field.toLowerCase()) + fieldArr.push(key) formfields.push(_f.field) @@ -791,6 +792,8 @@ } else { _select.push(`@${_f.field}=''`) } + + if (['appkey'].includes(key)) return _declare.push(`@${_f.field} ${_type}`) }) @@ -831,31 +834,34 @@ _select.push(`@${_f.field}=''`) } + if (['appkey'].includes(key)) return + _declare.push(`@${_f.field} ${_f.datatype}`) - return - } - - let _fieldlen = _f.fieldlength || 50 - - if (_fieldlen > 4000) { - _fieldlen = 'max' - } - - let _type = `nvarchar(${_fieldlen})` - - if (_f.type === 'number') { - _type = `decimal(18,${_f.decimal ? _f.decimal : 0})` - } else if (_f.type === 'picture' || _f.type === 'textarea') { - _type = `nvarchar(${_fieldlen})` - } - - if (_f.type === 'number') { - _select.push(`@${_f.field}=1`) } else { - _select.push(`@${_f.field}=''`) - } + let _fieldlen = _f.fieldlength || 50 + + if (_fieldlen > 4000) { + _fieldlen = 'max' + } + + let _type = `nvarchar(${_fieldlen})` + + if (_f.type === 'number') { + _type = `decimal(18,${_f.decimal ? _f.decimal : 0})` + } else if (_f.type === 'picture' || _f.type === 'textarea') { + _type = `nvarchar(${_fieldlen})` + } + + if (_f.type === 'number') { + _select.push(`@${_f.field}=1`) + } else { + _select.push(`@${_f.field}=''`) + } + + if (['appkey'].includes(key)) return - _declare.push(`@${_f.field} ${_type}`) + _declare.push(`@${_f.field} ${_type}`) + } }) } -- Gitblit v1.8.0