完善表单校验与公共数据逻辑

Co-Authored-By: Kimi-K3.1-Pro <noreply@moonshot.ai>
This commit is contained in:
lik
2026-10-24 18:49:02 +08:00
committed by trae-solo-agent
co-authored by Kimi-K3.1-Pro
parent d731fc1da3
commit a45a3d7a86
18 changed files with 496 additions and 336 deletions
+16
View File
@@ -0,0 +1,16 @@
function maskIdNumber(value) {
const text = String(value || '').trim()
if (!text) return ''
if (text.length <= 8) return '********'
return `${text.slice(0, 4)}********${text.slice(-4)}`
}
function maskOrderId(value) {
const text = String(value || '').trim()
return text ? `****${text.slice(-8).toUpperCase()}` : '--'
}
module.exports = {
maskIdNumber,
maskOrderId
}