Przeglądaj źródła

fix:WX session修改

duxin 3 lat temu
rodzic
commit
1dda0ae6c9
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      src/jfw/front/frontRouter.go

+ 3 - 0
src/jfw/front/frontRouter.go

@@ -71,6 +71,9 @@ func (this *CommonRouter) WxCommonPage(folder, loginSign, htmlPage string) error
 				return this.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(this.Site()+this.Url()), stateKey), 302)
 			}
 			openid = jyutil.Getopenid(this.GetString("code"))
+			if ok, _, _ := FindUserAndCreateSess(openid, this.Session(), "wx", false); !ok {
+				return this.Redirect("/swordfish/about")
+			}
 		}
 		if !CheckUserIsSubscribe(openid) {
 			return this.Redirect("/swordfish/about")