时间处理
This commit is contained in:
@@ -256,7 +256,7 @@ class CustomerService
|
|||||||
// $customer['created_at'] = Util::timeTotDate($customer['created_at']);
|
// $customer['created_at'] = Util::timeTotDate($customer['created_at']);
|
||||||
// $customer['updated_at'] = Util::timeTotDate($customer['updated_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');
|
$nameLang = $language=='en'?'name_en':($language=='ru'?'name_ru':'name');
|
||||||
$countryLang = $language=='en'?'en_addr':'cn_addr';
|
$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);
|
// $customer['car_type_name'] = empty($customer['car_type_id'])?'':CarType::where(['id'=>$customer['car_type_id']])->value($nameLang);
|
||||||
|
|||||||
@@ -100,7 +100,13 @@ class Util
|
|||||||
public static function formatDate($value,$key = ['created_at','updated_at'])
|
public static function formatDate($value,$key = ['created_at','updated_at'])
|
||||||
{
|
{
|
||||||
foreach ($key as $k){
|
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;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class ConversationService
|
|||||||
'reply' => '',
|
'reply' => '',
|
||||||
];
|
];
|
||||||
//$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱
|
//$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱
|
||||||
$emailDefault = 'tuotuo@hnxinyouhe.com'; //范彩凤
|
$emailDefault = 'support@hnxinyouhe.com'; //范彩凤
|
||||||
if (empty($conversation)) {
|
if (empty($conversation)) {
|
||||||
$email = $emailDefault;
|
$email = $emailDefault;
|
||||||
}else{
|
}else{
|
||||||
@@ -108,7 +108,7 @@ class ConversationService
|
|||||||
'reply' => '',
|
'reply' => '',
|
||||||
];
|
];
|
||||||
//$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱
|
//$emailDefault = 'app@hnxinyouhe.com'; //公共邮箱
|
||||||
$emailDefault = 'tuotuo@hnxinyouhe.com'; //范彩凤
|
$emailDefault = 'support@hnxinyouhe.com'; //范彩凤
|
||||||
if (empty($conversation)) {
|
if (empty($conversation)) {
|
||||||
$email = $emailDefault;
|
$email = $emailDefault;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user