Skip to content

yangzifun/qrcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

适合开发者或需要程序化生成二维码的场景。

通过 HTTP GET 请求直接访问 /qr 端点,即可获取二维码图片。API 返回的图片格式为 GIF

API 端点: https://your-worker-domain.com/qr

Query 参数:

参数名 是否必须 类型 默认值 说明 合法值范围
texturl String 要编码的文本内容或 URL。请务必进行 URL 编码 (encodeURIComponent) 任何字符串
cellSize Integer 4 每个二维码模块的像素大小。 120
margin Integer 0 二维码图案周围的空白边距(以模块数量为单位)。 010
errorCorrectionLevel String L 二维码的容错级别。 'L', 'M', 'Q', 'H'
typeNumber Integer 0 二维码版本号。0 表示由 API 自动选择最佳版本。 040

示例 URL (请将 your-worker-domain.com 替换为你的实际域名):

About

qrcode by Cloudflare Workers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published