feat:完善网站信息,增加案例解决方案数据管理

This commit is contained in:
henry
2021-12-17 17:33:20 +08:00
parent c6ba000829
commit cb5ab0ae37
11 changed files with 347 additions and 2 deletions

View File

@ -0,0 +1,38 @@
package api
import (
"SciencesServer/app/api/website/controller"
"SciencesServer/app/basic/api"
"github.com/gin-gonic/gin"
)
type Service struct{}
func (*Service) SolutionCase(c *gin.Context) {
data, err := controller.NewService()(nil, "").SolutionCase()
api.APIResponse(err, data)(c)
}
func (*Service) SolutionCaseList(c *gin.Context) {
form := &struct {
api.IDStringForm
api.PageForm
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := controller.NewService()(nil, "").SolutionCaseList(form.Convert(), form.Page, form.PageSize)
api.APIResponse(err, data)(c)
}
func (*Service) SolutionCaseDetail(c *gin.Context) {
form := new(api.IDStringForm)
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
data, err := controller.NewService()(nil, "").SolutionCaseDetail(form.Convert())
api.APIResponse(err, data)(c)
}