作者 lyh

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

@@ -27,10 +27,14 @@ class SelfSiteController extends BaseController @@ -27,10 +27,14 @@ class SelfSiteController extends BaseController
27 $traffic = $request->input('traffic', SyncSubmitTask::TRAFFIC_DEFAULT);//是否引流 27 $traffic = $request->input('traffic', SyncSubmitTask::TRAFFIC_DEFAULT);//是否引流
28 $files = $request->input('files', []);//文件 28 $files = $request->input('files', []);//文件
29 29
30 - if (empty($data)) { 30 + if (empty($data) || empty($domain)) {
31 return $this->error('参数错误'); 31 return $this->error('参数错误');
32 } 32 }
33 33
  34 + if (!in_array($type, [SyncSubmitTask::TYPE_VISIT, SyncSubmitTask::TYPE_INQUIRY])) {
  35 + return $this->error('类型错误');
  36 + }
  37 +
34 if (!empty($files)) { 38 if (!empty($files)) {
35 try { 39 try {
36 foreach ($files as $key => $file) { 40 foreach ($files as $key => $file) {
@@ -43,9 +47,9 @@ class SelfSiteController extends BaseController @@ -43,9 +47,9 @@ class SelfSiteController extends BaseController
43 'original_name' => $fileinfo['name'], 47 'original_name' => $fileinfo['name'],
44 ]; 48 ];
45 } 49 }
46 - }catch (InquiryFilterException $e){ 50 + } catch (InquiryFilterException $e) {
47 return $this->error($e->getMessage()); 51 return $this->error($e->getMessage());
48 - }catch (\Exception $e){ 52 + } catch (\Exception $e) {
49 return $this->error('File upload fail'); 53 return $this->error('File upload fail');
50 } 54 }
51 } 55 }