router.go 4.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package routers
  2. import (
  3. "IC/controllers"
  4. "github.com/astaxie/beego"
  5. "github.com/astaxie/beego/plugins/cors"
  6. )
  7. func init() {
  8. beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
  9. //AllowAllOrigins: true,
  10. AllowOrigins: []string{"https://xt.kuyicloud.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"},
  11. //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"},
  12. AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
  13. AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission", "KyToken"},
  14. ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
  15. AllowCredentials: true,
  16. }))
  17. beego.Router("/", &controllers.MainController{})
  18. //beego.Router("/api/lis/getlist", &controllers.LisController{}, "get:GetList")
  19. //beego.Router("/api/lis/synctobase", &controllers.LisController{}, "get:SyncToBase")
  20. //beego.Router("/api/lis/synfiled", &controllers.LisController{}, "get:FiledConfigSys")
  21. //beego.Router("/api/lis/syncadvice", &controllers.LisController{}, "get:SyncAdvice")
  22. //beego.Router("/api/lis/lgeysync", &controllers.LisController{}, "get:SyncLgth")
  23. //beego.Router("/api/lis/ystxsync", &controllers.LisController{}, "get:SyncYstx")
  24. //beego.Router("/api/lis/gzjhyzsync", &controllers.LisController{}, "get:SyncGzjhyz")
  25. //beego.Router("/api/lis/gzjhlissync", &controllers.LisController{}, "get:SyncGzjhLis")
  26. //beego.Router("/api/lis/hbdyyzsync", &controllers.LisController{}, "get:SyncHbJldyyz")
  27. //beego.Router("/api/lis/hbdylissync", &controllers.LisController{}, "get:SyncHbJldyLis")
  28. //beego.Router("/api/lis/tscylissync", &controllers.LisController{}, "get:SyncTscyLis")
  29. //beego.Router("/api/lis/fjtflissync", &controllers.LisController{}, "get:SyncFjtfLis")
  30. //beego.Router("/api/lis/csnylissync", &controllers.LisController{}, "get:SyncCsnyLis")
  31. //
  32. ////百霖lis
  33. //beego.Router("/api/lis/bltest", &controllers.LisController{}, "get:SyncBlLis")
  34. //beego.Router("/api/lis/blresulttest", &controllers.LisController{}, "get:SyncBlResultLis")
  35. //beego.Router("/api/schedule", &controllers.LisController{}, "get:Schedule")
  36. //
  37. //beego.Router("/api/syncshLis", &controllers.LisController{}, "get:SyncShLis")
  38. //beego.Router("/api/syncszblis", &controllers.LisController{}, "get:SyncSzblLis")
  39. //beego.Router("/api/test", &controllers.LisController{}, "get:SyncTest")
  40. ////beego.Router("/api/lis/gzjhxytx", &controllers.LisController{}, "get:SyncGzjhxytx")
  41. ////beego.Router("/api/lis/scdckfyy", &controllers.LisController{}, "get:SyncSccdkfyyLis")
  42. ////beego.Router("/api/lis/pajm", &controllers.LisController{}, "get:SyncPajmLis")
  43. //beego.Router("/api/lis/sssy", &controllers.LisController{}, "get:SyncSssy")
  44. //beego.Router("/api/lis/tscyvip", &controllers.LisController{}, "get:SyncTscyVipLis")
  45. //beego.Router("/api/lis/syncgzky", &controllers.LisController{}, "get:SyncGzky")
  46. //beego.Router("/api/lis/syncszwz", &controllers.LisController{}, "get:SyncSzwz")
  47. //beego.Router("/api/lis/syncpljx", &controllers.LisController{}, "get:SyncPljx")
  48. //beego.Router("/api/lis/syncbjnc", &controllers.LisController{}, "get:SyncBjncLis")
  49. //beego.Router("/api/lis/synczhra", &controllers.LisController{}, "get:SyncZhraLis")
  50. beego.Router("/api/lis/syncchyd", &controllers.LisController{}, "get:SyncChydLis")
  51. beego.Router("/test", &controllers.LisController{}, "get:Test")
  52. }