getAuth(); $id_ckauthinfo = $id_ckauth['client']; $id_getUserinfo = $idNewGetuser->getUserinfo(); //获取资料 if($_COOKIE['fr_id_auth'] && !$_COOKIE['fr_id_userinfo']){ id_user_info($id_ckauthinfo['uid'],$id_ckauthinfo['appid'],$id_ckauth['access_token']); }elseif($_COOKIE['fr_id_userinfo'] && !$id_getUserinfo['data']['uid']){ id_refresh_token(); id_user_info($id_ckauthinfo['uid'],$id_ckauthinfo['appid'],$id_ckauth['access_token']); } //access_token时效 if($id_ckauthinfo['uid'] && time() > $id_ckauth['expires_time']){ id_refresh_token(); } //每天第一次访问统计 if($_COOKIE["fr_id_auth"] && $_COOKIE["fr_id_addexist_time"] != date('Ymd')){ $addexist_data = ['uid' => $id_ckauthinfo['uid'],'device' => $_COOKIE["fr_id_appname"]]; $addexist_header = ['authentication:'.base64_encode($id_ckauthinfo['appid'].'.'.$id_ckauth['access_token'].'.'.$id_ckauthinfo['uid'])]; $re_addexist = CallInterface(API_URL.'/v1/user/addexist/','POST',$addexist_data,$addexist_header); $addexist_jsonarr = json_decode($re_addexist,true); if($addexist_jsonarr['code']=='201' || $addexist_jsonarr['code']=='200'){ setcookie('fr_id_addexist_time',date('Ymd'),time()+3600*24*365,'/'); } } ?>