This commit is contained in:
Havoc412 2024-10-21 07:37:56 +08:00
parent c94a7c018a
commit 67693fa7dd

View File

@ -16,13 +16,13 @@ type Response struct {
} }
func Code2Session(js_code string) (*Response, error) { func Code2Session(js_code string) (*Response, error) {
// return &Response{ // TEST
// OpenId: "open_id",
// SessionKey: "session_key",
// Errcode: 0,
// Errmsg: "ok",
// }, nil
return &Response{ // TEST
OpenId: "open_id",
SessionKey: "session_key",
Errcode: 0,
Errmsg: "ok",
}, nil
appid := variable.ConfigYml.GetString("Weixin.AppId") appid := variable.ConfigYml.GetString("Weixin.AppId")
appSecret := variable.ConfigYml.GetString("Weixin.AppSecret") appSecret := variable.ConfigYml.GetString("Weixin.AppSecret")
grantType := variable.ConfigYml.GetString("Weixin.Code2Session.GrantType") grantType := variable.ConfigYml.GetString("Weixin.Code2Session.GrantType")