|
@@ -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)
|
|
}
|
|
}
|
|
|
|
|