router.go 4.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. package routers
  2. import (
  3. "Xcx_New/controllers"
  4. m_api "Xcx_New/controllers/mobile_api_controllers"
  5. new_m_api "Xcx_New/controllers/new_mobile_api_controllers"
  6. "github.com/astaxie/beego"
  7. "github.com/astaxie/beego/plugins/cors"
  8. xcx_m_api "Xcx_New/controllers/xcx_mobile_api_controller.go"
  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:9529", "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", "http://xcx.sgjyun.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. controllers.PCIndexEvaluationApiControllersRegisterRouters()
  50. controllers.ManagerCenterRegistRouters()
  51. controllers.DrugStockManagerApiRegistRouters()
  52. controllers.HisManagerApiRegistRouters()
  53. controllers.HisConfigApiRegistRouters()
  54. controllers.HisHospitalManagerApiRegistRouters()
  55. m_api.MobileAPIControllersRegisterRouters()
  56. new_m_api.NewMobileAPIControllersRegisterRouters()
  57. new_m_api.StatisticsAPIControllersRegisterRouters()
  58. //admin_api.AdminAPIControllersRegisterRouters()
  59. //new_m_api.CommonApiControllersRegisterRouters()
  60. //new_m_api.NewCommonApiControllersRegisterRouters()
  61. //new_m_api.NewManageApiControllersRegisterRouters()
  62. //controllers.ManageRouters()
  63. ////controllers.PatientRouters()
  64. //controllers.DoctorScheduleRouters()
  65. //new_m_api.StaffScheduleApiControllersRegisterRouters()
  66. //controllers.DialysisPrameteRoutes()
  67. //new_m_api.DialysisParameterApiControllersRegisterRouters()
  68. //controllers.SelfDrugRouters()
  69. ////new_m_api.NewDrugApiControllersRegisterRouters()
  70. //controllers.HisProjectRouters()
  71. //controllers.GdybRegistRouters()
  72. xcx_m_api.XcxApiControllersRegisterRouters()
  73. }