Fix code formatting and comments in QR code generation

- Standardize comment punctuation
- Remove unnecessary spaces
- Improve code readability
- No functional changes
- Maintain responseType setting
This commit is contained in:
Sense T 2025-02-12 14:09:36 +08:00
parent 585241e85e
commit 0a9482039e

View File

@ -15,10 +15,10 @@ const generateQRCode = async (path: string, scene: string) => {
method: "POST",
url: url,
data: params,
responseType: "arraybuffer", // 重要需要设置响应类型为arraybuffer
responseType: "arraybuffer", // 重要: 需要设置响应类型为arraybuffer
});
// 将response.data一个Buffer写入文件
// 将response.data(一个Buffer)写入文件
writeFileSync("qrcode.png", response.data);
console.log("小程序码已生成");
} catch (error) {