Browse Source

邀请码和TKid等值

lizhen_gitee 1 year ago
parent
commit
b4ad72e631
1 changed files with 3 additions and 2 deletions
  1. 3 2
      application/common/library/Auth.php

+ 3 - 2
application/common/library/Auth.php

@@ -225,7 +225,7 @@ class Auth
         $ip = request()->ip();
         $time = time();
 
-        $introcode = User::column("introcode");
+        //$introcode = User::column("introcode");
 
         $data = [
             //'username' => $username,
@@ -235,7 +235,7 @@ class Auth
             /*'level'    => 1,
             'score'    => 0,*/
             'avatar' => '',
-            'introcode' => $this->getUinqueNo(8, $introcode),
+            //'introcode' => $this->getUinqueNo(8, $introcode),
         ];
         $params = array_merge($data, [
             //'nickname'  => preg_match("/^1[3-9]{1}\d{9}$/",$username) ? substr_replace($username,'****',3,4) : $username,
@@ -258,6 +258,7 @@ class Auth
 
             $this->_user = User::get($user->id);
             $this->_user->username = 100000 + $user->id;
+            $this->_user->introcode = 100000 + $user->id;
             $this->_user->save();
 
             //设置Token