فهرست منبع

Merge branch 'feature/v4.8.79' of https://jygit.jydev.jianyu360.cn/qmx/jy into dev/v4.8.79_wmh

wenmenghao321 1 سال پیش
والد
کامیت
8550aa94d6

+ 4 - 0
src/jfw/modules/publicapply/src/filter/sessionfilter.go

@@ -23,6 +23,7 @@ var reg_nps = regexp.MustCompile("^/publicapply/nps/.*")
 var regWhiteList = regexp.MustCompile("^/publicapply/userbase/whitelist$")
 var regWhiteList = regexp.MustCompile("^/publicapply/userbase/whitelist$")
 var regEntSearch = regexp.MustCompile("^/publicapply/enterpriseSearch/doQuery") //企业搜索接口
 var regEntSearch = regexp.MustCompile("^/publicapply/enterpriseSearch/doQuery") //企业搜索接口
 var regOneClick = regexp.MustCompile("^/publicapply/(oneClick|channel)/.*")
 var regOneClick = regexp.MustCompile("^/publicapply/(oneClick|channel)/.*")
+var regOriginalText = regexp.MustCompile("^/publicapply/userbase/getOriginalText$")
 
 
 func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 	session := l.App.SessionManager.Session(req, w)
 	session := l.App.SessionManager.Session(req, w)
@@ -42,6 +43,9 @@ func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 	if regWhiteList.MatchString(req.URL.Path) { // 判断用户是不是白名单接口不拦截
 	if regWhiteList.MatchString(req.URL.Path) { // 判断用户是不是白名单接口不拦截
 		return true
 		return true
 	}
 	}
+	if regOriginalText.MatchString(req.URL.Path) { // 查看原文不拦截  在接口里面判断登录
+		return true
+	}
 	userId, ok := getSession["userId"].(string)
 	userId, ok := getSession["userId"].(string)
 	if !ok || userId == "" {
 	if !ok || userId == "" {
 		R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
 		R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})

+ 67 - 38
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -379,7 +379,7 @@ type OriginalPower struct {
 	IsFree       bool
 	IsFree       bool
 	TotalCount   int64
 	TotalCount   int64
 	UserId       string
 	UserId       string
-	Stype        string
+	Stype        initjson.StypeInfo
 	NoCheckStype []string
 	NoCheckStype []string
 }
 }
 
 
@@ -392,12 +392,12 @@ const (
 	UserStateEntniche = 3 // 用户分类:商机管理
 	UserStateEntniche = 3 // 用户分类:商机管理
 )
 )
 
 
