This commit is contained in:
aozhiwei 2024-08-13 11:12:50 +08:00
parent 85ccf72de9
commit 189252a83a

View File

@ -17,14 +17,16 @@ type UserApi struct {
} }
func (this *UserApi) Login(c *gin.Context) { func (this *UserApi) Login(c *gin.Context) {
accountAddress := "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b" if f5.IsTestEnv() {
s := GetSessionMgr().AddSession(accountAddress, accountAddress) accountAddress := "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b"
c.JSON(http.StatusOK, gin.H{ s := GetSessionMgr().AddSession(accountAddress, accountAddress)
"code": 0, c.JSON(http.StatusOK, gin.H{
"message": "登录成功", "code": 0,
//"data": user, "message": "登录成功",
"token": s.GetToken(), //"data": user,
}) "token": s.GetToken(),
})
}
} }
func (this *UserApi) Info(c *gin.Context) { func (this *UserApi) Info(c *gin.Context) {