router.go 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package routers
  2. import (
  3. "XT_New/controllers"
  4. //admin_api "XT_New/controllers/admin_api_controllers"
  5. m_api "XT_New/controllers/mobile_api_controllers"
  6. new_m_api "XT_New/controllers/new_mobile_api_controllers"
  7. "github.com/astaxie/beego"
  8. "github.com/astaxie/beego/plugins/cors"
  9. )
  10. func init() {
  11. beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
  12. // AllowAllOrigins: true,
  13. 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"},
  14. //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"},
  15. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  16. AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission"},
  17. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  18. AllowCredentials: true,
  19. }))
  20. // beego.Router("/", &controllers.MainController{})
  21. controllers.VerifyUserLoginControllerRegistRouters()
  22. controllers.RoleAPIControllerRegistRouters()
  23. controllers.PatientApiRegistRouters()
  24. controllers.DialysisApiRegistRouters()
  25. controllers.QiniuApiRegistRouters()
  26. controllers.DataApiRegistRouters()
  27. controllers.DoctorApiRegistRouters()
  28. controllers.PublicApiRegistRouters()
  29. controllers.DeviceAPIControllerRegistRouters()
  30. controllers.PayApiRegistRouters()
  31. controllers.ScheduleApiRegistRouters()
  32. controllers.SignWeighAPIControllerRegistRouters()
  33. controllers.InvoiceApiRegistRouters()
  34. controllers.StockApiRegistRouters()
  35. controllers.StockGoodApiRegistRouters()
  36. controllers.StockManagerApiRegistRouters()
  37. controllers.PatientScheduleTemplateAPIControllerRegistRouters()
  38. controllers.DialysisRecordAPIControllerRegistRouter()
  39. controllers.InspectionApiRegistRouters()
  40. controllers.StatisticsApiRegistRouters()
  41. controllers.PatientDataConfigAPIControllerRegistRouters()
  42. controllers.PrintDataAPIControllerRegistRouters()
  43. controllers.DialysisBoardAPIControllerRegistRouter()
  44. controllers.QcdApiRegistRouters()
  45. controllers.OrgInfoApiRegistRouters()
  46. controllers.DistrictApiRegistRouters()
  47. controllers.GobalConfigRegistRouters()
  48. controllers.IntegrationConfigRegistRouters()
  49. m_api.MobileAPIControllersRegisterRouters()
  50. new_m_api.NewMobileAPIControllersRegisterRouters()
  51. //admin_api.AdminAPIControllersRegisterRouters()
  52. new_m_api.CommonApiControllersRegisterRouters()
  53. controllers.ManageRouters()
  54. //controllers.PatientRouters()
  55. }