dongfeng-pay/legend/routers/router.go

65 lines
3.2 KiB
Go
Raw Normal View History

2021-04-27 15:33:49 +08:00
package routers
import (
"github.com/beego/beego/v2/server/web"
"legend/controllers"
"legend/filter"
)
func init() {
pageInit()
logicInit()
}
/**
** 初始化展示页面路由器
*/
func pageInit() {
//web.Router("/favicon.ico", &controllers.ShowPageController{}, "*:FaviconPage")
web.Router("/", &controllers.IndexController{}, "*:Index")
web.Router("/index.html", &controllers.IndexController{}, "*:Index")
web.Router("/login.html", &controllers.LoginController{}, "*:LoginPage")
web.Router("/welcome.html", &controllers.ShowPageController{}, "*:WelcomePage")
web.Router("/merchantKey.html", &controllers.ShowPageController{}, "*:MerchantKeyPage")
web.Router("/orderList.html", &controllers.ShowPageController{}, "*:OrderListPage")
2021-05-16 15:21:52 +08:00
web.Router("/scaleTemplate.html", &controllers.ShowPageController{}, "*:ScaleTemplatePage")
web.Router("/templateAdd.html", &controllers.ShowPageController{}, "*:TemplateAdd")
web.Router("/templateEdit.html", &controllers.ShowPageController{}, "*:TemplateEdit")
2021-04-27 15:33:49 +08:00
web.Router("/groupList.html", &controllers.ShowPageController{}, "*:GroupListPage")
web.Router("/areaList.html", &controllers.ShowPageController{}, "*:AreaListPage")
web.Router("/imitateOrder.html", &controllers.ShowPageController{}, "*:ImitateChargePage")
web.Router("/settleList.html", &controllers.ShowPageController{}, "*:SettleListPage")
web.Router("/everydayChargeCount.html", &controllers.ShowPageController{}, "*:EverydayChargeCountPage")
web.Router("/groupChargeCount.html", &controllers.ShowPageController{}, "*:GroupChargeCountPage")
web.Router("/areaChargeCount.html", &controllers.ShowPageController{}, "*:AreaChargePage")
web.Router("/person.html", &controllers.ShowPageController{}, "*:PersonPage")
web.Router("areaAddOrEdit.html", &controllers.ShowPageController{}, "*:AreaAddOrEdit")
2021-05-19 13:46:49 +08:00
web.Router("/areaEdit.html", &controllers.ShowPageController{}, "*:AreaEdit")
2021-04-27 15:33:49 +08:00
}
/**
** 业务逻辑路由
*/
func logicInit() {
web.Router("/login", &controllers.LoginController{}, "*:Login")
web.Router("/logout.html", &controllers.LogoutController{}, "*:Logout")
web.Router("/switch/login", &controllers.LogoutController{}, "*:SwitchLogin")
web.Router("/person/password", &controllers.LoginController{}, "*:PersonPassword")
2021-05-16 15:21:52 +08:00
web.Router("/add/template", &controllers.TemplateController{}, "*:TemplateAdd")
web.Router("/template/list", &controllers.TemplateController{}, "*:TemplateList")
web.Router("/delete/template", &controllers.TemplateController{}, "*:TemplateDelete")
web.Router("/template/info", &controllers.TemplateController{}, "*:TemplateAllInfo")
web.Router("/group/list", &controllers.GroupController{}, "*:ListGroup")
web.Router("/add/group", &controllers.GroupController{}, "*:AddGroup")
web.Router("/delete/group", &controllers.GroupController{}, "*:DeleteGroup")
web.Router("/edit/group", &controllers.GroupController{}, "*:EditGroup")
2021-05-19 13:46:49 +08:00
web.Router("/add/area", &controllers.AreaController{}, "*:AreaAdd")
web.Router("/area/list", &controllers.AreaController{}, "*:AreaList")
web.Router("/delete/area", &controllers.AreaController{}, "*:AreaDelete")
web.Router("/get/area", &controllers.AreaController{}, "*:AreaGet")
web.Router("/edit/area", &controllers.AreaController{}, "*:AreaEdit")
2021-04-27 15:33:49 +08:00
web.InsertFilter("/*", web.BeforeRouter, filter.LoginFilter)
}