diff --git a/call/config.go b/call/config.go index 6ec9a34..6948aea 100644 --- a/call/config.go +++ b/call/config.go @@ -716,11 +716,15 @@ func GetConfigGameList(num int, cond ...int) []*common.ConfigGameList { continue } ret = append(ret, v) - if num > 0 && len(ret) >= num { - return ret - } } - return ret + sort.Slice(ret, func(i, j int) bool { + return ret[i].Sort > ret[j].Sort + }) + if num > 0 && len(ret) >= num { + return ret[:num] + } else { + return ret + } } func GetConfigGameListByID(provider, gameID int) *common.ConfigGameList {