This commit is contained in:
yangduo 2025-02-20 17:09:30 +08:00
parent 5c390f971c
commit c9e8367bb4

View File

@ -26,16 +26,14 @@ func (iga *InGameApi) PreOrder(c *gin.Context) {
return return
} }
rspObj := struct { data := map[string]interface{}{}
ErrorCode int32 `json:"errcode"` if f5.IsOnlineEnv() {
ErrMsg string `json:"errmsg"` ret := true
OrderId string `json:"order_id"` data, ret = iga.checkSessionData(c, reqJson.AccountId)
}{} if !ret {
data, ret := iga.checkSessionData(c, reqJson.AccountId)
if !ret && f5.IsOnlineEnv() {
return return
} }
}
nowTime := int32(f5.GetApp().GetRealSeconds()) nowTime := int32(f5.GetApp().GetRealSeconds())
order := new(model.InAppOrder) order := new(model.InAppOrder)
@ -53,7 +51,13 @@ func (iga *InGameApi) PreOrder(c *gin.Context) {
return return
} }
rspObj.OrderId = order.OrderId rspObj := struct {
ErrorCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
OrderId string `json:"order_id"`
}{
OrderId: order.OrderId,
}
c.JSON(200, rspObj) c.JSON(200, rspObj)
} }