forked from x/icebergs
add wx
This commit is contained in:
parent
072996863d
commit
8ff113403e
@ -14,7 +14,7 @@ func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
ADMIN: {Name: "admin index list", Help: "管理", Hand: func(m *ice.Message, arg ...string) {
|
||||
kit.If(len(arg) == 0, func() { arg = append(arg, SPACE, DOMAIN) })
|
||||
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodGet, CHAT_CMD+path.Join(arg...), "pwd", kit.Path(""))
|
||||
m.Cmdy(SPIDE, ice.OPS, SPIDE_RAW, http.MethodPost, CHAT_CMD+path.Join(arg...), "pwd", kit.Path(""))
|
||||
}},
|
||||
})
|
||||
}
|
||||
|
@ -58,8 +58,8 @@ func _dream_start(m *ice.Message, name string) {
|
||||
}
|
||||
defer m.ProcessOpen(m.MergePod(m.Option(mdb.NAME, name)))
|
||||
p := path.Join(ice.USR_LOCAL_WORK, name)
|
||||
if pid := m.Cmdx(nfs.CAT, path.Join(p, ice.Info.PidPath), kit.Dict(ice.MSG_USERROLE, aaa.TECH)); pid != "" {
|
||||
if nfs.Exists(m, "/proc/"+pid) {
|
||||
if p := path.Join(p, ice.Info.PidPath); nfs.Exists(m, p) {
|
||||
if pid := m.Cmdx(nfs.CAT, p, kit.Dict(ice.MSG_USERROLE, aaa.TECH)); pid != "" && nfs.Exists(m, "/proc/"+pid) {
|
||||
m.Info("already exists %v", pid)
|
||||
return
|
||||
}
|
||||
@ -72,15 +72,15 @@ func _dream_start(m *ice.Message, name string) {
|
||||
m.Sleep300ms()
|
||||
}
|
||||
defer ToastProcess(m)()
|
||||
defer m.Options(cli.CMD_DIR, "", cli.CMD_ENV, "", cli.CMD_OUTPUT, "")
|
||||
bin := kit.Select(kit.Path(os.Args[0]), cli.SystemFind(m, ice.ICE_BIN, nfs.PWD+path.Join(p, ice.BIN), nfs.PWD+ice.BIN))
|
||||
if strings.Count(m.Cmdx(cli.SYSTEM, "sh", "-c", "ps aux | grep "+bin+" | grep -v grep"), bin) > 0 {
|
||||
return
|
||||
}
|
||||
m.Options(cli.CMD_DIR, kit.Path(p), cli.CMD_ENV, kit.EnvList(kit.Simple(
|
||||
cli.CTX_OPS, Domain(tcp.LOCALHOST, m.Cmdv(SERVE, tcp.PORT)), cli.CTX_LOG, ice.VAR_LOG_BOOT_LOG, cli.CTX_PID, ice.VAR_LOG_ICE_PID,
|
||||
cli.CTX_ROOT, kit.Path(""), cli.PATH, cli.BinPath(p, ""), cli.USER, ice.Info.Username,
|
||||
)...), cli.CMD_OUTPUT, path.Join(p, ice.VAR_LOG_BOOT_LOG), mdb.CACHE_CLEAR_ONEXIT, ice.TRUE)
|
||||
defer m.Options(cli.CMD_DIR, "", cli.CMD_ENV, "", cli.CMD_OUTPUT, "")
|
||||
bin := kit.Select(kit.Path(os.Args[0]), cli.SystemFind(m, ice.ICE_BIN, nfs.PWD+path.Join(p, ice.BIN), nfs.PWD+ice.BIN))
|
||||
if strings.Count(m.Cmdx(cli.SYSTEM, "sh", "-c", "ps aux | grep "+bin), bin) > 0 {
|
||||
return
|
||||
}
|
||||
defer m.Sleep3s()
|
||||
gdb.Event(m, DREAM_CREATE, m.OptionSimple(mdb.NAME, mdb.TYPE))
|
||||
kit.If(m.Option(nfs.BINARY), func(p string) { _dream_binary(m, p) })
|
||||
@ -291,7 +291,8 @@ func init() {
|
||||
} else if arg[0] == ctx.ACTION {
|
||||
gdb.Event(m, DREAM_ACTION, arg)
|
||||
} else {
|
||||
m.EchoIFrame(m.MergePod(arg[0]))
|
||||
mdb.HashSelects(m, arg[0])
|
||||
// m.EchoIFrame(m.MergePod(arg[0]))
|
||||
}
|
||||
}},
|
||||
})
|
||||
|
@ -42,6 +42,7 @@ func StatsAction(arg ...string) ice.Actions {
|
||||
}, gdb.EventsAction(STATS_TABLES))
|
||||
}
|
||||
func PushStats(m *ice.Message, name string, value ice.Any, arg ...string) {
|
||||
kit.If(name == "", func() { name = kit.Keys(m.CommandKey(), mdb.TOTAL) })
|
||||
kit.If(value != 0, func() {
|
||||
m.Push(mdb.NAME, name).Push(mdb.VALUE, value).Push(mdb.UNITS, kit.Select("", arg, 0)).Push(ctx.TRANS, kit.Select("", arg, 1))
|
||||
m.Push(ctx.INDEX, m.PrefixKey())
|
||||
|
@ -3,3 +3,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
msg.Echo("hello world")
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONACTION, {
|
||||
list: ["刷新", "扫码", "清屏", "登录"],
|
||||
})
|
||||
|
@ -21,6 +21,8 @@ fieldset.web.wiki.portal>div.output>div.layout>div.aside div.item.section { padd
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main { padding:var(--portal-main-padding); height:600px; min-width:390px; max-width:var(--portal-max-width); overflow:auto; overflow-x:hidden; }
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column { display:flex; flex-direction:column; justify-content:center; }
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column fieldset.inner>div.output>div.layout>div.layout div.content div.tips { top:10px; right:10px; }
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column h1 { font-size:48px; }
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column h2 { margin:0; }
|
||||
fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset.inner.output div.content {
|
||||
background-color:var(--code-bg-color); color:var(--code-fg-color); padding:var(--input-padding) 0;
|
||||
--code-comment:silver; --code-keyword:orange;
|
||||
|
@ -82,9 +82,7 @@ func (s relay) Init(m *ice.Message, arg ...string) {
|
||||
m.GoSleep3s(func() { s.Hash.List(msg).Table(func(value ice.Maps) { s.xterm(m.Spawn(value)) }) })
|
||||
}
|
||||
func (s relay) StatsTables(m *ice.Message, arg ...string) {
|
||||
if msg := mdb.HashSelects(m.Spawn().Message); msg.Length() > 0 {
|
||||
web.PushStats(m.Message, "relay.total", msg.Length(), "", "服务器数量")
|
||||
}
|
||||
web.PushStats(m.Message, "", mdb.HashSelects(m.Spawn().Message).Length(), "", "服务器数量")
|
||||
}
|
||||
func (s relay) Inputs(m *ice.Message, arg ...string) {
|
||||
switch s.Hash.Inputs(m, arg...); arg[0] {
|
||||
@ -229,7 +227,7 @@ func (s relay) Install(m *ice.Message, arg ...string) {
|
||||
}
|
||||
func (s relay) Upgrade(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 && m.Option(MACHINE) == "" {
|
||||
m.Options(ice.CMD, m.Template(UPGRADE_SH), cli.DELAY, "0", "interval", "15s")
|
||||
m.Options(ice.CMD, m.Template(UPGRADE_SH), cli.DELAY, "0", "interval", "3s")
|
||||
s.ForFlow(m)
|
||||
} else {
|
||||
s.shell(m, m.Template(UPGRADE_SH), arg...)
|
||||
@ -246,7 +244,7 @@ func (s relay) Pushbin(m *ice.Message, arg ...string) {
|
||||
case "i686", "386":
|
||||
p = "ice.linux.386"
|
||||
}
|
||||
m.Options(nfs.FROM, ice.USR_PUBLISH+p, nfs.PATH, "contexts/demo/", nfs.FILE, ice.BIN_ICE_BIN)
|
||||
m.Options(nfs.FROM, ice.USR_PUBLISH+p, nfs.PATH, "contexts/", nfs.FILE, ice.BIN_ICE_BIN)
|
||||
m.Cmd(SSH_TRANS, tcp.SEND)
|
||||
}
|
||||
s.shell(m, m.Template(PUSHBIN_SH), arg...)
|
||||
@ -269,7 +267,7 @@ func (s relay) xterm(m *ice.Message) {
|
||||
})
|
||||
if e != nil {
|
||||
defer done()
|
||||
x, e = xterm.Command(m.Message, "", m.OptionDefault(SHELL, "sh"))
|
||||
x, e = xterm.Command(m.Message, "", m.OptionDefault(SHELL, code.SH))
|
||||
m.GoSleep300ms(func() { x.Write([]byte(kit.Format("ssh-copy-id %s@%s\n", m.Option(aaa.USERNAME), m.Option(tcp.HOST)))) })
|
||||
}
|
||||
})
|
||||
|
113
misc/wx/ide.go
113
misc/wx/ide.go
@ -21,32 +21,35 @@ import (
|
||||
)
|
||||
|
||||
func _ide_args(m *ice.Message) (args []string) {
|
||||
args = append(kit.SplitQuery(m.Option(ctx.ARGS)), kit.Simple(kit.Dict(m.OptionSimple(web.SPACE, ctx.INDEX, log.DEBUG)))...)
|
||||
kit.If(m.Option(tcp.WIFI), func(p string) { args = append(args, m.Cmd(tcp.WIFI, p).AppendSimple(tcp.SSID, aaa.PASSWORD)...) })
|
||||
return
|
||||
return append(args, kit.Simple(kit.SplitQuery(m.Option(ctx.ARGS)), kit.Dict(m.OptionSimple(web.SPACE, ctx.INDEX, log.DEBUG)))...)
|
||||
}
|
||||
func _ide_args_cli(m *ice.Message) []string {
|
||||
return []string{"--project", kit.Path(mdb.Config(m, PROJECT)), "--compile-condition", kit.Format(kit.Dict(
|
||||
"pathName", m.Option(PAGES), "query", kit.JoinQuery(kit.Simple(kit.Dict(web.SERVE, url.QueryEscape(web.UserHost(m)), _ide_args(m)))...),
|
||||
"pathName", m.Option(PAGES), "query", kit.JoinQuery(kit.Simple(_ide_args(m), web.SERVE, url.QueryEscape(web.UserHost(m)))...),
|
||||
))}
|
||||
}
|
||||
func _ide_args_qrcode(m *ice.Message, p string) []string {
|
||||
return []string{"--qr-format", nfs.IMAGE, "--qr-output", kit.Path(p)}
|
||||
}
|
||||
func _ide_autogen_utils(m *ice.Message) {
|
||||
p, mp := ice.USR_PROGRAM, ice.USR_VOLCANOS+PUBLISH_CLIENT_MP
|
||||
nfs.DirDeepAll(m, mp, "", func(value ice.Maps) {
|
||||
if !kit.IsIn(value[nfs.PATH], PROJECT_CONFIG_JSON, PROJECT_PRIVATE_CONFIG_JSON, CONF_JS) {
|
||||
m.Cmd(nfs.COPY, p+value[nfs.PATH], path.Join(mp, value[nfs.PATH]), ice.Maps{nfs.DIR_ROOT: ""})
|
||||
}
|
||||
to, from := ice.USR_PROGRAM, ice.USR_VOLCANOS+PUBLISH_CLIENT_MP
|
||||
nfs.DirDeepAll(m, from, "", func(value ice.Maps) {
|
||||
m.Cmd(nfs.COPY, to+value[nfs.PATH], path.Join(from, value[nfs.PATH]), ice.Maps{nfs.DIR_ROOT: ""})
|
||||
})
|
||||
to += "utils/"
|
||||
m.Cmd(nfs.COPY, to+"const.js", path.Join(ice.USR_VOLCANOS, "const.js"))
|
||||
head := nfs.TemplateText(m, "lib_head.js")
|
||||
for _, from := range []string{path.Join(ice.USR_VOLCANOS, ice.LIB), path.Join(nfs.SRC_TEMPLATE, web.CHAT_HEADER, aaa.LANGUAGE)} {
|
||||
nfs.DirDeepAll(m, from, "", func(value ice.Maps) {
|
||||
m.Cmd(nfs.SAVE, path.Join(to, ice.LIB, value[nfs.PATH]), head, lex.SP, m.Cmdx(nfs.CAT, value[nfs.PATH]), ice.Maps{nfs.DIR_ROOT: ""})
|
||||
})
|
||||
}
|
||||
}
|
||||
func _ide_autogen_pages(m *ice.Message) {
|
||||
p := ice.USR_PROGRAM
|
||||
list := []string{}
|
||||
head_wxml, foot_wxml := nfs.TemplateText(m, "pages_head.wxml"), nfs.TemplateText(m, "pages_foot.wxml")
|
||||
to, list := ice.USR_PROGRAM, []string{}
|
||||
head, foot := nfs.TemplateText(m, "pages_head.js"), nfs.TemplateText(m, "pages_foot.js")
|
||||
wxml := nfs.TemplateText(m, "pages.wxml")
|
||||
head_wxml, foot_wxml, wxml := nfs.TemplateText(m, "pages_head.wxml"), nfs.TemplateText(m, "pages_foot.wxml"), nfs.TemplateText(m, "pages.wxml")
|
||||
m.Travel(func(_ *ice.Context, s *ice.Context, key string, cmd *ice.Command) {
|
||||
if h, ok := cmd.Actions[PAGES]; ok {
|
||||
file := path.Join(path.Dir(strings.TrimPrefix(m.Resource(ctx.FileURI(cmd.FileLine())), nfs.REQUIRE)), kit.Select(key+".js", h.Name))
|
||||
@ -56,72 +59,49 @@ func _ide_autogen_pages(m *ice.Message) {
|
||||
prefix := strings.ReplaceAll(s.Prefix(), nfs.PT, "-")
|
||||
list = append(list, path.Join(PAGES, prefix, kit.TrimExt(path.Base(file), nfs.JS)))
|
||||
kit.For([]string{WXML, WXSS, nfs.JS, nfs.JSON}, func(ext string) {
|
||||
file = kit.ExtChange(file, ext)
|
||||
if kit.Ext(file) == nfs.JS {
|
||||
m.Cmd(nfs.SAVE, path.Join(p, PAGES, prefix, path.Base(file)), head, lex.NL, m.Cmdx(nfs.CAT, file), lex.NL, foot)
|
||||
} else if kit.Ext(file) == WXML {
|
||||
m.Cmd(nfs.SAVE, path.Join(p, PAGES, prefix, path.Base(file)), head_wxml, lex.NL, kit.Select(wxml, m.Cmdx(nfs.CAT, file)), lex.NL, foot_wxml)
|
||||
if file = kit.ExtChange(file, ext); kit.Ext(file) == WXML {
|
||||
m.Cmd(nfs.SAVE, path.Join(to, PAGES, prefix, path.Base(file)), head_wxml, lex.NL, kit.Select(wxml, m.Cmdx(nfs.CAT, file)), lex.NL, foot_wxml)
|
||||
} else if kit.Ext(file) == nfs.JS {
|
||||
m.Cmd(nfs.SAVE, path.Join(to, PAGES, prefix, path.Base(file)), head, lex.NL, m.Cmdx(nfs.CAT, file), lex.NL, foot)
|
||||
} else {
|
||||
m.Cmd(nfs.COPY, path.Join(p, PAGES, prefix, path.Base(file)), file)
|
||||
m.Cmd(nfs.COPY, path.Join(to, PAGES, prefix, path.Base(file)), file)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
app := kit.UnMarshal(m.Cmdx(nfs.CAT, p+APP_JSON))
|
||||
app := kit.UnMarshal(m.Cmdx(nfs.CAT, to+APP_JSON))
|
||||
kit.Value(app, PAGES, kit.AddUniq(kit.Simple(kit.Value(app, PAGES)), list...))
|
||||
m.Cmd(nfs.SAVE, p+APP_JSON, kit.Formats(app))
|
||||
m.Cmd(nfs.SAVE, to+APP_JSON, kit.Formats(app))
|
||||
}
|
||||
|
||||
const (
|
||||
PAGES_RIVER = "pages/river/river"
|
||||
PAGES_ACTION = "pages/action/action"
|
||||
PAGES_INSERT = "pages/insert/insert"
|
||||
PUBLISH_CLIENT_MP = "publish/client/mp"
|
||||
PAGES_RIVER = "pages/river/river"
|
||||
PAGES_ACTION = "pages/action/action"
|
||||
PAGES_INSERT = "pages/insert/insert"
|
||||
PUBLISH_CLIENT_MP = "publish/client/mp"
|
||||
PROJECT_CONFIG_JSON = "project.config.json"
|
||||
APP_JSON = "app.json"
|
||||
CONF_JS = "conf.js"
|
||||
)
|
||||
const (
|
||||
ISLOGIN = "islogin"
|
||||
CURRENT = "current"
|
||||
PROJECT = "project"
|
||||
PAGES = "pages"
|
||||
ENV = "env"
|
||||
UTILS = "utils"
|
||||
)
|
||||
const (
|
||||
AUTO_PREVIEW = "auto-preview"
|
||||
PREVIEW = "preview"
|
||||
PUSH = "push"
|
||||
DOC = "doc"
|
||||
|
||||
APP_JSON = "app.json"
|
||||
CONF_JS = "conf.js"
|
||||
CURRENT = "current"
|
||||
ISLOGIN = "islogin"
|
||||
)
|
||||
const (
|
||||
PROJECT_CONFIG_JSON = "project.config.json"
|
||||
PROJECT_PRIVATE_CONFIG_JSON = "project.private.config.json"
|
||||
ENV = "env"
|
||||
)
|
||||
const IDE = "ide"
|
||||
|
||||
func init() {
|
||||
Index.MergeCommands(ice.Commands{
|
||||
IDE: {Name: "ide hash auto", Help: "集成开发环境", Meta: Meta(), Actions: ice.MergeActions(ice.Actions{
|
||||
code.AUTOGEN: {Name: "autogen projectname*='终端工具链' appid*='wxf4e5104d83476ed6' serve*='https://2021.shylinux.com'", Help: "生成", Hand: func(m *ice.Message, arg ...string) {
|
||||
_ide_autogen_utils(m)
|
||||
_ide_autogen_pages(m)
|
||||
p := ice.USR_PROGRAM
|
||||
m.Cmd(nfs.SAVE, p+CONF_JS, `module.exports = `+kit.Formats(kit.Dict(m.OptionSimple(APPID, web.SERVE), nfs.MODULE, ice.Info.Make.Module, nfs.VERSION, ice.Info.Make.Versions())))
|
||||
m.Cmd(nfs.DEFS, p+PROJECT_CONFIG_JSON, kit.Formats(kit.Dict(m.OptionSimple(APPID, "projectname"))))
|
||||
IdeCli(m.Sleep3s(), cli.OPEN, "--project", kit.Path(mdb.Config(m, PROJECT, p))).ProcessInner()
|
||||
}},
|
||||
aaa.LOGIN: {Help: "登录", Hand: func(m *ice.Message, arg ...string) {
|
||||
p := nfs.TempName(m)
|
||||
m.GoSleep3s(func() { web.PushNoticeGrow(m, ice.Render(m, ice.RENDER_IMAGES, web.SHARE_LOCAL+p)) })
|
||||
IdeCli(m, "", _ide_args_cli(m), _ide_args_qrcode(m, p)).ProcessRefresh()
|
||||
}},
|
||||
web.ADMIN: {Help: "后台", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen("https://mp.weixin.qq.com/")
|
||||
}},
|
||||
DOC: {Help: "文档", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen("https://developers.weixin.qq.com/miniprogram/dev/api/")
|
||||
}},
|
||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
||||
switch mdb.HashInputs(m, arg); arg[0] {
|
||||
case PAGES:
|
||||
@ -139,6 +119,25 @@ func init() {
|
||||
})
|
||||
}
|
||||
}},
|
||||
aaa.LOGIN: {Help: "登录", Hand: func(m *ice.Message, arg ...string) {
|
||||
p := nfs.TempName(m)
|
||||
m.GoSleep3s(func() { web.PushNoticeGrow(m, ice.Render(m, ice.RENDER_IMAGES, web.SHARE_LOCAL+p)) })
|
||||
IdeCli(m, "", _ide_args_cli(m), _ide_args_qrcode(m, p)).ProcessRefresh()
|
||||
}},
|
||||
code.AUTOGEN: {Name: "autogen projectname*='终端工具链' appid*='wxf4e5104d83476ed6' serve*='https://2021.shylinux.com'", Help: "生成", Hand: func(m *ice.Message, arg ...string) {
|
||||
_ide_autogen_utils(m)
|
||||
_ide_autogen_pages(m)
|
||||
p := ice.USR_PROGRAM
|
||||
m.Cmd(nfs.SAVE, p+CONF_JS, `module.exports = `+kit.Formats(kit.Dict(m.OptionSimple(APPID, web.SERVE), nfs.MODULE, ice.Info.Make.Module, nfs.VERSION, ice.Info.Make.Versions())))
|
||||
m.Cmd(nfs.DEFS, p+PROJECT_CONFIG_JSON, kit.Formats(kit.Dict(m.OptionSimple(APPID, "projectname"))))
|
||||
IdeCli(m.Sleep3s(), cli.OPEN, "--project", kit.Path(mdb.Config(m, PROJECT, p))).ProcessInner()
|
||||
}},
|
||||
web.ADMIN: {Help: "后台", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen("https://mp.weixin.qq.com/")
|
||||
}},
|
||||
DOC: {Help: "文档", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.ProcessOpen("https://developers.weixin.qq.com/miniprogram/dev/api/")
|
||||
}},
|
||||
cli.MAKE: {Help: "构建", Hand: func(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Option(mdb.HASH), func(p string) { mdb.Config(m, CURRENT, p) })
|
||||
m.Options(m.Cmd("", kit.Select(mdb.Config(m, CURRENT), arg, 0)).AppendSimple())
|
||||
@ -154,18 +153,14 @@ func init() {
|
||||
PREVIEW: {Help: "体验", Hand: func(m *ice.Message, arg ...string) {
|
||||
kit.If(m.Option(mdb.HASH), func(p string) { mdb.Config(m, CURRENT, p) })
|
||||
p := nfs.TempName(m)
|
||||
IdeCli(m, "", _ide_args_cli(m), _ide_args_qrcode(m, p))
|
||||
m.EchoImages(web.SHARE_LOCAL + p).ProcessInner()
|
||||
IdeCli(m, "", _ide_args_cli(m), _ide_args_qrcode(m, p)).EchoImages(web.SHARE_LOCAL + p).ProcessInner()
|
||||
}},
|
||||
PUSH: {Name: "push weixin", Help: "推送", Hand: func(m *ice.Message, arg ...string) {
|
||||
defer m.ProcessHold()
|
||||
defer web.ToastProcess(m)()
|
||||
m.Cmd(web.SPACE, m.Option(web.WEIXIN), lex.PARSE, m.Cmdx("", m.Option(mdb.HASH)))
|
||||
}},
|
||||
}, web.StatsAction("", "小程序场景数"), mdb.ExportHashAction(
|
||||
mdb.FIELD, "time,hash,name,pages,space,index,args,wifi",
|
||||
cli.DARWIN, "/Applications/wechatwebdevtools.app/Contents/MacOS/cli",
|
||||
)), Hand: func(m *ice.Message, arg ...string) {
|
||||
}, web.StatsAction("", "小程序场景数"), mdb.ExportHashAction(mdb.FIELD, "time,hash,name,pages,space,index,args,wifi", cli.DARWIN, "/Applications/wechatwebdevtools.app/Contents/MacOS/cli")), Hand: func(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 0 && tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) && kit.Value(kit.UnMarshal(IdeCli(m.Spawn(), ISLOGIN).Append(cli.CMD_OUT)), aaa.LOGIN) != true {
|
||||
m.EchoInfoButton("请登录: ", aaa.LOGIN)
|
||||
return
|
||||
|
@ -215,7 +215,9 @@ func (m *Message) EchoImages(src string) *Message { return m.Echo(Render(m, R
|
||||
func (m *Message) EchoVideos(src string) *Message { return m.Echo(Render(m, RENDER_VIDEOS, src)) }
|
||||
func (m *Message) EchoAudios(src string) *Message { return m.Echo(Render(m, RENDER_AUDIOS, src)) }
|
||||
func (m *Message) EchoIFrame(src string) *Message {
|
||||
kit.If(src, func() { m.Echo(Render(m, RENDER_IFRAME, src)) })
|
||||
kit.If(!m.IsCliUA(), func() {
|
||||
kit.If(src, func() { m.Echo(Render(m, RENDER_IFRAME, src)) })
|
||||
})
|
||||
return m
|
||||
}
|
||||
func (m *Message) EchoScript(arg ...string) *Message {
|
||||
|
Loading…
x
Reference in New Issue
Block a user