政企超链接开始集成
This commit is contained in:
+5
-2
@@ -20,7 +20,7 @@ func main() {
|
||||
baidu.DefaultBaiDuMap.Init("ZeT902EZvVgIoGVWEFK3osUm")
|
||||
//fmt.Println("0123456"[1:7])
|
||||
appIns := hotime.Init("config/config.json")
|
||||
notNeedLogin := []string{"login", "test", "auth", "upload"} //不需要登录的操作
|
||||
notNeedLogin := []string{"token", "login", "test", "auth", "upload", "info"} //不需要登录的操作
|
||||
//RESTfull接口适配
|
||||
appIns.SetConnectListener(func(context *hotime.Context) bool {
|
||||
|
||||
@@ -57,7 +57,10 @@ func main() {
|
||||
if context.RouterString[0] == "app" && context.RouterString[1] == "analyse" {
|
||||
return true
|
||||
}
|
||||
|
||||
//微信操作无需登录
|
||||
if context.RouterString[0] == "app" && context.RouterString[1] == "category" {
|
||||
return true
|
||||
}
|
||||
//没有登录
|
||||
if context.Session("user_id").Data == nil {
|
||||
context.Display(2, "没有登录")
|
||||
|
||||
Reference in New Issue
Block a user