This commit is contained in:
laodaming 2023-06-08 19:29:08 +08:00
parent 427c7cc817
commit f3e9916b37

View File

@ -3,7 +3,6 @@ package logic
import (
"context"
"errors"
"fmt"
"fusenapi/model"
"fusenapi/server/data-transfer/internal/svc"
"fusenapi/server/data-transfer/internal/types"
@ -56,9 +55,8 @@ func (l *UploadQrcodeLogic) UploadQrcode(req *types.UploadQrcodeReq) (resp *type
imgBase64, err := qrcode.CreateQrCodeBs64WithLogo(req.Url, "", "", 512, int(qrCodeSet.IndexX), int(qrCodeSet.IndexY), true)
if err != nil {
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, err.Error())
return resp.SetStatusWithMessage(basic.CodeServiceErr, "failed to generate qrcode")
}
fmt.Println(imgBase64)
return resp.SetStatusWithMessage(basic.CodeOK, "success", types.UploadQrcodeRsp{
Link: "",
D: qrType + " " + imgBase64,