作者 景龙
1 个管道 的构建 通过 耗费 0 秒

调试微信登录

@@ -405,7 +405,7 @@ class LoginController extends HomeBaseController @@ -405,7 +405,7 @@ class LoginController extends HomeBaseController
405 $users['user_nickname'] = $info['nickname']; 405 $users['user_nickname'] = $info['nickname'];
406 $users['avatar'] = $info['headimgurl']; 406 $users['avatar'] = $info['headimgurl'];
407 $users['last_login_time'] = time(); 407 $users['last_login_time'] = time();
408 - $userModel->where(['wb_id'=>$info['openid'],'source'=>'微信'])->update($users); 408 + $userModel->where($where)->update($users);
409 }else{ 409 }else{
410 $users['wb_id'] = $info['unionid']; 410 $users['wb_id'] = $info['unionid'];
411 $users['user_nickname'] = $info['nickname']; 411 $users['user_nickname'] = $info['nickname'];
@@ -458,7 +458,7 @@ class LoginController extends HomeBaseController @@ -458,7 +458,7 @@ class LoginController extends HomeBaseController
458 $users['user_nickname'] = $info['screen_name']; 458 $users['user_nickname'] = $info['screen_name'];
459 $users['avatar'] = $info['profile_image_url']; 459 $users['avatar'] = $info['profile_image_url'];
460 $users['last_login_time'] = time(); 460 $users['last_login_time'] = time();
461 - $userModel->where(['wb_id'=>$info['id'],'source'=>'微博'])->update($users); 461 + $userModel->where($where)->update($users);
462 }else{ 462 }else{
463 $users['wb_id'] = $info['id']; 463 $users['wb_id'] = $info['id'];
464 $users['user_nickname'] = $info['screen_name']; 464 $users['user_nickname'] = $info['screen_name'];