mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
opt some
This commit is contained in:
parent
ecb21797b9
commit
9ab2d4b8cf
@ -42,11 +42,9 @@ func _hash_select(m *ice.Message, prefix, chain, field, value string) {
|
||||
fields := _hash_fields(m)
|
||||
cb := m.Optionv(SELECT_CB)
|
||||
m.Richs(prefix, chain, value, func(key string, val map[string]interface{}) {
|
||||
m.Debug("what %v", val)
|
||||
val = kit.GetMeta(val)
|
||||
switch cb := cb.(type) {
|
||||
case func(fields []string, value map[string]interface{}):
|
||||
m.Debug("what %v", val)
|
||||
cb(fields, val)
|
||||
default:
|
||||
if m.Option(FIELDS) == DETAIL {
|
||||
|
@ -54,7 +54,6 @@ func Script(m *ice.Message, name string) io.Reader {
|
||||
}
|
||||
m.Option("_script", name)
|
||||
|
||||
m.Debug("name %v", name)
|
||||
if s, e := os.Open(path.Join(m.Option(nfs.DIR_ROOT), name)); e == nil {
|
||||
return s
|
||||
}
|
||||
|
@ -47,8 +47,10 @@ func init() {
|
||||
PREFIX, kit.Dict("#", COMMENT),
|
||||
KEYWORD, kit.Dict(
|
||||
"title", KEYWORD,
|
||||
"premenu", KEYWORD,
|
||||
"chapter", KEYWORD,
|
||||
"section", KEYWORD,
|
||||
"source", KEYWORD,
|
||||
"refer", KEYWORD,
|
||||
"field", KEYWORD,
|
||||
"label", KEYWORD,
|
||||
|
@ -139,9 +139,7 @@ func (b *Label) Init(m *ice.Message, arg ...string) Chart {
|
||||
return b
|
||||
}
|
||||
func (b *Label) Draw(m *ice.Message, x, y int) Chart {
|
||||
m.Debug("arg %v", m.Option("order"))
|
||||
order, _ := kit.Parse(nil, "", kit.Split(m.Option("order"))...).(map[string]interface{})
|
||||
m.Debug("order", order)
|
||||
|
||||
top := y
|
||||
for _, line := range b.data {
|
||||
@ -202,7 +200,6 @@ func (b *Chain) Init(m *ice.Message, arg ...string) Chart {
|
||||
b.MarginX = kit.Int(m.Option("marginx"))
|
||||
b.MarginY = kit.Int(m.Option("marginy"))
|
||||
|
||||
m.Debug("what %v", arg)
|
||||
// 解析数据
|
||||
b.data = kit.Parse(nil, "", b.show(m, arg[0])...).(map[string]interface{})
|
||||
|
||||
|
6
init.go
6
init.go
@ -84,9 +84,9 @@ var Index = &Context{Name: "ice", Help: "冰山模块",
|
||||
"^_^ 欢迎使用冰山框架 ^_^",
|
||||
"^_^ Welcome to Icebergs World ^_^",
|
||||
"",
|
||||
"More: shylinuxc@gmail.com",
|
||||
"More: https://shylinux.com",
|
||||
"More: https://github.com/shylinux/icebergs",
|
||||
"Report: shylinuxc@gmail.com",
|
||||
"Public: https://shylinux.com",
|
||||
"Source: https://github.com/shylinux/icebergs",
|
||||
"",
|
||||
},
|
||||
}},
|
||||
|
@ -55,7 +55,6 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
m.Debug("what %v", m.Option(SID))
|
||||
if sid := strings.TrimSpace(m.Option(SID)); m.Option(SID, sid) != "" {
|
||||
if msg := m.Cmd(SESS, sid); msg.Append(kit.MDB_STATUS) != "" {
|
||||
m.Option(aaa.USERNAME, msg.Append(aaa.USERNAME))
|
||||
@ -64,7 +63,6 @@ func init() {
|
||||
// 登录失败
|
||||
}
|
||||
}
|
||||
m.Debug("what %v", m.Option(SID))
|
||||
m.Render(ice.RENDER_RESULT)
|
||||
}},
|
||||
"/sess": {Name: "/sess", Help: "会话", Action: map[string]*ice.Action{
|
||||
|
Loading…
x
Reference in New Issue
Block a user