浏览代码

基础设置修改问题

刘远航 4 年之前
父节点
当前提交
4b25e95594
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      app/Http/Controllers/Api/V2/ServiceApplyController.php

+ 6 - 2
app/Http/Controllers/Api/V2/ServiceApplyController.php

xqd xqd
@@ -27,7 +27,6 @@ class ServiceApplyController extends AuthController
         ]);
         $user = $this->user;
         $doctor_id = $user['id'];
-
         $where['docter_id'] = $doctor_id;
         $where['service_type'] = $req['service_type'];
         $data = ServiceApply::where($where)->first();
@@ -39,7 +38,12 @@ class ServiceApplyController extends AuthController
             ]);
             return out();
         }else{
-            return out('','','您已提交');
+            if ($data['status']!=2){
+                ServiceApply::where($where)->update(['status'=>1]);
+                return out();
+            }else{
+                return out('','','您已提交');
+            }
         }
     }
 }