feat:完善网站信息,修改留言信息模块

This commit is contained in:
henry
2021-12-20 17:07:39 +08:00
parent a66d120b3f
commit b0a9ef3569
7 changed files with 69 additions and 3 deletions

View File

@ -13,12 +13,14 @@ func (*Message) Launch(c *gin.Context) {
form := &struct {
Name string `json:"name" form:"name" binding:"required"`
Mobile string `json:"mobile" form:"mobile" binding:"required"`
Email string `json:"email" form:"email"`
Company string `json:"company" form:"company"`
Content string `json:"content" form:"content" binding:"required"`
}{}
if err := api.Bind(form)(c); err != nil {
api.APIFailure(err.(error))(c)
return
}
err := controller.NewMessage()().Form(form.Name, form.Mobile, form.Content)
err := controller.NewMessage()().Form(form.Name, form.Mobile, form.Email, form.Company, form.Content)
api.APIResponse(err)(c)
}