1
0
forked from x/icebergs

fix route

This commit is contained in:
shylinux 2020-04-06 15:32:50 +08:00
parent 35730461cb
commit 0ea4c5de6a

View File

@ -1775,11 +1775,22 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
return return
} }
m.Richs(ice.WEB_SPACE, nil, kit.Select("*", arg, 0), func(key string, value map[string]interface{}) { target, rest := "*", ""
if len(arg) > 0 {
ls := strings.SplitN(arg[0], ".", 2)
if target = ls[0]; len(ls) > 1 {
rest = ls[1]
}
}
m.Richs(ice.WEB_SPACE, nil, target, func(key string, value map[string]interface{}) {
if len(arg) > 1 { if len(arg) > 1 {
ls := []interface{}{ice.WEB_SPACE, value[kit.MDB_NAME]}
m.Call(false, func(res *ice.Message) *ice.Message { return res }) m.Call(false, func(res *ice.Message) *ice.Message { return res })
// 发送命令 // 发送命令
m.Cmdy(ice.WEB_SPACE, value[kit.MDB_NAME], arg[1:]) if rest != "" {
ls = append(ls, ice.WEB_SPACE, rest)
}
m.Cmdy(ls, arg[1:])
return return
} }