更新gf版本到v2.2.5

This commit is contained in:
孟帅
2022-12-11 20:48:18 +08:00
parent e990ce28a1
commit 6b3333340f
41 changed files with 470 additions and 613 deletions

View File

@@ -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