router.go 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. package routers
  2. import (
  3. "XT_New/controllers"
  4. m_api "XT_New/controllers/mobile_api_controllers"
  5. new_m_api "XT_New/controllers/new_mobile_api_controllers"
  6. "github.com/astaxie/beego"
  7. "github.com/astaxie/beego/plugins/cors"
  8. )
  9. func init() {
  10. beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
  11. //AllowAllOrigins: true,
  12. AllowOrigins: []string{"https://xt.kuyicloud.com", "http://localhost:9528", "http://localhost:9529", "http://localhost:9531", "http://xt.test.shengws.com", "http://new_mobile.test.sgjyun.com", "https://api.xt.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", "https://mobile.kuyicloud.com"},
  13. //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"},
  14. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  15. AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission", "KyToken"},
  16. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  17. AllowCredentials: true,
  18. }))
  19. beego.Router("/", &controllers.MainController{})
  20. controllers.VerifyUserLoginControllerRegistRouters()
  21. controllers.RoleAPIControllerRegistRouters()
  22. controllers.PatientApiRegistRouters()
  23. controllers.DialysisApiRegistRouters()
  24. controllers.QiniuApiRegistRouters()
  25. controllers.DataApiRegistRouters()
  26. controllers.DoctorApiRegistRouters()
  27. controllers.PublicApiRegistRouters()
  28. controllers.DeviceAPIControllerRegistRouters()
  29. controllers.PayApiRegistRouters()
  30. controllers.ScheduleApiRegistRouters()
  31. controllers.SignWeighAPIControllerRegistRouters()
  32. controllers.InvoiceApiRegistRouters()
  33. controllers.StockApiRegistRouters()
  34. controllers.StockGoodApiRegistRouters()
  35. controllers.StockManagerApiRegistRouters()
  36. controllers.PatientScheduleTemplateAPIControllerRegistRouters()
  37. controllers.DialysisRecordAPIControllerRegistRouter()
  38. controllers.InspectionApiRegistRouters()
  39. controllers.StatisticsApiRegistRouters()
  40. controllers.PatientDataConfigAPIControllerRegistRouters()
  41. controllers.PrintDataAPIControllerRegistRouters()
  42. controllers.DialysisBoardAPIControllerRegistRouter()
  43. controllers.QcdApiRegistRouters()
  44. controllers.OrgInfoApiRegistRouters()
  45. controllers.DistrictApiRegistRouters()
  46. controllers.GobalConfigRegistRouters()
  47. controllers.IntegrationConfigRegistRouters()
  48. controllers.PCIndexEvaluationApiControllersRegisterRouters()
  49. controllers.ManagerCenterRegistRouters()
  50. controllers.DrugStockManagerApiRegistRouters()
  51. controllers.HisManagerApiRegistRouters()
  52. controllers.HisConfigApiRegistRouters()
  53. controllers.HisChargeApiRegistRouters()
  54. controllers.HisHospitalManagerApiRegistRouters()
  55. controllers.HisPrintApiRegistRouters()
  56. controllers.CoordinateRcegistRouters()
  57. m_api.MobileAPIControllersRegisterRouters()
  58. new_m_api.NewMobileAPIControllersRegisterRouters()
  59. new_m_api.StatisticsAPIControllersRegisterRouters()
  60. //admin_api.AdminAPIControllersRegisterRouters()
  61. controllers.CommonApiControllersRegisterRouters()
  62. new_m_api.NewCommonApiControllersRegisterRouters()
  63. new_m_api.NewManageApiControllersRegisterRouters()
  64. controllers.ManageRouters()
  65. //controllers.PatientRouters()
  66. controllers.DoctorScheduleRouters()
  67. new_m_api.StaffScheduleApiControllersRegisterRouters()
  68. controllers.DialysisPrameteRoutes()
  69. new_m_api.DialysisParameterApiControllersRegisterRouters()
  70. controllers.SelfDrugRouters()
  71. //new_m_api.NewDrugApiControllersRegisterRouters()
  72. controllers.HisProjectRouters()
  73. controllers.GdybRegistRouters()
  74. controllers.SupplyOrderApiRegistRouters()
  75. controllers.SecondaryOrderApiRegistRouters()
  76. controllers.HisDepositApiRegistRouters()
  77. controllers.HisSummaryApiRegistRouters()
  78. controllers.PharmacyApiControllersRegisterRouters()
  79. controllers.PharmacyApiRegistRouters()
  80. controllers.SignApiRegistRouters()
  81. controllers.ZuobiaoApiRegistRouters()
  82. }