|
...
|
...
|
@@ -27,10 +27,14 @@ class SelfSiteController extends BaseController |
|
|
|
$traffic = $request->input('traffic', SyncSubmitTask::TRAFFIC_DEFAULT);//是否引流
|
|
|
|
$files = $request->input('files', []);//文件
|
|
|
|
|
|
|
|
if (empty($data)) {
|
|
|
|
if (empty($data) || empty($domain)) {
|
|
|
|
return $this->error('参数错误');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!in_array($type, [SyncSubmitTask::TYPE_VISIT, SyncSubmitTask::TYPE_INQUIRY])) {
|
|
|
|
return $this->error('类型错误');
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($files)) {
|
|
|
|
try {
|
|
|
|
foreach ($files as $key => $file) {
|
|
...
|
...
|
@@ -43,9 +47,9 @@ class SelfSiteController extends BaseController |
|
|
|
'original_name' => $fileinfo['name'],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}catch (InquiryFilterException $e){
|
|
|
|
} catch (InquiryFilterException $e) {
|
|
|
|
return $this->error($e->getMessage());
|
|
|
|
}catch (\Exception $e){
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
return $this->error('File upload fail');
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|