Przeglądaj źródła

小程序登录增加短信验证码登录

kevin 1 rok temu
rodzic
commit
69c08c502a
1 zmienionych plików z 5 dodań i 4 usunięć
  1. 5 4
      app/api/model/user/UserOpen.php

+ 5 - 4
app/api/model/user/UserOpen.php

@@ -379,10 +379,6 @@ class UserOpen extends UserModel
      */
      */
     public function smsloginWx($data)
     public function smsloginWx($data)
     {
     {
-        if (!$this->check($data)) {
-            return false;
-        }
-
         $user = $this->where('user_no', $data['user_no'])->find();
         $user = $this->where('user_no', $data['user_no'])->find();
         if (empty($user)) {
         if (empty($user)) {
             $vall = [
             $vall = [
@@ -401,8 +397,13 @@ class UserOpen extends UserModel
             }
             }
 
 
             $user = $this->where('user_no', $data['user_no'])->find();
             $user = $this->where('user_no', $data['user_no'])->find();
+            $data['mobile'] = $user['mobile'];
         }
         }
 
 
+        if (!$this->check($data)) {
+            return false;
+        }
+        
         $info = [
         $info = [
             'open_id'    => $data['openid'],
             'open_id'    => $data['openid'],
             'reg_source' => 'wx',
             'reg_source' => 'wx',