|
@@ -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")
|
|
|
}
|