duxin 3 жил өмнө
parent
commit
1dda0ae6c9

+ 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")