wugg 2 жил өмнө
parent
commit
36e0ec03c9

+ 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'],