router2.go
777 字节
package routers
import (
"github.com/astaxie/beego"
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/port/beego/controllers"
)
//外部调用,企业平台,总后台调用
func init() {
nsPlatform := beego.NewNamespace("/platform",
beego.NSRouter("/action", &controllers.SyncDataController{}, "post:SyncData"),
beego.NSRouter("/admins_change", &controllers.SyncDataController{}, "post:CompanyAdminChance"),
)
nsUcenter := beego.NewNamespace("/ucenter",
beego.NSRouter("/company/allow_forbid", &controllers.SyncDataController{}, "post:AllowForidCompany"),
beego.NSRouter("/company/info", &controllers.SyncDataController{}, "post:GetCompanyInfo"),
)
beego.AddNamespace(nsPlatform) //企业平台调用
beego.AddNamespace(nsUcenter) //统一用户中心调用
}