$appSecret, "needUnionid"=>true,//根据是否为公众号确定是否二次获取unionid "needUserInfo"=>true,//获取用户信息 ); },function($appid,$state,$userInfo){ //可以在此处进行$userInfo的持久化工作 $nickName=$userInfo["nickname"]; eeglobal_log_handler(LOG_CATALOG,"info","nickName=$nickName"); }); exit; }catch(Throwable $e){ $friendMsg=get_class($e)=='GeneralException'?$e->friendmsg:"非常抱歉,获取微信登录信息时发生错误"; throw new GeneralException("处理业务发生错误:".$e->getMessage(),$friendMsg,LOG_CATALOG,0,$e); }