|
@@ -1210,21 +1210,24 @@ func SearchFilter(obj map[string]interface{}) map[string]interface{} {
|
|
}
|
|
}
|
|
|
|
|
|
func (s *Short) NologinArticle(stype, id string) error {
|
|
func (s *Short) NologinArticle(stype, id string) error {
|
|
- sess := s.Session().GetMultiple()
|
|
|
|
- userId := util.ObjToString(sess["userId"])
|
|
|
|
|
|
+ //sess := s.Session().GetMultiple()
|
|
|
|
+ //userId := util.ObjToString(sess["userId"])
|
|
sids := encrypt.CommonDecodeArticle(stype, id)
|
|
sids := encrypt.CommonDecodeArticle(stype, id)
|
|
if len(sids) == 0 || (len(sids) > 0 && sids[0] == "") {
|
|
if len(sids) == 0 || (len(sids) > 0 && sids[0] == "") {
|
|
s.Redirect("/notin/page", 302)
|
|
s.Redirect("/notin/page", 302)
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
-
|
|
|
|
- if userId != "" { //已登录用户直接跳转至正常三级页
|
|
|
|
- return s.LoginCommon(sess, stype, id, mobileReg.MatchString(s.Header("User-Agent"))) //是否是移动端
|
|
|
|
- }
|
|
|
|
if detailNeedMosaic == nil {
|
|
if detailNeedMosaic == nil {
|
|
detailNeedMosaic, _ = config.Sysconfig["detailNeedMosaic"].(map[string]interface{})
|
|
detailNeedMosaic, _ = config.Sysconfig["detailNeedMosaic"].(map[string]interface{})
|
|
}
|
|
}
|
|
- return s.NologinCommon(userId, stype, id, sids[0])
|
|
|
|
|
|
+ urlStr := strings.ReplaceAll(s.Request.URL.String(), "nologin", "article")
|
|
|
|
+ return s.Redirect(urlStr, 301)
|
|
|
|
+
|
|
|
|
+ //if userId != "" { //已登录用户直接跳转至正常三级页
|
|
|
|
+ // return s.LoginCommon(sess, stype, id, mobileReg.MatchString(s.Header("User-Agent"))) //是否是移动端
|
|
|
|
+ //}
|
|
|
|
+ //
|
|
|
|
+ //return s.NologinCommon(userId, stype, id, sids[0])
|
|
}
|
|
}
|
|
|
|
|
|
func (s *Short) NologinCommon(userId, stype, id, sid string) error {
|
|
func (s *Short) NologinCommon(userId, stype, id, sid string) error {
|