Browse Source

雇主注册

linwu 2 years ago
parent
commit
9441b6ace8
1 changed files with 8 additions and 8 deletions
  1. 8 8
      app/mobile/controller/Login.php

+ 8 - 8
app/mobile/controller/Login.php

@@ -177,14 +177,14 @@ class Login
         $worker  = WorkerModel::field(['id', 'realname', 'mobile', 'address', 'title', 'details', 'picone', 'remark', 'status'])->where('userid', $user_id)->find();
         if (empty($worker)) {
             $worker = json_encode(['id' => 0, 'realname' => '', 'mobile' => '', 'address' => '', 'title' => '', 'details' => '', 'picone' => '', 'remark' => '']);
-        }
-
-        if ($worker->status == 1) {
-            return $this->_jump('等待管理员审核', url('/login/setType') . '?type=1');
-        } elseif ($worker->status == 3 || $worker->status == 4) {
-            return $this->_jump('账号异常,请联系管理员', url('/login/setType') . '?type=1');
-        } elseif ($worker->status == 5) {
-            my_redirect(url('/emp/index'));
+        } else {
+            if ($worker->status == 1) {
+                return $this->_jump('等待管理员审核', url('/login/setType') . '?type=1');
+            } elseif ($worker->status == 3 || $worker->status == 4) {
+                return $this->_jump('账号异常,请联系管理员', url('/login/setType') . '?type=1');
+            } elseif ($worker->status == 5) {
+                my_redirect(url('/emp/index'));
+            }
         }
 
         return view('login/emp_register', ['worker' => $worker]);