router2.go
964 字节
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.Router("/api/business/index", &controllers.SyncDataController{}, "Post:SyncData")
beego.AddNamespace(nsPlatform) //企业平台调用
beego.AddNamespace(nsUcenter) //统一用户中心调用
}