This commit is contained in:
aozhiwei 2024-08-13 11:11:30 +08:00
parent ead104b8fd
commit 85ccf72de9
3 changed files with 22 additions and 1 deletions

View File

@ -69,5 +69,17 @@
"api": ["xxx", "-xxx"],
"ui": ["addannouncement", "editannouncement", "addaudit", "editaudit"]
}
},
{
"account_address": "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b",
"__doc__": "test_admin",
"roles": [
"admin",
"customer_service"
],
"special": {
"api": ["xxx", "-xxx"],
"ui": ["addannouncement", "editannouncement", "addaudit", "editaudit"]
}
}
]

View File

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

View File

@ -66,7 +66,8 @@ func (this *RechargeApi) BuyWithEmail(c *gin.Context) {
}
func (this *RechargeApi) internalBuy(c *gin.Context,
netId int32, goodsId int32, goodsNum int32, accountAddress string, passportAddress string) {
netId int32, goodsId int32, goodsNum int32, accountAddress string, passportAddress string,
email string) {
currencyMeta := mt.Table.Currency.Get(netId)
if currencyMeta == nil {
f5.RspErr(c, 2, "server internal error")