Created
July 5, 2017 14:02
-
-
Save leopard627/43ad64d7d2bc64d1e09c8b7e5aa91c91 to your computer and use it in GitHub Desktop.
beego session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"github.com/astaxie/beego" | |
) | |
func (c *AdminController) Logindo() { | |
username := c.GetString("username") | |
c.SetSession("Adminname", username) //设置Session | |
adminName := c.GetSession("Adminname") //读取Session | |
c.DelSession("Adminname") //删除Session | |
c.TplNames = "admin/login.html" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment