作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server

... ... @@ -75,23 +75,20 @@ class InquiryFormData extends Base
unset($data['globalso-date']);
//推送邮件发送
$has_file = false;
foreach ($data as $k => $v){
if(is_array($v)){
$has_file = true;
break;
if(is_array($v) && !empty($v['path'])){
$v = getImageUrl($v['path']);
$data[$k] = $v;
}
//其他字段补充到message里
if(!in_array($k, ['name', 'email', 'message', 'phone', 'ip', 'date', 'cname', 'domain', 'edition', 'domain_host_url'])){
$data['message'].= "<br/>" . $k .': ' . $v;
}
}
if(!$has_file) {
$res = (new FormGlobalsoApi())->submitInquiry($ip, $referer, $submit_at, $data, $traffic);
Log::channel('inquiry')->info('询盘发送邮件', [$data, $res]);
if(!$res){
throw new \Exception('询盘发送邮件失败');
}
$res = (new FormGlobalsoApi())->submitInquiry($ip, $referer, $submit_at, $data, $traffic);
Log::channel('inquiry')->info('询盘发送邮件', [$data, $res]);
if(!$res){
throw new \Exception('询盘发送邮件失败');
}
}
... ...