码农笔录博客源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
540 B

6 years ago
package filter
import (
"github.com/astaxie/beego/context"
6 years ago
"github.com/astaxie/beego/logs"
6 years ago
)
var FilterAdmin = func(ctx *context.Context) {
url := ctx.Input.URI()
refer := ctx.Input.Refer()
site := ctx.Input.Site()
6 years ago
logs.Info(url)
6 years ago
logs.Info(site)
logs.Info(site + url)
if site+url == refer {
6 years ago
ctx.Input.SetData("refresh", true)
}
6 years ago
//beego.Informational(url)
6 years ago
//if url != "/login"{
// ctx.Redirect(302, "/login")
//}
}
6 years ago
var FilterLoginInfo = func(ctx *context.Context) {
if ctx.Input.Session("userid") != nil {
//ctx.
}
6 years ago
}