31 lines
559 B
Go
31 lines
559 B
Go
package front
|
|
|
|
import (
|
|
"qteam/app/models/usersmodel"
|
|
"time"
|
|
)
|
|
|
|
type LoginRequest struct {
|
|
Data string `form:"data" validate:"required"`
|
|
}
|
|
|
|
type XyDecryptData struct {
|
|
Mobile string `json:"phone"`
|
|
CerNo string `json:"cerNo"`
|
|
Time string `json:"time"`
|
|
UserId string `json:"userId"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
func (this *XyDecryptData) RequestToDb() (user usersmodel.Users) {
|
|
user.Phone = this.Mobile
|
|
user.Name = this.Mobile
|
|
user.Status = 1
|
|
user.CreateTime = time.Now()
|
|
user.UpdateTime = time.Now()
|
|
return
|
|
}
|