mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-09 18:53:46 +08:00
更新gf版本到v2.2.5
This commit is contained in:
@@ -56,7 +56,7 @@ func (c *cMonitor) OnlineList(ctx context.Context, req *monitor.OnlineListReq) (
|
||||
var (
|
||||
res monitor.OnlineListRes
|
||||
clients []*monitor.OnlineModel
|
||||
i int
|
||||
i int64
|
||||
)
|
||||
|
||||
if c.wsManager.GetClientsLen() == 0 {
|
||||
@@ -86,7 +86,7 @@ func (c *cMonitor) OnlineList(ctx context.Context, req *monitor.OnlineListReq) (
|
||||
})
|
||||
}
|
||||
|
||||
res.PageCount = form.CalPageCount(len(clients), req.PerPage)
|
||||
res.PageCount = form.CalPageCount(int64(len(clients)), req.PerPage)
|
||||
res.Page = req.Page
|
||||
res.PerPage = req.PerPage
|
||||
|
||||
@@ -95,7 +95,7 @@ func (c *cMonitor) OnlineList(ctx context.Context, req *monitor.OnlineListReq) (
|
||||
_, perPage, offset := form.CalPage(ctx, req.Page, req.PerPage)
|
||||
|
||||
for k, v := range clients {
|
||||
if k >= offset && i <= perPage {
|
||||
if int64(k) >= offset && i <= perPage {
|
||||
i++
|
||||
if isDemo.Bool() {
|
||||
v.Addr = consts.DemoTips
|
||||
|
||||
Reference in New Issue
Block a user