forked from x/icebergs
fix route
This commit is contained in:
parent
35730461cb
commit
0ea4c5de6a
@ -1775,11 +1775,22 @@ var Index = &ice.Context{Name: "web", Help: "网络模块",
|
||||
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 {
|
||||
ls := []interface{}{ice.WEB_SPACE, value[kit.MDB_NAME]}
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user