1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-07-09 10:09:53 +08:00
parent 7b8e933bb9
commit b9a8678410

View File

@ -21,7 +21,8 @@ func init() {
GRANT: {Name: "grant space auto", Help: "授权", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{ GRANT: {Name: "grant space auto", Help: "授权", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
web.SPACE_LOGIN: {Hand: func(m *ice.Message, arg ...string) { web.SPACE_LOGIN: {Hand: func(m *ice.Message, arg ...string) {
m.GoSleep30ms(func() { m.GoSleep30ms(func() {
p := m.Cmdx(web.SPACE, web.DOMAIN) // p := m.Cmdx(web.SPACE, web.DOMAIN)
p := m.Option(ice.MSG_USERWEB)
link := tcp.PublishLocalhost(m, m.Options(ice.MSG_USERWEB, p).MergePodCmd("", "", web.SPACE, kit.Keys(web.ParseLink(m, p)[ice.POD], m.Option(mdb.NAME)))) link := tcp.PublishLocalhost(m, m.Options(ice.MSG_USERWEB, p).MergePodCmd("", "", web.SPACE, kit.Keys(web.ParseLink(m, p)[ice.POD], m.Option(mdb.NAME))))
m.Cmd(web.SPACE, m.Option(mdb.NAME), cli.PWD, m.Option(mdb.NAME), link, m.Cmdx(cli.QRCODE, link)) m.Cmd(web.SPACE, m.Option(mdb.NAME), cli.PWD, m.Option(mdb.NAME), link, m.Cmdx(cli.QRCODE, link))
}) })
@ -61,6 +62,9 @@ func init() {
} }
m.Options(tcp.HOSTNAME, ice.Info.Hostname, nfs.PATH, msg.Append(mdb.TEXT)) m.Options(tcp.HOSTNAME, ice.Info.Hostname, nfs.PATH, msg.Append(mdb.TEXT))
if !m.WarnNotValid(m.Option(nfs.PATH) == "", arg[0]) { if !m.WarnNotValid(m.Option(nfs.PATH) == "", arg[0]) {
m.Option(aaa.IP, msg.Append(aaa.IP))
m.Option(ice.MSG_USERUA, msg.Append(aaa.UA))
m.Options(web.ParseUA(m))
if m.EchoInfoButton(nfs.Template(m, "auth.html"), aaa.CONFIRM); m.IsWeixinUA() { if m.EchoInfoButton(nfs.Template(m, "auth.html"), aaa.CONFIRM); m.IsWeixinUA() {
m.OptionFields(mdb.DETAIL) m.OptionFields(mdb.DETAIL)
m.Push(web.SPACE, arg[0]) m.Push(web.SPACE, arg[0])