21 lines
518 B
Go
21 lines
518 B
Go
package front
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"qteam/app/http/controllers"
|
|
"qteam/app/http/entities/front"
|
|
"qteam/app/services"
|
|
)
|
|
|
|
func XyLogin(c *gin.Context) {
|
|
var request = controllers.GetRequest(c).(*front.LoginRequest)
|
|
code, token := services.XyYouKuLogin(request)
|
|
controllers.HandCodeRes(c, gin.H{"token": token}, code)
|
|
}
|
|
|
|
func UserInfo(c *gin.Context) {
|
|
userId := controllers.GetUserId(c)
|
|
phone := controllers.GetUserPhone(c)
|
|
controllers.Success(c, gin.H{"userId": userId, "phone": phone}, "")
|
|
}
|