wangshan 1 rok pred
rodič
commit
26bbef17c1
1 zmenil súbory, kde vykonal 6 pridanie a 2 odobranie
  1. 6 2
      src/jfw/modules/app/src/app/front/wx.go

+ 6 - 2
src/jfw/modules/app/src/app/front/wx.go

@@ -22,7 +22,11 @@ func init() {
 
 // 微信首页地址
 func (w *WX) Index(pageLabel string) error {
-	//w.Session().Set("firstVisitTagByWX", pageLabel)
-	redis.Put("limitation", fmt.Sprintf("firstVisitTagByWX_%s", w.Session().Id()), pageLabel, cacheTimeOut) //app 登录注册 用户标识
+	//未登录
+	if userId, _ := w.GetSession("userId").(string); userId == "" {
+		redis.Put("limitation", fmt.Sprintf("firstVisitTagByWX_%s", w.Session().Id()), pageLabel, cacheTimeOut) //app 登录注册 用户标识
+		return w.Redirect("/jyapp/jylab/mainSearch")
+	}
+	//已登录
 	return w.Redirect("/jy_mobile/tabbar/home")
 }