-func NewOriginalPower(baseUserId, accountId, entId, positionType, positionId int64, biddingId, mgoUserId, Phone string, userId, stype string) OriginalPower {
+func NewOriginalPower(baseUserId, accountId, entId, positionType, positionId int64, biddingId, mgoUserId, phone string, userId string, stype initjson.StypeInfo) OriginalPower {
 	return OriginalPower{
 	return OriginalPower{
 		PositionId:   positionId,
 		PositionId:   positionId,
 		BiddingId:    biddingId,
 		BiddingId:    biddingId,
 		MgoUserId:    mgoUserId,
 		MgoUserId:    mgoUserId,
-		Phone:        Phone,
+		Phone:        phone,
 		BaseUserId:   baseUserId,
 		BaseUserId:   baseUserId,
 		AccountId:    accountId,
 		AccountId:    accountId,
 		EntId:        entId,
 		EntId:        entId,
@@ -414,10 +414,7 @@ func (o *OriginalPower) FindOriginalPowerRecord() (hasRecord bool, text string)
 	// 免费用户 不限制时间
 	// 免费用户 不限制时间
 	where := ""
 	where := ""
 	if o.UserType == UserTypePay {
 	if o.UserType == UserTypePay {
-		now := time.Now()
-		year, month, _ := now.Date()
-		monthStart := time.Date(year, month, 1, 0, 0, 0, 0, time.Local)
-		timeStart := date.FormatDate(&monthStart, date.Date_Full_Layout)
+		timeStart := GetMonthStart()
 		// 付费用户 查询当月
 		// 付费用户 查询当月
 		where = fmt.Sprintf(` and create_time >="%s" `, timeStart)
 		where = fmt.Sprintf(` and create_time >="%s" `, timeStart)
 	}
 	}
@@ -439,10 +436,7 @@ func (o *OriginalPower) CountRecord() int {
 	// 免费用户 不限制时间
 	// 免费用户 不限制时间
 	where := ""
 	where := ""
 	if o.UserType == UserTypePay {
 	if o.UserType == UserTypePay {
-		now := time.Now()
-		year, month, _ := now.Date()
-		monthStart := time.Date(year, month, 1, 0, 0, 0, 0, time.Local)
-		timeStart := date.FormatDate(&monthStart, date.Date_Full_Layout)
+		timeStart := GetMonthStart()
 		// 付费用户 查询当月
 		// 付费用户 查询当月
 		where = fmt.Sprintf(`and create_time >="%s"`, timeStart)
 		where = fmt.Sprintf(`and create_time >="%s"`, timeStart)
 	}
 	}
@@ -450,32 +444,60 @@ func (o *OriginalPower) CountRecord() int {
 	if len(o.NoCheckStype) > 0 {
 	if len(o.NoCheckStype) > 0 {
 		sourceStr = "and source not in (\"" + strings.Join(o.NoCheckStype, "\",\"") + "\")"
 		sourceStr = "and source not in (\"" + strings.Join(o.NoCheckStype, "\",\"") + "\")"
 	}
 	}
-	q := fmt.Sprintf(" SELECT count(*) FROM %s where position_id=? and user_type=? %s  %s;", TabelOriginalPowerRecord, sourceStr, where)
+	q := fmt.Sprintf(" SELECT count(distinct(bidding_id)) FROM %s where position_id=? and user_type=? %s  %s;", TabelOriginalPowerRecord, sourceStr, where)
 	return int(db.Mysql.CountBySql(q, o.PositionId, o.UserType))
 	return int(db.Mysql.CountBySql(q, o.PositionId, o.UserType))
 }
 }
 
 
 // SavePowerRecord 保存查看原文记录
 // SavePowerRecord 保存查看原文记录
-func (o *OriginalPower) SavePowerRecord(originalUrl string) int64 {
-	return db.Mysql.Insert(TabelOriginalPowerRecord, map[string]interface{}{
-		"user_id":      o.MgoUserId,
-		"position_id":  o.PositionId,
-		"phone":        o.Phone,
-		"bidding_id":   o.BiddingId,
-		"original_url": originalUrl,
-		"user_type":    o.UserType,
-		"source":       o.Stype,
-		"user_state":   o.UserState,
-		"create_time":  date.NowFormat(date.Date_Full_Layout),
-	})
+func (o *OriginalPower) SavePowerRecord(originalUrl string) {
+	// 先判断是否校验权限 再判断是否是付费用户(因为可能登录的是付费用户,但是是从不校验权限的链接进来的)
+	where := ""
+	if o.Stype.Check && o.UserType == UserTypePay {
+		// 加上时间条件
+		timeStart := GetMonthStart()
+		// 付费用户 查询当月
+		where = fmt.Sprintf(`and create_time >="%s"`, timeStart)
+	}
+	q := fmt.Sprintf("SELECT id FROM %s where bidding_id=? and position_id=? and source=? and user_type=? %s order by create_time desc limit 1;", TabelOriginalPowerRecord, where)
+	rs := db.Mysql.SelectBySql(q, o.BiddingId, o.PositionId, o.Stype.Name, o.UserType)
+	if rs != nil && len(*rs) > 0 && util.IntAll((*rs)[0]["id"]) != 0 {
+		// 存在则直接次数加一,更新更新时间
+		id := util.IntAll((*rs)[0]["id"])
+		updateSql := fmt.Sprintf("update  %s set views_times = views_times+1,update_time=? where id =?", TabelOriginalPowerRecord)
+		_, err := db.Mysql.ExecBySql(updateSql, date.NowFormat(date.Date_Full_Layout), id)
+		if err != nil {
+			log.Println("更新浏览次数失败:", err, updateSql, date.NowFormat(date.Date_Full_Layout), id)
+		}
+	} else {
+		// 否则新增
+		insertData := map[string]interface{}{
+			"user_id":      o.MgoUserId,
+			"position_id":  o.PositionId,
+			"phone":        o.Phone,
+			"bidding_id":   o.BiddingId,
+			"original_url": originalUrl,
+			"user_type":    o.UserType,
+			"source":       o.Stype.Name,
+			"user_state":   o.UserState,
+			"create_time":  date.NowFormat(date.Date_Full_Layout),
+			"update_time":  date.NowFormat(date.Date_Full_Layout),
+		}
+		insertRs := db.Mysql.Insert(TabelOriginalPowerRecord, insertData)
+		if insertRs < 1 {
+			log.Println("新增失败", insertData)
+		}
+	}
+
 }
 }
 
 
-// GetLeads 获取留资信息和判断是否满足
-func (o *OriginalPower) GetLeads() (leadOk bool, rM map[string]interface{}) {
+// CNode  获取留资信息和判断是否满足
+func (o *OriginalPower) CNode() (leadOk bool) {
 	// 查留资source
 	// 查留资source
 	if hasRetainedCapital(o.UserId, []string{"pc_article_original_one", "app_article_original_one", "wx_article_original_one", "h5_article_original_one"}) {
 	if hasRetainedCapital(o.UserId, []string{"pc_article_original_one", "app_article_original_one", "wx_article_original_one", "h5_article_original_one"}) {
 		leadOk = true
 		leadOk = true
+		return
 	}
 	}
-	rM = map[string]interface{}{}
+	rM := map[string]interface{}{}
 	rdata, ok := db.Mgo.Find("saleLeads", map[string]interface{}{
 	rdata, ok := db.Mgo.Find("saleLeads", map[string]interface{}{
 		"userid": o.UserId,
 		"userid": o.UserId,
 	}, `{"createtime":-1}`, nil, false, 0, 10)
 	}, `{"createtime":-1}`, nil, false, 0, 10)
@@ -497,8 +519,8 @@ func (o *OriginalPower) GetLeads() (leadOk bool, rM map[string]interface{}) {
 		delete(rM, "client")
 		delete(rM, "client")
 	}
 	}
 	if userinfo := config.Compatible.Select(o.UserId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && len(*userinfo) > 0 {
 	if userinfo := config.Compatible.Select(o.UserId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && len(*userinfo) > 0 {
-		s_phone := util.ObjToString((*userinfo)["s_phone"])
-		phone := util.If(s_phone == "", util.ObjToString((*userinfo)["s_m_phone"]), s_phone)
+		sPhone := util.ObjToString((*userinfo)["s_phone"])
+		phone := util.If(sPhone == "", util.ObjToString((*userinfo)["s_m_phone"]), sPhone)
 		if rM["phone"] == nil || rM["phone"] == "" {
 		if rM["phone"] == nil || rM["phone"] == "" {
 			rM["phone"] = phone
 			rM["phone"] = phone
 		}
 		}
@@ -506,15 +528,12 @@ func (o *OriginalPower) GetLeads() (leadOk bool, rM map[string]interface{}) {
 			rM["company"] = util.ObjToString((*userinfo)["s_company"])
 			rM["company"] = util.ObjToString((*userinfo)["s_company"])
 		}
 		}
 	}
 	}
-
 	// 查之前的留资信息是否满足
 	// 查之前的留资信息是否满足
-	if !leadOk {
-		if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" && rM["companyType"] != "" {
-			if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
-				leadOk = false
-			} else {
-				leadOk = true
-			}
+	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" && rM["companyType"] != "" {
+		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
+			leadOk = false
+		} else {
+			leadOk = true
 		}
 		}
 	}
 	}
 	return
 	return
@@ -536,7 +555,8 @@ func GetOriginalTextUrl(biddingId string) (href string) {
 	if obj != nil && len(obj) > 0 {
 	if obj != nil && len(obj) > 0 {
 		infoformat := util.IntAllDef(obj["infoformat"], 1)
 		infoformat := util.IntAllDef(obj["infoformat"], 1)
 		obj["infoformat"] = infoformat
 		obj["infoformat"] = infoformat
-		//精准字段(竞争对手的地址) 或  拟建项目
+		//精准字段(竞争对手的地址) 或  拟建项目不返回原文地址
+		// infoformat: 拟建数据标识
 		if obj["competehref"] != nil || infoformat == 2 {
 		if obj["competehref"] != nil || infoformat == 2 {
 			delete(obj, "href")
 			delete(obj, "href")
 		} else {
 		} else {
@@ -622,3 +642,12 @@ func GetStypeInfo(referer string) (stypeInfo *initjson.StypeInfo) {
 	}
 	}
 	return
 	return
 }
 }
+
+// GetMonthStart 获取月初时间
+func GetMonthStart() string {
+	now := time.Now()
+	year, month, _ := now.Date()
+	monthStart := time.Date(year, month, 1, 0, 0, 0, 0, time.Local)
+	timeStart := date.FormatDate(&monthStart, date.Date_Full_Layout)
+	return timeStart
+}

+ 2 - 2
src/jfw/modules/publicapply/src/userbase/original_power.json

@@ -17,8 +17,8 @@
     },
     },
     {
     {
       "name": "indexcontent",
       "name": "indexcontent",
-      "login": true,
-      "check": true
+      "login": false,
+      "check": false
     },
     },
     {
     {
       "name": "bdcontent",
       "name": "bdcontent",

+ 24 - 26
src/jfw/modules/publicapply/src/userbase/service/service.go

@@ -166,31 +166,34 @@ func (this *ServiceStruct) GetOriginalText() {
 		return
 		return
 	}
 	}
 	var url string
 	var url string
-	var info map[string]interface{}
 	// 判断需不需要登录 和验证不验证权限  直接查询原文地址返回
 	// 判断需不需要登录 和验证不验证权限  直接查询原文地址返回
 	stypeInfo := entity.GetStypeInfo(this.Request.Referer())
 	stypeInfo := entity.GetStypeInfo(this.Request.Referer())
 	if stypeInfo == nil {
 	if stypeInfo == nil {
 		this.ServeJson(Result{Data: nil, Error_code: Error_code_1003, Error_msg: Error_msg_1003})
 		this.ServeJson(Result{Data: nil, Error_code: Error_code_1003, Error_msg: Error_msg_1003})
+		return
 	}
 	}
 	sessUser := entity.GetUserBaseInfo(this.Session())
 	sessUser := entity.GetUserBaseInfo(this.Session())
-	if stypeInfo.Login {
-		if sessUser.MgoUserId == "" {
-			this.ServeJson(Result{Data: nil, Error_code: Error_code_1001, Error_msg: Error_msg_1001})
-			return
-		}
+	if stypeInfo.Login && sessUser.MgoUserId == "" {
+		this.ServeJson(Result{Data: nil, Error_code: Error_code_1001, Error_msg: Error_msg_1001})
+		return
 	}
 	}
 	// id 解密
 	// id 解密
 	biddingId_ := encrypt.CommonDecodeArticle(stypeInfo.Name, req.Id)
 	biddingId_ := encrypt.CommonDecodeArticle(stypeInfo.Name, req.Id)
 	var biddingId string
 	var biddingId string
-	if len(biddingId_) > 0 && biddingId_[0] != "" {
-		biddingId = biddingId_[0]
+	if len(biddingId_) == 0 || biddingId_[0] == "" {
+		this.ServeJson(Result{Data: nil, Error_code: Error_code_1003, Error_msg: Error_msg_1003})
+		return
 	}
 	}
+	biddingId = biddingId_[0]
 	var op entity.OriginalPower
 	var op entity.OriginalPower
 	if sessUser.MgoUserId != "" { // 已登录
 	if sessUser.MgoUserId != "" { // 已登录
-		op = entity.NewOriginalPower(sessUser.BaseUserId, sessUser.AccountId, sessUser.EntId, sessUser.PositionType, sessUser.PositionId, biddingId, sessUser.MgoUserId, sessUser.Phone, sessUser.UserId, stypeInfo.Name)
-		// 初始化用户新
+		op = entity.NewOriginalPower(sessUser.BaseUserId, sessUser.AccountId, sessUser.EntId, sessUser.PositionType, sessUser.PositionId, biddingId, sessUser.MgoUserId, sessUser.Phone, sessUser.UserId, *stypeInfo)
 		op.SetUserInfo()
 		op.SetUserInfo()
+		pLock := entity.GetOriginalTextLock(fmt.Sprintf("%d", op.PositionId))
+		pLock.Lock()
+		defer pLock.Unlock()
 	}
 	}
+	//  如果未登录且不需要校验 直接查地址返回
 	// 不用校验直接查地址 如果登录了需要存记录
 	// 不用校验直接查地址 如果登录了需要存记录
 	if !stypeInfo.Check {
 	if !stypeInfo.Check {
 		url := entity.GetOriginalTextUrl(biddingId)
 		url := entity.GetOriginalTextUrl(biddingId)
@@ -210,13 +213,16 @@ func (this *ServiceStruct) GetOriginalText() {
 		})
 		})
 		return
 		return
 	}
 	}
