pc.go 805 B

12345678910111213141516171819202122232425
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "hongze/hongze_yb/controller/pc"
  5. "hongze/hongze_yb/middleware"
  6. )
  7. func InitPc(r *gin.Engine) {
  8. rGroup := r.Group("api/pc").Use(middleware.Token())
  9. rGroup.GET("/latest_news", pc.LatestNews)
  10. rGroup.GET("/banner", pc.Banner)
  11. rGroup.GET("/latest_release", pc.LatestRelease)
  12. rGroup.GET("/detail", pc.ClassifyDetail)
  13. rGroup.GET("/detail_banner", pc.ClassifyDetailBanner)
  14. rGroup.GET("/recommend", pc.Recommend)
  15. rGroup.GET("/classify", pc.ClassifyFirstList)
  16. rGroup.GET("/comment", pc.CustomerComment)
  17. rGroup.POST("/getSunCode", pc.GetSunCode)
  18. pcGroup := r.Group("api/pc")
  19. pcGroup.GET("/login", pc.WechatLogin)
  20. pcGroup.GET("/get_sms_code", pc.GetSmsCode)
  21. pcGroup.GET("/get_email_code", pc.GetEmailCode)
  22. pcGroup.POST("/pcLogin", pc.PcLogin)
  23. }