作者 lyh

gx

@@ -1008,8 +1008,8 @@ if (!function_exists('check_domain_record')) { @@ -1008,8 +1008,8 @@ if (!function_exists('check_domain_record')) {
1008 */ 1008 */
1009 function email_desensitize($email){ 1009 function email_desensitize($email){
1010 $parts = explode('@', $email); 1010 $parts = explode('@', $email);
1011 - $username = $parts[0];  
1012 - $domain = $parts[1]; 1011 + $username = $parts[0] ?? '';
  1012 + $domain = $parts[1] ?? '';
1013 $maskedUsername = substr($username, 0, -4) . '****'; 1013 $maskedUsername = substr($username, 0, -4) . '****';
1014 $maskedDomain = '****.' . substr($domain, -5); 1014 $maskedDomain = '****.' . substr($domain, -5);
1015 return $maskedUsername . '@' . $maskedDomain; 1015 return $maskedUsername . '@' . $maskedDomain;
@@ -170,8 +170,10 @@ class InquiryController extends BaseController @@ -170,8 +170,10 @@ class InquiryController extends BaseController
170 //非正常登录的 170 //非正常登录的
171 171
172 if(($this->user['login_source']??0) != 2 && ($this->user['login_source']??0) != 3){ 172 if(($this->user['login_source']??0) != 2 && ($this->user['login_source']??0) != 3){
  173 + if(!empty($item['email']) && (strpos($item['email'], '@') !== false)){
  174 + $item['email'] = email_desensitize($item['email']);
  175 + }
173 //脱敏 176 //脱敏
174 - !empty($item['email']) && $item['email'] = email_desensitize($item['email']);  
175 !empty($item['phone']) && $item['phone'] = substr($item['phone'], 0, -4) . '****'; 177 !empty($item['phone']) && $item['phone'] = substr($item['phone'], 0, -4) . '****';
176 } 178 }
177 179
@@ -875,7 +875,7 @@ class ProductLogic extends BaseLogic @@ -875,7 +875,7 @@ class ProductLogic extends BaseLogic
875 'intro' => $intro, 875 'intro' => $intro,
876 'content' => $content, 876 'content' => $content,
877 'describe' => Arr::a2s($describe), 877 'describe' => Arr::a2s($describe),
878 -// 'seo_mate' => Arr::a2s($seo_mate ?? []), 878 + 'seo_mate' => Arr::a2s($seo_mate ?? []),
879 'created_uid' => $user_id, 879 'created_uid' => $user_id,
880 'status' => Product::STATUS_ON 880 'status' => Product::STATUS_ON
881 ] 881 ]