前台,响应fix

This commit is contained in:
wolter 2024-08-12 13:42:22 +08:00
parent 4032cbdd5b
commit e1bd366989
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package controllers
import ( import (
"PaymentCenter/app/constants/common" "PaymentCenter/app/constants/common"
"PaymentCenter/app/constants/errorcode" "PaymentCenter/app/constants/errorcode"
"PaymentCenter/app/constants/pojo"
"PaymentCenter/app/http/entities/front" "PaymentCenter/app/http/entities/front"
"PaymentCenter/app/models/orderrequestlogmodel" "PaymentCenter/app/models/orderrequestlogmodel"
"PaymentCenter/app/services" "PaymentCenter/app/services"
@ -42,7 +43,7 @@ func ApiRes(c *gin.Context, data interface{}, code int, msg ...string) {
} }
// 加密数据 // 加密数据
if code == errorcode.Success { if code == errorcode.Success {
if apiRsp, ok := data.(front.ApiResponse); ok { if apiRsp, ok := data.(front.ApiResponse); ok && appCheckInfo.App.KeyType != pojo.NO_CRYPT {
apiRsp.Order, code = api.EnCrypt(appCheckInfo.App, apiRsp.Order) apiRsp.Order, code = api.EnCrypt(appCheckInfo.App, apiRsp.Order)
if code != errorcode.Success { if code != errorcode.Success {
message = errorcode.GetMsg(code, "") message = errorcode.GetMsg(code, "")