feat:完善项目管理
This commit is contained in:
@ -1 +1,15 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/website/controller"
|
||||
"SciencesServer/app/basic/api"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Docking struct{}
|
||||
|
||||
// Launch 联系客服对接
|
||||
func (*Docking) Launch(c *gin.Context) {
|
||||
err := controller.NewDocking()(nil, "").Form()
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
24
app/api/website/api/message.go
Normal file
24
app/api/website/api/message.go
Normal file
@ -0,0 +1,24 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/website/controller"
|
||||
"SciencesServer/app/basic/api"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Message struct{}
|
||||
|
||||
// Launch 留言发起
|
||||
func (*Message) Launch(c *gin.Context) {
|
||||
form := &struct {
|
||||
Name string `json:"name" form:"name" binding:"required"`
|
||||
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
||||
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)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
Reference in New Issue
Block a user