wugg před 2 roky
rodič
revize
36e0ec03c9
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      app/controller/User.php

+ 2 - 2
app/controller/User.php

@@ -39,7 +39,7 @@ class User extends BaseController
             ]);
     	if($validate->check($post)==false) return json_show(1004,$validate->getError());
         $source = isset($post['source']) ? trim($post['source']):"";
-        $uiq = Db::table("sys_account")->where(["username"=>$post['username']])->find();
+        $uiq = Db::table("sys_account")->where(["username"=>$post['mobile']])->find();
         if($uiq){
             return json_show(1002,"账户名已存在!");
         }
@@ -52,7 +52,7 @@ class User extends BaseController
             $salt =makeSalt();
             $password = sha1($post['password'].$salt);
             $data = [
-            	'username'=>$post['username'],
+            	'username'=>$post['mobile'],
                 "password"=>$password,
                 "salt"=>$salt,
                 "mobile"=>$post['mobile'],