正在显示
2 个修改的文件
包含
13 行增加
和
4 行删除
| @@ -55,6 +55,7 @@ class InquiryInfoController extends BaseController | @@ -55,6 +55,7 @@ class InquiryInfoController extends BaseController | ||
| 55 | 'email'=>'required',//邮箱 | 55 | 'email'=>'required',//邮箱 |
| 56 | 'phone'=>'required',//电话号码 | 56 | 'phone'=>'required',//电话号码 |
| 57 | 'ip'=>'required',//ip | 57 | 'ip'=>'required',//ip |
| 58 | + 'ip_area'=>'required',//ip地址 | ||
| 58 | 'forward_url'=>'required',//转发网址 | 59 | 'forward_url'=>'required',//转发网址 |
| 59 | 'message'=>'required',//发送内容 | 60 | 'message'=>'required',//发送内容 |
| 60 | 'delay'=>'required',//延迟发送时间 | 61 | 'delay'=>'required',//延迟发送时间 |
| @@ -64,6 +65,7 @@ class InquiryInfoController extends BaseController | @@ -64,6 +65,7 @@ class InquiryInfoController extends BaseController | ||
| 64 | 'email.required' => '邮箱不能为空', | 65 | 'email.required' => '邮箱不能为空', |
| 65 | 'phone.required' => '电话号码不能为空', | 66 | 'phone.required' => '电话号码不能为空', |
| 66 | 'ip.required' => 'ip不能为空', | 67 | 'ip.required' => 'ip不能为空', |
| 68 | + 'ip_area.required' => 'ip地址不能为空', | ||
| 67 | 'forward_url.required' => '转发网址不能为空', | 69 | 'forward_url.required' => '转发网址不能为空', |
| 68 | 'message.required' => '发送内容不能为空', | 70 | 'message.required' => '发送内容不能为空', |
| 69 | 'delay.required' => '延迟发送时间不能为空', | 71 | 'delay.required' => '延迟发送时间不能为空', |
| @@ -20,6 +20,11 @@ class InquiryInfoLogic extends BaseLogic | @@ -20,6 +20,11 @@ class InquiryInfoLogic extends BaseLogic | ||
| 20 | parent::__construct(); | 20 | parent::__construct(); |
| 21 | $this->param = $this->requestAll; | 21 | $this->param = $this->requestAll; |
| 22 | $this->model = new InquiryInfo(); | 22 | $this->model = new InquiryInfo(); |
| 23 | + //TODO::测试数据 | ||
| 24 | + $this->manager = [ | ||
| 25 | + 'id'=>1, | ||
| 26 | + 'name'=>'cs' | ||
| 27 | + ]; | ||
| 23 | } | 28 | } |
| 24 | 29 | ||
| 25 | /** | 30 | /** |
| @@ -73,12 +78,12 @@ class InquiryInfoLogic extends BaseLogic | @@ -73,12 +78,12 @@ class InquiryInfoLogic extends BaseLogic | ||
| 73 | * @time :2023/7/12 9:22 | 78 | * @time :2023/7/12 9:22 |
| 74 | */ | 79 | */ |
| 75 | public function inquirySave(){ | 80 | public function inquirySave(){ |
| 76 | - try { | 81 | +// try { |
| 77 | $xp_id = $this->inquiryInfoSave(); | 82 | $xp_id = $this->inquiryInfoSave(); |
| 78 | $this->inquiryUserSave($xp_id); | 83 | $this->inquiryUserSave($xp_id); |
| 79 | - }catch (Exception $e){ | ||
| 80 | - $this->fail('error'); | ||
| 81 | - } | 84 | +// }catch (Exception $e){ |
| 85 | +// $this->fail('error'); | ||
| 86 | +// } | ||
| 82 | return $this->success(); | 87 | return $this->success(); |
| 83 | } | 88 | } |
| 84 | 89 | ||
| @@ -99,6 +104,8 @@ class InquiryInfoLogic extends BaseLogic | @@ -99,6 +104,8 @@ class InquiryInfoLogic extends BaseLogic | ||
| 99 | 'ip_area'=>$this->param['ip_area'], | 104 | 'ip_area'=>$this->param['ip_area'], |
| 100 | 'message'=>$this->param['message'], | 105 | 'message'=>$this->param['message'], |
| 101 | 'type'=>$this->param['type'], | 106 | 'type'=>$this->param['type'], |
| 107 | + 'created_at'=>date('Y-m-d H:i:s'), | ||
| 108 | + 'updated_at'=>date('Y-m-d H:i:s'), | ||
| 102 | ]; | 109 | ]; |
| 103 | return $this->model->insertGetId($param); | 110 | return $this->model->insertGetId($param); |
| 104 | } | 111 | } |
-
请 注册 或 登录 后发表评论