mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 16:50:54 +08:00
代码规范过滤,移除冗余代码,替换掉不推荐的包
This commit is contained in:
@@ -49,7 +49,7 @@ func NewCommonWechat() *sCommonWechat {
|
||||
func init() {
|
||||
serv := NewCommonWechat()
|
||||
service.RegisterCommonWechat(serv)
|
||||
gcron.Add(gctx.New(), "@every 300s", serv.CleanTempMap, "WechatCleanTempMap")
|
||||
_, _ = gcron.Add(gctx.New(), "@every 300s", serv.CleanTempMap, "WechatCleanTempMap")
|
||||
}
|
||||
|
||||
// Authorize 微信用户授权
|
||||
@@ -116,7 +116,7 @@ func (s *sCommonWechat) AuthorizeCall(ctx context.Context, in commonin.WechatAut
|
||||
|
||||
switch data.Type {
|
||||
case consts.WechatAuthorizeOpenId: // 设置openid
|
||||
cache.Instance().Set(ctx, data.State, tk.OpenID, time.Hour*24*7)
|
||||
_ = cache.Instance().Set(ctx, data.State, tk.OpenID, time.Hour*24*7)
|
||||
case consts.WechatAuthorizeBindLogin: // 绑定微信登录
|
||||
// ...
|
||||
default:
|
||||
|
Reference in New Issue
Block a user