easy3wui 1.5.48 → 1.5.49-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -498,7 +498,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
498
498
|
_this.getcheckDesensitizeData = function (str, item) {
|
|
499
499
|
var phoneRegex = /^1[3-9]\d{9}$/; // 手机号
|
|
500
500
|
var emailRegex = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/; // 邮箱
|
|
501
|
-
var idRegex =
|
|
501
|
+
var idRegex = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/; // 身份证
|
|
502
|
+
item.dataDesensitizationFlagTrue = false; // 当前字段--数据脱敏标识--脱敏成功
|
|
502
503
|
if (phoneRegex.test(str)) {
|
|
503
504
|
// 手机号
|
|
504
505
|
item.dataDesensitizationFlagTrue = true; // 当前字段--数据脱敏标识--脱敏成功
|
|
@@ -513,12 +514,8 @@ var Easy3wFormPage = function (_Component) {
|
|
|
513
514
|
|
|
514
515
|
var desensitizedUsername = username.slice(0, 1) + '****';
|
|
515
516
|
return desensitizedUsername + '@' + domain; // 脱敏邮箱
|
|
516
|
-
} else if (idRegex.test(str)
|
|
517
|
-
//
|
|
518
|
-
item.dataDesensitizationFlagTrue = true; // 当前字段--数据脱敏标识--脱敏成功
|
|
519
|
-
return str.slice(0, 3) + '***********' + str.slice(-4); // 脱敏身份证
|
|
520
|
-
} else if (idRegex.test(str) && str.length === 15) {
|
|
521
|
-
// 15位身份证
|
|
517
|
+
} else if (idRegex.test(str)) {
|
|
518
|
+
// 身份证
|
|
522
519
|
item.dataDesensitizationFlagTrue = true; // 当前字段--数据脱敏标识--脱敏成功
|
|
523
520
|
return str.slice(0, 3) + '********' + str.slice(-4); // 脱敏身份证
|
|
524
521
|
} else {
|
|
@@ -702,7 +702,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
702
702
|
this.getcheckDesensitizeData = function (str, item) {
|
|
703
703
|
var phoneRegex = /^1[3-9]\d{9}$/; // 手机号
|
|
704
704
|
var emailRegex = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/; // 邮箱
|
|
705
|
-
var idRegex =
|
|
705
|
+
var idRegex = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/; // 身份证
|
|
706
706
|
item.dataDesensitizationFlagTrue = false; // 当前字段--数据脱敏标识--未脱敏成功
|
|
707
707
|
if (phoneRegex.test(str)) {
|
|
708
708
|
// 手机号
|
|
@@ -718,12 +718,8 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
718
718
|
|
|
719
719
|
var desensitizedUsername = username.slice(0, 1) + '****';
|
|
720
720
|
return desensitizedUsername + '@' + domain; // 脱敏邮箱
|
|
721
|
-
} else if (idRegex.test(str)
|
|
722
|
-
//
|
|
723
|
-
item.dataDesensitizationFlagTrue = true; // 当前字段--数据脱敏标识--脱敏成功
|
|
724
|
-
return str.slice(0, 3) + '***********' + str.slice(-4); // 脱敏身份证
|
|
725
|
-
} else if (idRegex.test(str) && str.length === 15) {
|
|
726
|
-
// 15位身份证
|
|
721
|
+
} else if (idRegex.test(str)) {
|
|
722
|
+
// 身份证
|
|
727
723
|
item.dataDesensitizationFlagTrue = true; // 当前字段--数据脱敏标识--脱敏成功
|
|
728
724
|
return str.slice(0, 3) + '********' + str.slice(-4); // 脱敏身份证
|
|
729
725
|
} else {
|