feat:完善信息

This commit is contained in:
henry
2021-09-28 18:23:34 +08:00
parent ef9213f261
commit b876eab301
9 changed files with 319 additions and 4 deletions

View 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() {
}