فهرست منبع

feat:三级页seo

wangchuanjin 2 سال پیش
والد
کامیت
bccbed58c7
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/jfw/front/shorturl.go

+ 2 - 2
src/jfw/front/shorturl.go

@@ -61,7 +61,7 @@ func (s *Short) Article(stype, id string) error {
 	userId, _ := s.GetSession("userId").(string)
 	if stype == "content" && userId == "" && seoAgentReg.MatchString(s.UserAgent()) {
 		sids := encrypt.CommonDecodeArticle(stype, id)
-		return s.NologinCommon("", "nologin", encrypt.CommonEncodeArticle("nologin", sids[0]), sids[0])
+		return s.NologinCommon("", stype, id, sids[0])
 	}
 	return s.LoginCommon(userId, stype, id)
 }
@@ -988,7 +988,7 @@ func (s *Short) NologinArticle(stype, id string) error {
 		return nil
 	}
 	if userId != "" { //已登录用户直接跳转至正常三级页
-		return s.LoginCommon(userId, "content", encrypt.CommonEncodeArticle("content", sids[0]))
+		return s.LoginCommon(userId, "content", id)
 	}
 	return s.NologinCommon(userId, stype, id, sids[0])
 }