|
@@ -329,7 +329,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
|
|
s.T["isEntniche"] = isEntniche
|
|
s.T["isEntniche"] = isEntniche
|
|
s.T["isEntnicheNew"] = isEntnicheNew
|
|
s.T["isEntnicheNew"] = isEntnicheNew
|
|
s.T["isEntService"] = isEntService
|
|
s.T["isEntService"] = isEntService
|
|
-
|
|
|
|
|
|
+ ipTrue := config.IpList.Match(s.IP())
|
|
if bm {
|
|
if bm {
|
|
//判断有没有取关,取关的话,跳转到关于剑鱼标讯页面
|
|
//判断有没有取关,取关的话,跳转到关于剑鱼标讯页面
|
|
if ssOpenid != nil && ssOpenid != "" {
|
|
if ssOpenid != nil && ssOpenid != "" {
|
|
@@ -385,7 +385,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
|
|
s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
|
|
s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
|
|
obj := wxvisitD(sid, userId, myopenid, stype, (isVip && isOldVip) || isMember || isEntniche || newCanRead)
|
|
obj := wxvisitD(sid, userId, myopenid, stype, (isVip && isOldVip) || isMember || isEntniche || newCanRead)
|
|
canRead := false
|
|
canRead := false
|
|
- if ((isVip && isOldVip) || isMember || isEntniche) || //老版本vip、大会员、商机管理
|
|
|
|
|
|
+ if ((isVip && isOldVip) || isMember || isEntniche) || ipTrue || //老版本vip、大会员、商机管理
|
|
((isVip && !isOldVip) && (!(util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向"))) || //新超级订阅非采购意向”和“拟建项目”
|
|
((isVip && !isOldVip) && (!(util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向"))) || //新超级订阅非采购意向”和“拟建项目”
|
|
stype == "mailprivate" || stype == "indexcontent" || stype == "bdprivate" { //邮箱推送
|
|
stype == "mailprivate" || stype == "indexcontent" || stype == "bdprivate" { //邮箱推送
|
|
canRead = true
|
|
canRead = true
|
|
@@ -400,7 +400,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
|
|
if canRead || util.ObjToString(obj["subtype"]) == "拟建" {
|
|
if canRead || util.ObjToString(obj["subtype"]) == "拟建" {
|
|
FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, true)
|
|
FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, true)
|
|
//免费用户正文手机号替换
|
|
//免费用户正文手机号替换
|
|
- if obj["site"] == "剑鱼信息发布平台" && !isMember {
|
|
|
|
|
|
+ if obj["site"] == "剑鱼信息发布平台" && !isMember && !ipTrue {
|
|
//采购电话中标单位电话置空
|
|
//采购电话中标单位电话置空
|
|
if util.InterfaceToStr(obj["buyertel"]) != "" {
|
|
if util.InterfaceToStr(obj["buyertel"]) != "" {
|
|
obj["buyertel"] = "freeView"
|
|
obj["buyertel"] = "freeView"
|
|
@@ -498,7 +498,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
var detailKey = func() string {
|
|
var detailKey = func() string {
|
|
- if (isVip && isOldVip) || isMember || isEntniche || newCanRead || stype == "mailprivate" || stype == "indexcontent" || stype == "bdprivate" {
|
|
|
|
|
|
+ if (isVip && isOldVip) || isMember || isEntniche || newCanRead || stype == "mailprivate" || stype == "indexcontent" || stype == "bdprivate" || ipTrue {
|
|
return "pay" //可以看全部
|
|
return "pay" //可以看全部
|
|
} else if isVip && !isOldVip {
|
|
} else if isVip && !isOldVip {
|
|
return "new_vip_pay" //新版超级订阅不能看 采购意向
|
|
return "new_vip_pay" //新版超级订阅不能看 采购意向
|
|
@@ -524,7 +524,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
|
|
po, bo, wo, obj := pcVRT(sid, industry, stype, isVip || isMember || isEntniche || newCanRead)
|
|
po, bo, wo, obj := pcVRT(sid, industry, stype, isVip || isMember || isEntniche || newCanRead)
|
|
if obj != nil && len(obj) > 0 {
|
|
if obj != nil && len(obj) > 0 {
|
|
var node bool
|
|
var node bool
|
|
- if ((isVip && isOldVip) || isMember || isEntniche) || //老版本vip、大会员、商机管理
|
|
|
|
|
|
+ if ((isVip && isOldVip) || isMember || isEntniche) || ipTrue || //老版本vip、大会员、商机管理 白名单
|
|
((isVip && !isOldVip) && (!(util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向"))) || //新超级订阅非采购意向”和“拟建项目”
|
|
((isVip && !isOldVip) && (!(util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向"))) || //新超级订阅非采购意向”和“拟建项目”
|
|
stype == "mailprivate" || stype == "indexcontent" || stype == "bdprivate" { //邮箱推送
|
|
stype == "mailprivate" || stype == "indexcontent" || stype == "bdprivate" { //邮箱推送
|
|
node = true
|
|
node = true
|
|
@@ -559,7 +559,7 @@ func (s *Short) LoginCommon(userId, stype, id string, bm bool) error {
|
|
}
|
|
}
|
|
FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, false)
|
|
FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, false)
|
|
//免费用户正文手机号替换
|
|
//免费用户正文手机号替换
|
|
- if obj["site"] == "剑鱼信息发布平台" && !isMember {
|
|
|
|
|
|
+ if obj["site"] == "剑鱼信息发布平台" && !isMember && !ipTrue {
|
|
//采购电话中标单位电话置空
|
|
//采购电话中标单位电话置空
|
|
if util.InterfaceToStr(obj["buyertel"]) != "" {
|
|
if util.InterfaceToStr(obj["buyertel"]) != "" {
|
|
obj["buyertel"] = "freeView"
|
|
obj["buyertel"] = "freeView"
|
|
@@ -1195,7 +1195,8 @@ func (s *Short) NologinArticle(stype, id string) error {
|
|
|
|
|
|
func (s *Short) NologinCommon(userId, stype, id, sid string) error {
|
|
func (s *Short) NologinCommon(userId, stype, id, sid string) error {
|
|
tg := &Tags{}
|
|
tg := &Tags{}
|
|
- catchKey := fmt.Sprintf("jypcdetail_nologin_%s_%s", stype, sid)
|
|
|
|
|
|
+ ipTrue := config.IpList.Match(s.IP())
|
|
|
|
+ catchKey := fmt.Sprintf("jypcdetail_nologin_%s_%s_%v", stype, sid, ipTrue)
|
|
if res := redis.Get(redisLimitation, catchKey); res == nil || res == "" {
|
|
if res := redis.Get(redisLimitation, catchKey); res == nil || res == "" {
|
|
industry := s.GetString("industry")
|
|
industry := s.GetString("industry")
|
|
var shareid = s.GetString("id")
|
|
var shareid = s.GetString("id")
|
|
@@ -1208,7 +1209,7 @@ func (s *Short) NologinCommon(userId, stype, id, sid string) error {
|
|
s.DisableHttpCache()
|
|
s.DisableHttpCache()
|
|
po, bo, wo, obj := pcVRT(sid, industry, stype, false)
|
|
po, bo, wo, obj := pcVRT(sid, industry, stype, false)
|
|
if obj != nil && len(obj) > 0 {
|
|
if obj != nil && len(obj) > 0 {
|
|
- if obj["subtype"] == "采购意向" { //未登录不能访问采购意向
|
|
|
|
|
|
+ if !ipTrue && obj["subtype"] == "采购意向" { //未登录不能访问采购意向
|
|
return s.Redirect("/notin/page", 302)
|
|
return s.Redirect("/notin/page", 302)
|
|
}
|
|
}
|
|
if len(po) > 0 {
|
|
if len(po) > 0 {
|
|
@@ -1230,10 +1231,12 @@ func (s *Short) NologinCommon(userId, stype, id, sid string) error {
|
|
obj["projectnameTitle"] = obj["projectname"]
|
|
obj["projectnameTitle"] = obj["projectname"]
|
|
obj["projectcodeTitle"] = obj["projectcode"]
|
|
obj["projectcodeTitle"] = obj["projectcode"]
|
|
log.Println(time.Now().UnixNano())
|
|
log.Println(time.Now().UnixNano())
|
|
- if obj["subtype"] == "拟建" {
|
|
|
|
- otherFilter(obj, false)
|
|
|
|
- } else {
|
|
|
|
- obj = Filter(obj)
|
|
|
|
|
|
+ if !ipTrue { //非白名单用户
|
|
|
|
+ if obj["subtype"] == "拟建" {
|
|
|
|
+ otherFilter(obj, false)
|
|
|
|
+ } else {
|
|
|
|
+ obj = Filter(obj)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//obj["description"] = fmt.Sprintf("%s,%s。", obj["title"], baseInfo(obj))
|
|
//obj["description"] = fmt.Sprintf("%s,%s。", obj["title"], baseInfo(obj))
|
|
}
|
|
}
|