Merge branch 'feature/transmit' into develop
This commit is contained in:
@@ -78,13 +78,14 @@ class InquiryTransmitController extends BaseController
|
|||||||
'en-3-P-vdx' => $this->formHmtl2($config)
|
'en-3-P-vdx' => $this->formHmtl2($config)
|
||||||
};
|
};
|
||||||
|
|
||||||
return json([
|
return $this->success(['html' => $html], 'success');
|
||||||
'code' => 200,
|
// return json([
|
||||||
'data' => [
|
// 'code' => 200,
|
||||||
'html' => $html
|
// 'data' => [
|
||||||
],
|
// 'html' => $html
|
||||||
'message' => 'success'
|
// ],
|
||||||
]);
|
// 'message' => 'success'
|
||||||
|
// ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->method() == 'POST') {
|
if ($request->method() == 'POST') {
|
||||||
@@ -112,15 +113,16 @@ class InquiryTransmitController extends BaseController
|
|||||||
'uCountry' => $params['uCountry']
|
'uCountry' => $params['uCountry']
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->service->serviceStore($request, $edata);
|
$this->service->serviceStore($request, $edata, $domain);
|
||||||
|
|
||||||
$this->emailHtml($edata);
|
$this->emailHtml($edata);
|
||||||
|
|
||||||
return json([
|
return $this->success([], 'Thank you for your message! We will contact with you soon.');
|
||||||
'code' => 200,
|
// return json([
|
||||||
'data' => [],
|
// 'code' => 200,
|
||||||
'message' => 'Thank you for your message! We will contact with you soon.'
|
// 'data' => [],
|
||||||
]);
|
// 'message' => 'Thank you for your message! We will contact with you soon.'
|
||||||
|
// ]);
|
||||||
}
|
}
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
Log::info('Data:'.date('Y-m-d H:i:s').':'.$th->getMessage().'|'.$th->getLine().'|'.$th->getFile());
|
Log::info('Data:'.date('Y-m-d H:i:s').':'.$th->getMessage().'|'.$th->getLine().'|'.$th->getFile());
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class InquiryTransmitService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 创建 */
|
/** 创建 */
|
||||||
public function serviceStore(Request $request, array $data = [])
|
public function serviceStore(Request $request, array $data = [], string $domain = '')
|
||||||
{
|
{
|
||||||
$data['email'] = $data['Email'];
|
$data['email'] = $data['Email'];
|
||||||
$data['name'] = $data['Name'];
|
$data['name'] = $data['Name'];
|
||||||
@@ -40,8 +40,9 @@ class InquiryTransmitService
|
|||||||
$data['country'] = $data['Country'];
|
$data['country'] = $data['Country'];
|
||||||
$data['form_Url'] = $data['Form Url'];
|
$data['form_Url'] = $data['Form Url'];
|
||||||
$data['message'] = $data['Message'];
|
$data['message'] = $data['Message'];
|
||||||
$data['iplocation'] = $data['IpLocation'];
|
$data['ip_location'] = $data['IpLocation'];
|
||||||
$data['ip'] = $data['Ip'];
|
$data['ip'] = $data['Ip'];
|
||||||
|
$data['domain'] = $domain;
|
||||||
|
|
||||||
return InquiryTransmit::create($data);
|
return InquiryTransmit::create($data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user