1
This commit is contained in:
parent
ead104b8fd
commit
85ccf72de9
@ -69,5 +69,17 @@
|
|||||||
"api": ["xxx", "-xxx"],
|
"api": ["xxx", "-xxx"],
|
||||||
"ui": ["addannouncement", "editannouncement", "addaudit", "editaudit"]
|
"ui": ["addannouncement", "editannouncement", "addaudit", "editaudit"]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"account_address": "0x0cf08c8661f87cbf823128d37ba75814cbcdf08b",
|
||||||
|
"__doc__": "test_admin",
|
||||||
|
"roles": [
|
||||||
|
"admin",
|
||||||
|
"customer_service"
|
||||||
|
],
|
||||||
|
"special": {
|
||||||
|
"api": ["xxx", "-xxx"],
|
||||||
|
"ui": ["addannouncement", "editannouncement", "addaudit", "editaudit"]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -17,6 +17,14 @@ type UserApi struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *UserApi) Login(c *gin.Context) {
|
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) {
|
func (this *UserApi) Info(c *gin.Context) {
|
||||||
|
@ -66,7 +66,8 @@ func (this *RechargeApi) BuyWithEmail(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *RechargeApi) internalBuy(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)
|
currencyMeta := mt.Table.Currency.Get(netId)
|
||||||
if currencyMeta == nil {
|
if currencyMeta == nil {
|
||||||
f5.RspErr(c, 2, "server internal error")
|
f5.RspErr(c, 2, "server internal error")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user