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

View File

@ -26,15 +26,13 @@ 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 {
return
data, ret := iga.checkSessionData(c, reqJson.AccountId) }
if !ret && f5.IsOnlineEnv() {
return
} }
nowTime := int32(f5.GetApp().GetRealSeconds()) nowTime := int32(f5.GetApp().GetRealSeconds())
@ -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)
} }
@ -266,7 +270,7 @@ func (iga *InGameApi) OrderInfo(c *gin.Context) {
if err := c.ShouldBindJSON(&reqJson); err != nil { if err := c.ShouldBindJSON(&reqJson); err != nil {
f5.RspErr(c, 401, "params error") f5.RspErr(c, 401, "params error")
return return
} }
if !f5.IsOnlineEnv() { if !f5.IsOnlineEnv() {
rspObj := struct { rspObj := struct {