二维码/条形码的生成
This commit is contained in:
@@ -279,3 +279,20 @@ func (c *CmsController) QueryConfigs() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 生成二维码或条形码
|
||||
// @Description 生成二维码或条形码
|
||||
// @Param token header string true "认证token"
|
||||
// @Param width formData int true "图片宽"
|
||||
// @Param height formData int true "图片高"
|
||||
// @Param codetype formData string true "编码类型(二维码:qr; 条形码:bar)"
|
||||
// @Param srcData formData string true "二维码/条形码数据源"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CreateQrAndBarCode [post]
|
||||
func (c *CmsController) CreateQrAndBarCode() {
|
||||
c.callCreateQrAndBarCode(func(params *tCmsCreateQrAndBarCodeParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = jxutils.CreateQrAndBarCode(params.Width, params.Height, params.Codetype, params.SrcData)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user