ai地址动态

This commit is contained in:
meimei
2025-04-21 17:24:32 +08:00
parent 5eec69b7ea
commit 702953a91e
5 changed files with 20 additions and 9 deletions

View File

@@ -26,10 +26,15 @@ class TokenWechatLogic
* authorwh
* @throws \Exception
*/
function getToken()
function getToken($url='')
{
$base_url = SundryConfig::val('py_app_base_url');
$url = $base_url.'/vip_groups/auth_info';
// $base_url = SundryConfig::val('py_app_base_url');
// $url = $base_url.'/vip_groups/auth_info';
if (empty($url)){
throw new \Exception('获取url失败');
}
$base_url = parse_url($url);
$url = $base_url['scheme'].'://'.$base_url['host'].'/vip_groups/auth_info';
$res = \wanghua\general_utility_tools_php\http\Curl::curl_post($url, []);
if(empty($res['data'])){
throw new \Exception('获取token失败');