|
@@ -187,11 +187,7 @@ func (s *Short) Article(stype, id string) error {
|
|
|
}
|
|
|
s.T["canRead"] = canRead
|
|
|
}
|
|
|
- if userId == "" {
|
|
|
- canRead = true
|
|
|
- s.T["canRead"] = canRead
|
|
|
- }
|
|
|
- if canRead || (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
|
|
|
+ if canRead || userId == "" || (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
|
|
|
if belongUserId != "" && belongUserId != userId && util.ObjToString(obj["subtype"]) != "拟建" && userId != "" { //分享开打的
|
|
|
article_id := encrypt.CommonDecodeArticle(stype, id)[0]
|
|
|
key := fmt.Sprintf("integral_article_%s_%s_%s", article_id, belongUserId, userId)
|
|
@@ -268,12 +264,13 @@ func (s *Short) Article(stype, id string) error {
|
|
|
obj["detail"] = strings.ReplaceAll(strings.ReplaceAll(detail3, `<span class="freeView">点击查看</span><span class="freeView">点击查看</span>`, `<span class="freeView">点击查看</span>`), "*********", code)
|
|
|
}
|
|
|
}
|
|
|
- if !canRead { //登录拟建&采购不展示遮罩 只打码
|
|
|
- obj = otherFilter(obj, userId != "")
|
|
|
+ if !canRead && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") { //登录拟建&采购不展示遮罩 只打码
|
|
|
+ otherFilter(obj, userId != "")
|
|
|
s.T["canRead"] = true
|
|
|
} else if userId == "" {
|
|
|
obj = Filter(obj)
|
|
|
obj["description"] = fmt.Sprintf("%s,%s。", obj["title"], baseInfo(obj))
|
|
|
+ s.T["canRead"] = true
|
|
|
}
|
|
|
if obj["l_publishtime"] != nil {
|
|
|
obj["publishtimeShorDate"] = time.Unix(util.Int64All(obj["l_publishtime"]), 0).Format(date.Date_Short_Layout)
|