1 line
2.3 KiB
JSON
1 line
2.3 KiB
JSON
|
|
{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\src\\utils\\dataDesensi.js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\utils\\dataDesensi.js","mtime":1737610069399},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\nfunction tmName(val) {\n //*姓名脱敏\n val = val.replace(/^\\s+|\\s+$/g, \"\");\n if (val && val.length == 2) {\n return val.replace(/^(.{1}).*(.{1})$/, \"$1*\");\n } else if (val && val.length > 2) {\n return val.replace(/^(.{1}).*(.{1})$/, \"$1*$2\");\n } else {\n return val;\n }\n}\nfunction tmNames(val) {\n //*姓名多个脱敏\n var names = [];\n val.split(\",\").forEach(function (item) {\n item = item.replace(/^\\s+|\\s+$/g, \"\");\n if (item && item.length == 2) {\n names.push(item.replace(/^(.{1}).*(.{1})$/, \"$1*\"));\n } else if (item && item.length > 2) {\n names.push(item.replace(/^(.{1}).*(.{1})$/, \"$1*$2\"));\n } else {\n names.push(item);\n }\n });\n return names.join(\"、\");\n}\nfunction tmPhone(val) {\n //*电话脱敏\n return val.replace(/^(.{3}).*(.{4})$/, \"$1**$2\");\n}\nfunction tmIdCard(val) {\n //*身份证号脱敏\n return val.replace(/^(.{3}).*(.{4})$/, \"$1****$2\");\n}\nfunction tmPinyin(val) {\n //*拼音脱敏\n return val.replace(/^(.{2}).*(.{2})$/, \"$1****$2\");\n}\nfunction tmCard(val) {\n //*证件号脱敏\n return val.replace(/^(.{2}).*(.{2})$/, \"$1****$2\");\n}\nfunction tmEmail(val) {\n //*邮箱脱敏\n return val.replace(/^(.{3}).*(.{5})$/, \"$1****$2\");\n}\nfunction tmZipCode(val) {\n //*邮编--传真脱敏\n return val.replace(/^(.{2}).*(.{2})$/, \"$1**$2\");\n}\nexport default {\n tmName: tmName,\n tmNames: tmNames,\n tmIdCard: tmIdCard,\n tmPinyin: tmPinyin,\n tmCard: tmCard,\n tmEmail: tmEmail,\n tmZipCode: tmZipCode,\n tmPhone: tmPhone\n};",null]}
|