router.go
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package routers
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr/controllers"
)
func init() {
nsV1 := beego.NewNamespace("v1") //, beego.NSBefore(middleware.CheckJWTToken)
nsV1.Router("/auth/login", &controllers.AuthController{}, "Post:Login")
nsV1.Router("/auth/smsCode", &controllers.AuthController{}, "Post:SmsCode")
nsV1.Router("/auth/accessToken", &controllers.AuthController{}, "Post:AccessToken")
nsV1.Router("/auth/refreshToken", &controllers.AuthController{}, "Post:RefreshToken")
nsV1.Router("/auth/revoke", &controllers.AuthController{}, "Post:Revoke")
nsV1.Router("/auth/updateDevice", &controllers.AuthController{}, "Post:UpdateDevice")
nsV1.Router("/auth/checkSmsCode", &controllers.AuthController{}, "Post:AuthCheckSmsCode")
nsV1.Router("/auth/centerCompanys", &controllers.AuthController{}, "post:CenterCompanys")
nsV1.Router("/auth/companys", &controllers.AuthController{}, "post:Companys")
nsV1.Router("/user/userInfo", &controllers.UserController{}, "Post:UserInfo")
nsV1.Router("/user/checkSmsCode", &controllers.UserController{}, "Post:CheckSmsCode")
nsV1.Router("/user/changePhone", &controllers.UserController{}, "Post:ChangePhone")
nsV1.Router("/user/resetPassword", &controllers.UserController{}, "Post:ResetPassword")
nsV1.Router("/user/changePassword", &controllers.UserController{}, "Post:ChangePassword")
nsV1.Router("/order/statistics", &controllers.OrderController{}, "Post:Statistics")
nsV1.Router("/order/details", &controllers.OrderController{}, "Post:OrderDetail")
nsV1.Router("/order/list", &controllers.OrderController{}, "Post:OrderList")
nsV1.Router("/order/intentions", &controllers.OrderController{}, "Post:Intentions")
nsV1.Router("/dividend/statistics", &controllers.DividendController{}, "Post:DividendStatistics")
nsV1.Router("/dividend/orders", &controllers.DividendController{}, "Post:DividendOrders")
nsV1.Router("/company/property", &controllers.CompanyController{}, "post:Property")
nsV1.Router("/company/partners", &controllers.CompanyController{}, "post:Partners")
nsV1.Router("/company/statistics", &controllers.CompanyController{}, "post:Statistics")
nsV1.Router("/partner/detail", &controllers.PartnerController{}, "post:Detail")
beego.AddNamespace(nsV1)
InitV2()
}
func InitV2() {
nsV2 := beego.NewNamespace("v2") // ,, beego.NSBefore(middleware.CheckJWTToken)
nsV2.Router("/auth/login", &controllers.AuthController{}, "Post:LoginV2")
nsV2.Router("/user/userInfo", &controllers.UserController{}, "Post:UserInfoV2")
beego.AddNamespace(nsV2)
}