forked from x/icebergs
opt some
This commit is contained in:
parent
fbc725d641
commit
81b1bb8fc2
@ -44,13 +44,13 @@ func init() {
|
||||
COMPILE: {Value: kit.Data(cli.ENV, kit.Dict("GOPRIVATE", "shylinux.com,github.com", "GOPROXY", "https://goproxy.cn,direct", "CGO_ENABLED", "0"))},
|
||||
}, Commands: ice.Commands{
|
||||
COMPILE: {Name: "compile arch=amd64,386,mipsle,arm,arm64 os=linux,darwin,windows src=src/main.go@key run binpack relay", Help: "编译", Actions: ice.Actions{
|
||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(nfs.DIR, ice.SRC, nfs.DIR_CLI_FIELDS, kit.Dict(nfs.DIR_REG, `.*\.go$`)).Sort(nfs.PATH)
|
||||
}},
|
||||
BINPACK: {Name: "binpack", Help: "打包", Hand: func(m *ice.Message, arg ...string) {
|
||||
BINPACK: {Help: "打包", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(AUTOGEN, BINPACK)
|
||||
}},
|
||||
RELAY: {Name: "relay", Help: "跳板", Hand: func(m *ice.Message, arg ...string) {
|
||||
RELAY: {Help: "跳板", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(COMPILE, ice.SRC_RELAY_GO, path.Join(ice.USR_PUBLISH, RELAY))
|
||||
}},
|
||||
}, Hand: func(m *ice.Message, arg ...string) {
|
||||
|
@ -66,9 +66,6 @@ func init() {
|
||||
m.Cmd(ctx.COMMAND, mdb.SEARCH, ctx.COMMAND, ice.OptionFields(ctx.INDEX)).Tables(func(value ice.Maps) {
|
||||
m.Push(nfs.PATH, "index:"+value[ctx.INDEX])
|
||||
})
|
||||
m.Cmd(web.DREAM, ice.Map{nfs.DIR_TYPE: "", nfs.DIR_DEEP: "", nfs.DIR_ROOT: ""}).Tables(func(value ice.Maps) {
|
||||
m.Push(nfs.PATH, "dream:"+value[mdb.NAME])
|
||||
})
|
||||
m.Cmd(FAVOR, "_system_app").Tables(func(value ice.Maps) {
|
||||
m.Push(nfs.PATH, "_open:"+strings.ToLower(value[mdb.NAME]))
|
||||
})
|
||||
|
19
core/mall/goods.go
Normal file
19
core/mall/goods.go
Normal file
@ -0,0 +1,19 @@
|
||||
package mall
|
||||
|
||||
import (
|
||||
ice "shylinux.com/x/icebergs"
|
||||
"shylinux.com/x/icebergs/base/mdb"
|
||||
)
|
||||
const GOODS = "goods"
|
||||
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
GOODS: {Name: "goods hash auto", Help: "商品", Actions: ice.MergeActions(ice.Actions{
|
||||
|
||||
}, mdb.HashAction(mdb.FIELD, "time,hash,type,name,text")), Hand: func(m *ice.Message, arg ...string) {
|
||||
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
|
||||
m.Action(mdb.CREATE)
|
||||
}
|
||||
}},
|
||||
})
|
||||
}
|
@ -235,6 +235,8 @@ func init() {
|
||||
_status_each(m, PULL, cli.SYSTEM, GIT, PULL)
|
||||
}},
|
||||
code.COMPILE: {Name: "compile", Help: "编译", Hand: func(m *ice.Message, arg ...string) {
|
||||
web.ToastProcess(m)
|
||||
defer web.ToastSuccess(m)
|
||||
m.Cmdy(code.VIMER, code.COMPILE)
|
||||
}},
|
||||
PUSH: {Name: "push", Help: "上传", Hand: func(m *ice.Message, arg ...string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user