+	if sessUser.MgoUserId == "" {
+		this.ServeJson(Result{Data: nil, Error_code: Error_code_1001, Error_msg: Error_msg_1001})
+		return
+	}
 	// 2. 获取用户类型对应的条数
 	// 2. 获取用户类型对应的条数
-	pLock := entity.GetOriginalTextLock(fmt.Sprintf("%d", op.PositionId))
-	pLock.Lock()
-	defer pLock.Unlock()
 	// a. 查看过返回地址
 	// a. 查看过返回地址
 	hasRecord, textData := op.FindOriginalPowerRecord()
 	hasRecord, textData := op.FindOriginalPowerRecord()
 	if hasRecord && textData != "" {
 	if hasRecord && textData != "" {
+		// 存记录
+		op.SavePowerRecord(textData)
 		this.ServeJson(Result{Data: map[string]interface{}{
 		this.ServeJson(Result{Data: map[string]interface{}{
 			"url": textData,
 			"url": textData,
 		}})
 		}})
@@ -241,8 +247,7 @@ func (this *ServiceStruct) GetOriginalText() {
 			}})
 			}})
 			return
 			return
 		}
 		}
-		//有剩余次数
-		//查原文链接
+		//有剩余次数 查原文链接
 		url = entity.GetOriginalTextUrl(biddingId)
 		url = entity.GetOriginalTextUrl(biddingId)
 		if url == "" {
 		if url == "" {
 			this.ServeJson(Result{
 			this.ServeJson(Result{
@@ -261,28 +266,25 @@ func (this *ServiceStruct) GetOriginalText() {
 			"surplus": op.TotalCount - int64(count) - 1,
 			"surplus": op.TotalCount - int64(count) - 1,
 		}})
 		}})
 		return
 		return
-
 	default:
 	default:
 		// 免费
 		// 免费
-		var leadOk bool
-		leadOk, info = op.GetLeads()
 		if op.TotalCount <= int64(count) {
 		if op.TotalCount <= int64(count) {
 			//- 机会已经消耗过  需要留资  升级大会员 status 3
 			//- 机会已经消耗过  需要留资  升级大会员 status 3
 			this.ServeJson(Result{Data: map[string]interface{}{
 			this.ServeJson(Result{Data: map[string]interface{}{
 				"url":     "",
 				"url":     "",
 				"surplus": 0,
 				"surplus": 0,
-				"info":    info,
 				"status":  OriginalStatus3,
 				"status":  OriginalStatus3,
 			}})
 			}})
+			return
 		}
 		}
-		// 有剩余次数
-		// 校验留资
+		var leadOk bool
+		leadOk = op.CNode()
+		// 有剩余次数  校验留资
 		if !leadOk {
 		if !leadOk {
 			//   留资信息不满足 需要留资 status 1
 			//   留资信息不满足 需要留资 status 1
 			this.ServeJson(Result{Data: map[string]interface{}{
 			this.ServeJson(Result{Data: map[string]interface{}{
 				"url":     "",
 				"url":     "",
 				"surplus": 0,
 				"surplus": 0,
-				"info":    info,
 				"status":  OriginalStatus1,
 				"status":  OriginalStatus1,
 			}})
 			}})
 			return
 			return
@@ -291,7 +293,6 @@ func (this *ServiceStruct) GetOriginalText() {
 			this.ServeJson(Result{Data: map[string]interface{}{
 			this.ServeJson(Result{Data: map[string]interface{}{
 				"url":     "",
 				"url":     "",
 				"surplus": op.TotalCount - int64(count),
 				"surplus": op.TotalCount - int64(count),
-				"info":    info,
 				"status":  OriginalStatus2,
 				"status":  OriginalStatus2,
 			}})
 			}})
 			return
 			return
@@ -313,10 +314,7 @@ func (this *ServiceStruct) GetOriginalText() {
 		this.ServeJson(Result{Data: map[string]interface{}{
 		this.ServeJson(Result{Data: map[string]interface{}{
 			"url":     url,
 			"url":     url,
 			"surplus": op.TotalCount - int64(count) - 1,
 			"surplus": op.TotalCount - int64(count) - 1,
-			"info":    info,
 		}})
 		}})
 		return
 		return
 	}
 	}
-
-	//this.ServeJson(r)
 }
 }

+ 6 - 2
src/web/staticres/css/collect-user-info.css

@@ -89,7 +89,7 @@
   position: fixed;
   position: fixed;
   left: 50%;
   left: 50%;
   top: 40%;
   top: 40%;
-  width: 752px;
+  width: 760px;
   max-height: 680px;
   max-height: 680px;
   margin: 0 auto;
   margin: 0 auto;
   padding: 32px;
   padding: 32px;
@@ -102,10 +102,14 @@
 }
 }
 #collectUserInfoDialog .dialog-header{
 #collectUserInfoDialog .dialog-header{
   color: #1D1D1D;
   color: #1D1D1D;
