Browse Source

feat:"三级页判断"

zhangxinlei1996 3 years ago
parent
commit
aa5bda34ee
1 changed files with 8 additions and 5 deletions
  1. 8 5
      src/jfw/modules/app/src/app/front/shorturl.go

+ 8 - 5
src/jfw/modules/app/src/app/front/shorturl.go

@@ -24,12 +24,15 @@ type Short struct {
 	*xweb.Action
 	article     xweb.Mapper `xweb:"/jyapp/article/(\\w+)/(.*).html"` //([pm])
 	replication xweb.Mapper `xweb:"/jyapp/shorturl/replication"`     //用户复制操作记录入库
-
+	qwe         xweb.Mapper `xweb:"/jyapp/shorturl/qwe"`
 }
 
 func init() {
 	xweb.AddAction(&Short{})
 }
+func (s *Short) Qwe() {
+	s.ServeJson(CNode("6220622c1ec1b946dbbb5062"))
+}
 
 var DateFullLayout = "2006-01-02 15:04:05"
 var suffix_msgt = "_SX"
@@ -73,10 +76,6 @@ func (s *Short) Article(stype, id string) error {
 	if strings.Contains(obj["subtype"].(string), "拟建") || strings.Contains(obj["subtype"].(string), "采购意向") {
 		s.T["canRead"] = false
 	} else {
-		//检验是否留资
-		if CNode(userId) {
-			s.T["canRead"] = true
-		}
 		if seeRes := redis.Get("other", watchKey); seeRes != nil && seeRes != "" {
 			if resVal, _ := seeRes.(string); resVal != "" {
 				sidss := strings.Split(resVal, "_")
@@ -101,6 +100,10 @@ func (s *Short) Article(stype, id string) error {
 			redis.Put("other", watchKey, sid, jy.GetExpire())
 			s.T["canRead"] = true
 		}
+		//检验是否留资
+		if CNode(userId) {
+			s.T["canRead"] = true
+		}
 	}
 	if len(obj) > 0 {
 		if belongUserId != "" && belongUserId != userId && util.ObjToString(obj["subtype"]) != "拟建" { //分享开打的