Преглед изворни кода

师傅入驻审核状态更新

whitefang пре 1 година
родитељ
комит
9e260a4adb
1 измењених фајлова са 10 додато и 1 уклоњено
  1. 10 1
      app/workerapi/logic/LoginLogic.php

+ 10 - 1
app/workerapi/logic/LoginLogic.php

@@ -53,7 +53,16 @@ class LoginLogic extends BaseLogic
     {
         try {
             $master = MasterWorkerRegister::where('mobile',$params['mobile'])->findOrEmpty();
-            if(!$master->isEmpty()){
+
+            if(!$master->isEmpty() and $master->status==1){
+                throw new \Exception('该手机号已入驻');
+            }
+
+            if(!$master->isEmpty() and $master->status==0){
+                throw new \Exception('该手机号后台审核中');
+            }
+
+            if(!$master->isEmpty() and $master->status==2){
                 $master->save([
                     'maintain_exp_type' => $params['maintain_exp_type'],
                     'other_exp_type' => $params['other_exp_type'],