-  font-size: 16px;
+  font-size: 18px;
   line-height: 28px;
   line-height: 28px;
   text-align: center;
   text-align: center;
 }
 }
+#collectUserInfoDialog .dialog-header.dialog-header-subtitle{
+  color: #686868;
+  font-size: 16px;
+}
 #collectUserInfoDialog .dialog-header.fs18{
 #collectUserInfoDialog .dialog-header.fs18{
   font-size: 18px;
   font-size: 18px;
 }
 }

+ 1 - 1
src/web/staticres/css/dev2/newBidSearch.css

@@ -433,7 +433,7 @@
   border-radius: 8px;
   border-radius: 8px;
   color: #fff;
   color: #fff;
   transform: translateX(-50%) translateY(-50%);
   transform: translateX(-50%) translateY(-50%);
-  z-index: 99;
+  z-index: 3001;
 }
 }
 /* 自定义标签弹框 */
 /* 自定义标签弹框 */
 .tags-box{
 .tags-box{

+ 1 - 1
src/web/staticres/css/subscribe_new.css

@@ -158,7 +158,7 @@
 
 
 .sub-contrast .contrast-main {
 .sub-contrast .contrast-main {
   width: 100%;
   width: 100%;
-  height: 1020px;
+  min-height: 1020px;
   margin-top: 32px;
   margin-top: 32px;
 }
 }
 
 

+ 1 - 1
src/web/staticres/frontRouter/pc/coupon/css/coupon-list.css

@@ -311,5 +311,5 @@
   border-radius: 8px;
   border-radius: 8px;
   color: #fff;
   color: #fff;
   transform: translateX(-50%) translateY(-50%);
   transform: translateX(-50%) translateY(-50%);
-  z-index: 99;
+  z-index: 3001;
 }
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
src/web/staticres/js/pc-collect-user-info.js


+ 54 - 0
src/web/staticres/pccss/pc-detail.css

@@ -1020,3 +1020,57 @@ a{
 .page-detail .nijian-guide.hidden +.caigouyixiang-guide.hidden + .cutline {
 .page-detail .nijian-guide.hidden +.caigouyixiang-guide.hidden + .cutline {
   display: none;
   display: none;
 }
 }
+
+.confirmed-dialog.el-dialog {
+  border-radius: 8px;
+}
+.confirmed-dialog.el-dialog .el-dialog__header {
+  padding: 32px 32px 0;
+}
+.confirmed-dialog.el-dialog .el-dialog__body {
+  padding: 20px 32px 32px;
+  text-align: center;
+  line-height: 22px;
+}
+.confirmed-dialog.el-dialog .el-dialog__footer {
+  padding: 0 32px 32px;
+}
+.confirmed-dialog.el-dialog .el-dialog__title {
+  color: #1D1D1D;
+  font-size: 18px;
+  line-height: 28px;
+}
+.confirmed-dialog.el-dialog .dialog-footer {
+  display: flex;
+  justify-content: space-between;
+}
+.dialog-button {
+  width: 132px;
+  height: 36px;
+  font-size: 16px;
+  line-height: 24px;
+  border-radius: 6px;
+}
+.dialog-button.confirm {
+  color: #fff;
+  background-color: #2ABED1;
+  border: 1px solid #2ABED1;
+}
+.dialog-button.plain {
+  color: #686868;
+  background-color: transparent;
+  border: 1px solid #E0E0E0;
+}
+
+.confirmed-dialog.el-dialog .dialog-footer .left-tip {
+  margin-top: 4px;
+  color: #FF9F40;
+  font-size: 12px;
+}
+.confirmed-dialog.el-dialog .dialog-footer-tip-container {
+  margin-top: 12px;
+  color: #686868;
+  font-size: 14px;
+  line-height: 22px;
+  text-align: left;
+}

+ 159 - 27
src/web/staticres/public-pc/js/article-content.js

@@ -406,6 +406,154 @@ var bidNode = {
 var bidVue = new Vue(bidNode)
 var bidVue = new Vue(bidNode)
 /*--E-*/
 /*--E-*/
 
 
+var originalActions = {
+  openOriginLink: function (url) {
+    var originalUrl = this.calcOriginUrl(url)
+    window.open(originalUrl)
+  },
+  calcOriginUrl: function (url) {
+    //获取原文百度统计跳转
+    var originalhref;
+    // var originalUrl = goTemplateData.params.obj.url;
+    if (url) {
+      originalUrl = url.replace("http://https://","https://");
+      if (window.location.href.indexOf("mailprivate")>0||isWechat()){
+        originalhref='/front/transfer?url='+encodeURIComponent(originalUrl);
+      }else{
+        var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent(originalUrl)
+        originalhref=url
+      }
+      $(".com-original").attr("dataHref",originalhref);
+    }
+  },
+  getOriginalText: function (p) {
+    // p.use
+    // p.success
+    // p.error
+    // p.complete
+    var params = {
+      id: id,
+    }
+    if (p.use) {
+      params.use = p.use
+    }
+    $.ajax({
+      type: 'POST',
+      contentType: "application/json",
+      data: JSON.stringify(params),
+      url: '/publicapply/userbase/getOriginalText',
+      success: function(res) {
+        p && p.success && p.success(res)
+      },
+      error: function() {
+        p && p.error && p.error()
+      },
+      complete: function() {
+        p && p.complete && p.complete()
+      }
+    })
+  },
+  doConfirmLinkAction: function () {
+    this.getOriginalText({
+      use: true,
+      success: function (r) {
+        if (r && r.data && r.data.url) {
+          originalActions.openOriginLink(r.data.url)
+        } else {
+          toastFn('获取原文链接失败')
+        }
+      }
+    })
+  },
+  leaveInfoOne: function () {
+    vm.dialogTitleTop = '请完善个人信息'
+    vm.dialogTitle = '即刻获得<span class="highlight-text">1次</span>免费查看原网站链接查看原文链接的机会,如需查看更多请联系客服:<span class="highlight-text">400-108-6670</span>'
+    vm.isNeedSubmit('pc_article_original_one')
+  },
+  // 免费用户查看原文链接权限次数余额为0
+  leaveInfoMore: function () {
+    vm.dialogTitleTop = '申请更多查看原文链接权限'
+    vm.dialogTitle = '<p style="text-align:left">查看原文链接次数已用完,请填写以下信息升级大会员获得更多查看原文链接权限,同时可查看超前商机、联系人电话,85%用户已升级!</p>'
+    vm.isNeedSubmit('pc_article_original_more')
+  },
+  // 免费用户查看原文链接权限次数余额>0
+  leaveInfoMore2: function () {
+    vm.dialogTitleTop = '申请更多查看原文链接权限'
+    vm.dialogTitle = '请填写以下信息升级大会员获得更多查看原文链接权限,同时可查看超前商机、联系人电话,85%用户已升级!'
+    vm.isNeedSubmit('pc_article_original_more')
+  },
+  doGetLinkAction: function () {
+    var _this = this
+    this.getOriginalText({
+      success: function (r) {
+        if (r && r.data) {
+          var status = r.data.status
+          // entService企业级用户
+          if (r.data.url || entService) {
+            originalActions.openOriginLink(r.data.url)
+          } else if (status === 1) {
+            // 免费用户,未留资,需要留资  留资提示即刻获得一次查看原文机会
+            _this.leaveInfoOne()
+          } else if (status === 2) {
+            // 免费用户,不需要留资(余额>0)  弹框提示用户确定消耗一次查看原网站的机会   用户如果选择确认,再次调用该接口 `use` 传true
+            dialogsVm.dialog.originalDeductConfirm = true
+          } else if (status === 3) {
+            // 需要留资  留资提示已经消耗过查看原网站链接的机会、升级为大会员
+            _this.leaveInfoMore()
+          } else if (status === 4) {
+            // 付费用户次数达上限,提示暂无更多查看原文权限,联系客服
+            dialogsVm.dialog.originalMax = true
+          } else {
+            toastFn('获取原文链接失败: 未定义状态')
+          }
+        } else {
+          toastFn('获取原文链接失败')
+        }
+      }
+    })
+  },
+}
+
+var dialogsVm = new Vue({
+  el: '#dialog-container',
+  delimiters: ['{', '}'],
+  data: function () {
+    return {
+      dialog: {
+        // 查看原文付费用户上限
+        originalMax: false,
+        // 留资成功,获得一次机会
+        originalSubmitSuccess: false,
+        // 原文链接扣除二次确认
+        originalDeductConfirm: false,
+      }
+    }
+  },
+  methods: {
+    concatKf: function () {
+      this.dialog.originalMax = false
+      if (goTemplateData.inIframe) {
+        window.$BRACE.$emit('open-customer')
+      } else {
+        // 打开客服弹窗
+        checkCustomerService()
+      }
+    },
+    closeDialog: function () {
+      this.dialog.originalSubmitSuccess = false
+      this.dialog.originalDeductConfirm = false
+    },
+    goToOriginalLink: function () {
+      this.closeDialog()
+      originalActions.doConfirmLinkAction()
+    },
+    deductTipAction: function () {
+      this.closeDialog()
+      originalActions.leaveInfoMore2()
+    },
+  }
+})
+
 
 
 var isMember = goTemplateData.params.isMember // 大会员
 var isMember = goTemplateData.params.isMember // 大会员
 var isVip = goTemplateData.params.isVip // 超级订阅
 var isVip = goTemplateData.params.isVip // 超级订阅
@@ -1278,7 +1426,7 @@ $(function(){
       $('.center-ad-container').show();
       $('.center-ad-container').show();
     }
     }
   }
   }
-  if (goTemplateData.params.obj.href) {
+  if (goTemplateData.params.obj.originalShow) {
     $(".com-original").removeClass("hidden");
     $(".com-original").removeClass("hidden");
   }
   }
   //
   //
@@ -1289,39 +1437,23 @@ $(function(){
       $("#backTop").hide();
       $("#backTop").hide();
     }
     }
   });
   });
