Files
waf-platform/EdgeAdmin/internal/web/actions/default/finance/init.go

42 lines
1.1 KiB
Go

//go:build plus
package finance
import (
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
"github.com/TeaOSLab/EdgeAdmin/internal/plus"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/finance/fee"
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/finance/users"
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
"github.com/iwind/TeaGo"
)
func init() {
TeaGo.BeforeStart(func(server *TeaGo.Server) {
server.
Helper(plus.NewHelper(plus.ComponentCodeFinance)).
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeFinance)).
// 财务管理
Prefix("/finance").
Get("", new(IndexAction)).
Data("teaMenu", "finance").
// 计费设置
Prefix("/finance/fee").
Data("teaSubMenu", "fee").
GetPost("", new(fee.IndexAction)).
Get("/traffic", new(fee.TrafficAction)).
Get("/bandwidth", new(fee.BandwidthAction)).
GetPost("/updatePricePopup", new(fee.UpdatePricePopupAction)).
GetPost("/calculator", new(fee.CalculatorAction)).
// 用户
Prefix("/finance/users").
Post("/options", new(users.OptionsAction)).
//
EndAll()
})
}