Browse Source

fix:修改

duxin 1 year ago
parent
commit
c6369d0d5c
1 changed files with 8 additions and 8 deletions
  1. 8 8
      go-xweb/xweb/action.go

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

@@ -951,21 +951,21 @@ func (c *Action) Session() *httpsession.Session {
 }
 }
 
 
 func (c *Action) GetSession(key string) interface{} {
 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{}) {
 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)
 	c.Session().Set(key, value)
 }
 }
 
 
 func (c *Action) DelSession(key string) {
 func (c *Action) DelSession(key string) {
-	c.SessionMap = nil
+	//c.SessionMap = nil
 	c.Session().Del(key)
 	c.Session().Del(key)
 }
 }