-  //获取原文百度统计跳转
-  var originalhref;
-  var originalUrl = goTemplateData.params.obj.url;
-  if (originalUrl!=""&&originalUrl!=undefined){
-    originalUrl = originalUrl.replace("http://https://","https://");
-    if (window.location.href.indexOf("mailprivate")>0||isWechat()){
-      originalhref='/front/transfer?url='+encodeURIComponent(originalUrl);
-    }else{
-      var url =document.location.protocol+"//"+ window.location.host+"/front/transfer?url="+encodeURIComponent(originalUrl)
-      originalhref=url
-    }
-  }else{
-    $(".com-original").hide();
-  }
-  // $(".com-original").attr("dataHref",originalhref);
   // 点击阅读原文 用户留资
   // 点击阅读原文 用户留资
   $(".com-original").on('click',function() {
   $(".com-original").on('click',function() {
-    if (entService) {
-      return window.open(originalhref)
-    }
     if (!loginflag) {
     if (!loginflag) {
       openLoginDig()
       openLoginDig()
       return
       return
     }
     }
+
     console.log('三级页-阅读原文:article_original')
     console.log('三级页-阅读原文:article_original')
-    vm.dialogTitle = '为给您匹配精准的推荐信息,请完善个人信息,免费查看原文'
-    vm.isNeedSubmit('article_original', function(res) {
-      if(this.source == 'article_original') {
-        // 如果是阅读原文点击的 留完用户资料执行原点击操作
-        $(".com-original").trigger('click')
-      }
-      window.open(originalhref)
-    })
+    originalActions.doGetLinkAction()
+    // vm.dialogTitle = '为给您匹配精准的推荐信息,请完善个人信息,免费查看原文'
+    // vm.isNeedSubmit('pc_article_original_one', function(res) {
+    //   if(this.source == 'article_original') {
+    //     // 如果是阅读原文点击的 留完用户资料执行原点击操作
+    //     $(".com-original").trigger('click')
+    //   }
+    //   window.open(originalhref)
+    // })
   })
   })
 
 
   //var sds = goTemplateData.params.keywords;
   //var sds = goTemplateData.params.keywords;

