mirror of
https://shylinux.com/x/icebergs
synced 2025-04-28 10:12:02 +08:00
opt input
This commit is contained in:
parent
816ea9f3b4
commit
c4108d5875
@ -15,16 +15,21 @@ const GOODS = "goods"
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
GOODS: {Name: "goods hash auto", Help: "商品", Actions: ice.MergeActions(ice.Actions{
|
GOODS: {Name: "goods hash@keyboard place@province date@date name@key auto", Help: "商品", Actions: ice.MergeActions(ice.Actions{
|
||||||
mdb.MODIFY: {Name: "modify zone type name text price count image"},
|
mdb.MODIFY: {Name: "modify zone type name text price count image=4@img"},
|
||||||
|
mdb.CREATE: {Name: "modify zone type name text price count image=4@img"},
|
||||||
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }},
|
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }},
|
||||||
"copy": {Hand: func(m *ice.Message, arg ...string) { m.Cmd("", mdb.CREATE, m.OptionSimple("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"))
|
||||||
|
}},
|
||||||
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image")), Hand: func(m *ice.Message, arg ...string) {
|
}, 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] == "" {
|
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
||||||
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
|
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)
|
||||||
ctx.DisplayLocal(m, "")
|
ctx.DisplayLocal(m, "")
|
||||||
} else {
|
} else {
|
||||||
m.EchoImages(web.MergeURL2(m, web.SHARE_CACHE+kit.Split(m.Append("image"))[0]))
|
for _, p := range kit.Split(m.Append("image")) {
|
||||||
|
m.EchoImages(web.MergeURL2(m, web.SHARE_CACHE+p))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m.PushAction("copy", mdb.MODIFY, mdb.REMOVE)
|
m.PushAction("copy", mdb.MODIFY, mdb.REMOVE)
|
||||||
}},
|
}},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user