mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
opt some
This commit is contained in:
parent
a54df18a51
commit
623cb165e2
@ -14,15 +14,20 @@ func init() {
|
||||
GOODS: {Name: "goods hash auto", Help: "商品", Actions: ice.MergeActions(ice.Actions{
|
||||
mdb.CREATE: {Name: "modify zone type name text price count image"},
|
||||
mdb.MODIFY: {Name: "modify zone type name text price count image"},
|
||||
"copy": {Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image"))
|
||||
}},
|
||||
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }},
|
||||
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image")), Hand: func(m *ice.Message, arg ...string) {
|
||||
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
||||
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
|
||||
if !m.IsMobile() {
|
||||
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
|
||||
}
|
||||
ctx.DisplayLocal(m, "")
|
||||
} else {
|
||||
m.EchoImages(web.MergeURL2(m, "/share/cache/"+m.Append("image")))
|
||||
}
|
||||
m.PushAction(mdb.MODIFY, mdb.REMOVE)
|
||||
m.PushAction("copy", mdb.MODIFY, mdb.REMOVE)
|
||||
}},
|
||||
})
|
||||
}
|
3
misc.go
3
misc.go
@ -137,6 +137,9 @@ func (m *Message) SetResult(arg ...string) *Message {
|
||||
return m.Set(MSG_RESULT, arg...)
|
||||
}
|
||||
|
||||
func (m *Message) IsMobile() bool {
|
||||
return strings.Contains(m.Option(MSG_USERUA), "Mobile")
|
||||
}
|
||||
func (m *Message) Design(action Any, help string, input ...Any) {
|
||||
list := kit.List()
|
||||
for _, input := range input {
|
||||
|
Loading…
x
Reference in New Issue
Block a user