package routers

import (
	"github.com/gin-gonic/gin"
	"hongze/hongze_yb/controller/pc"
	"hongze/hongze_yb/middleware"
)

func InitPc(r *gin.Engine)  {
	rGroup := r.Group("api/pc").Use(middleware.Token())
	rGroup.GET("/latest_news", pc.LatestNews)
	rGroup.GET("/banner", pc.Banner)
	rGroup.GET("/latest_release", pc.LatestRelease)
	rGroup.GET("/detail", pc.ClassifyDetail)
	rGroup.GET("/detail_banner", pc.ClassifyDetailBanner)
	rGroup.GET("/recommend", pc.Recommend)
	rGroup.GET("/classify", pc.ClassifyFirstList)
	rGroup.GET("/comment", pc.CustomerComment)
	rGroup.POST("/getSunCode", pc.GetSunCode)
	pcGroup := r.Group("api/pc")
	pcGroup.GET("/login", pc.WechatLogin)
	pcGroup.GET("/get_sms_code", pc.GetSmsCode)
	pcGroup.GET("/get_email_code", pc.GetEmailCode)
	pcGroup.POST("/pcLogin", pc.PcLogin)
}
