码农笔录博客源码
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.

28 lines
559 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()
6 years ago
logs.Info(url)
6 years ago
//logs.Info(refer)
//logs.Info("https://www.aiprose.com"+url)
6 years ago
if "https://www.aiprose.com"+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
}