feat:完善信息
This commit is contained in:
20
app/basic/api/sms.go
Normal file
20
app/basic/api/sms.go
Normal file
@ -0,0 +1,20 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"SciencesServer/app/basic/controller"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Sms struct{}
|
||||
|
||||
func (a *Sms) sCaptcha(c *gin.Context) {
|
||||
form := &struct {
|
||||
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
||||
}{}
|
||||
if err := Bind(form)(c); err != nil {
|
||||
APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := controller.NewSms()().Captcha(form.Mobile)
|
||||
APIResponse(err)
|
||||
}
|
Reference in New Issue
Block a user