|
@@ -650,6 +650,8 @@ func GetClientActiveQR(c *gin.Context) {
|
|
|
var outData models.ClientCardQRReply
|
|
|
var qr models.QRRequest
|
|
|
var getQR models.GetQRRequest
|
|
|
+ var activeSql shanghu.MerchantActiveConfig
|
|
|
+ var out models.ClientActiveQRReply
|
|
|
|
|
|
err := c.ShouldBindJSON(&inData)
|
|
|
if err != nil {
|
|
@@ -716,12 +718,23 @@ func GetClientActiveQR(c *gin.Context) {
|
|
|
app.Error(c, 500, err, getQR.Errmsg)
|
|
|
return
|
|
|
}
|
|
|
+ activeSql.ID = inData.ActiveConfigId
|
|
|
+ activeInfo, err := activeSql.GetConfigInfoById()
|
|
|
+ if err != nil {
|
|
|
+ app.Error(c, 500, err, getQR.Errmsg)
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
//fmt.Println(string(reply))
|
|
|
|
|
|
encoded := base64.StdEncoding.EncodeToString(reply)
|
|
|
+ out.H = activeInfo.H
|
|
|
+ out.W = activeInfo.W
|
|
|
+ out.X = activeInfo.X
|
|
|
+ out.Y = activeInfo.Y
|
|
|
+ out.Encoded = encoded
|
|
|
|
|
|
- app.OK(c, encoded, app.Success)
|
|
|
+ app.OK(c, out, app.Success)
|
|
|
|
|
|
}
|
|
|
|