|
@@ -151,7 +151,10 @@ func (s *Short) LoginCommon(sess map[string]interface{}, stype, id string, bm bo
|
|
|
replaceStr = ".html?"
|
|
|
paramSuffix = ".html?aside=0&"
|
|
|
}
|
|
|
- return s.Redirect(fmt.Sprintf("%s%s%s", config.Sysconfig["workDesktopUrl"].(string), config.Sysconfig["webdomain"].(string), url.QueryEscape(strings.Replace(s.Request.URL.String(), replaceStr, paramSuffix, 1))))
|
|
|
+ //p415 首页改版 三级页登录跳转第一版修改
|
|
|
+ urlStr := strings.ReplaceAll(s.Request.URL.String(), "nologin", "article")
|
|
|
+ //return s.Redirect(fmt.Sprintf("%s%s%s", config.Sysconfig["workDesktopUrl"].(string), config.Sysconfig["webdomain"].(string), url.QueryEscape(strings.Replace(s.Request.URL.String(), replaceStr, paramSuffix, 1))))
|
|
|
+ return s.Redirect(strings.Replace(urlStr, replaceStr, paramSuffix, 1), 302)
|
|
|
}
|
|
|
}
|
|
|
userId, _ := sess["userId"].(string)
|
|
@@ -1212,6 +1215,7 @@ func (s *Short) NologinArticle(stype, id string) error {
|
|
|
s.Redirect("/notin/page", 302)
|
|
|
return nil
|
|
|
}
|
|
|
+
|
|
|
if userId != "" { //已登录用户直接跳转至正常三级页
|
|
|
return s.LoginCommon(sess, stype, id, mobileReg.MatchString(s.Header("User-Agent"))) //是否是移动端
|
|
|
}
|