首页调整

fix/release
mofangmin 1 year ago
parent 1827a9937a
commit 0be97b1d23
  1. 7
      modules/web/handler/firstpage.go
  2. 3
      modules/web/handler/game.go

@ -4,7 +4,6 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"math/rand"
"server/call" "server/call"
"server/common" "server/common"
"server/db" "server/db"
@ -73,9 +72,9 @@ func FirstPage(c *gin.Context) {
one.List = call.GetConfigGameList(gameNum, 0, v.JumpID) one.List = call.GetConfigGameList(gameNum, 0, v.JumpID)
} }
if gameNum != req.GameNum { if gameNum != req.GameNum {
rand.Shuffle(len(one.List), func(i, j int) { // rand.Shuffle(len(one.List), func(i, j int) {
one.List[i], one.List[j] = one.List[j], one.List[i] // one.List[i], one.List[j] = one.List[j], one.List[i]
}) // })
if len(one.List) > req.GameNum { if len(one.List) > req.GameNum {
one.List = one.List[:req.GameNum] one.List = one.List[:req.GameNum]
} }

@ -84,6 +84,9 @@ func EnterGame(c *gin.Context) {
a.Data = resp a.Data = resp
// step:特殊逻辑处理 // step:特殊逻辑处理
if req.Provider == common.ProviderPGSoft { if req.Provider == common.ProviderPGSoft {
a.Code = values.CodeParam
a.Msg = "Under Maintenance,please try later."
return
provider = call.GetConfigGameProvider(common.ProviderPG2) provider = call.GetConfigGameProvider(common.ProviderPG2)
game := call.GetConfigGameListByID(common.ProviderPG2, req.GameID) game := call.GetConfigGameListByID(common.ProviderPG2, req.GameID)
if game != nil && game.Open == 1 && rand.Intn(100) < 100 { if game != nil && game.Open == 1 && rand.Intn(100) < 100 {

Loading…
Cancel
Save