|
@@ -160,7 +160,7 @@ class Auth
|
|
|
$time = time();
|
|
|
|
|
|
$data = [
|
|
|
- 'u_id' => $this->getUinqueId(8, $ids),
|
|
|
+ 'u_id' => $this->getUinqueId(8, [$ids]),
|
|
|
'invite_no' => $this->getUinqueNo(8, $invite_no),
|
|
|
'username' => $username,
|
|
|
// 'password' => $password,
|
|
@@ -677,13 +677,13 @@ class Auth
|
|
|
$ip = request()->ip();
|
|
|
$time = time();
|
|
|
|
|
|
- $introcode = User::column("introcode");
|
|
|
+ $introcode = User::column("invite_no");
|
|
|
|
|
|
$data = [
|
|
|
'wechat_openid' => $wechat_openid,
|
|
|
- //'avatar' => 'https://meet-1251365327.cos.ap-beijing.myqcloud.com/uploads/20220314/f57ebce8a72b823912904fe76eda0909.png',
|
|
|
- 'avatar' => $extend['gender'] == 1 ? config('avatar_boy') : config('avatar_girl'),//config('site.domain_cdnurl').'/avatar.png',
|
|
|
- 'introcode' => $this->getUinqueNo(6, $introcode),
|
|
|
+ 'gender' => isset($extend['gender']) ? $extend['gender'] : 1,
|
|
|
+ 'avatar' => isset($extend["avatar"]) ? $extend["avatar"] : '/assets/dc0f37f043e1e9f5240ed87e37f18740.png',
|
|
|
+ 'invite_no' => $this->getUinqueNo(6, $introcode),
|
|
|
'nickname' => get_rand_nick_name(),
|
|
|
];
|
|
|
$params = array_merge($data, [
|
|
@@ -703,7 +703,7 @@ class Auth
|
|
|
$user = User::create($params, true);
|
|
|
|
|
|
$this->_user = User::get($user->id);
|
|
|
- $this->_user->u_id = $this->getUinqueId(8, $user->id);
|
|
|
+ $this->_user->u_id = $this->getUinqueId(8, [$user->id]);
|
|
|
$this->_user->save();
|
|
|
|
|
|
//设置Token
|
|
@@ -723,7 +723,7 @@ class Auth
|
|
|
Hook::listen("user_register_successed", $this->_user, $data);
|
|
|
\app\common\model\NewBagHave::insert(["user_id" => $user->id, "createtime" => time()]);
|
|
|
Db::commit();
|
|
|
- } catch (Exception $e) {
|
|
|
+ } catch (Exception $e) {echo '<pre>';var_dump($e->getLine());exit;
|
|
|
$this->setError($e->getMessage());
|
|
|
Db::rollback();
|
|
|
return false;
|