接口地址:https://www.mxnzp.com/api/barcode/create |
---|
返回格式:json |
请求方式:get |
请求示例:https://www.mxnzp.com/api/barcode/create?content=6902538005141&width=500&height=300&type=0&app_id=&app_secret= |
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
app_id | string | 必填 | app_id 扫码关注公众号 |
app_secret | string | 必填 | app_secret 扫码关注公众号 |
content | string | 必填 | 需要生成二维码的商品code值 |
width | int | 必填 | 生成的图片宽度,默认500 |
height | int | 必填 | 生成图片的高度,默认300 |
type | int | 选填 | 返回类型,0-生成条形码图片的地址链接 1-生成条形码图片的base64字符串 |
名称 | 类型 | 说明 |
---|---|---|
content | string | 图片对应的商品code值 |
barCodeUrl | string | 如果type=0 则此参数会有值,且此值会返回条形码的下载链接 |
barCodeBase64 | string | 如果type=1 则此参数会有值,且此值会返回条形码的base64字符串 |
type | int | 对应类型 |
错误码 | 说明 |
---|---|
0 | app_id或者app_secret不合法 |