|
|
@@ -35,14 +35,14 @@ class GiftCardQrCodeService
|
|
|
|
|
|
$tempFileName = 'qrcode_' . $cardNo . '_' . time() . '.png';
|
|
|
$tempFilePath = $tempDir . $tempFileName;
|
|
|
- outFileLog($tempFilePath,'qrcode','$tempFilePath');
|
|
|
+
|
|
|
// 使用SimpleSoftwareIO QrCode生成二维码 - 正确的调用方式
|
|
|
$qrCodeGenerator = new Generator();
|
|
|
$qrCode = $qrCodeGenerator->format('png')
|
|
|
->size(430)
|
|
|
->margin(2)
|
|
|
->generate($qrContent);
|
|
|
- outFileLog($qrCode,'qrcode','$qrCode');
|
|
|
+
|
|
|
// 保存到文件
|
|
|
file_put_contents($tempFilePath, $qrCode);
|
|
|
|
|
|
@@ -55,7 +55,7 @@ class GiftCardQrCodeService
|
|
|
|
|
|
// Generate Qiniu cloud storage path
|
|
|
$remotePath = 'gift_card_qrcode/' . date('Ymd') . '/' . $tempFileName;
|
|
|
-// return $remotePath;
|
|
|
+
|
|
|
// Upload to Qiniu cloud
|
|
|
if (self::uploadToQiniu($tempFilePath, $remotePath)) {
|
|
|
// Delete temp file
|