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.
26 lines
499 B
26 lines
499 B
package filter
|
|
|
|
import (
|
|
"github.com/astaxie/beego/context"
|
|
"github.com/astaxie/beego/logs"
|
|
)
|
|
|
|
var FilterAdmin = func(ctx *context.Context) {
|
|
url := ctx.Input.URI()
|
|
refer := ctx.Input.Refer()
|
|
site := ctx.Input.Site()
|
|
logs.Info(url)
|
|
if site+url == refer {
|
|
ctx.Input.SetData("refresh",true)
|
|
}
|
|
//beego.Informational(url)
|
|
//if url != "/login"{
|
|
// ctx.Redirect(302, "/login")
|
|
//}
|
|
}
|
|
|
|
var FilterLoginInfo = func(ctx *context.Context) {
|
|
if ctx.Input.Session("userid") != nil {
|
|
//ctx.
|
|
}
|
|
}
|
|
|