This commit is contained in:
2025-07-25 17:00:03 +08:00
parent 2141d22dda
commit 60bf257cf7
2 changed files with 2 additions and 5 deletions
+1
View File
@@ -93,6 +93,7 @@ class CustomerService
if($seas == 'seas'){
$item['phone'] = Util::mask($item['phone']);
$item['email'] = Util::mask($item['email']);
$item['WhatsApp'] = Util::mask($item['WhatsApp']);
$item['seas_time'] = time()-(empty($item['deleted_at'])?strtotime($item['updated_at']):strtotime($item['deleted_at']));
}
}
+1 -5
View File
@@ -123,11 +123,7 @@ class Util
if(empty($str)){
return '';
}
// 只对 11 位手机号进行脱敏,中间 4 位用 * 替换
if (preg_match('/^1[3-9]\d{9}$/', $str)) {
return substr($str, 0, 3) . '****' . substr($str, -4);
}
return $str;
return substr($str, 0, 3) . '****' . substr($str, -4);
}
}