微擎没有关注公众号获取头像昵称信息
if ($_W['fans']['follow'] == 0){//不用关注 借用获取昵称和头像
if ($_W['account']['level'] == 4){
if ($_W['fans']['nickname']){
$fans = $_W['fans'];
$fans['avatar'] = $fans['tag']['avatar'];
}else $fans = unserialize(base64_decode($_SESSION['userinfo']));
}
if (empty($fans)){
load()->model('mc');
$fans = mc_oauth_userinfo();
}
//第二张表
if($score != 0){
$tdata = array(
'open_id'=>$_W['fans']['openid'], //用户id
'uname'=>$fans['nickname'], //用户昵称
'uprice'=>$fans['headimgurl'], //用户头像
'score'=>$score,
'create_time' =>$dtime,
);
$result5 = pdo_insert('game_score', $tdata);
}