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:
parent
585241e85e
commit
0a9482039e
@ -15,10 +15,10 @@ const generateQRCode = async (path: string, scene: string) => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: url,
|
url: url,
|
||||||
data: params,
|
data: params,
|
||||||
responseType: "arraybuffer", // 重要:需要设置响应类型为arraybuffer
|
responseType: "arraybuffer", // 重要: 需要设置响应类型为arraybuffer
|
||||||
});
|
});
|
||||||
|
|
||||||
// 将response.data(一个Buffer)写入文件
|
// 将response.data(一个Buffer)写入文件
|
||||||
writeFileSync("qrcode.png", response.data);
|
writeFileSync("qrcode.png", response.data);
|
||||||
console.log("小程序码已生成");
|
console.log("小程序码已生成");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user