From b3d4f7b33bcff75a1723c76891477375187c4632 Mon Sep 17 00:00:00 2001 From: chengxl Date: Tue, 2 Sep 2025 09:43:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/job/WechatMaterial.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/api/job/WechatMaterial.php b/application/api/job/WechatMaterial.php index 90a3e5d..d676f78 100644 --- a/application/api/job/WechatMaterial.php +++ b/application/api/job/WechatMaterial.php @@ -52,12 +52,12 @@ class WechatMaterial $response = $oAiarticle->uploadMaterial($data); // 验证API响应 if (empty($response)) { - throw new RuntimeException("OpenAI API返回空结果"); + throw new \RuntimeException("OpenAI API返回空结果"); } // 检查JSON解析错误 $aResult = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) { - throw new RuntimeException("解析OpenAI响应失败: " . json_last_error_msg() . " | 原始响应: {$response}"); + throw new \RuntimeException("解析OpenAI响应失败: " . json_last_error_msg() . " | 原始响应: {$response}"); } $sMsg = empty($aResult['msg']) ? '上传素材失败' : $aResult['msg'];