This commit is contained in:
commie
2026-02-15 19:41:56 +08:00
parent 61c5192018
commit 1a7f4bc98a
68 changed files with 992 additions and 353 deletions
+7 -5
View File
@@ -81,15 +81,17 @@ class Utils
* @param string $token 认证令牌
* @return array 响应数据
*/
public static function send(string $path, array $data, string $errMsg, string $token = ''): array|bool
public static function send(string $path, array $data, string $errMsg='', string $token = ''): array|bool
{
$token = $token ? $token : Utils::getAdminToken();
if($path != Url::$getAdminToken){
$token = $token ? $token : Utils::getAdminToken();
}
$url = Url::buildUrl($path);
//cp($url);
log_alert($url);
//log_alert($data);
$res = self::request($url, $data, $token);
//cp($data);
//cp($res);
//log_alert($res);
$res = json_decode($res, true);
if($res['errCode'] !==0 ){
throw new \Exception($res['errMsg'],$res['errCode']);