feat:完善项目

This commit is contained in:
henry
2022-01-15 11:54:05 +08:00
parent 048d116b05
commit c5fb6023f3
18 changed files with 191 additions and 129 deletions

View File

@ -50,7 +50,12 @@ func registerAPI(app *gin.Engine) {
userV1.POST("/collect/launch", _api.Collect)
}
// Activity 活动信息管理
activityV1 := v1.Group("/activity")
activityV1 := v1.Group("/activity").Use(NeedLogin(config.RedisKeyForAccountEnterprise,
session.NewEnterprise(), AddSkipperURL([]string{
apiPrefix + "/v1/activity",
apiPrefix + "/v1/activity/detail",
apiPrefix + "/v1/account",
}...)))
{
_api := new(api2.Activity)
activityV1.POST("", _api.Instance)
@ -62,6 +67,7 @@ func registerAPI(app *gin.Engine) {
{
_api := new(api2.Sys)
sysV1.GET("/platform", _api.Platform)
sysV1.GET("/banner", _api.Banner)
sysV1.GET("/navigation", _api.Navigation)
sysV1.GET("/agreement", _api.Agreement)
sysV1.GET("/agreement/detail", _api.AgreementDetail)
@ -84,7 +90,7 @@ func registerAPI(app *gin.Engine) {
serviceV1 := v1.Group("/service")
{
_api := new(api2.Service)
serviceV1.GET("/solution_case", _api.SolutionCase)
serviceV1.POST("/solution_case", _api.SolutionCase)
serviceV1.POST("/solution_case/list", _api.SolutionCaseList)
serviceV1.POST("/solution_case/detail", _api.SolutionCaseDetail)
serviceV1.POST("/innovate", _api.Innovate)
@ -141,11 +147,11 @@ func registerAdminAPI(app *gin.Engine) {
apiPrefix + "/v1/account/logout",
}...)))
// 权限验证
//g.Use(NeedPermission(AddSkipperURL([]string{
// apiPrefix + "/captcha",
// apiPrefix + "/account/login",
// apiPrefix + "/account/logout",
//}...)))
v1.Use(NeedPermission(AddSkipperURL([]string{
apiPrefix + "/v1/captcha",
apiPrefix + "/v1/account/login",
apiPrefix + "/v1/account/logout",
}...)))
// Captcha 验证码
v1.GET("/captcha", new(api1.Captcha).Captcha)
// Upload 上传管理
@ -347,6 +353,8 @@ func registerEnterpriseAPI(app *gin.Engine) {
apiPrefix + "/v1/account/authorize",
}...)))
v1.Use(NeedAuthIdentity())
// Upload 上传管理
v1.POST("/upload", new(api.Upload).Upload)
// Config 配置管理