-
Notifications
You must be signed in to change notification settings - Fork 9
BarcodeAPI
walker6253 edited this page Jun 30, 2021
·
2 revisions
- 提供条形码、二维码的图像数据生成,此API接口无需授权,可作为IMG元素的src。
GET /v1/barcode/qr/{fileName}.{imageType}| 路径参数 | 说明 |
|---|---|
| fileName | 图像文件名称,允许任意值,对产生的二维码图像数据无意义 |
| imageType | 图像文件类型,允许值包括gif、jpg、jpeg、png |
| 查询参数 | 类型 | 说明 |
|---|---|---|
| value | string | 二维码所代表的内容 |
| size | int | 二维码的大小。合法取值为1 - 10,默认为3,表示产生的二维码长和宽均为size * 21像素。 |
| ecclevel | int | 容错率。合法取值为0 - 3,默认为0,表示产生的二维码容错率从低到高的4个层次 |
| color | string | 条形码颜色,默认黑色。格式举例:0xff0000 |
GET /v1/barcode/{type}/{value}.{imageType}| 路径参数 | 说明 |
|---|---|
| type | 条形码类型,允许值为c39、ean13 |
| value | 条形码所代表的内容,允许取值应按照条形码类型而定 |
| imageType | 图像文件类型,允许值包括gif、jpg、jpeg、png |
| 查询参数 | 类型 | 说明 |
|---|---|---|
| width | int | 条形码宽度像素值,默认为250 |
| height | int | 条形码高度像素值,默认为100 |
| isTextDrawn | boolean | 是否显示文字内容,默认是false |
| textSize | int | 文字大小, 默认为5 |
| color | string | 条形码颜色,默认黑色。格式举例:0xff0000 |