diff --git a/app/http/controllers/api.go b/app/http/controllers/api.go index 1b7f4c7..8aa0ac2 100644 --- a/app/http/controllers/api.go +++ b/app/http/controllers/api.go @@ -3,6 +3,7 @@ package controllers import ( "PaymentCenter/app/constants/common" "PaymentCenter/app/constants/errorcode" + "PaymentCenter/app/constants/pojo" "PaymentCenter/app/http/entities/front" "PaymentCenter/app/models/orderrequestlogmodel" "PaymentCenter/app/services" @@ -42,7 +43,7 @@ func ApiRes(c *gin.Context, data interface{}, code int, msg ...string) { } // 加密数据 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) if code != errorcode.Success { message = errorcode.GetMsg(code, "")