123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- // @APIVersion 1.0.0
- // @Title beego Test API
- // @Description beego has a very cool tools to autogenerate documents for your API
- // @Contact astaxie@gmail.com
- // @TermsOfServiceUrl http://beego.me/
- // @License Apache 2.0
- // @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
- package routers
- import (
- "github.com/beego/beego/v2/server/web"
- "github.com/beego/beego/v2/server/web/filter/cors"
- "hongze/hongze_clpt/controllers"
- )
- func init() {
- web.InsertFilter("*", web.BeforeRouter, cors.Allow(&cors.Options{
- AllowAllOrigins: true,
- AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
- AllowHeaders: []string{"Origin", "Account", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "From"},
- ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "Sign"},
- AllowCredentials: true,
- }))
- ns := web.NewNamespace("/api",
- web.NSNamespace("/wechat",
- web.NSInclude(
- &controllers.WechatController{},
- &controllers.WechatCommonController{},
- &controllers.MobileWechatController{},
- ),
- ),
- web.NSNamespace("/user",
- web.NSInclude(
- &controllers.UserController{},
- &controllers.UserCommonController{},
- ),
- ),
- web.NSNamespace("/permission",
- web.NSInclude(
- &controllers.ChartPermissionController{},
- &controllers.ChartPermissionAuthController{},
- &controllers.MobileChartPermissionAuthController{},
- ),
- ),
- web.NSNamespace("/resource",
- web.NSInclude(
- &controllers.BaseResourceController{},
- ),
- web.NSInclude(
- &controllers.ResourceController{},
- ),
- ),
- web.NSNamespace("/home",
- web.NSInclude(
- &controllers.MobileHomeController{},
- ),
- ),
- web.NSNamespace("/article",
- web.NSInclude(
- &controllers.ArticleController{},
- ),
- ),
- web.NSNamespace("/search",
- web.NSInclude(
- &controllers.MobileSearchController{},
- &controllers.BaseSearchController{},
- ),
- ),
- web.NSNamespace("/report",
- web.NSInclude(
- &controllers.ReportController{},
- &controllers.ReportCommonController{},
- &controllers.MobileReportController{},
- ),
- ),
- web.NSNamespace("/report_billboard",
- web.NSInclude(
- &controllers.ReportBillboardController{},
- &controllers.ReportBillboardCommonController{},
- &controllers.MobileReportBillboardController{},
- ),
- ),
- web.NSNamespace("/micro_roadshow",
- web.NSInclude(
- &controllers.MicroRoadShowController{},
- ),
- ),
- web.NSNamespace("/activity",
- web.NSInclude(
- &controllers.ActivityController{},
- &controllers.ActivityNoLoginController{},
- ),
- ),
- web.NSNamespace("/activity_special",
- web.NSInclude(
- &controllers.ActivitySpecialController{},
- ),
- ),
- web.NSNamespace("/advice",
- web.NSInclude(
- &controllers.AdviceController{},
- ),
- ),
- web.NSNamespace("/research",
- web.NSInclude(
- &controllers.MobileResearchController{},
- ),
- ),
- web.NSNamespace("/report_selection",
- web.NSInclude(
- &controllers.ReportSelectionController{},
- ),
- ),
- web.NSNamespace("/morning_meeting",
- web.NSInclude(
- &controllers.MorningMeetingController{},
- ),
- ),
- web.NSNamespace("/product_interior",
- web.NSInclude(
- &controllers.ProductInteriorController{},
- ),
- ),
- web.NSNamespace("/config",
- web.NSInclude(
- &controllers.ConfigController{},
- &controllers.BaseConfigController{},
- ),
- ),
- web.NSNamespace("/tactics",
- web.NSInclude(
- &controllers.MobileTacticsController{},
- ),
- ),
- web.NSNamespace("/banner",
- web.NSInclude(
- &controllers.BannerController{},
- &controllers.BaseBannerController{},
- ),
- ),
- web.NSNamespace("/tag",
- web.NSInclude(
- &controllers.TagController{},
- &controllers.TagCommonController{},
- ),
- ),
- web.NSNamespace("/collection",
- web.NSInclude(
- &controllers.CollectionController{},
- &controllers.BaseCollectionController{},
- ),
- ),
- web.NSNamespace("/yanxuan_special",
- web.NSInclude(
- &controllers.YanxuanSpecialController{},
- ),
- web.NSInclude(
- &controllers.YanxuanSpecialNoLoginController{},
- ),
- ),
- web.NSNamespace("/ficc_report",
- web.NSInclude(
- &controllers.FiccYbController{},
- ),
- ),
- )
- web.AddNamespace(ns)
- }
|