|
@@ -30,7 +30,7 @@ class GiftCardQrCodeService
|
|
|
$config = WeChatConfigService::getMnpConfig();
|
|
$config = WeChatConfigService::getMnpConfig();
|
|
|
|
|
|
|
|
$app = Factory::miniProgram($config);
|
|
$app = Factory::miniProgram($config);
|
|
|
- return $app;
|
|
|
|
|
|
|
+
|
|
|
// 修正:使用正确的API方法
|
|
// 修正:使用正确的API方法
|
|
|
// $response = $app->app_code->getUnlimited($scene, [
|
|
// $response = $app->app_code->getUnlimited($scene, [
|
|
|
// 'page' => $page,
|
|
// 'page' => $page,
|
|
@@ -49,7 +49,7 @@ class GiftCardQrCodeService
|
|
|
// 方案2:使用getQrCode方法
|
|
// 方案2:使用getQrCode方法
|
|
|
$response = $app->app_code->getQrCode($page . '?' . $scene, 280
|
|
$response = $app->app_code->getQrCode($page . '?' . $scene, 280
|
|
|
);
|
|
);
|
|
|
-
|
|
|
|
|
|
|
+ return $response;
|
|
|
if (!($response instanceof \EasyWeChat\Kernel\Http\StreamResponse)) {
|
|
if (!($response instanceof \EasyWeChat\Kernel\Http\StreamResponse)) {
|
|
|
Log::error('生成小程序码失败', ['response' => $response]);
|
|
Log::error('生成小程序码失败', ['response' => $response]);
|
|
|
return false;
|
|
return false;
|