feat:完善信息
This commit is contained in:
45
app/enterprise/api/account.go
Normal file
45
app/enterprise/api/account.go
Normal file
@ -0,0 +1,45 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"SciencesServer/app/common/api"
|
||||
"SciencesServer/app/enterprise/controller/account"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Account struct{}
|
||||
|
||||
type (
|
||||
accountLoginForm struct {
|
||||
Mode int `json:"mode" form:"mode" binding:"required"`
|
||||
}
|
||||
|
||||
accountRegisterForm struct {
|
||||
}
|
||||
)
|
||||
|
||||
func (a *Account) Login(c *gin.Context) {
|
||||
form := new(accountLoginForm)
|
||||
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := account.NewLogin().Login()(account.LoginMode(form.Mode), nil)
|
||||
api.APIResponse(err, data)
|
||||
}
|
||||
|
||||
func (a *Account) Register() {
|
||||
|
||||
}
|
||||
|
||||
func (c *Account) BindName() {
|
||||
|
||||
}
|
||||
|
||||
func (c *Account) BindMobile() {
|
||||
|
||||
}
|
||||
|
||||
func (a *Account) Logout() {
|
||||
|
||||
}
|
Reference in New Issue
Block a user