tongshanglei 3 年之前
父节点
当前提交
546ef3b4c5
共有 1 个文件被更改,包括 2 次插入15 次删除
  1. 2 15
      catch/wind/controller/Fan.php

+ 2 - 15
catch/wind/controller/Fan.php

@@ -37,13 +37,7 @@ class Fan extends CatchController
     public function save(Request $request) : \think\Response
     {
         $data = $request->post();
-       
-        if($data['production_date']){
-            $data['production_date'] = date('Y-m-d',$data['production_date']);
-        }
-        if($data['install_date']){
-            $data['install_date'] = date('Y-m-d',$data['install_date']);
-        }
+      
         return CatchResponse::success($this->fanModel->storeBy($data));
     }
     
@@ -66,14 +60,7 @@ class Fan extends CatchController
     public function update(Request $request, $id) : \think\Response
     {   $data = $request->post();
       
-        if(!strstr($data['production_date'],'-'))
-        {
-            $data['production_date'] = date('Y-m-d',$data['production_date']);
-        }
-        if(!strstr($data['install_date'],'-'))
-        {
-            $data['install_date'] = date('Y-m-d',$data['install_date']);
-        }
+       
         return CatchResponse::success($this->fanModel->updateBy($id, $data));
     }