浏览代码

Merge branch 'dev/v4.8.91_dx' of qmx/jy into feature/v4.8.91

duxin 1 年之前
父节点
当前提交
765e422eee
共有 1 个文件被更改,包括 10 次插入7 次删除
  1. 10 7
      src/jfw/front/shorturl.go

+ 10 - 7
src/jfw/front/shorturl.go

@@ -1210,21 +1210,24 @@ func SearchFilter(obj map[string]interface{}) map[string]interface{} {
 }
 
 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)
 	if len(sids) == 0 || (len(sids) > 0 && sids[0] == "") {
 		s.Redirect("/notin/page", 302)
 		return nil
 	}
-
-	if userId != "" { //已登录用户直接跳转至正常三级页
-		return s.LoginCommon(sess, stype, id, mobileReg.MatchString(s.Header("User-Agent"))) //是否是移动端
-	}
 	if detailNeedMosaic == nil {
 		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 {