duxin 1 жил өмнө
parent
commit
c6369d0d5c

+ 8 - 8
go-xweb/xweb/action.go

@@ -951,21 +951,21 @@ func (c *Action) Session() *httpsession.Session {
 }
 
 func (c *Action) GetSession(key string) interface{} {
-	if c.SessionMap == nil {
-		c.SessionMap = c.session.GetMultiple()
-	}
-	return c.SessionMap[key]
+	//if c.SessionMap == nil {
+	//	c.SessionMap = c.session.GetMultiple()
+	//}
+	return c.Session().Get(key)
 }
 
 func (c *Action) SetSession(key string, value interface{}) {
-	if c.SessionMap != nil {
-		c.SessionMap[key] = value
-	}
+	//if c.SessionMap != nil {
+	//	c.SessionMap[key] = value
+	//}
 	c.Session().Set(key, value)
 }
 
 func (c *Action) DelSession(key string) {
-	c.SessionMap = nil
+	//c.SessionMap = nil
 	c.Session().Del(key)
 }