+ 1 - 1
src/web/staticres/site/common/css/slide-leave-info.css

@@ -100,5 +100,5 @@
   border-radius: 8px;
   border-radius: 8px;
   color: #fff;
   color: #fff;
   transform: translateX(-50%) translateY(-50%);
   transform: translateX(-50%) translateY(-50%);
-  z-index: 99;
+  z-index: 3001;
 }
 }

+ 1 - 1
src/web/staticres/tags/js/no-login-detail.js

@@ -859,7 +859,7 @@ $(function(){
       $('.center-ad-container').show();
       $('.center-ad-container').show();
     }
     }
   }
   }
-  if (goTemplateData.params.obj.href) {
+  if (goTemplateData.params.obj.originalShow) {
     $(".com-original").removeClass("hidden");
     $(".com-original").removeClass("hidden");
   }
   }
   //
   //

+ 22 - 0
src/web/templates/frontRouter/pc/serviceSystem/free/index.html

@@ -1580,6 +1580,28 @@
                                 </div>
                                 </div>
                             </div>
                             </div>
                          </div>
                          </div>
+                         <div class="table_content">
+                            <div class="table_content_l">
+                               <span>查看公告原文链接</span>
+                            </div>
+                            <div class="table_content_r">
+                                <div class="table_content_r_item ">
+                                    <div class="table_content_longcell">
+                                        <p class="tit">
+                                            查看公告原文链接
+                                        </p>
+                                        <p class="text">
+                                            用户点击原文链接可查看公告原地址,鉴别信息真伪。
+                                        </p>
+                                    </div>
+                                    <div class="table_content_sortcell"><i class="free"></i></div>
+                                    <div class="table_content_sortcell"><i class="right"></i></div>
+                                    <div class="table_content_sortcell"><i class="right"></i></div>
+                                    <div class="table_content_sortcell"><i class="right"></i></div>
+                                    <div class="table_content_sortcell"><i class="right"></i></div>
+                                </div>
+                            </div>
+                         </div>
                          <div class="table_content">
                          <div class="table_content">
                             <div class="table_content_l">
                             <div class="table_content_l">
                                <span>招标附件下载</span>
                                <span>招标附件下载</span>

