浏览代码

feat:免费三级页面

wangshan 2 年之前
父节点
当前提交
1f286bd4f8
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/jfw/front/shorturl.go

+ 3 - 1
src/jfw/front/shorturl.go

@@ -297,6 +297,7 @@ func (s *Short) LoginCommon(userId, stype, id string) error {
 		privatedata   bool = userPower.PrivateGD                                                          //广东移动DICT 用户
 		isEntService  bool = userPower.Data.Ent.PowerSource > 0 && userPower.Data.Entniche.IsEntPower > 0 //商机管理服务
 		newCanRead         = false
+		isPay              = isVip || isMember || isEntniche
 	)
 	if res != nil && len(*res) > 0 {
 		if isVip && util.Int64All((*res)["l_vip_starttime"]) < util.Int64All(config.Sysconfig["contextOldVipLimit"]) {
@@ -488,7 +489,8 @@ func (s *Short) LoginCommon(userId, stype, id string) error {
 				newCanRead = true
 			}
 		}
-		var detailKey = util.If((isVip && isOldVip) || isMember || isEntniche || newCanRead, "pay", "free")
+		var detailKey = util.If((isVip && isOldVip) || isMember || isEntniche || newCanRead, "pay", "free").(string)
+		detailKey = util.If(!isPay && SeeDetailLimit(nil, userId, sid), "saleLeads_free", detailKey).(string)
 		catchKey := fmt.Sprintf("jypcdetail_%s_%s_%s", detailKey, stype, sid)
 		log.Println(catchKey, "-缓存-", userId)
 		if res := redis.Get(redisLimitation, catchKey); res == nil || res == "" {