实现微信扫码登陆
This commit is contained in:
@@ -70,10 +70,10 @@ abstract class BaseController
|
||||
$userInfo = [];
|
||||
if (session('user_id')) {
|
||||
// 从数据库获取最新用户信息
|
||||
$user = Users::where('id', session('user_id'))->find();
|
||||
$user = Users::where('uid', session('user_id'))->find();
|
||||
if ($user) {
|
||||
$userInfo = [
|
||||
'id' => $user->id,
|
||||
'id' => $user->uid,
|
||||
'name' => $user->name,
|
||||
'account' => $user->account,
|
||||
'avatar' => $user->avatar ?? '/static/images/avatar.png',
|
||||
|
||||
Reference in New Issue
Block a user