package routers import ( "XT_New/controllers" //admin_api "XT_New/controllers/admin_api_controllers" m_api "XT_New/controllers/mobile_api_controllers" new_m_api "XT_New/controllers/new_mobile_api_controllers" "github.com/astaxie/beego" "github.com/astaxie/beego/plugins/cors" ) func init() { beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{ // AllowAllOrigins: true, AllowOrigins: []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://localhost:9531", "http://xt.test.shengws.com", "http://new_mobile.test.sgjyun.com", "https://xt.test.shengws.com", "http://xt.test.sgjyun.com", "https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com", "https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com", "http://mobile.sgjyun.com", "http://mobile.kuyicloud.com"}, //AllowOrigins: []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://xt.test.shengws.com","https://xt.test.shengws.com", "http://xt.test.sgjyun.com","https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com","https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com","http://mobile.sgjyun.com","http://mobile.kuyicloud.com"}, AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission"}, ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"}, AllowCredentials: true, })) // beego.Router("/", &controllers.MainController{}) controllers.VerifyUserLoginControllerRegistRouters() controllers.RoleAPIControllerRegistRouters() controllers.PatientApiRegistRouters() controllers.DialysisApiRegistRouters() controllers.QiniuApiRegistRouters() controllers.DataApiRegistRouters() controllers.DoctorApiRegistRouters() controllers.PublicApiRegistRouters() controllers.DeviceAPIControllerRegistRouters() controllers.PayApiRegistRouters() controllers.ScheduleApiRegistRouters() controllers.SignWeighAPIControllerRegistRouters() controllers.InvoiceApiRegistRouters() controllers.StockApiRegistRouters() controllers.StockGoodApiRegistRouters() controllers.StockManagerApiRegistRouters() controllers.PatientScheduleTemplateAPIControllerRegistRouters() controllers.DialysisRecordAPIControllerRegistRouter() controllers.InspectionApiRegistRouters() controllers.StatisticsApiRegistRouters() controllers.PatientDataConfigAPIControllerRegistRouters() controllers.PrintDataAPIControllerRegistRouters() controllers.DialysisBoardAPIControllerRegistRouter() controllers.QcdApiRegistRouters() controllers.OrgInfoApiRegistRouters() controllers.DistrictApiRegistRouters() controllers.GobalConfigRegistRouters() controllers.IntegrationConfigRegistRouters() m_api.MobileAPIControllersRegisterRouters() new_m_api.NewMobileAPIControllersRegisterRouters() //admin_api.AdminAPIControllersRegisterRouters() controllers.ManageRouters() //controllers.PatientRouters() }