Commit 447f0a75 by 杨树贤

修复邮箱加密显示的问题

parent a9cbf937
......@@ -19,8 +19,11 @@ class SupplierContactTransformer
$emailTemp = explode('@', $item['supplier_email'])[0];
$replace = str_pad('*', strlen($emailTemp), '*');
$emailTemp = str_replace($emailTemp, $replace, $emailTemp);
$item['supplier_email'] = $emailTemp . '@' . isset(explode('@',
$item['supplier_email'])[1]) ? explode('@', $item['supplier_email'])[1] : '***';
if (count(explode('@', $item['supplier_email'])) > 1) {
$item['supplier_email'] = $emailTemp . '@' . explode('@', $item['supplier_email'])[1];
} else {
$item['supplier_email'] = $emailTemp;
}
}
if (!empty($item['supplier_mobile'])) {
$temp = substr($item['supplier_mobile'], 3, 4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment