diff --git a/idapi_config.php b/idapi_config.php index ae741a8..3541f57 100644 --- a/idapi_config.php +++ b/idapi_config.php @@ -12,6 +12,14 @@ define('API_KEY', 'i7hP48WAcuTrmxfN'); define('API_URL', 'http://testapi'); define('ID_URL', 'https://id'); + +//正式环境 - 通行证 +//define('NEW_API_URL', 'https://fanruanclub.com'); + +//测试环境 - 通行证 +define('NEW_API_URL', 'https://passport.fanruan.com'); + +//测试环境 - 数字平台 define('DIGIT_API_URL', 'https://testdpapi.fanruan.com'); diff --git a/idapi_function.php b/idapi_function.php index 2a90c2f..ee8b8af 100644 --- a/idapi_function.php +++ b/idapi_function.php @@ -101,7 +101,7 @@ function setRefreshToken() $id_ckuser = id_CKdecrypt($_COOKIE["fr_id_auth"]); $id_ckuserinfo = $id_ckuser['client']; $data = '&appid='.$id_ckuserinfo['appid'].'&uid='.$id_ckuserinfo['uid'].'&refresh_token='.$id_ckuser['refresh_token']; - $re_login = CallInterface(DIGIT_API_URL.'/v1/token/refresh/'.$data,'GET'); + $re_login = CallInterface(NEW_API_URL.'/v1/token/refresh/'.$data,'GET'); $jsonarr = json_decode($re_login,true); if($jsonarr['message']=='success'){ $new_json = json_encode($jsonarr['data'],JSON_UNESCAPED_UNICODE); diff --git a/refreshtoken/index.php b/refreshtoken/index.php index ffdc089..2f67189 100644 --- a/refreshtoken/index.php +++ b/refreshtoken/index.php @@ -12,7 +12,7 @@ if($get_cookie){ $id_ckuser = id_CKdecrypt($get_cookie); $id_ckuserinfo = $id_ckuser['client']; $data = '&appid='.$id_ckuserinfo['appid'].'&uid='.$id_ckuserinfo['uid'].'&refresh_token='.$id_ckuser['refresh_token']; - $re_login = CallInterface(DIGIT_API_URL.'/v1/token/refresh/'.$data,'GET'); + $re_login = CallInterface(NEW_API_URL.'/v1/token/refresh/'.$data,'GET'); $jsonarr = json_decode($re_login,true); if($jsonarr['code']==200){