政企超链接开始集成

This commit is contained in:
hoteas
2022-03-03 21:23:57 +08:00
parent e4ef9230c2
commit cac0214271
97 changed files with 379 additions and 117 deletions
+5 -2
View File
@@ -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, "没有登录")