Merge branch 'hotfix/user' into develop

This commit is contained in:
2025-08-20 11:29:23 +08:00
3 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ class CustomerService
// $customer['created_at'] = Util::timeTotDate($customer['created_at']);
// $customer['updated_at'] = Util::timeTotDate($customer['updated_at']);
$customer = Util::formatDate($customer,['follow_last']);
$customer = Util::formatDate($customer,['follow_next','follow_last']);
$nameLang = $language=='en'?'name_en':($language=='ru'?'name_ru':'name');
$countryLang = $language=='en'?'en_addr':'cn_addr';
// $customer['car_type_name'] = empty($customer['car_type_id'])?'':CarType::where(['id'=>$customer['car_type_id']])->value($nameLang);
+7 -1
View File
@@ -100,7 +100,13 @@ class Util
public static function formatDate($value,$key = ['created_at','updated_at'])
{
foreach ($key as $k){
$value[$k]= self::timeTotDate($value[$k]);
// 如果是整数,可能是 UNIX 时间戳
if (is_numeric($value[$k]) && $value[$k] > 0) {
// 检查是否是合理的时间戳范围(1970-2100年)
if ($value[$k] >= 0 && $value[$k] <= 4102444800) {
$value[$k]= self::timeTotDate($value[$k]);
}
}
}
return $value;
}
+2 -2
View File
@@ -60,7 +60,7 @@ class ConversationService
'reply' => '',
];
//$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱
$emailDefault = 'tuotuo@hnxinyouhe.com'; //范彩凤
$emailDefault = 'support@hnxinyouhe.com'; //范彩凤
if (empty($conversation)) {
$email = $emailDefault;
}else{
@@ -108,7 +108,7 @@ class ConversationService
'reply' => '',
];
//$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱
$emailDefault = 'tuotuo@hnxinyouhe.com'; //范彩凤
$emailDefault = 'support@hnxinyouhe.com'; //范彩凤
if (empty($conversation)) {
$email = $emailDefault;
}else{