1
0
mirror of https://shylinux.com/x/icebergs synced 2025-06-26 02:17:30 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-06-16 13:53:14 +08:00
parent 8d40fb6fbb
commit fa884c8302
2 changed files with 8 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import "shylinux.com/x/ice"
type cache struct {
ice.Hash
short string `data:"uniq"`
field string `data:"hash,state,client,goback"`
field string `data:"hash,state,goback"`
}
func init() { ice.Cmd("web.chat.oauth.cache", cache{}) }

View File

@ -53,6 +53,13 @@ func init() {
)), Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(ACCESS, AGENT).Options(SIGNATURE, _wx_sign(m, m.Option(NONCESTR, ice.Info.Pathname), m.Option(TIMESTAMP, kit.Format(time.Now().Unix())))).Display("")
ctx.OptionFromConfig(m, "oauth", nfs.SCRIPT)
if false && m.Option(ice.MSG_USERNAME) == "" {
msg := m.Spawn()
web.ParseURL(msg, m.Option("oauth"))
state := m.Cmdx("web.chat.oauth.cache", mdb.CREATE, "state", msg.Option("state"), "goback", m.Option(ice.MSG_USERWEB))
what := kit.MergeURL(m.Option("oauth"), "state", state)
m.Info("what %v", what)
}
m.Option("oauth", strings.ReplaceAll(m.Option("oauth"), "https%3A%2F%2Fyunxuanlinghang.com", strings.ReplaceAll(m.Option(ice.MSG_USERHOST), "://", "%3A%2F%2F")))
}},
})