+ 54 - 1
src/web/templates/pc/biddetail_rec.html

@@ -301,6 +301,59 @@
     }
     }
   }
   }
 </script>
 </script>
+<div class="dialog-container" id="dialog-container" v-cloak>
+  <el-dialog
+    title="暂无更多查看原文链接权限"
+    custom-class="confirmed-dialog"
+    :visible.sync="dialog.originalMax"
+    :show-close="false"
+    top="25vh"
+    width="380"
+    center>
+    <p>如需开通更多权限获得商机,请联系客服。</p>
+    <div slot="footer" class="dialog-footer">
+      <button class="dialog-button confirm" @click="concatKf">联系客服</button>
+      <button class="dialog-button plain" @click="dialog.originalMax = false">取消</button>
+    </div>
+  </el-dialog>
+  <el-dialog
+    title="提交成功"
+    custom-class="confirmed-dialog"
+    :visible.sync="dialog.originalSubmitSuccess"
+    :show-close="false"
+    top="25vh"
+    width="380"
+    center>
+    <p style="text-align: left;">恭喜您获得<span class="highlight-text">1次</span>免费查看原文链接的机会,如需查看更多请联系客服:<span class="highlight-text">400-108-6670</span>。</p>
+    <div slot="footer" class="dialog-footer">
+      <div class="left-groups">
+        <button class="dialog-button confirm" @click="goToOriginalLink">查看原文链接</button>
+        <p class="left-tip">(本次查看消耗1次机会)</p>
+      </div>
+      <button class="dialog-button plain" @click="dialog.originalSubmitSuccess = false">返回</button>
+    </div>
+  </el-dialog>
+  <el-dialog
+    title="查看原文链接"
+    custom-class="confirmed-dialog"
+    :visible.sync="dialog.originalDeductConfirm"
+    :show-close="false"
+    top="25vh"
+    width="380"
+    center>
+    <p>确定消耗<span class="highlight-text">1次</span>查看原文链接的机会吗?</p>
+    <div slot="footer" class="footer-container">
+      <div class="dialog-footer">
+        <button class="dialog-button confirm" @click="goToOriginalLink">确定</button>
+        <button class="dialog-button plain" @click="dialog.originalDeductConfirm = false">返回</button>
+      </div>
+      <div class="dialog-footer-tip-container">
+        您当前是免费用户,有1次查看原文链接的机会,如需更多查看次数,您可点击
+        <span class="highlight-text pointer" @click="deductTipAction">升级大会员></span>
+      </div>
+    </div>
+  </el-dialog>
+</div>
 <div class="page-detail j-content">
 <div class="page-detail j-content">
     <!-- 用户留资 -->
     <!-- 用户留资 -->
     <div id="vue-collect-user-info"></div>
     <div id="vue-collect-user-info"></div>
