From f28d046358d77372580d588fb90aa11a252129d0 Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 18 Nov 2023 13:06:41 +0800 Subject: [PATCH] add mp --- misc/mp/login.go | 40 ---------------------------------------- misc/mp/mp.go | 13 ------------- misc/mp/mp.shy | 0 3 files changed, 53 deletions(-) delete mode 100644 misc/mp/login.go delete mode 100644 misc/mp/mp.go delete mode 100644 misc/mp/mp.shy diff --git a/misc/mp/login.go b/misc/mp/login.go deleted file mode 100644 index 0a5fd3cd..00000000 --- a/misc/mp/login.go +++ /dev/null @@ -1,40 +0,0 @@ -package mp - -import ( - ice "shylinux.com/x/icebergs" - "shylinux.com/x/icebergs/base/aaa" - "shylinux.com/x/icebergs/base/ctx" - "shylinux.com/x/icebergs/base/mdb" - "shylinux.com/x/icebergs/base/tcp" - "shylinux.com/x/icebergs/base/web" -) - -const ( - APPID = "appid" - SECRET = "secret" - - ACCESS = "access" - OPENID = "openid" - TOKENS = "tokens" - EXPIRES = "expires" - QRCODE = "qrcode" -) -const ( - ERRCODE = "errcode" - ERRMSG = "errmsg" -) -const LOGIN = "login" - -func init() { - Index.MergeCommands(ice.Commands{ - web.PP(LOGIN): {Actions: ice.MergeActions(ice.Actions{ - ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { - m.Cmd(web.SPIDE, mdb.CREATE, MP, mdb.Config(m, tcp.SERVER)) - }}, - }, aaa.WhiteAction(aaa.SESS, aaa.USER), ctx.ConfAction(tcp.SERVER, "https://api.weixin.qq.com"))}, - - LOGIN: {Name: "login list", Help: "登录", Actions: ice.Actions{ - mdb.CREATE: {Hand: func(m *ice.Message, arg ...string) { m.Cmd("web.chat.wx.access", mdb.CREATE, arg) }}, - }, Hand: func(m *ice.Message, arg ...string) { m.Cmdy("web.chat.wx.access") }}, - }) -} diff --git a/misc/mp/mp.go b/misc/mp/mp.go deleted file mode 100644 index d7a3a1fe..00000000 --- a/misc/mp/mp.go +++ /dev/null @@ -1,13 +0,0 @@ -package mp - -import ( - ice "shylinux.com/x/icebergs" - "shylinux.com/x/icebergs/base/web" - "shylinux.com/x/icebergs/core/chat" -) - -const MP = "mp" - -var Index = &ice.Context{Name: MP, Help: "小程序"} - -func init() { chat.Index.Register(Index, &web.Frame{}) } diff --git a/misc/mp/mp.shy b/misc/mp/mp.shy deleted file mode 100644 index e69de29b..00000000