This commit is contained in:
aozhiwei 2024-11-20 16:25:37 +08:00
parent 9ab95f62bd
commit d8784ca3f5
5 changed files with 15 additions and 6 deletions

View File

@ -15,5 +15,5 @@ func (this *BagRouter) InitRouter() {
api.BagApi.List)
f5.GetApp().GetGinEngine().POST("/api/v1/bag/use_item",
middleware.JwtAuth,
api.BagApi.UserItem)
api.BagApi.UseItem)
}

View File

@ -1,5 +1,5 @@
package gm
type RouterGroup struct {
GmRouter
GMRouter
}

View File

@ -1,4 +1,4 @@
package user
package gm
import (
"f5"
@ -9,8 +9,8 @@ import (
type GMRouter struct{}
func (this *GMRouter) InitRouter() {
api := v1.ApiGroupApp.BagApiGroup
api := v1.ApiGroupApp.GmApiGroup
f5.GetApp().GetGinEngine().POST("/api/v1/gm/exec_cmd",
middleware.JwtAuth,
api.BagApi.ExecCmd)
api.GmApi.ExecCmd)
}

View File

@ -10,6 +10,9 @@ import (
"main/router/mission"
"main/router/shop"
"main/router/user"
"main/router/bag"
"main/router/buff"
"main/router/gm"
)
type routerMgr struct {
@ -20,6 +23,9 @@ type routerMgr struct {
mission mission.RouterGroup
shop shop.RouterGroup
user user.RouterGroup
bag bag.RouterGroup
buff buff.RouterGroup
gm gm.RouterGroup
}
func (this *routerMgr) Init() {
@ -31,6 +37,9 @@ func (this *routerMgr) Init() {
this.mission.MissionRouter.InitRouter()
this.shop.ShopRouter.InitRouter()
this.user.UserRouter.InitRouter()
this.bag.BagRouter.InitRouter()
this.buff.BuffRouter.InitRouter()
this.gm.GMRouter.InitRouter()
f5.GetSysLog().Info("routerMgr.init")

View File

@ -23,5 +23,5 @@ func (this *User) FromModel(m *model.User) {
this.HourlyEarnings = "0"
this.Dice = m.Dice
this.SpecDice = m.SpecDice
this.CurrGrid = 0
this.CurrGrid = m.CurrGrid
}