@@ -1341,7 +1394,7 @@
                 <div class="original-text" onclick="adv_statistics(this)" adv_name="pc_article_getoriginaltext">
                 <div class="original-text" onclick="adv_statistics(this)" adv_name="pc_article_getoriginaltext">
                     {{end}}
                     {{end}}
                     <a target="_blank" class="com-original hidden" rel="no-referrer">
                     <a target="_blank" class="com-original hidden" rel="no-referrer">
-                        <img src="{{Msg "seo" "cdn"}}/images/pc_15.png">查看原文
+                        <img src="{{Msg "seo" "cdn"}}/images/pc_15.png">查看原文链接
                     </a>
                     </a>
                     <!--#onekey{padding:8px 40px;}-->
                     <!--#onekey{padding:8px 40px;}-->
                     <!--<div class="onekey" data-toggle="modal" data-target="#myModal">一键报告排版问题</div>-->
                     <!--<div class="onekey" data-toggle="modal" data-target="#myModal">一键报告排版问题</div>-->

+ 11 - 1
src/web/templates/pc/subscribe_new.html

@@ -289,7 +289,15 @@
                             <div>附件下载</div>
                             <div>附件下载</div>
                             <img src="{{Msg "seo" "cdn"}}/images/subscribe/new-logo.png?v={{Msg "seo" "version"}}" alt="" style="margin-left: 8px;width: 40px;">
                             <img src="{{Msg "seo" "cdn"}}/images/subscribe/new-logo.png?v={{Msg "seo" "version"}}" alt="" style="margin-left: 8px;width: 40px;">
                         </div>
                         </div>
-                        <div>招标文件/采购清单一键下载</div></li>
+                        <div>招标文件/采购清单一键下载</div>
+                    </li>
+                    <li class="double">
+                        <div style="display: flex; align-items: center;">
+                            <div>查看公告原文链接</div>
+                            <img src="{{Msg "seo" "cdn"}}/images/subscribe/new-logo.png?v={{Msg "seo" "version"}}" alt="" style="margin-left: 8px;width: 40px;">
+                        </div>
+                        <div>支持用户点击原文链接查看公告原地址,鉴别信息真伪</div>
+                    </li>
                     <li class="gray" style="display: flex; align-items: center;" >
                     <li class="gray" style="display: flex; align-items: center;" >
                         <div>项目报告下载</div>
                         <div>项目报告下载</div>
                         <img src="{{Msg "seo" "cdn"}}/images/subscribe/new-logo.png?v={{Msg "seo" "version"}}" alt="" style="margin-left: 8px;width: 40px;">
                         <img src="{{Msg "seo" "cdn"}}/images/subscribe/new-logo.png?v={{Msg "seo" "version"}}" alt="" style="margin-left: 8px;width: 40px;">
@@ -314,6 +322,7 @@
                     <li class="double"><i class="wrong"></i></li>
                     <li class="double"><i class="wrong"></i></li>
                     <li class="gray double"><i class="wrong"></i></li>
                     <li class="gray double"><i class="wrong"></i></li>
                     <li class="double"><i class="wrong"></i></li>
                     <li class="double"><i class="wrong"></i></li>
+                    <li class="double"><i class="wrong"></i></li>
                     <li class="gray"><i class="wrong"></i></li>
                     <li class="gray"><i class="wrong"></i></li>
                     <li>10组</li>
                     <li>10组</li>
                     <li>公告公示</li>
                     <li>公告公示</li>
@@ -338,6 +347,7 @@
                     <li class="double">50个画像/省/月</li>
                     <li class="double">50个画像/省/月</li>
                     <li class="gold double">5个画像/省/月</li>
                     <li class="gold double">5个画像/省/月</li>
                     <li class=" double">10个/月</li>
                     <li class=" double">10个/月</li>
+                    <li class="double"><i class="right"></i></li>
                     <li class="gold"><i class="right"></i></li>
                     <li class="gold"><i class="right"></i></li>
                     <li>300组</li>
                     <li>300组</li>
                     <li>招标公告+国家企业公示</li>
                     <li>招标公告+国家企业公示</li>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است