This commit is contained in:
aozhiwei 2024-04-27 10:07:56 +08:00
parent ceb6cead8c
commit 59b5839d5d
2 changed files with 3 additions and 7 deletions

View File

@ -7,7 +7,6 @@ import (
"main/constant" "main/constant"
"sync" "sync"
"fmt" "fmt"
"net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
@ -101,11 +100,7 @@ func (this *mailMgr) loadGroupMembers() {
} }
func (this *mailMgr) CaGetMailList(c *gin.Context) { func (this *mailMgr) CaGetMailList(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{ hum := c.MustGet("hum").(common.Player)
"code": 50014,
"message": "未登录或非法访问",
})
/*
rspObj := struct { rspObj := struct {
ErrCode int32 `json:"errcode"` ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"` ErrMsg string `json:"errmsg"`
@ -122,7 +117,7 @@ func (this *mailMgr) CaGetMailList(c *gin.Context) {
} }
return true return true
}) })
c.JSON(200, rspObj)*/ c.JSON(200, rspObj)
} }
func (this *mailMgr) CaMarkMail(c *gin.Context) { func (this *mailMgr) CaMarkMail(c *gin.Context) {

View File

@ -13,6 +13,7 @@ func CaAuth(c *gin.Context) {
hum = GetPlayerMgr().ForceCreatePlayer(accountId, sessionId) hum = GetPlayerMgr().ForceCreatePlayer(accountId, sessionId)
} }
hum.Lock() hum.Lock()
c.Set("hum", hum)
c.Next() c.Next()
hum.UnLock() hum.UnLock()
} }