Эх сурвалжийг харах

Merge branch 'dev4.6.3' of http://192.168.3.207:8080/qmx/jy into dev4.6.3

WH01243 3 жил өмнө
parent
commit
91e5ab2451
35 өөрчлөгдсөн 2107 нэмэгдсэн , 1266 устгасан
  1. 7 0
      src/jfw/filter/pcfilter.go
  2. 5 4
      src/jfw/front/front.go
  3. 2 1
      src/jfw/jyutil/jyutil.go
  4. 6 0
      src/jfw/jyutil/sessionkeep.go
  5. 39 16
      src/jfw/modules/app/src/app/front/login.go
  6. 6 5
      src/jfw/modules/app/src/config.json
  7. 10 3
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  8. 4 2
      src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js
  9. 10 0
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js
  10. 1 1
      src/jfw/modules/app/src/web/templates/big-member/page_client_follow_detail.html
  11. 153 135
      src/jfw/modules/app/src/web/templates/big-member/page_client_list.html
  12. 2 2
      src/jfw/modules/app/src/web/templates/me/login.html
  13. 1 1
      src/jfw/modules/app/src/web/templates/me/mine.html
  14. 5 1
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  15. 14 8
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  16. 0 1
      src/jfw/modules/app/src/web/templates/weixin/search/tabSearch.html
  17. 3 0
      src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html
  18. 142 0
      src/jfw/modules/common/src/qfw/util/jy/jy.go
  19. 20 0
      src/jfw/modules/sxfUser/src/config.json
  20. 73 0
      src/jfw/modules/sxfUser/src/db/db.go
  21. 68 0
      src/jfw/modules/sxfUser/src/main.go
  22. 818 773
      src/web/staticres/common-module/ent-search/ent-search-template.js
  23. 2 2
      src/web/staticres/common-module/keep-tags/keep-ent-tags-template.js
  24. 17 0
      src/web/staticres/css/dev2/newBidSearch.css
  25. 5 4
      src/web/staticres/js/ent-search-index-pc.js
  26. 4 2
      src/web/staticres/js/login.js
  27. 10 10
      src/web/staticres/js/pc_detail_tags.js
  28. 151 0
      src/web/staticres/js/pc_entniche_tags.js
  29. 6 1
      src/web/staticres/js/pur-busniess-index-pc.js
  30. 290 60
      src/web/staticres/js/pur-search-index-pc.js
  31. 1 1
      src/web/staticres/pccss/pc-detail.css
  32. 225 16
      src/web/templates/pc/biddetail_rec.html
  33. 4 1
      src/web/templates/pc/entsearchindex.html
  34. 1 1
      src/web/templates/pc/purScopebusniess.html
  35. 2 215
      src/web/templates/pc/pursearchindex.html

+ 7 - 0
src/jfw/filter/pcfilter.go

@@ -7,6 +7,7 @@ import (
 	"jfw/public"
 	"net/http"
 	"qfw/util"
+	"qfw/util/jy"
 	"qfw/util/redis"
 	"strings"
 	"time"
@@ -38,11 +39,17 @@ func (this *pcFilter) Do() bool {
 	if strings.HasPrefix(this.R.RequestURI, "/jypc/toAct/") {
 		return true
 	}
+
 	href := "/?nol=1"
 	//对比session是否一致,不一致则清除掉sessionid
 	if uid := this.GetSession["userId"]; uid != nil && uid != "" {
 		userid, _ := uid.(string)
 		sessid := fmt.Sprint(this.Session.Id())
+		//i_unlimited :登录限制
+		if i_unlimited := util.IntAll(this.GetSession["i_unlimited"]); i_unlimited > 0 {
+			jy.PutLoginSess(public.MQFW, util.ObjToString(config.Sysconfig["appPushServiceRpc"]), sessid, userid, util.IntAll(config.Sysconfig["criticality"]), i_unlimited)
+			return true
+		}
 		//老用户没有LoginRedisKey的创建key
 		if sid := redis.Get("other", jyutil.LoginRedisKey(userid)); sid == nil {
 			redis.Put("other", jyutil.LoginRedisKey(userid), sessid, 3600*util.IntAllDef(config.Sysconfig["pcSessionTimeout"], 168))

+ 5 - 4
src/jfw/front/front.go

@@ -645,6 +645,7 @@ func (f *Front) SignOut() error {
 	userId, _ := f.GetSession("userId").(string)
 	if userId != "" {
 		redis.Del("other", jyutil.LoginRedisKey(userId))
+		jy.DelUnlimitSessionId(fmt.Sprint(f.Session().Id()), userId) //多账号
 	}
 	f.DelSession("rpcBackUserInfo")
 	f.DelSession("user")
@@ -816,10 +817,10 @@ func CreateSession(q map[string]interface{}, sess *httpsession.Session, typ stri
 	//
 	if pcSessionFlag, ok := config.Sysconfig["pcSessionFlag"].(bool); pcSessionFlag && ok && flag {
 		userid := util.ObjToString(sessionVal["userId"])
-		// sidStr := fmt.Sprint(sess.Id())
-		// jyutil.ClearPcSession(userid, sidStr)
-		log.Println("sess:", sess.Id(), q["_id"])
-		redis.Put("other", jyutil.LoginRedisKey(userid), sess.Id(), 3600*util.IntAllDef(config.Sysconfig["pcSessionTimeout"], 168))
+		//无限制登陆用户
+		if util.IntAll(sessionVal["i_unlimited"]) <= 0 {
+			redis.Put("other", jyutil.LoginRedisKey(userid), sess.Id(), 3600*util.IntAllDef(config.Sysconfig["pcSessionTimeout"], 168))
+		}
 	}
 	sessionVal["platform"] = typ
 	sess.SetMultiple(sessionVal)

+ 2 - 1
src/jfw/jyutil/jyutil.go

@@ -161,7 +161,7 @@ func Getopenid(code string) (openid string) {
 
 //
 func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[string]interface{}) {
-	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1,"i_ispush":1}`)
+	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1,"i_ispush":1,"i_unlimited":1}`)
 	sessionVal := make(map[string]interface{})
 	if !ok || person == nil || len(*person) == 0 {
 		return nil, sessionVal
@@ -191,6 +191,7 @@ func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[strin
 		phone = util.ObjToString((*person)["s_m_phone"])
 	}
 	sessionVal["phone"] = phone
+	sessionVal["i_unlimited"] = util.IntAll((*person)["i_unlimited"])
 	return person, sessionVal
 }
 

+ 6 - 0
src/jfw/jyutil/sessionkeep.go

@@ -78,6 +78,12 @@ func (sk *SessionKeep) Do() bool {
 			} else {
 				if flag == 2 {
 					_, sessionVal := GetSessionVal(map[string]interface{}{"_id": StringTOBsonId(deuserid)})
+					//未登陆账号
+					if i_unlimited, ok := sessionVal["i_unlimited"].(int); i_unlimited > 0 && ok {
+						http.SetCookie(sk.W, sk.cookie("", SKCookieName))
+						http.Redirect(sk.W, sk.R, "/", 302)
+						return false
+					}
 					for k, v := range sessionVal {
 						sk.SetSession[k] = v
 					}

+ 39 - 16
src/jfw/modules/app/src/app/front/login.go

@@ -51,7 +51,6 @@ type Login struct {
 	afterPageLoadToCheck xweb.Mapper `xweb:"/jyapp/free/afterPageLoadToCheck"` //检测
 	channelSign          xweb.Mapper `xweb:"/jyapp/free/channelSign"`          //渠道统计
 	savePushIdMsg        xweb.Mapper `xweb:"/jyapp/free/savePushIdMsg"`        //推送id记录
-	tes                  xweb.Mapper `xweb:"/jyapp/free/tes"`
 }
 
 var (
@@ -71,14 +70,7 @@ func init() {
 	}
 	go rs.GC()
 }
-func (l *Login) Tes() {
-	//uid: 5d9fe93a27573439d033b294 QQtJCABNAVEDAkFYQ1pWTVYAAgYWXUla
-	// u_secure := BsonIdToSId(person["_id"]) //Ql9FD1wRUFNQVENfEgoGRQQCUlFHCUNa
-	// simpleuid := qutil.SE.EncodeString(BsonIdToSId(person["_id"]))
-	// log.Println("uid:", u_secure, simpleuid)
-	log.Println(qutil.SE.DecodeString("Ql9FD1wRUFNQVENfEgoGRQQCUlFHCUNa"))
-	log.Println(qutil.SE.DecodeString("QQtJCABNAVEDAkFYQ1pWTVYAAgYWXUla"))
-}
+
 func (l *Login) Login() error {
 	defer qutil.Catch()
 	if l.Method() == "GET" {
@@ -756,6 +748,7 @@ func (l *Login) SignOut() {
 			}
 		}()
 	}
+	jy.DelUnlimitSessionId(fmt.Sprint(l.Session().Id()), userid) //多账号
 	ClearSession(l.Session())
 	l.ServeJson(map[string]interface{}{
 		"status": status,
@@ -833,7 +826,7 @@ func (l *Login) AfterPageLoadToCheck() {
 			},
 			"$pull": map[string]interface{}{"a_jpushid": rid},
 		})
-		sign = createSign(userId, rid, "更新极光id后")
+		sign = createSign(userId, rid, "更新极光id后", l.Session())
 	}
 	l.ServeJson(map[string]interface{}{
 		"status":       status,
@@ -849,7 +842,7 @@ func (l *Login) Brand() {
 		if !checkIsKicked(false, u.UserId, u.Rid, l.Session()) {
 			jgPushId := l.GetString("jgPushId")
 			setMobileInfo(u.UserId, l.GetString("phoneBrand"), l.GetString("pushToken"), jgPushId)
-			sign = createSign(u.UserId, jgPushId, "设置手机类型和推送id后")
+			sign = createSign(u.UserId, jgPushId, "设置手机类型和推送id后", l.Session())
 		}
 	}
 	l.ServeJson(map[string]interface{}{
@@ -920,7 +913,7 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 		default:
 			return false
 		}
-		field := `{"s_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_headimageurl":1,"s_phone":1,"s_nickname":1,"s_appversion":1}`
+		field := `{"s_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_headimageurl":1,"s_phone":1,"s_nickname":1,"s_appversion":1,"i_unlimited":1}`
 		data, ok := mongodb.FindOneByField("user", query, field)
 		if !ok {
 			return false
@@ -947,6 +940,7 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 	s.Set("s_appponetype", person["s_appponetype"])
 	s.Set("s_appversion", person["s_appversion"])
 	s.Set("s_headimageurl", strings.Replace(qutil.ObjToString(person["s_headimageurl"]), "http://", "https://", 1))
+	s.Set("i_unlimited", qutil.IntAll(person["i_unlimited"]))
 	if qutil.ObjToString(person["s_phone"]) != "" {
 		phone := person["s_phone"].(string)
 		s.Set("s_phone", phone)
@@ -974,6 +968,17 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 		Expires:  expires,
 	}
 	http.SetCookie(rw, c)
+	//多账号登陆用户
+	i_unlimited := qutil.IntAll(person["i_unlimited"])
+	if i_unlimited > 0 {
+		uid := BsonIdToSId(person["_id"])
+		jy.PutLoginSess(mongodb, qutil.ObjToString(config.Sysconfig["appPushServiceRpc"]), fmt.Sprint(s.Id()), uid, qutil.IntAll(config.Sysconfig["criticality"]), i_unlimited)
+		redis.Put("other", fmt.Sprintf("app_%s", fmt.Sprint(s.Id())), &jy.AppLoginPush{
+			JgPushId:    qutil.ObjToString(person["s_jpushid"]),
+			OtherPushId: qutil.ObjToString(person["s_opushid"]),
+			PhoneType:   qutil.ObjToString(person["s_appponetype"]),
+		}, 86400*30)
+	}
 	return true
 }
 
@@ -1003,11 +1008,11 @@ func ClearSession(s *httpsession.Session) {
 	s.Del("phoneAuthTime")
 	s.Del("mailAuthTime")
 	s.Del("phone")
-
+	s.Del("i_unlimited")
 }
 
 //生成签名,返回手机端
-func createSign(userid, rid, signType string) string {
+func createSign(userid, rid, signType string, session *httpsession.Session) string {
 	u := &UserSign{
 		UserId:     userid,
 		CreateTime: time.Now().Unix(),
@@ -1033,14 +1038,22 @@ func getSign(u *UserSign) (string, string) {
 
 //
 func afterLogin(user map[string]interface{}, session *httpsession.Session, rid, oid, phoneType, channel, deviceId string, isNewUser bool, rw http.ResponseWriter) string {
+	log.Println("===>", fmt.Sprint(session.Id()))
 	userid := BsonIdToSId(user["_id"])
 	old_rid, _ := user["s_jpushid"].(string)
 	old_oid, _ := user["s_opushid"].(string)
 	old_ponetype, _ := user["s_appponetype"].(string)
+	off := true
 	go func() {
 		if !isNewUser {
+			if rd, ok := mongodb.FindById("user", userid, `{"i_unlimited":1}`); ok && rd != nil && len(*rd) > 0 {
+				i_unlimited := qutil.IntAll((*rd)["i_unlimited"])
+				if i_unlimited > 0 {
+					off = false
+				}
+			}
 			//同一账号在不同设备登录,极光id不一样,给之前的设备推送自定义的下线消息,离线消息保持10天
-			if old_rid != "" && old_rid != rid {
+			if old_rid != "" && old_rid != rid && off {
 				mongodb.UpdateById("user", userid, map[string]interface{}{
 					"$addToSet": map[string]interface{}{"a_jpushid": old_rid},
 				})
@@ -1115,7 +1128,7 @@ func afterLogin(user map[string]interface{}, session *httpsession.Session, rid,
 	user["s_opushid"] = oid
 	user["s_appponetype"] = phoneType
 	createSession(session, user, "", 0, rw)
-	return createSign(userid, rid, "登录后")
+	return createSign(userid, rid, "登录后", session)
 }
 
 //清空这个rid
@@ -1151,6 +1164,16 @@ func autoLogin(sign, from string, session *httpsession.Session, rw http.Response
 	if fromIsRestart && checkIsKicked(true, u.UserId, u.Rid, session) {
 		return -3
 	}
+	// //解析签名时 查看该签名是否被标记下线 如果被标记 则退出
+	// signKey := fmt.Sprintf("app_%s", fmt.Sprint(session.Id()))
+	// log.Println("key:", signKey)
+	// if data := redis.Get("other", signKey); data != nil {
+	// 	rdata := qutil.ObjToMap(data)
+	// 	ok, _ := (*rdata)["ok"].(bool)
+	// 	if sign == qutil.ObjToString((*rdata)["sign"]) && !ok {
+	// 		return -3
+	// 	}
+	// }
 	if createSession(session, nil, u.UserId, 0, rw) {
 		return 1
 	}

+ 6 - 5
src/jfw/modules/app/src/config.json

@@ -1,10 +1,10 @@
 {
-	"cookiedomain": ".jianyu360.cn",
+	"cookiedomain": ".jianyu360.com",
 	"webport": "89",
 	"weixinrpc": "127.0.0.1:8083",
 	"cacheflag": false,
 	"agreement": "http",
-	"webdomain": "https://wcj.jydev.jianyu360.com",
+	"webdomain": "https://web-zxl.jydev.jianyu360.com",
 	"redirect": {
 		"wxpushlist": "/jyapp/wxpush/bidinfo/%s",
 		"newInfoFollow": "/jyapp/followent/newInfo/%s",
@@ -110,7 +110,7 @@
 		"shareTimesUpperLimitR": 4000,
 		"shareTimesUpperLimitIrr": 1000
 	},
-	"appPushServiceRpc": "192.168.17.53:5565",
+	"appPushServiceRpc": "192.168.20.139:5566",
 	"afterSavePushId": 60,
 	"mail": [
     {
@@ -146,7 +146,7 @@
 	"termValidity": 3600,
 	"uploadPath": "./web/staticres/jyapp/res/",
 	"appConfig":{
-		"pushGrpcServer":"192.168.3.11:5565",
+		"pushGrpcServer":"192.168.20.139:5565",
 		"pushGrpcHeartBeat":3
 	},
     "redisSessionLockSize":20,
@@ -157,5 +157,6 @@
     "maxBindPop":8,
     "bindPopRedis":"merge",
     "phoneFilterFlag":true,
-    "optimalTime":"2021-08-03 12:00:00"
+    "optimalTime":"2021-08-03 12:00:00",
+    "criticality":2
 }

+ 10 - 3
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -750,6 +750,14 @@ var Verification = {
     return /^[1][3-9][0-9]{9}$/.test(value);
   }
 }
+
+//深信服用户开了一批特殊规则的手机号
+var CreatePhone = {
+  //自己创建的手机号验证[格式为100xxxxxxxx]
+  isPhone: function (value) {
+    return /^[1][0][0][0-9]{8}$/.test(value);
+  }
+}
 // 部分页面没有全局工具函数
 if (typeof utils !== 'object') {
   utils = {}
@@ -1105,7 +1113,7 @@ function loginSuccess (result) {
     }
 
     // 消息总数方法
-    checkMsgCount(false, 0);
+    checkMsgCount(true, 0);
   } catch (e) {
     console.log('获取ID失败')
   }
@@ -1273,8 +1281,7 @@ function redSpotBackFuc (r, flag) {
   var noticeCount = r.notice;
   //JyObj.getUnReadMessageCount("");
   // #fix 修复三级页同步请求导致页面白屏时间过长
-  var isContent = location.href.indexOf('/article/content/') === -1
-  checkMsgCount(isContent, 0)
+  checkMsgCount(true, 0)
   // message红点
   if (noticeCount > 0) {
     $(".trigger-div-notice .dot-red").show()

+ 4 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -83,6 +83,7 @@ var vm = new Vue({
       // iconbm: '/jyapp/big-member/image/icon-putonghy.png'
       showPopover: false,
       protype: 'vip', // 关键词接口动态修改
+      entinfo: {}
     }
   },
   computed: {
@@ -488,11 +489,12 @@ var vm = new Vue({
         success: function(res) {
           console.log(res)
           if(res.error_code === 0) {
+            _this.entinfo = res.data
             let address = ''
             if(res.data.admin_department || res.data.admin_system) {
-              address = '/page_entniche/page/sub_management/sub_management_system.html'
+              address = '/page_entniche_new/page/sub_management/sub_management_system.html'
             } else {
-              address = '/page_entniche/page/subsetting/sub_entrance.html'
+              address = '/page_entniche_new/page/subsetting/sub_entrance.html'
             }
             $("#sub_manager").click(function() {
               setSessionStorage();

+ 10 - 0
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -125,6 +125,16 @@ var mine = {
               autoLogin(url) 
             }
         })
+
+        // 我的企业跳转
+        $('.my-ent').on('click', function(e) {
+          setLiActive(e.currentTarget)
+          if(entUserInfo.isNew) {
+            location.href = '/page_entniche_new/ent/enterprise?t=' + new Date().getTime()
+          } else {
+            location.href = '/page_entniche/ent/enterprise?t=' + new Date().getTime()
+          }
+        })
         
         // 客户关注跳转
         $('.customer-follow').on('click', function (e) {

+ 1 - 1
src/jfw/modules/app/src/web/templates/big-member/page_client_follow_detail.html

@@ -656,7 +656,7 @@
                     .then(() => {
                         $.ajax({
                             type: 'POST',
-                            url: '/follow/project/cancel',
+                            url: '/entnicheNew/follow/project/cancel',
                             data: {
                                 sid: _this.sid,
                                 fid: _this.fid

+ 153 - 135
src/jfw/modules/app/src/web/templates/big-member/page_client_list.html

@@ -23,7 +23,7 @@
 </head>
 <body>
 <div id="jyKeepComponent">
-  <keep-component ref="vKeepComponent" @on-save-tag="onSvaeTag" :bid="nowOpenBid" :first="false"></keep-component>
+  <keep-ent-component ref="vKeepComponent" @on-save-tag="onSvaeTag" :bid="nowOpenBid" :first="false"></keep-ent-component>
 </div>
 <div class="j-container">
     {{include "/big-member/header.html"}}
@@ -50,7 +50,16 @@
                     <input v-model.trim="inputVal" type="text" maxlength="50" placeholder="搜索关注的客户" @input="searchFn" >
                 </div>
             </div>
-            <div class="j-main havefomain" ref="jList">
+            <div class="j-main nofomain" v-show="inputVal.length && noSearchResult">
+                <div class="nofollow">
+                    <div class="noimg">
+                        <img src="/jyapp/big-member/image/img-empty.png" alt="">
+                    </div>
+                    <p class="notofo">未搜索到相关客户</p>
+                    <p class="cantofo">可在浏览项目信息时随时关注客户</p>
+                </div>
+            </div>
+            <div class="j-main havefomain" ref="jList" v-show="!noSearchResult">
               <div class="claim-main" style="width:100%;background: #fff;">
                 <div class="claim-scree">
                   <van-tabs v-model="active" color="#2ABED1">
@@ -60,7 +69,7 @@
                         :finished="finished"
                         finished-text="没有更多了"
                         @load="getProjectList"
-                      >   
+                      >
                       <div class="followList" v-for="(item, index) in list" style="padding-left: 16px;" @click="followView(item.fid,item.sid,item)">
                         <p class="pro_title">
                           <span class="j-icon icon-company"></span>
@@ -104,7 +113,7 @@
                         :finished="finished"
                         finished-text="没有更多了"
                         @load="getProjectList"
-                      >   
+                      >
                       <div class="followList" v-for="(item, index) in havaClaimList" style="padding-left: 16px;" @click="followView(item.fid,item.sid,item)">
                         <p class="pro_title">
                           <span class="j-icon icon-company"></span>
@@ -148,7 +157,7 @@
                         :finished="finished"
                         finished-text="没有更多了"
                         @load="getProjectList"
-                      >   
+                      >
                       <div class="followList" v-for="(item, index) in noClaimList" style="padding-left: 16px;" @click="followView(item.fid,item.sid,item)">
                         <p class="pro_title">
                           <span class="j-icon icon-company"></span>
@@ -231,7 +240,7 @@
               let getclient = sessionStorage.getItem('setClientInfo')
               if(getclient) {
                 getclient = JSON.parse(getclient)
-                vNode.methods.changeFollowState(getclient.data,getclient.str,data,'tag')
+                  vueComponent.changeFollowState(getclient.data,getclient.str,data,'tag')
               }
             }
             // changeKeepStatus (type, that) {
@@ -240,16 +249,17 @@
             // }
         }
     })
-    var vNode = {
+    var vueComponent = new Vue({
         delimiters: ['${', '}'],
         el: '#v-node',
         components: {
-          areaCityMobile: areaCityMobileComponent
+            areaCityMobile: areaCityMobileComponent
         },
         data: {
             sessStorageKey:'$data-pro_follow_list',
             scrollTop:0,//页面滚动高度
             foShow:false,
+            noSearchResult: false,
             list: [],
             result: [],
             loading: false,
@@ -300,138 +310,143 @@
                 return !!$data
             },
             toggle(index) {
-              this.$refs.checkboxes[index].toggle();
+                this.$refs.checkboxes[index].toggle();
             },
             getEntFollow: function(arr) {
-              let _this = this
-              const params = {
-                names: arr.join(',')
-              }
-              // 关注
-              $.ajax({
-                type: 'POST',
-                url: '/entnicheNew/customer/check',
-                contentType: 'application/json',
-                data: JSON.stringify(params),
-                success: function(res) {
-                  console.log(res)
-                  if(res.error_code == 0) {
-                    if(res.data.iscoll) {
-                      _this.list.forEach(item => {
-                        res.data.names.forEach(sum => {
-                          if(sum === item.name) {
-                            item.follow = true
-                          }
-                        })
-                      });
-                    }
-                  }
+                let _this = this
+                const params = {
+                    names: arr.join(',')
                 }
-              })
-              // 认领
-              $.ajax({
-                type: 'POST',
-                url: '/entnicheNew/customer/claimcheck',
-                contentType: 'application/json',
-                data: JSON.stringify(params),
-                success: function(res) {
-                  console.log(res)
-                  if(res.error_code == 0) {
-                    _this.havaClaimList = []
-                    _this.noClaimList = []
-                    let newarr = []
-                    if(res.data.iscoll) {
-                      let listcopy = _this.list
-                      listcopy.forEach((item, index) => {
-                        res.data.names.forEach(sum => {
-                          if(sum === item.name) {
-                            _this.havaClaimList.push(item)
-                            newarr = _this.remove(listcopy, item)
-                            item.claim = true
-                          }
-                        })
-                      });
-                      if(res.data.names.length !== listcopy.length) {
-                        _this.noClaimList = newarr
-                      } else {
-                        _this.noClaimList = _this.list
-                      }
-                    } else {
-                      _this.noClaimList = _this.list
+                // 关注
+                $.ajax({
+                    type: 'POST',
+                    url: '/entnicheNew/customer/check',
+                    contentType: 'application/json',
+                    data: JSON.stringify(params),
+                    success: function(res) {
+                        console.log(res)
+                        if(res.error_code == 0) {
+                            if(res.data.iscoll) {
+                                _this.list.forEach(item => {
+                                    res.data.names.forEach(sum => {
+                                        if(sum === item.name) {
+                                            item.follow = true
+                                        }
+                                    })
+                                });
+                            }
+                        }
                     }
-                  }
-                }
-              })
+                })
+                // 认领
+                $.ajax({
+                    type: 'POST',
+                    url: '/entnicheNew/customer/claimcheck',
+                    contentType: 'application/json',
+                    data: JSON.stringify(params),
+                    success: function(res) {
+                        console.log(res)
+                        if(res.error_code == 0) {
+                            _this.havaClaimList = []
+                            _this.noClaimList = []
+                            let newarr = []
+                            // 存在已认领
+                            if(res.data.iscoll) {
+                                let listcopy = _this.list
+                                const CollNames = res.data.names || []
+                                _this.noClaimList = listcopy.filter(v => {
+                                    let isColl = CollNames.includes(v.name)
+                                    v.claim = isColl
+                                    if (isColl) {
+                                        _this.havaClaimList.push(v)
+                                    }
+                                    return !isColl
+                                })
+                            } else {
+                                _this.noClaimList = _this.list
+                            }
+                        }
+                    }
+                })
             },
             remove(arr, item) {
-              var result=[];  
-                  arr.forEach(function(element){  
-                      if(element.name != item.name){  
-                          result.push(element);  
-                      }  
-                  });  
-              return result;  
+                var result=[];
+                arr.forEach(function(element){
+                    if(element.name != item.name){
+                        result.push(element);
+                    }
+                });
+                return result;
             },
             // 关注、认领
             changeFollowState (data, str, taglid, tag) {
-              this.loading = true
-              let params = {
-                "name": data.name, //采购单位名称
-                "province": data.province || data.wProvince, //省份
-                "city": data.wCity, //区域
-              }
-              if(str == 'g') {
-                params.mold = 0
-                params.B = data.follow
-                this.ajaxClaim(params)
-              } else if(str == 'r') {
-                const sessParams = {
-                  data: data,
-                  str: str
+                this.loading = true
+                let params = {
+                    "name": data.name, //采购单位名称
+                    "province": data.province || data.wProvince, //省份
+                    "city": data.wCity, //区域
                 }
-                sessionStorage.setItem('setClientInfo', JSON.stringify(sessParams))
-                params.mold = 1
-                params.D = data.claim
-                // 获取标签
-                if(tag) {
-                  params.label = taglid
-                  this.ajaxClaim(params)
-                } else {
-                  if(data.claim) {
+                if(str == 'g') {
+                    params.mold = 0
+                    params.B = data.follow
                     this.ajaxClaim(params)
-                  } else {
-                    // this.ajaxClaim(params)
-                    if (vKeepComponent) {
-                      vKeepComponent.changeBid(data.name, !data.claim)
-                      // vKeepComponent.changeKeepStatus(!data.claim, this)
+                } else if(str == 'r') {
+                    const sessParams = {
+                        data: data,
+                        str: str
+                    }
+                    sessionStorage.setItem('setClientInfo', JSON.stringify(sessParams))
+                    params.mold = 1
+                    params.D = data.claim
+                    // 获取标签
+                    if(tag) {
+                        params.label = taglid
+                        this.ajaxClaim(params)
+                    } else {
+                        if(data.claim) {
+                            this.ajaxClaim(params)
+                        } else {
+                            // this.ajaxClaim(params)
+                            if (vKeepComponent) {
+                                vKeepComponent.changeBid(data.name, !data.claim)
+                                // vKeepComponent.changeKeepStatus(!data.claim, this)
+                            }
+                        }
                     }
-                  }
                 }
-              }
             },
             ajaxClaim: function (params) {
-              let _this = this
-              $.ajax({
-                type:'POST',
-                url: '/entnicheNew/customer/attention',
-                contentType: 'application/json',
-                data: JSON.stringify(params),
-                success: (res) => {
-                  _this.loading = false
-                  console.log(res)
-                  if(res.data) {
-                    _this.getProjectList()
-                  } else {
-                    _this.$toast('取消认领失败')
-                  }
-                },
-                error: function(err) {
-                  _this.loading = false
-                }
-              })
+                const _this = this
+                $.ajax({
+                    type:'POST',
+                    url: '/entnicheNew/customer/attention',
+                    contentType: 'application/json',
+                    data: JSON.stringify(params),
+                    success: (res) => {
+                        _this.loading = false
+                        console.log(res)
+                        if(res.error_code == 0) {
+                            if(res.data) {
+                                _this.$toast((params.D ? '取消' : '') +  '认领成功')
+                                _this.getProjectList()
+                            } else {
+                                _this.$toast(res.error_msg)
+                            }
+                        } else {
+                            _this.$toast(res.error_msg)
+                        }
+                    },
+                    error: function(err) {
+                        _this.loading = false
+                    }
+                })
             },
             searchFn: function() {
-              this.getProjectList()
+                if (this.inputVal.length) {
+                    doChangeInput()
+                } else {
+                    this.noSearchResult = false
+                }
             },
             // 判断是否开通大会员
             isOpening:function() {
@@ -449,11 +464,11 @@
                 })
             },
             checkAll() {
-              if (this.clientchecked) {
-                this.$refs.checkboxGroup.toggleAll(true);
-              } else {
-                this.$refs.checkboxGroup.toggleAll();
-              }
+                if (this.clientchecked) {
+                    this.$refs.checkboxGroup.toggleAll(true);
+                } else {
+                    this.$refs.checkboxGroup.toggleAll();
+                }
             },
             getProjectList () {
                 // 异步更新数据
@@ -463,13 +478,14 @@
                     type:'get',
                     url:'/entnicheNew/customer/list',
                     data:{
-                      searchCode: _this.inputVal,
+                        searchCode: _this.inputVal,
                     },
                     success:function(res) {
                         if (res.error_code == 0){
                             _this.countMax = res.data.countMax
                             if(res.data && res.data.list && $.isArray(res.data.list) && res.data.list !=0){
                                 _this.foShow = false
+                                _this.noSearchResult = false
                                 _this.listnum = res.data.count
                                 let nameArr = []
                                 for (let i = 0; i < res.data.list.length; i++) {
@@ -480,7 +496,7 @@
                                 }
                                 _this.list = res.data.list
                                 if(nameArr.length !== 0) {
-                                  _this.getEntFollow(nameArr)
+                                    _this.getEntFollow(nameArr)
                                 }
                                 if(!res.data.hasNext){
                                     _this.loading = true
@@ -492,13 +508,15 @@
 
                             }else{
                                 _this.loading = true
-                                _this.foShow = true
+                                if (_this.inputVal.length) {
+                                    _this.noSearchResult = true
+                                } else {
+                                    _this.foShow = true
+                                }
                             }
                         } else {
                             _this.$toast(res.error_msg)
                         }
-
-
                     }
                 })
             },
@@ -564,8 +582,8 @@
                 return td;
             }
         }
-    }
-    var vueComponent = new Vue(vNode)
+    })
+    var doChangeInput = utils.debounce(vueComponent.getProjectList, 300)
 </script>
 
 </body>

+ 2 - 2
src/jfw/modules/app/src/web/templates/me/login.html

@@ -201,7 +201,7 @@
 					return
 				}
 				var phone = $.trim($("#tel").val());
-				if(!Verification.isPhone(phone)){
+				if((!Verification.isPhone(phone))||(!CreatePhone.isPhone(phone))){
 					EasyAlert.show("手机号格式错误");
 					return
 				}
@@ -374,7 +374,7 @@
 				dcsOne = false;
 	     		$("#sendIdentCode").css("color","#888888")
 			}
-			if($.trim(phone).length > 0 && Verification.isPhone(phone)){
+			if($.trim(phone).length > 0 && (Verification.isPhone(phone) || CreatePhone.isPhone(phone))){
 				if($(".header-tab>a.header-tab-active").index() == 0){
 					if($.trim(password).length > 0 && password.length >= 6){
 						$("#btn").removeClass("disabled");

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -125,7 +125,7 @@
                 <!-- 我的企业 -->
                 {{if and (or (not .T.isIosExam) (and .T.isIosExam .T.isEnt)) (or (not .T.isIosExamPhone) (and .T.isIosExamPhone .T.isEnt))}}
                 <div class="menu">
-                    <a class="menu_list my-ent" data-need-bind-phone data-href="/page_entniche/ent/enterprise">
+                    <a class="menu_list my-ent" data-need-bind-phone>
                         <div class="menu_list_left">
                             <span class="j-icon base-icon icon-company"></span>
                             <span class="label">我的企业</span>

+ 5 - 1
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -821,7 +821,11 @@ console.log('Hello world');
             setSessionStorage();
             sessionStorage.setItem(vm.sessStorageKey, JSON.stringify(vm.$data))
             if(historyVt == 's') {
-              location.href = '/page_entniche/page/sub_management/sub_management_system.html'
+              if(vm.entinfo.admin_department || vm.entinfo.admin_system) {
+                location.href = '/page_entniche_new/page/sub_management/sub_management_system.html'
+              } else {
+                location.href = '/page_entniche/page/subsetting/sub_entrance.html'
+              }
               return
             }
             let thisType = sessionStorage.getItem('userIsNew')

+ 14 - 8
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -209,6 +209,9 @@
 <div id="jyKeepComponent">
     <keep-component ref="vKeepComponent" @on-change-keep="changeKeepStatus" :bid="nowOpenBid" :first="false"></keep-component>
 </div>
+<div id="jyEntKeepComponent">
+  <keep-ent-component ref="vKeepEntComponent" @on-save-tag="onSvaeTag" :bid="nowOpenBid" :first="false"></keep-ent-component>
+</div>
 <div class="tip-div" id="freeExperice">
     <div class="updateTips-wrap" style="height: 3.3rem;">
         <div class="updateTips-title">您暂无使用权限</div>
@@ -629,6 +632,7 @@
 <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/china-map-data.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/keep-tags/keep-tags-template.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/keep-tags/keep-ent-tags-template.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/area-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/money-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/date-mobile.js?v={{Msg "seo" "version"}}'></script>
@@ -654,12 +658,6 @@
 
   getNewEntNiche()
 </script>
-<script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script>
-<script>
-// 初始化
-var vConsole = new VConsole();
-console.log('Hello world');
-</script>
 <script>
     /*********************处理安卓3.0.3版本更新问题 start*******************************/
    if(!mySysIsIos() && (localStorage.checkUpdate==undefined || Date.parse(new Date())/1000-parseInt(localStorage.checkUpdate)>604800) && compareVersion(JyObj.getVersion(),"3.0.4")) {
@@ -1212,10 +1210,18 @@ console.log('Hello world');
                                 sessionStorage.removeItem("b-list-pushList");
                                 sessionStorage.removeItem("entInfo");
                                 // 跳转到商机管理使用页面
-                                location.href = '/page_entniche/home'
+                                if(res.data.isNew) {
+                                  location.href = '/page_entniche_new/home'
+                                } else {
+                                  location.href = '/page_entniche/home'
+                                }
                             } else {
                                 // 跳转到创建企业页面
-                                location.href = '/page_entniche/page/introduce_page.html'
+                                if(res.data.isNew) {
+                                  location.href = '/page_entniche_new/page/introduce_page.html'
+                                } else {
+                                  location.href = '/page_entniche/page/introduce_page.html'
+                                }
                             }
                         }
                     });

+ 0 - 1
src/jfw/modules/app/src/web/templates/weixin/search/tabSearch.html

@@ -604,7 +604,6 @@
         }
         .cor-item-left {
             display: flex;
-            flex: 1;
         }
         .cor-item-right {
             display: flex;

+ 3 - 0
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -1182,6 +1182,9 @@ console.log('Hello world');
                 $('.entnicheUser').show()
                 getActionState ({{.T.obj.buyer}}, 'g')
                 getActionState ({{.T.obj.buyer}}, 'r')
+              } else {
+                $('.commonUser').show()
+                $('.entnicheUser').hide()
               }
             }
           }

+ 142 - 0
src/jfw/modules/common/src/qfw/util/jy/jy.go

@@ -12,8 +12,11 @@ import (
 	"net/url"
 	"qfw/util"
 	"qfw/util/mail"
+	"qfw/util/redis"
+	qrpc "qfw/util/rpc"
 	"qfw/util/sms"
 	"regexp"
+	"sort"
 	"strings"
 	"time"
 	"unicode"
@@ -320,3 +323,142 @@ func GetMonth(mon string) int {
 	}
 	return month[mon]
 }
+
+//value unlimited 并发限制登陆用户
+func LoginRedisKey(userid string) string {
+	return fmt.Sprintf("unlimited_%s", userid)
+}
+
+//获取loginSess
+func GetLoginSess(userid string) []string {
+	key := LoginRedisKey(userid)
+	if data, ok := redis.Get("other", key).([]interface{}); ok {
+		return util.ObjArrToStringArr(data)
+	}
+	return []string{}
+}
+
+//判断是否在内
+func IsInLoginSess(key string, arr []string) bool {
+	for _, v := range arr {
+		if key == v {
+			return true
+		}
+	}
+	return false
+}
+
+type TtlMap struct {
+	key   string //sessionid
+	value int    //ttl
+}
+
+type AppLoginPush struct {
+	JgPushId    string `json:"jpushId"`
+	OtherPushId string `json:"opushId"`
+	PhoneType   string `json:"phoneType"`
+}
+
+//更新存储用户sessionid的队列 【sessionid ttl小于三天的清除】  key:sessionid
+func PutLoginSess(mongodb MongodbSim, apppushRpc, key, userid string, limit, max int) bool {
+	value := GetLoginSess(userid)
+	if !IsInLoginSess(key, value) {
+		value = append(value, key)
+	}
+	ttlmap := []TtlMap{}
+	if len(value) >= int(limit*max/100) {
+		new_value := []string{}
+		//如果已存的session大于限制 则清除三天后到期的session
+		for _, vv := range value {
+			ttl := redis.GetTTL("session", vv)
+			if ttl <= 86400*1 && ttl != -1 {
+				// if ttl <= 600 && ttl != -1 {
+				if ok := redis.Del("session", vv); ok {
+					LoginOutPush(mongodb, userid, vv, apppushRpc)
+					log.Println(fmt.Sprintf("%s用户的sessionid 到期时间还有%v 小于三天 清除 %s", userid, ttl, vv))
+				}
+				continue
+			}
+			new_value = append(new_value, vv)
+			ttlmap = append(ttlmap, TtlMap{vv, int(ttl)})
+		}
+		value = new_value
+	}
+	//清除并发最大限制的某个sessionid
+	if len(value) > max {
+		//排序 获取马上过期的session 清除
+		sort.Slice(ttlmap, func(i, j int) bool {
+			return ttlmap[i].value < ttlmap[j].value
+		})
+		if len(ttlmap) > 0 {
+			//清除sessionid
+			delId := ttlmap[0].key
+			redis.Del("session", delId)
+			value = removeArr(value, delId)
+			LoginOutPush(mongodb, userid, delId, apppushRpc)
+			log.Println(fmt.Sprintf("%s用户的sessionid 超过最大限制 清除 %s ,到期时间%v", userid, delId, ttlmap[0].value))
+			for _, v := range ttlmap {
+				log.Println(v.key, "===", v.value)
+			}
+		}
+	}
+	return redis.Put("other", LoginRedisKey(userid), value, -1)
+}
+
+//清除数组中的s
+func removeArr(arr []string, s string) []string {
+	result := []string{}
+	for _, v := range arr {
+		if v == s {
+			continue
+		}
+		result = append(result, v)
+	}
+	return result
+}
+
+//
+func LoginOutPush(mongodb MongodbSim, userid, sessid, apppushRpc string) {
+	rediskey := fmt.Sprintf("app_%s", sessid)
+	r := redis.Get("other", rediskey)
+	if r == nil {
+		return
+	}
+	arr, err := json.Marshal(r)
+	if err != nil {
+		log.Println("json Marshal err:", err)
+	}
+	apppush := AppLoginPush{}
+	// 反序列化
+	err2 := json.Unmarshal(arr, &apppush)
+	if err2 != nil {
+		log.Println("json Unmarshal err:", err)
+	}
+	mongodb.UpdateById("user", userid, map[string]interface{}{
+		"$addToSet": map[string]interface{}{"a_jpushid": apppush.JgPushId},
+	})
+	//
+	log.Println("多账号登陆:", userid, apppush.PhoneType, apppush.JgPushId, apppush.OtherPushId, "踢人下线")
+	ok := qrpc.AppPush(apppushRpc, map[string]interface{}{
+		"type":        "signOut",
+		"descript":    "您的账号在其他设备登录,如有需要请重新登录。",
+		"jgPushId":    apppush.JgPushId,
+		"otherPushId": apppush.OtherPushId,
+		"phoneType":   apppush.PhoneType,
+		"userId":      userid,
+	})
+	log.Println("ok:", ok)
+}
+
+//session数组清除某个value[针对多账号同时在线的方法、退出登录时调用]
+func DelUnlimitSessionId(sessid, userid string) []string {
+	sessArr := GetLoginSess(userid)
+	newArr := []string{}
+	for _, v := range sessArr {
+		if v == sessid {
+			continue
+		}
+		newArr = append(newArr, v)
+	}
+	return newArr
+}

+ 20 - 0
src/jfw/modules/sxfUser/src/config.json

@@ -0,0 +1,20 @@
+{
+	"mysql":{
+		"dbName": "bxt",
+	    "address": "192.168.3.242:3306",
+	    "userName": "root",
+	    "passWord": "Topnet123",
+		"maxOpenConns": 5,
+		"maxIdleConns": 5
+	},
+	"mongodb":{
+		"address": "192.168.3.206:27080",
+ 		"size": 5,
+		"dbName": "qfw",
+		"replSet": ""
+	},
+	"user":[
+		"1109222"
+	],
+	"limit":100
+}

+ 73 - 0
src/jfw/modules/sxfUser/src/db/db.go

@@ -0,0 +1,73 @@
+package db
+
+import (
+	"log"
+	"mongodb"
+	qutil "qfw/util"
+	"qfw/util/mysql"
+)
+
+var Mysql *mysql.Mysql
+var Config *config
+
+var Mgo mongodb.MongodbSim
+
+type config struct {
+	Mysql   *mysqlConf `json:"mysql"`
+	MgoCfig *mgoConf   `json:"mongodb"`
+	User    []string   `json:"user"`
+	Limit   int        `json:"limit"`
+}
+
+type mysqlConf struct {
+	DbName       string
+	Address      string
+	UserName     string
+	PassWord     string
+	MaxOpenConns int
+	MaxIdleConns int
+}
+
+type mgoConf struct {
+	Address           string
+	Size              int
+	DbName            string
+	ReplSet           string
+	UserName          string
+	Password          string
+	Collection        string
+	Collection_change string
+}
+
+//
+func init() {
+	//程序配置文件
+	qutil.ReadConfig(&Config)
+	//InitMysql(Config.Mysql.Address, Config.Mysql.PassWord, Config.Mysql.DbName)
+	InitMongodb(Config.MgoCfig.Address, Config.MgoCfig.DbName, Config.MgoCfig.ReplSet, Config.MgoCfig.Size)
+}
+
+//初始化Mysql
+func InitMysql(mysql_addr, mysql_pwd, dbname string) {
+	Mysql = &mysql.Mysql{
+		Address:      mysql_addr,
+		UserName:     "root",
+		PassWord:     mysql_pwd,
+		DBName:       dbname,
+		MaxOpenConns: 50,
+		MaxIdleConns: 20,
+	}
+	Mysql.Init()
+	log.Println("初始化 mysql")
+}
+
+func InitMongodb(addr, dbname, replset string, size int) {
+	Mgo = mongodb.MongodbSim{
+		MongodbAddr: addr,
+		Size:        size,
+		DbName:      dbname,
+		ReplSet:     replset,
+	}
+	Mgo.InitPool()
+	log.Println("初始化 mongodb")
+}

+ 68 - 0
src/jfw/modules/sxfUser/src/main.go

@@ -0,0 +1,68 @@
+package main
+
+import (
+	. "db"
+	"flag"
+	"log"
+	"time"
+)
+
+func main() {
+	modle := flag.Int("m", 0, "默认:0;1 已有账号修限制登陆权益;2 新账号设置登陆权益 ;")
+	flag.Parse()
+	if *modle == 1 {
+		do()
+	} else if *modle == 2 {
+		do2()
+	}
+}
+
+func do() {
+	if len(Config.User) > 0 {
+		for _, v := range Config.User {
+			ok := Mgo.Update("user", map[string]interface{}{
+				"i_appid": 2,
+				"$or": []map[string]interface{}{
+					map[string]interface{}{
+						"s_phone": v,
+					},
+					map[string]interface{}{
+						"s_m_phone": v,
+					},
+				},
+			}, map[string]interface{}{
+				"$set": map[string]interface{}{
+					"i_unlimited": Config.Limit,
+				},
+			}, false, false)
+			if !ok {
+				log.Println(v, "失败")
+			} else {
+				log.Println(v, "成功")
+			}
+		}
+	}
+}
+
+func do2() {
+	if len(Config.User) > 0 {
+		for _, v := range Config.User {
+			id := Mgo.Save("user", map[string]interface{}{
+				"l_registedate": time.Now().Unix(),
+				"s_phone":       v,
+				"o_jy": map[string]interface{}{
+					"i_apppush":    1,
+					"i_ratemode":   2,
+					"l_modifydate": time.Now().Unix(),
+				},
+				"i_appid":     2,
+				"i_unlimited": Config.Limit,
+			})
+			if id == "" {
+				log.Println(v, "失败")
+			} else {
+				log.Println(v, "成功")
+			}
+		}
+	}
+}

+ 818 - 773
src/web/staticres/common-module/ent-search/ent-search-template.js

@@ -871,861 +871,906 @@ window.vEntSearchComponent = new Vue({
     }
   }
 })
-
-window.vBuyerSearchComponent = new Vue({
-  el: '#v-buyer-search-group',
-  components: {
-    areaCityMobile: areaCityMobileComponent,
-    moneyComponent: moneyComponent,
-    dateComponent: dateComponent,
-    keywordComponent: keywordComponent,
-    industryComponent: industryComponent,
-    cateComponent: cateComponent
+var vKeepEntComponent  = new Vue({
+  delimiters: ['${', '}'],
+  el: '#jyEntKeepComponent',
+  data: {
+      nowOpenBid: ''
   },
-  delimiters: ['@@', '@@'],
-  data: function () {
-    return {
-      entSearchKey: new Date().getTime(),
-      industryComponentKey: new Date().getTime(),
-      showEntSearch: false,
-      showPop: false,
-      showUpTip: false,
-      moneyTags: [
-        {
-          name: '不限',
-          value: '',
-          selected: true
-        },
-        {
-          name: '100万以内',
-          value: '0-100',
-          selected: false
-        },
-        {
-          name: '100-500万',
-          value: '100-500',
-          selected: false
-        },
-        {
-          name: '500-1000万',
-          value: '500-1000',
-          selected: false
-        },
-        {
-          name: '1000-5000万',
-          value: '1000-5000',
-          selected: false
-        },
-        {
-          name: '5000万以上',
-          value: '5000-',
-          selected: false
-        }
-      ],
-      listInfo: {
-        value: '',
-        pageNum: 0,
-        pageSize: 500,
-        total: -1,
-        loading: true,
-        finished: false
+  methods: {
+      changeBid (id, type) {
+          this.nowOpenBid = id
+          this.$refs.vKeepEntComponent .ajaxAddKeep(id, type)
       },
-      activeTabIndex: 0,
-      beforeTabIndex: 0,
-      entTabs: [
-        {
-          title: ''
-        },
-        {
-          title: '区域'
-        },
-        {
-          title: '行业'
-        },
-        {
-          title: '客户分类'
-        },
-        {
-          title: '业务范围'
-        },
-        {
-          title: '企业历史客户',
-          disabled: true
+      onSvaeTag (data) {
+        let getclient = sessionStorage.getItem('setClientInfo')
+        if(getclient) {
+          getclient = JSON.parse(getclient)
+          vBuyerSearchComponent.changeFollowState(getclient.data,getclient.str,data,'tag')
         }
-      ],
-      statusEnum: ['存续', '吊销', '停业', '撤销'],
-      statusColors: ['#2CB7CA', '#F5AF5C', '#58A1E7', '#51CEA2'],
-      list: [],
-      conditionMap: {
-        1: [
+      }
+      // changeKeepStatus (type, that) {
+      //     changeCollectStatus(type, that)
+      //     changeCollectDataStatus(type, this.nowOpenBid)
+      // }
+  }
+})
+if (navigator.userAgent.toLowerCase().indexOf('micromessenger') === -1) {
+  window.vBuyerSearchComponent = new Vue({
+    el: '#v-buyer-search-group',
+    components: {
+      areaCityMobile: areaCityMobileComponent,
+      moneyComponent: moneyComponent,
+      dateComponent: dateComponent,
+      keywordComponent: keywordComponent,
+      industryComponent: industryComponent,
+      cateComponent: cateComponent
+    },
+    delimiters: ['@@', '@@'],
+    data: function () {
+      return {
+        entSearchKey: new Date().getTime(),
+        industryComponentKey: new Date().getTime(),
+        showEntSearch: false,
+        showPop: false,
+        showUpTip: false,
+        moneyTags: [
           {
-            title: '企业名称',
-            checked: true,
-            key: 'A'
+            name: '不限',
+            value: '',
+            selected: true
           },
           {
-            title: '法定代表人',
-            checked: false,
-            key: 'B'
+            name: '100万以内',
+            value: '0-100',
+            selected: false
           },
-          // {
-          //   title: '股东',
-          //   checked: false,
-          //   key: 'C'
-          // },
-          // {
-          //   title: '高管',
-          //   checked: false,
-          //   key: 'D'
-          // },
           {
-            title: '经营范围',
-            disabled: true,
-            checked: false,
-            key: 'F'
+            name: '100-500万',
+            value: '100-500',
+            selected: false
           },
           {
-            title: '中标项目/标的物',
-            disabled: true,
-            checked: false,
-            key: 'E'
+            name: '500-1000万',
+            value: '500-1000',
+            selected: false
+          },
+          {
+            name: '1000-5000万',
+            value: '1000-5000',
+            selected: false
+          },
+          {
+            name: '5000万以上',
+            value: '5000-',
+            selected: false
           }
-        ]
-      },
-      conditionStrMap: {
-        industry: [],
-        area: [],
-        buyerclass: [],
-        business_scope: [],
-        entcustomer: []
-      },
-      isSelectConditionTabs: {
-        1: false,
-        2: false,
-        3: false,
-        4: false,
-        5: false,
-        6: false,
-        7: false,
-        8: false,
-        9: false
-      },
-      moreContentList: [4,5],
-      showPopForArea: false,
-      dateComponentKey: new Date().getTime(),
-      times: [
-        {
-          name: '全部',
+        ],
+        listInfo: {
           value: '',
-          selected: true
+          pageNum: 0,
+          pageSize: 500,
+          total: -1,
+          loading: true,
+          finished: false
         },
-        {
-          name: '近1年内',
-          value: '-1y',
-          selected: false
+        activeTabIndex: 0,
+        beforeTabIndex: 0,
+        entTabs: [
+          {
+            title: ''
+          },
+          {
+            title: '区域'
+          },
+          {
+            title: '行业'
+          },
+          {
+            title: '客户分类'
+          },
+          {
+            title: '业务范围'
+          },
+          {
+            title: '企业历史客户',
+            disabled: true
+          }
+        ],
+        statusEnum: ['存续', '吊销', '停业', '撤销'],
+        statusColors: ['#2CB7CA', '#F5AF5C', '#58A1E7', '#51CEA2'],
+        list: [],
+        conditionMap: {
+          1: [
+            {
+              title: '企业名称',
+              checked: true,
+              key: 'A'
+            },
+            {
+              title: '法定代表人',
+              checked: false,
+              key: 'B'
+            },
+            // {
+            //   title: '股东',
+            //   checked: false,
+            //   key: 'C'
+            // },
+            // {
+            //   title: '高管',
+            //   checked: false,
+            //   key: 'D'
+            // },
+            {
+              title: '经营范围',
+              disabled: true,
+              checked: false,
+              key: 'F'
+            },
+            {
+              title: '中标项目/标的物',
+              disabled: true,
+              checked: false,
+              key: 'E'
+            }
+          ]
         },
-        {
-          name: '1-3年',
-          value: '1y-3y',
-          selected: false
+        conditionStrMap: {
+          industry: [],
+          area: [],
+          buyerclass: [],
+          business_scope: [],
+          entcustomer: []
         },
-        {
-          name: '3-5年',
-          value: '3y-5y',
-          selected: false
+        isSelectConditionTabs: {
+          1: false,
+          2: false,
+          3: false,
+          4: false,
+          5: false,
+          6: false,
+          7: false,
+          8: false,
+          9: false
         },
-        {
-          name: '5-10年',
-          value: '5y-10y',
-          selected: false
+        moreContentList: [4,5],
+        showPopForArea: false,
+        dateComponentKey: new Date().getTime(),
+        times: [
+          {
+            name: '全部',
+            value: '',
+            selected: true
+          },
+          {
+            name: '近1年内',
+            value: '-1y',
+            selected: false
+          },
+          {
+            name: '1-3年',
+            value: '1y-3y',
+            selected: false
+          },
+          {
+            name: '3-5年',
+            value: '3y-5y',
+            selected: false
+          },
+          {
+            name: '5-10年',
+            value: '5y-10y',
+            selected: false
+          },
+          {
+            name: '10年以上',
+            value: '10y-',
+            selected: false
+          }
+        ],
+        selectDate: {
+          startDate: '',
+          endDate: '',
+          exact: ''
         },
-        {
-          name: '10年以上',
-          value: '10y-',
-          selected: false
-        }
-      ],
-      selectDate: {
-        startDate: '',
-        endDate: '',
-        exact: ''
+        entList: [],
+        buyerList: [],
+        checked: false,
+        cateNameStr: '', // 采购单位搜索名称
+        showEntHistory: false,  // 企业客户历史
+        showEntKeyword: false, // 关键词
+        entHistoryList: [],
+        keytimer: '',
+        keyWordList: [], // 关键词列表
+        keyContent: '请选择业务范围',
+        selectEntList: '请选择企业历史客户',
+        nowOpenBid: ''
+      }
+    },
+    mounted () {
+      this.keytimer = new Date().getTime()
+    },
+    computed: {
+      getTabs () {
+        var tempList = this.entTabs.slice(0, 4)
+        tempList.push({
+          title: '更多筛选'
+        })
+        return tempList
       },
-      entList: [],
-      buyerList: [],
-      checked: false,
-      cateNameStr: '', // 采购单位搜索名称 
-      showEntHistory: false,  // 企业客户历史
-      showEntKeyword: false, // 关键词
-      entHistoryList: [],
-      keytimer: '',
-      keyWordList: [], // 关键词列表
-      keyContent: '请选择业务范围',
-      selectEntList: '请选择企业历史客户'
-    }
-  },
-  mounted () {
-    this.keytimer = new Date().getTime()
-  },
-  computed: {
-    getTabs () {
-      var tempList = this.entTabs.slice(0, 4)
-      tempList.push({
-        title: '更多筛选'
-      })
-      return tempList
-    },
-    isMoreSelect () {
-      return this.activeTabIndex < 7
-    },
-    isMoreContent () {
-      return this.activeTabIndex === 4
+      isMoreSelect () {
+        return this.activeTabIndex < 7
+      },
+      isMoreContent () {
+        return this.activeTabIndex === 4
+      },
+      isWaitBuy () {
+        return this.entTabs[this.activeTabIndex].disabled
+      }
     },
-    isWaitBuy () {
-      return this.entTabs[this.activeTabIndex].disabled
-    }
-  },
-  methods: {
-    // 企业历史客户列表
-    getHistoryList () {
-      let _this = this
-      $.ajax({
-        type: 'POST',
-        url: '/entnicheNew/customer/history',
-        success: function(res) {
-          console.log(res)
-          if(res.error_code == 0) {
-            if(res.data.list && res.data.list.length > 0) {
-              _this.entHistoryList = res.data.list
+    methods: {
+      // 企业历史客户列表
+      getHistoryList () {
+        let _this = this
+        $.ajax({
+          type: 'POST',
+          url: '/entnicheNew/customer/history',
+          success: function(res) {
+            console.log(res)
+            if(res.error_code == 0) {
+              if(res.data.list && res.data.list.length > 0) {
+                _this.entHistoryList = res.data.list
+              }
             }
           }
+        })
+      },
+      toggle (index) {
+        console.log(index)
+      },
+      checkNowPower () {
+        var tempPower = window.jyUserPower
+        var resultPower = false
+        if (tempPower) {
+          resultPower = tempPower.entniche || tempPower.member || tempPower.vip !== 0
+          this.changePower(!resultPower)
         }
-      })
-    },
-    toggle (index) {
-      console.log(index)
-    },
-    checkNowPower () {
-      var tempPower = window.jyUserPower
-      var resultPower = false
-      if (tempPower) {
-        resultPower = tempPower.entniche || tempPower.member || tempPower.vip !== 0
-        this.changePower(!resultPower)
-      }
-      return resultPower
-    },
-    changePower (type) {
-      this.conditionMap[1][2].disabled = type
-      this.conditionMap[1][3].disabled = type
-    },
-    getMoreListToStr (key) {
-      if (typeof this.conditionMap[key] !== "undefined" && this.conditionMap[key].length) {
-        return this.conditionMap[key].filter(function (v) {
-          return v.checked
-        }).map(function (v) {
-          return v.key
-        }).join(',')
-      }
-      return ''
-    },
-    changeConditionStrMap (i, type) {
-      this.isSelectConditionTabs[(i > 4 ? 4: i)] = type
-      switch (i) {
-        case 1 : {
-          var tempParams = {}
-          if (type) {
-            tempParams = this.$refs.areaCitySelector.onConfirm()
-          } else {
-            tempParams = this.$refs.areaCitySelector.resetAll()
+        return resultPower
+      },
+      changePower (type) {
+        this.conditionMap[1][2].disabled = type
+        this.conditionMap[1][3].disabled = type
+      },
+      getMoreListToStr (key) {
+        if (typeof this.conditionMap[key] !== "undefined" && this.conditionMap[key].length) {
+          return this.conditionMap[key].filter(function (v) {
+            return v.checked
+          }).map(function (v) {
+            return v.key
+          }).join(',')
+        }
+        return ''
+      },
+      changeConditionStrMap (i, type) {
+        this.isSelectConditionTabs[(i > 4 ? 4: i)] = type
+        switch (i) {
+          case 1 : {
+            var tempParams = {}
+            if (type) {
+              tempParams = this.$refs.areaCitySelector.onConfirm()
+            } else {
+              tempParams = this.$refs.areaCitySelector.resetAll()
+            }
+            if (tempParams && tempParams.data) {
+              this.conditionStrMap.area = tempParams.data
+            } else {
+              this.conditionStrMap.area = []
+            }
+            break
           }
-          if (tempParams && tempParams.data) {
-            this.conditionStrMap.area = tempParams.data
-          } else {
-            this.conditionStrMap.area = []
+          case 2: {
+            var tempParams = {}
+            if (type) {
+              tempParams = this.$refs.industryComponent.onConfirm()
+            } else {
+              tempParams = this.$refs.industryComponent.resetAll()
+              this.industryComponentKey = new Date().getTime()
+            }
+            break
           }
-          break
-        }
-        case 2: {
-          var tempParams = {}
-          if (type) {
-            tempParams = this.$refs.industryComponent.onConfirm()
-          } else {
-            tempParams = this.$refs.industryComponent.resetAll()
-            this.industryComponentKey = new Date().getTime()
+          case 3: {
+            var tempParams = {}
+            if (type) {
+              tempParams = this.$refs.cateComponent.onConfirm()
+            } else {
+              tempParams = this.$refs.cateComponent.resetAll()
+              this.cateComponentKey = new Date().getTime()
+            }
+            console.log(tempParams)
+            if (tempParams && tempParams.data) {
+              this.conditionStrMap.buyerclass = tempParams.data
+            } else {
+              this.conditionStrMap.buyerclass = []
+            }
+            break
           }
-          break
-        }
-        case 3: {
-          var tempParams = {}
-          if (type) {
-            tempParams = this.$refs.cateComponent.onConfirm()
-          } else {
-            tempParams = this.$refs.cateComponent.resetAll()
-            this.cateComponentKey = new Date().getTime()
+          case 4 : {
+            // this.conditionStrMap.entcustomer = this.getMoreListToStr(4)
+            break
           }
-          console.log(tempParams)
-          if (tempParams && tempParams.data) {
-            this.conditionStrMap.buyerclass = tempParams.data
-          } else {
-            this.conditionStrMap.buyerclass = []
+          case 5 : {
+            this.conditionStrMap.entStatus = this.getMoreListToStr(5)
+            break
           }
-          break
-        }
-        case 4 : {
-          // this.conditionStrMap.entcustomer = this.getMoreListToStr(4)
-          break
-        }
-        case 5 : {
-          this.conditionStrMap.entStatus = this.getMoreListToStr(5)
-          break
-        }
-        case 6: {
-          var tempParams = {}
-         try {
-           if (type) {
-             tempParams = this.$refs.dateComponentForEnt.onConfirm()
-           } else {
-             tempParams = this.$refs.dateComponentForEnt.resetAll()
-             this.dateComponentKey = new Date().getTime()
-           }
-         } catch (err) {
-           if (type) {
-             tempParams = this.$refs.dateComponentForEnt[0].onConfirm()
-           } else {
-             tempParams = this.$refs.dateComponentForEnt[0].resetAll()
-             this.dateComponentKey = new Date().getTime()
-           }
-         }
-          console.log(tempParams)
-          if (tempParams && tempParams.data) {
-            if (tempParams.data.start === '' && tempParams.data.end === '') {
+          case 6: {
+            var tempParams = {}
+            try {
+              if (type) {
+                tempParams = this.$refs.dateComponentForEnt.onConfirm()
+              } else {
+                tempParams = this.$refs.dateComponentForEnt.resetAll()
+                this.dateComponentKey = new Date().getTime()
+              }
+            } catch (err) {
+              if (type) {
+                tempParams = this.$refs.dateComponentForEnt[0].onConfirm()
+              } else {
+                tempParams = this.$refs.dateComponentForEnt[0].resetAll()
+                this.dateComponentKey = new Date().getTime()
+              }
+            }
+            console.log(tempParams)
+            if (tempParams && tempParams.data) {
+              if (tempParams.data.start === '' && tempParams.data.end === '') {
+                this.selectDate = {
+                  startDate: '',
+                  endDate: '',
+                  exact: ''
+                }
+                this.conditionStrMap.establish = ''
+                this.dateComponentKey = new Date().getTime()
+                return
+              }
+              var tempDate = tempParams.data.exact
+              this.selectDate = {
+                startDate: tempParams.data.start,
+                endDate: tempParams.data.end,
+                exact: tempParams.data.exact
+              }
+              if (tempDate === 'exact') {
+                tempDate = (tempParams.data.start ? tempParams.data.start / 1000 : '')  + '-' + (tempParams.data.end ? tempParams.data.end / 1000 : '')
+              }
+              this.conditionStrMap.establish = tempDate
+              if (this.conditionStrMap.establish === '_' || this.conditionStrMap.establish === 'all') {
+                this.conditionStrMap.establish = ''
+              }
+            } else {
               this.selectDate = {
                 startDate: '',
                 endDate: '',
                 exact: ''
               }
               this.conditionStrMap.establish = ''
-              this.dateComponentKey = new Date().getTime()
-              return
             }
-            var tempDate = tempParams.data.exact
-            this.selectDate = {
-              startDate: tempParams.data.start,
-              endDate: tempParams.data.end,
-              exact: tempParams.data.exact
-            }
-            if (tempDate === 'exact') {
-              tempDate = (tempParams.data.start ? tempParams.data.start / 1000 : '')  + '-' + (tempParams.data.end ? tempParams.data.end / 1000 : '')
-            }
-            this.conditionStrMap.establish = tempDate
-            if (this.conditionStrMap.establish === '_' || this.conditionStrMap.establish === 'all') {
-              this.conditionStrMap.establish = ''
+            break
+          }
+          case 7: {
+            var tempParams = {}
+            if (type) {
+              tempParams = this.$refs.areaRadioComponent.onConfirm()
+            } else {
+              tempParams = this.$refs.areaRadioComponent.resetAll()
             }
-          } else {
-            this.selectDate = {
-              startDate: '',
-              endDate: '',
-              exact: ''
+            if (tempParams && tempParams.data) {
+              this.conditionStrMap.biddingArea = tempParams.data[0]
             }
-            this.conditionStrMap.establish = ''
+            break
           }
-          break
-        }
-        case 7: {
-          var tempParams = {}
-          if (type) {
-            tempParams = this.$refs.areaRadioComponent.onConfirm()
-          } else {
-            tempParams = this.$refs.areaRadioComponent.resetAll()
+          case 8 : {
+            this.conditionStrMap.entClass = this.getMoreListToStr(8)
+            break
           }
-          if (tempParams && tempParams.data) {
-            this.conditionStrMap.biddingArea = tempParams.data[0]
+          case 9 : {
+            this.conditionStrMap.entContact = this.getMoreListToStr(9)
+            break
           }
-          break
         }
-        case 8 : {
-          this.conditionStrMap.entClass = this.getMoreListToStr(8)
-          break
-        }
-        case 9 : {
-          this.conditionStrMap.entContact = this.getMoreListToStr(9)
-          break
+      },
+      // 企业客户历史确定
+      submitEnt () {
+        console.log(this.conditionStrMap.entcustomer)
+        if(this.conditionStrMap.entcustomer.length > 0) {
+          this.selectEntList = '已选:' + this.conditionStrMap.entcustomer.length + '个客户'
+        } else {
+          this.selectEntList = '请选择企业历史客户'
         }
-      }
-    },
-    // 企业客户历史确定
-    submitEnt () {
-      console.log(this.conditionStrMap.entcustomer)
-      if(this.conditionStrMap.entcustomer.length > 0) {
-        this.selectEntList = '已选:' + this.conditionStrMap.entcustomer.length + '个客户'
-      } else {
+        this.togglePopForArea(false)
+      },
+      resetEnt () {
         this.selectEntList = '请选择企业历史客户'
-      }
-      this.togglePopForArea(false)
-    },
-    resetEnt () {
-      this.selectEntList = '请选择企业历史客户'
-      this.conditionStrMap.entcustomer= []
-      this.togglePopForArea(false)
-    },
-    // 获取关键词
-    getKeyWordList () {
-      let _this = this
-      let setScopeList = sessionStorage.getItem('big-setScopeList')
-      if(setScopeList) {
-        setScopeList = JSON.parse(setScopeList)
-        _this.conditionStrMap.business_scope = setScopeList
-        _this.keyContent = '已选:' + this.formatterContent(setScopeList)
-      } else {
-        $.ajax({
-          type: 'POST',
-          url: '/entnicheNew/subscribe/key/get',
-          success:function(res) {
-            // console.log(res)
-            let getArr = []
-            if (res.data.data.length > 0) {
-              res.data.data.forEach((item) => {
-                item.a_key.forEach((sum) => {
-                  let obj = {
-                    "appendkey": sum.appendkey,
-                    "key": sum.key,
-                    "matchway": 1,
-                    "notkey": sum.notkey,
-                    "updatetime": new Date().getTime()
-                  }
-                  getArr.push(obj)
+        this.conditionStrMap.entcustomer= []
+        this.togglePopForArea(false)
+      },
+      // 获取关键词
+      getKeyWordList () {
+        let _this = this
+        let setScopeList = sessionStorage.getItem('big-setScopeList')
+        if(setScopeList) {
+          setScopeList = JSON.parse(setScopeList)
+          _this.conditionStrMap.business_scope = setScopeList
+          _this.keyContent = '已选:' + this.formatterContent(setScopeList)
+        } else {
+          $.ajax({
+            type: 'POST',
+            url: '/entnicheNew/subscribe/key/get',
+            success:function(res) {
+              // console.log(res)
+              let getArr = []
+              if (res.data.data.length > 0) {
+                res.data.data.forEach((item) => {
+                  item.a_key.forEach((sum) => {
+                    let obj = {
+                      "appendkey": sum.appendkey,
+                      "key": sum.key,
+                      "matchway": 1,
+                      "notkey": sum.notkey,
+                      "updatetime": new Date().getTime()
+                    }
+                    getArr.push(obj)
+                  })
                 })
-              })
-              _this.conditionStrMap.business_scope = getArr
-              _this.keyContent = '已选:' + _this.formatterContent(getArr)
-            } else {
-              _this.keyContent = '请选择业务范围'
+                _this.conditionStrMap.business_scope = getArr
+                _this.keyContent = '已选:' + _this.formatterContent(getArr)
+              } else {
+                _this.keyContent = '请选择业务范围'
+              }
+              sessionStorage.setItem('big-setScopeList',JSON.stringify(getArr))
             }
-            sessionStorage.setItem('big-setScopeList',JSON.stringify(getArr))
-          }
-        })
-      }
-    },
-    // 处理采购内容数据格式
-    formatterContent: function(data){
-      var arr = [];
-      if(data) {
+          })
+        }
+      },
+      // 处理采购内容数据格式
+      formatterContent: function(data){
+        var arr = [];
+        if(data) {
           data.forEach(function(item,i){
-              arr.push(item.key)
+            arr.push(item.key)
           });
-      }
-      return arr.join('、');
-    },
-    onSelectScreen (data) {
-      if(data == 4) {
-        // this.showPop = false
-        // this.showEntKeyword = true
-        location.href = '/jyapp/big/page/client_set_scope?header=业务范围'
-      } else if(data == 5) {
-        this.showEntHistory = true
-      }
-    },
-    goUpBuyPage (originName) {
-      if (!originName) {
-        originName = '企业搜索' + this.entTabs[this.activeTabIndex].title + '-去开通'
-      }
-      try {
-        _hmt.push(['_trackEvent','超级订阅-' + (utils.isWeiXinBrowser ? 'wx' : 'app'), 'click', originName]);
-      } catch (e) {
-        console.log('未初始化百度统计')
-      }
-      window.location.href = (utils.isWeiXinBrowser ? '/front' : '/jyapp') + '/vipsubscribe/vipsubscribe_new'
-    },
-    // 获取地区数据
-    getAreaConfirm (data) {
-      console.log(data)
-      this.conditionStrMap.area = data.data
-    },
-    getCancel (data) {
-      console.log(data)
-    },
-    // 获取行业数据
-    getIndustryData(data) {
-      if(data) {
-        this.conditionStrMap.industry = data.data
-      }
-    },
-    // 获取客户分类数据
-    getCateData(data) {
-      console.log(data)
-      this.conditionStrMap.buyerclass = data
-    },
-    getSearchParams () {
-      var tempParams = {
-        entName: this.listInfo.value,
-        pageSize: this.listInfo.pageSize,
-        pageNum: this.listInfo.pageNum
-      }
-      // for (var k in this.conditionStrMap) {
-      //   tempParams[k] = this.conditionStrMap[k]
-      // }
-      Object.assign(tempParams, this.conditionStrMap)
-      return tempParams
-    },
-    entSwitch: function() {
-      
-    },
-    onLoad () {
-      this.ajaxEntList().done(this.doFormatList.bind(this))
-    },
-    doFormatList (r) {
-      if (r && r.error_msg == '' && r.data) {
-        this.listInfo.pageNum++
-        if (this.listInfo.pageNum === 1) {
-          if (r.data.list.length > 10) {
-            this.listInfo.total = r.data.list.length
-            this.showUpTip = false
-          } else {
-            // this.showUpTip = true
-            this.listInfo.finished = true
-          }
         }
+        return arr.join('、');
+      },
+      onSelectScreen (data) {
+        if(data == 4) {
+          // this.showPop = false
+          // this.showEntKeyword = true
+          location.href = '/jyapp/big/page/client_set_scope?header=业务范围'
+        } else if(data == 5) {
+          this.showEntHistory = true
+        }
+      },
+      goUpBuyPage (originName) {
+        if (!originName) {
+          originName = '企业搜索' + this.entTabs[this.activeTabIndex].title + '-去开通'
+        }
+        try {
+          _hmt.push(['_trackEvent','超级订阅-' + (utils.isWeiXinBrowser ? 'wx' : 'app'), 'click', originName]);
+        } catch (e) {
+          console.log('未初始化百度统计')
+        }
+        window.location.href = (utils.isWeiXinBrowser ? '/front' : '/jyapp') + '/vipsubscribe/vipsubscribe_new'
+      },
+      // 获取地区数据
+      getAreaConfirm (data) {
+        console.log(data)
+        this.conditionStrMap.area = data.data
+      },
+      getCancel (data) {
+        console.log(data)
+      },
+      // 获取行业数据
+      getIndustryData(data) {
+        if(data) {
+          this.conditionStrMap.industry = data.data
+        }
+      },
+      // 获取客户分类数据
+      getCateData(data) {
+        console.log(data)
+        this.conditionStrMap.buyerclass = data
+      },
+      getSearchParams () {
+        var tempParams = {
+          entName: this.listInfo.value,
+          pageSize: this.listInfo.pageSize,
+          pageNum: this.listInfo.pageNum
+        }
+        // for (var k in this.conditionStrMap) {
+        //   tempParams[k] = this.conditionStrMap[k]
+        // }
+        Object.assign(tempParams, this.conditionStrMap)
+        return tempParams
+      },
+      entSwitch: function() {
 
-        let cateArr = []
-        r.data.list.forEach(function(sum) {
-          console.log(sum)
-          sum.follow = false
-          sum.claim = false
-          cateArr.push(sum.Buyer)
-        })
-        if (r.data.list) {
-          r.data.list = r.data.list.splice(0, 499)
-          if(r.data.count<=10) {
-            this.buyerList = r.data.list
-          } else {
-            if(this.listInfo.pageNum <= 1) {
+      },
+      onLoad () {
+        this.ajaxEntList().done(this.doFormatList.bind(this))
+      },
+      doFormatList (r) {
+        if (r && r.error_msg == '' && r.data) {
+          this.listInfo.pageNum++
+          if (this.listInfo.pageNum === 1) {
+            if (r.data.list.length > 10) {
+              this.listInfo.total = r.data.list.length
+              this.showUpTip = false
+            } else {
+              // this.showUpTip = true
+              this.listInfo.finished = true
+            }
+          }
+
+          let cateArr = []
+          r.data.list.forEach(function(sum) {
+            console.log(sum)
+            sum.follow = false
+            sum.claim = false
+            cateArr.push(sum.Buyer)
+          })
+          if (r.data.list) {
+            r.data.list = r.data.list.splice(0, 499)
+            if(r.data.count<=10) {
               this.buyerList = r.data.list
             } else {
-              this.buyerList = this.buyerList.concat(r.data.list)
+              if(this.listInfo.pageNum <= 1) {
+                this.buyerList = r.data.list
+              } else {
+                this.buyerList = this.buyerList.concat(r.data.list)
+              }
             }
           }
-        }
 
-        this.cateNameStr = cateArr.join(',')
-        this.getActionState(this.cateNameStr, 'r')
-        this.getActionState(this.cateNameStr, 'g')
-        this.listInfo.loading = false
-        if (this.listInfo.total !== -1 && this.listInfo.total <= this.buyerList.length) {
-          this.listInfo.finished = true
+          this.cateNameStr = cateArr.join(',')
+          this.getActionState(this.cateNameStr, 'r')
+          this.getActionState(this.cateNameStr, 'g')
+          this.listInfo.loading = false
+          if (this.listInfo.total !== -1 && this.listInfo.total <= this.buyerList.length) {
+            this.listInfo.finished = true
+          }
+        } else {
+          this.$toast(r.error_msg)
         }
-      } else {
-        this.$toast(r.error_msg)
-      }
-    },
-    // 是否认领和关注企业
-    getActionState (names, str) {
-      let _this = this
-      const params = {
-        entUserId: '171',
-        names: names
-      }
-      // 认领
-      if(str == 'r') {
-        $.ajax({
-          type: 'POST',
-          url: '/entnicheNew/customer/claimcheck',
-          contentType: 'application/json',
-          data: JSON.stringify(params),
-          success: function(res) {
-            console.log(res)
-            if(res.data.iscoll) {
-              _this.buyerList.forEach(function(item) {
-                res.data.names.forEach(function(sum) {
-                  if(item.Buyer == sum) {
-                    item.claim = true
-                  }
+      },
+      // 是否认领和关注企业
+      getActionState (names, str) {
+        let _this = this
+        const params = {
+          entUserId: '171',
+          names: names
+        }
+        // 认领
+        if(str == 'r') {
+          $.ajax({
+            type: 'POST',
+            url: '/entnicheNew/customer/claimcheck',
+            contentType: 'application/json',
+            data: JSON.stringify(params),
+            success: function(res) {
+              console.log(res)
+              if(res.data.iscoll) {
+                _this.buyerList.forEach(function(item) {
+                  res.data.names.forEach(function(sum) {
+                    if(item.Buyer == sum) {
+                      item.claim = true
+                    }
+                  })
                 })
-              })
+              }
             }
-          }
-        })
-      } else if (str == 'g') {
-        // 关注
-        $.ajax({
-          type: 'POST',
-          url: '/entnicheNew/customer/check',
-          contentType: 'application/json',
-          data: JSON.stringify(params),
-          success: function(res) {
-            console.log(res)
-            if(res.data.iscoll) {
-              _this.buyerList.forEach(function(item) {
-                res.data.names.forEach(function(sum) {
-                  if(item.Buyer == sum) {
-                    item.follow = true
-                  }
+          })
+        } else if (str == 'g') {
+          // 关注
+          $.ajax({
+            type: 'POST',
+            url: '/entnicheNew/customer/check',
+            contentType: 'application/json',
+            data: JSON.stringify(params),
+            success: function(res) {
+              console.log(res)
+              if(res.data.iscoll) {
+                _this.buyerList.forEach(function(item) {
+                  res.data.names.forEach(function(sum) {
+                    if(item.Buyer == sum) {
+                      item.follow = true
+                    }
+                  })
                 })
-              })
-            }
-          }
-        })
-      }
-    },
-    // 关注企业
-    changeFollowState (data, str) {
-      let _this = this
-      let params = {
-        "userId": 123,
-        "name": data.Buyer, //采购单位名称
-        "province": data.WProvince, //省份
-        "city": data.WCity, //区域
-        "mold": 0, //1 认领;默认 0关注
-        "B": data.follow, //true 取关;默认 false 关注
-      }
-      if(str == 'r') {
-        params = {
+              }
+            }
+          })
+        }
+      },
+      // 关注企业
+      changeFollowState (data, str, tags, tagstr) {
+        const dataparams = {
+          data: data,
+          str: 'r'
+        }
+        sessionStorage.setItem('setClientInfo', JSON.stringify(dataparams))
+        let _this = this
+        let params = {
           "userId": 123,
           "name": data.Buyer, //采购单位名称
-          "province": data.WProvince, //省份
-          "city": data.WCity, //区域
-          "mold": 1, //1 认领;默认 0关注
-          "D": data.claim, //true 取关;默认 false 关注
+          "province": data.wProvince, //省份
+          "city": data.wCity, //区域
+          "mold": 0, //1 认领;默认 0关注
+          "B": data.follow, //true 取关;默认 false 关注
         }
-      }
-      $.ajax({
-        type: 'POST',
-        url: '/entnicheNew/customer/attention',
-        contentType: 'application/json',
-        data: JSON.stringify(params),
-        success: function(res) {
-          console.log(res)
-          if(res.error_code == 0) {
-            if(res.data) {
-              if(params.mold == 0) {
-                data.follow = !data.follow
-              } else {
-                data.claim = !data.claim
+        if(str == 'r') {
+          params = {
+            "userId": 123,
+            "name": data.Buyer, //采购单位名称
+            "province": data.wProvince, //省份
+            "city": data.wCity, //区域
+            "mold": 1, //1 认领;默认 0关注
+            "D": data.claim, //true 取关;默认 false 关注
+            'label': tags || ''
+          }
+          if(tagstr) {
+            params.D = false
+          }
+        }
+        if(!data.claim && tagstr != 'tag' && str == 'r') {
+          if (vKeepEntComponent) {
+            vKeepEntComponent.changeBid(data.Buyer, !data.claim)
+            // vKeepComponent.changeKeepStatus(!data.claim, this)
+          }
+        } else {
+          $.ajax({
+            type: 'POST',
+            url: '/entnicheNew/customer/attention',
+            contentType: 'application/json',
+            data: JSON.stringify(params),
+            success: function(res) {
+              console.log(res)
+              if(res.error_code == 0) {
+                if(res.data) {
+                  if(params.mold == 0) {
+                    data.follow = !data.follow
+                  } else {
+                    data.claim = !data.claim
+                  }
+                  _this.$toast('操作成功')
+                  _this.onLoad()
+                } else {
+                  _this.$toast(res.error_msg)
+                }
               }
-            } else {
-              _this.$toast(res.error_msg)
             }
-          }
+          })
         }
-      })
-    },
-    ajaxEntList() {
-      let aa = this.getSearchParams()
-      return $.ajax({
-        url: '/entnicheNew/customer/corList',
-        type: 'POST',
-        contentType: 'application/json',
-        data: JSON.stringify(aa)
-      })
-    },
-    doQueryList () {
-      this.listInfo.pageNum = 0
-      this.listInfo.total = -1
-      this.listInfo.finished = false
-      this.listInfo.loading = true
-      this.listInfo.value = $("#search-header-input").val()
-      this.list = []
-      this.onLoad()
-    },
-    onCancelArea (tempParams) {
-      this.resetValueForData(7)
-      if (tempParams && tempParams.data) {
-        this.conditionStrMap.biddingArea = tempParams.data[0]
-      }
-      this.togglePopForArea(false)
-    },
-    onConfirmArea (tempParams) {
-      if (tempParams && tempParams.data) {
-        this.conditionStrMap.biddingArea = tempParams.data[0]
-      }
-      this.togglePopForArea(false)
-    },
-    resetCondition () {
-      var _this = this
-      if (this.activeTabIndex === 4) {
-        this.moreContentList.forEach(function (v) {
-          _this.resetValueForData(v)
-          _this.changeConditionStrMap(v, false)
-        })
-      } else {
-        this.resetValueForData(this.activeTabIndex)
-        this.changeConditionStrMap(this.activeTabIndex, false)
-      }
-      this.togglePop(false)
-      this.doQueryList()
-    },
-    submitCondition () {
-      console.log('submit', this.activeTabIndex)
-      var _this = this
-      if (this.activeTabIndex === 4) {
-        this.moreContentList.forEach(function (v) {
-          _this.changeConditionStrMap(v, true)
+      },
+      ajaxEntList() {
+        let aa = this.getSearchParams()
+        return $.ajax({
+          url: '/entnicheNew/customer/corList',
+          type: 'POST',
+          contentType: 'application/json',
+          data: JSON.stringify(aa)
         })
-      } else {
-        this.changeConditionStrMap(this.activeTabIndex, true)
-      }
-      this.togglePop(false)
-      this.doQueryList()
-    },
-    resetValueForData (key) {
-      if (typeof this.conditionMap[key] !== "undefined") {
-        var defalutKey = this.$options.data().conditionMap[key]
-        this.$set(this.conditionMap, key, defalutKey)
-      }
-    },
-    removeFixedScroll () {
-      $(".app-layout-content-b").scrollTop(0)
-      $(".app-layout-content-b").removeClass('ent-stop-scroll')
-      $("#v-buyer-search-group .ent-search-list").css({height: 'unset'})
-      $("#v-buyer-search-group .ent-search-pop").css({height: 'unset'})
-    },
-    fixedScroll () {
-      console.log('fix view Height for EntSearch')
-      $(".app-layout-content-b").scrollTop(0)
-      $(".app-layout-content-b").addClass('ent-stop-scroll')
-      var isMaxHeight = $(".app-layout-content-b").height() - $(".tabs-nav").height() - $("#v-buyer-search-group .van-tabs.van-tabs--line").height()
-      $("#v-buyer-search-group .ent-search-list").css({height: isMaxHeight})
-      $("#v-buyer-search-group .ent-search-pop").css({height: isMaxHeight})
-    },
-    updateScrollTop () {
-      $(".app-layout-content-b").scrollTop(0)
-    },
-    selectEnt (ent) {
-      sessionStorage.setItem('home_top_search_tab_index', $(".tabs-nav .active").index())
-      saveSearchHistory('ent', ent.Buyer, ent._id)
-      sessionStorage.setItem('landentinfo', JSON.stringify({
-        anchor: '企业全景分析',
-        landname: ent.name
-      }))
-      SuperSearch.setSessionStorage()
-      // if(!this.checkNowPower()){
-      //   this.goUpBuyPage()
-      // }else{
+      },
+      doQueryList () {
+        this.listInfo.pageNum = 0
+        this.listInfo.total = -1
+        this.listInfo.finished = false
+        this.listInfo.loading = true
+        this.listInfo.value = $("#search-header-input").val()
+        this.list = []
+        this.onLoad()
+      },
+      onCancelArea (tempParams) {
+        this.resetValueForData(7)
+        if (tempParams && tempParams.data) {
+          this.conditionStrMap.biddingArea = tempParams.data[0]
+        }
+        this.togglePopForArea(false)
+      },
+      onConfirmArea (tempParams) {
+        if (tempParams && tempParams.data) {
+          this.conditionStrMap.biddingArea = tempParams.data[0]
+        }
+        this.togglePopForArea(false)
+      },
+      resetCondition () {
+        var _this = this
+        if (this.activeTabIndex === 4) {
+          this.moreContentList.forEach(function (v) {
+            _this.resetValueForData(v)
+            _this.changeConditionStrMap(v, false)
+          })
+        } else {
+          this.resetValueForData(this.activeTabIndex)
+          this.changeConditionStrMap(this.activeTabIndex, false)
+        }
+        this.togglePop(false)
+        this.doQueryList()
+      },
+      submitCondition () {
+        console.log('submit', this.activeTabIndex)
+        var _this = this
+        if (this.activeTabIndex === 4) {
+          this.moreContentList.forEach(function (v) {
+            _this.changeConditionStrMap(v, true)
+          })
+        } else {
+          this.changeConditionStrMap(this.activeTabIndex, true)
+        }
+        this.togglePop(false)
+        this.doQueryList()
+      },
+      resetValueForData (key) {
+        if (typeof this.conditionMap[key] !== "undefined") {
+          var defalutKey = this.$options.data().conditionMap[key]
+          this.$set(this.conditionMap, key, defalutKey)
+        }
+      },
+      removeFixedScroll () {
+        $(".app-layout-content-b").scrollTop(0)
+        $(".app-layout-content-b").removeClass('ent-stop-scroll')
+        $("#v-buyer-search-group .ent-search-list").css({height: 'unset'})
+        $("#v-buyer-search-group .ent-search-pop").css({height: 'unset'})
+      },
+      fixedScroll () {
+        console.log('fix view Height for EntSearch')
+        $(".app-layout-content-b").scrollTop(0)
+        $(".app-layout-content-b").addClass('ent-stop-scroll')
+        var isMaxHeight = $(".app-layout-content-b").height() - $(".tabs-nav").height() - $("#v-buyer-search-group .van-tabs.van-tabs--line").height()
+        $("#v-buyer-search-group .ent-search-list").css({height: isMaxHeight})
+        $("#v-buyer-search-group .ent-search-pop").css({height: isMaxHeight})
+      },
+      updateScrollTop () {
+        $(".app-layout-content-b").scrollTop(0)
+      },
+      selectEnt (ent) {
+        sessionStorage.setItem('home_top_search_tab_index', $(".tabs-nav .active").index())
+        saveSearchHistory('ent', ent.Buyer, ent._id)
+        sessionStorage.setItem('landentinfo', JSON.stringify({
+          anchor: '企业全景分析',
+          landname: ent.name
+        }))
+        SuperSearch.setSessionStorage()
+        // if(!this.checkNowPower()){
+        //   this.goUpBuyPage()
+        // }else{
         var tempUrl = '/jyapp/big/page/client_portrayal?entName='
         location.href = tempUrl + encodeURIComponent(ent.Buyer) + '&from=client'
-      // }
-    },
-    onClickTabs (name, title) {
-      this.checkNowPower()
-      this.togglePop(!(name === this.beforeTabIndex && this.showPop))
-      this.beforeTabIndex = name
-      if(name == 4 ) {
-        this.getKeyWordList()
-        this.getHistoryList()
-      }
-    },
-    getNowAllCheckStatus (index) {
-      var tempA = this.conditionMap[index].map(function (v) {
-        return v.checked
-      })
-      var nowLength = 0
-      try {
-        nowLength = tempA.slice(1,tempA.length).filter(function(v) {
-          return v
-        }).length
-      } catch (e) {
-        console.log(e)
-      }
-      var allLength = this.conditionMap[index].length - 1
-      return nowLength === 0 || allLength === nowLength
-    },
-    recoverAllCheckForIndex (index) {
-      this.conditionMap[index].forEach(function (v) {
-        v.checked = false
-      })
-    },
-    togglePopForArea (status) {
-      this.showEntHistory = status
-    },
-    onSelectMoreGroup (index) {
-      // if (this.entTabs[index].disabled) {
-      //   return this.showBuyTip()
-      // }
-      // if (index === 7) {
-      //     this.togglePopForArea(true)
-      // }
-    },
-    onSelectMoreItem (index, tags, tagIndex) {
-      if (this.entTabs[index].disabled) {
-        return this.showBuyTip()
-      }
-      var isMoreCheck = index < 7
-      var isMoreAllCheck = tagIndex === 0
-      if (isMoreCheck && !isMoreAllCheck) {
+        // }
+      },
+      onClickTabs (name, title) {
+        this.checkNowPower()
+        this.togglePop(!(name === this.beforeTabIndex && this.showPop))
+        this.beforeTabIndex = name
+        if(name == 4 ) {
+          this.getKeyWordList()
+          this.getHistoryList()
+        }
+      },
+      getNowAllCheckStatus (index) {
+        var tempA = this.conditionMap[index].map(function (v) {
+          return v.checked
+        })
+        var nowLength = 0
+        try {
+          nowLength = tempA.slice(1,tempA.length).filter(function(v) {
+            return v
+          }).length
+        } catch (e) {
+          console.log(e)
+        }
+        var allLength = this.conditionMap[index].length - 1
+        return nowLength === 0 || allLength === nowLength
+      },
+      recoverAllCheckForIndex (index) {
+        this.conditionMap[index].forEach(function (v) {
+          v.checked = false
+        })
+      },
+      togglePopForArea (status) {
+        this.showEntHistory = status
+      },
+      onSelectMoreGroup (index) {
+        // if (this.entTabs[index].disabled) {
+        //   return this.showBuyTip()
+        // }
+        // if (index === 7) {
+        //     this.togglePopForArea(true)
+        // }
+      },
+      onSelectMoreItem (index, tags, tagIndex) {
+        if (this.entTabs[index].disabled) {
+          return this.showBuyTip()
+        }
+        var isMoreCheck = index < 7
+        var isMoreAllCheck = tagIndex === 0
+        if (isMoreCheck && !isMoreAllCheck) {
           this.conditionMap[index][0].checked = false
           tags.checked = !tags.checked
           if (this.getNowAllCheckStatus(index)) {
             this.recoverAllCheckForIndex(index)
             this.conditionMap[index][0].checked = true
           }
-      } else {
-        this.recoverAllCheckForIndex(index)
-        tags.checked = true
-      }
-    },
-    showBuyTip () {
-      var _this = this
-      this.$dialog.close()
-      this.$dialog.confirm({
-        title: '开通超级订阅',
-        message: '立享更多搜索权限<br>寻找商机更精准',
-        className: 'ent-search-dialog center-text',
-        overlayClass: 'z-2030',
-        confirmButtonText: '去开通',
-      }).then(function () {
-        _this.goUpBuyPage('会员选项-去开通')
-      }).catch(function () {});
-    },
-    onSelectItem (item, index) {
-      if (item.disabled) {
-        return this.showBuyTip()
-      }
-      if (index < 7) {
-        item.checked = !item.checked
-      } else {
-        this.conditionMap[index].forEach(function (v) {
-          v.checked = false
-        })
-        item.checked = true
-        this.submitCondition()
-      }
-    },
-    togglePop (type) {
-      this.checkNowPower()
-      this.showPop = type
-    },
-    toggleEntShow (type) {
-      if (type) {
-        Object.assign(vBuyerSearchComponent.$data, vBuyerSearchComponent.$options.data())
-      }
-      this.checkNowPower()
-      this.showEntSearch = type
-      if (type) {
-        this.entSearchKey = new Date().getTime()
-        $("#supersearchPage input[name=super_searchinput]").blur();
-        this.doQueryList()
-        $(window).on('resize', this.fixedScroll.bind(this))
-      } else {
-        $(window).off('resize', this.fixedScroll.bind(this))
-      }
-      var _this = this
-      this.$nextTick(function () {
+        } else {
+          this.recoverAllCheckForIndex(index)
+          tags.checked = true
+        }
+      },
+      showBuyTip () {
+        var _this = this
+        this.$dialog.close()
+        this.$dialog.confirm({
+          title: '开通超级订阅',
+          message: '立享更多搜索权限<br>寻找商机更精准',
+          className: 'ent-search-dialog center-text',
+          overlayClass: 'z-2030',
+          confirmButtonText: '去开通',
+        }).then(function () {
+          _this.goUpBuyPage('会员选项-去开通')
+        }).catch(function () {});
+      },
+      onSelectItem (item, index) {
+        if (item.disabled) {
+          return this.showBuyTip()
+        }
+        if (index < 7) {
+          item.checked = !item.checked
+        } else {
+          this.conditionMap[index].forEach(function (v) {
+            v.checked = false
+          })
+          item.checked = true
+          this.submitCondition()
+        }
+      },
+      togglePop (type) {
+        this.checkNowPower()
+        this.showPop = type
+      },
+      toggleEntShow (type) {
         if (type) {
-          _this.fixedScroll()
+          Object.assign(vBuyerSearchComponent.$data, vBuyerSearchComponent.$options.data())
+        }
+        this.checkNowPower()
+        this.showEntSearch = type
+        if (type) {
+          this.entSearchKey = new Date().getTime()
+          $("#supersearchPage input[name=super_searchinput]").blur();
+          this.doQueryList()
+          $(window).on('resize', this.fixedScroll.bind(this))
         } else {
-          _this.removeFixedScroll()
+          $(window).off('resize', this.fixedScroll.bind(this))
         }
-      })
-      setTimeout(function () {
-        _this.$nextTick(function () {
+        var _this = this
+        this.$nextTick(function () {
           if (type) {
             _this.fixedScroll()
           } else {
             _this.removeFixedScroll()
           }
         })
-      }, 300)
+        setTimeout(function () {
+          _this.$nextTick(function () {
+            if (type) {
+              _this.fixedScroll()
+            } else {
+              _this.removeFixedScroll()
+            }
+          })
+        }, 300)
+      }
     }
-  }
-})
+  })
+}
+
 
 function changeDefaultForSearchRange (type, key, value) {
   var prefixForKey = 'mainSearchRangeFor'

+ 2 - 2
src/web/staticres/common-module/keep-tags/keep-ent-tags-template.js

@@ -273,7 +273,7 @@ if (typeof utils !== 'object') {
 }
 utils.isWeiXinBrowser = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
 
-Vue.component('keep-component', {
+Vue.component('keep-ent-component', {
   delimiters: ['@@', '@@'],
   template: `
 <div id="v-keep-component" v-cloak>
@@ -516,7 +516,7 @@ Vue.component('keep-component', {
     },
     addTag () {
       this.isAddLoading = true
-      this.ajaxFn('/publicapply/bidcoll/addLabel', { name: this.tagInput }, function (r) {
+      this.ajaxFn('/entnicheNew/customer/addLabel', { name: this.tagInput }, function (r) {
         if (r && r.error_msg === '' && r.data) {
           this.addTagInList(r.data)
         } else {

+ 17 - 0
src/web/staticres/css/dev2/newBidSearch.css

@@ -561,4 +561,21 @@
 .free-go-open .go-open-btn:hover{
   text-decoration: none;
   color: #fff;
+}
+
+.claim{
+  display: inline-block;
+  width: auto!important;
+  padding-left: 24px;
+  font-size: 16px;
+  color: #2cb7ca;
+  cursor: pointer;
+}
+.claim-no{
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA1FJREFUWEftmM1u2kAQx//jjzaqekjfIL21ClJBammiXsKlCskleYKSJ0jzBIEnCHmCJE+Aqkqh6oVcqqikEhxsqbfyBuXQqJGwPdUu2DJm/QEkElLhhOzdnd/+Z3ZnxoQF/9GC82EJOK+HlgoujIIvmtdrJvSWANLvzEJ3v9CfF07Mz+zitUZn9emKcwjivrVdPI0az32+2YLBEhBwS1Z582piTPPmWMw3/poXWTeQCXC92a5ohBNmrAqj7A0K9u67bhggDTD8noCe56Fm7xbP01ROBFz/+i1PrnkCYMtfiIGeC7f0s7zZmwYw3+isDlYGHQLW/HkCdKBYK7xuLODLyx97OnmNYDChD+bTP3eP6j1FfKUp6K+Ta36vgugQI29Ij0Cr2OXXFyo1lYAy4EnvBC4Fzl24tahq0ygYHivW11mrEtEH+Zwg4vK5Ki6VgLnLdh2EQ7k79o7snY16WqxkVXBsU0JN0LF85nHN2n1bjdpRAzbb4jRuiZ1Z28VnaXDi/SyAct6X9m/hbob3yS5v7E0HCFxZ5WLpQQF9MWJsJSu4BARySwVHATrzIfnvFJRFg+HkJ062ya/AkPeluDvJ1cdytXjuGE5vIkXet4IyP3tmK5yqslxD4k512C08OKCAmRqS0GdtULLfj1dA8qK+bwV9tQQkXLMRrk6USibAPSigWFwmfeitOMi40mw8H4/S6kyZhNC1touFpBiLg8wCN7uClzcNEO8llUET5VNIyaxwYnMG9F/DmnCKYmG9eV0h6GcSgtF1yN1PqgXD7hb/VRV31Avyuno8aIEgryz2cKBqAWIr6tDpkgUlmOpW+U0t05WSMMhvvoj4Y1AQM7r2jjqUYgGl/Kw3/B0Km9M0OypGkQ7J4DMO9SUArhy4B3EeSu3qhLsB/Th8UjlDCxCNUWMYMkHzJbzCLo7SOrtUQD++DGiVoDwPrFPVgXMRt/uglwZHSnmuxTVfmSrquBCaaHYS3B7tpUdrJrpTZTeTgtGJKrfL+GTvVGOtzxpEtzbWSxPcA9XXhrRDNxOgv6iqxx0zmNJLp8GNDmaWYfFjVG4fXp/pvXQWy3MpGDYwPBB3eda9/u3tk57q60MWoLkOySwG5p1zbwrOCxI3f+EB/wEsbk5HCowJ7QAAAABJRU5ErkJggg==) no-repeat left center;
+  background-size: 20px 20px;
+}
+.claim-yes{
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAudJREFUWEft2EFPE0EUB/D/sAVbYgnxiImpB8MaagImFLjBcfECiXeoX8By8tj26AnwAwjfoBoT9theDNKatIc2lpONiRwNkUYK7e4zs1BS2912ZneNTWSO7czOb997s7szDEPe2JD78P8AI5ni5N1Aa5ZnpN4KlGrrc6d+ZMdzBFX9MBJgI9sgttYJImDfgJGuaks1L1DXQCtiwdZLxihBhElnBEuVtfm0W6Qr4OODz2sBZm4TEBGZmAE100S68iy2L9K/s48UMPqhsIwAJQEsy05k9WcotchYl0m7EJCnMxxqJYko4QrWNUimPgcCo3ohObjO5Nk87QS2P6g+HYF8dY5CyYrW2f3QGN7GVEv6/GMFZy1DSM2hTRgrTml3BD7R819FcVwyfy98A3yRr6Lw40wIeFWaqCmN0bmSzbPTFjij5zcZsCc8g0cgn4fI3KqsLu50z2kLjOr5rOxK9RJBCwjzfUVb/ONhfx3d3jj9CyCAXFmLrQxtBG+BXmvwNoJDE8FwQIE6Md6z9KcnxvFKfWD9/rr6Dcc/f/X0OTm/wPfzS6fHqz+reDo8jr0FFRwq0/irj78COdKh+QPkF5dFclz8qIrjs96odmD9A7aRb54+wlRorG8gBXH8Gv4C+RWnQnewF1MdkSfnl4jnq/3S2nlz/gP7ISVxkhE8KGTAqOfF7ZTL7ki6wMkBZw4+JRjfSkq0NpIPkUjrzQxkIm63qbL93JrNFCebwWaRCe7aJO7DtisBtYoWe2j3Z99PfgVK9m8jOc5w88nfvpuofpQisA3foQynINotawupfhkYuKvjg/kGSqGRFGNsw2s6rfGE3frFaErk/EYI2EZZ5zCkZMBgHRK5aDnASJe1pZzoWClg+6Iz+uEmoCRF087rzCTa+rK68E4U1u7nCthZnwDjRyH27brO6o2xHZF0Sq1i0Tt1qk+Z4w3Pi0QEe3Uc17g6wGwEh+cAUwTvpY+nGvQysejYoQf+BiROhjgdpNiKAAAAAElFTkSuQmCC) no-repeat left center;
+  background-size: 20px 20px;
 }

+ 5 - 4
src/web/staticres/js/ent-search-index-pc.js

@@ -213,7 +213,7 @@ var vm = new Vue({
             endDate:'',
             thisStartTime:'',
             thisEndTime:'',
-            industryShow: false
+            indusShow: false
         }
     },
     watch: {
@@ -270,7 +270,6 @@ var vm = new Vue({
         },
     },
     created: function () {
-        this.industryTab()
         this.getPower()
         this.initPageData()
         this.initProvinceMapList()
@@ -281,17 +280,19 @@ var vm = new Vue({
         this.$refs.searchType.setState(this.filterState.searchType)
         // 全选按钮逻辑
         // this.searchTypeChange([], true)
+        this.industryTab()
     },
     methods: {
         industryTab() {
+            const _this = this
             $.ajax({
                 type:'POST',
                 url:'/entnicheNew/buy/whetherbuy',
                 success:function (res) {
                   if (res.data.isNew) {
-                    this.industryShow = true
+                    $('#tab-cgdw').css('display', 'inline-block')
                   } else {
-                    this.industryShow = false
+                    $('#tab-cgdw').css('display', 'none')
                   }
                 }
             })

+ 4 - 2
src/web/staticres/js/login.js

@@ -352,7 +352,7 @@ function checkMenuForEnt () {
                         +"<span>我的企业</span>"
                         +"</div>"
                     }
-                    if(r.entnicheMenu){
+                    if(r.entnicheMenu == true){
                         if (r.isNew == true) {
                             tempHtml+= "<div class=\"myorderDiv\" onclick=\"window.location.href='/entpc/newBus'\">"
                                 +"<span>商机管理</span>"
@@ -1176,7 +1176,9 @@ $(function(){
 
     // 表单规则
     function ruleForPhone (data, type) {
-        var checkStatus = /^[1][3-9][0-9]{9}$/.test(data.value)
+    		var phoneReg = /^[1][3-9][0-9]{9}$/.test(data.value);
+		var createPhoneReg =/^[1][0][0][0-9]{8}$/.test(data.value);
+        var checkStatus =  phoneReg || createPhoneReg;
         if (type === 'input') {
             return data.value.length >= 11 ? checkStatus : true
         }

+ 10 - 10
src/web/staticres/js/pc_detail_tags.js

@@ -181,20 +181,20 @@ function deleteInputTag(item) {
   var id = $(item).parent().attr('data-id')
   activeTags.splice(index, 1)
   inputTagList()
-  $('.tags-item[data-id="' + id + '"]').removeClass('tags-active')
+  $('#collectTags .tags-item[data-id="' + id + '"]').removeClass('tags-active')
 }
 
 function inputTagList () {
   var ht = '';
-  $('.tag-labels').html(ht)
+  $('#collectTags .tag-labels').html(ht)
   activeTags.forEach(function(v,i) {
     ht+='<span class="tag-label" data-index=' + i + ' data-id="' + v.lid + '">'
     ht+='<em>'+ v.lname + '</em>'
     ht+='<i class="tag-close" onclick="deleteInputTag(this)"></i>'
     ht+='</span>'
   });
-  $('.tag-labels').html(ht)
-  if ($('.tag-labels').children('.tag-label').length > 0) {
+  $('#collectTags .tag-labels').html(ht)
+  if ($('#collectTags .tag-labels').children('.tag-label').length > 0) {
     $('.tag-placeholder').hide()
   }
   checkTagDisabled()
@@ -206,11 +206,11 @@ function renderTagsList (data) {
     data.forEach(function(v,i) {
       ht+='<span class="tags-item" data-count=' + v.count + ' data-id=' + v.lid + '>'+ v.lanme +'</span>'
     });
-    $(".tags-list").html(ht)
+    $("#collectTags .tags-list").html(ht)
     activeTags.forEach(function(s,j){
-      $('.tags-list .tags-item[data-id="' + s.lid +  '"]').addClass('tags-active')
+      $('#collectTags .tags-list .tags-item[data-id="' + s.lid +  '"]').addClass('tags-active')
     })
-    $('.tags-item').click(function(e) {
+    $('#collectTags .tags-item').click(function(e) {
       e.stopPropagation()
       if ($(this).hasClass('disabled')) return
       var id = $(this).attr('data-id');
@@ -285,7 +285,7 @@ function addTagsAjax (name) {
     dataType:'json',
     success: function(r){
       if (r.data) {
-        $('.tag-input .clear-input').val('')
+        $('#collectTags .tag-input .clear-input').val('')
         // 添加标签成功后 绑定标签
         if (activeTags.length < 3) {
           activeTags.push({
@@ -331,10 +331,10 @@ function collBidAction (baction, binfo, callback) {
 function checkTagDisabled () {
   if (activeTags.length >= 3) {
     // 禁用标签
-    $('.tags-list').find('.tags-item:not(.tags-active)').addClass('disabled')
+    $('#collectTags .tags-list').find('.tags-item:not(.tags-active)').addClass('disabled')
   } else {
     // 解除禁用
-    $('.tags-list').find('.disabled').removeClass('disabled')
+    $('#collectTags .tags-list').find('.disabled').removeClass('disabled')
   }
 }
 // toast提示

+ 151 - 0
src/web/staticres/js/pc_entniche_tags.js

@@ -0,0 +1,151 @@
+var entNicheTags = []; //选中的自定义标签 作为全局变量使用
+// 解绑自定义标签
+function deleteEntInputTag(item) {
+  var index = $(item).parent().attr('data-index')
+  var id = $(item).parent().attr('data-id')
+  entNicheTags.splice(index, 1)
+  inputEntTagList()
+  $('#entNicheTags .tags-item[data-id="' + id + '"]').removeClass('tags-active')
+}
+// 获取用户自定义标签
+function geEntNicheUserTags () {
+  $.ajax({
+    type:'post',
+    url:'/entnicheNew/customer/getLabel?t=' + Date.now(),
+    success: function(r){
+      if (r.error_code == 0 && $.isArray(r.data)) {
+        renderEntTagsList(r.data.reverse())
+      }
+    }
+  })
+}
+function inputEntTagList () {
+  var ht = '';
+  $('#entNicheTags .tag-labels').html(ht)
+  entNicheTags.forEach(function(v,i) {
+    ht+='<span class="tag-label" data-index=' + i + ' data-id="' + v.lid + '">'
+    ht+='<em>'+ v.lname + '</em>'
+    ht+='<i class="tag-close" onclick="deleteEntInputTag(this)"></i>'
+    ht+='</span>'
+  });
+  $('#entNicheTags .tag-labels').html(ht)
+  if ($('#entNicheTags .tag-labels').children('.tag-label').length > 0) {
+    $('#entNicheTags .tag-placeholder').hide()
+  }
+  checkEntTagDisabled()
+}
+// 渲染标签列表数据
+function renderEntTagsList (data) {
+  if (data && data.length > 0) {
+    var ht = '';
+    data.forEach(function(v,i) {
+      ht+='<span class="tags-item" data-count=' + v.count + ' data-id=' + v.lid + '>'+ v.lanme +'</span>'
+    });
+    $("#entNicheTags .tags-list").html(ht)
+    entNicheTags.forEach(function(s,j){
+      $('#entNicheTags .tags-list .tags-item[data-id="' + s.lid +  '"]').addClass('tags-active')
+    })
+    $('#entNicheTags .tags-item').click(function(e) {
+      e.stopPropagation()
+      if ($(this).hasClass('disabled')) return
+      var id = $(this).attr('data-id');
+      var name = $(this).text()
+      $(this).toggleClass('tags-active')
+      if ($(this).hasClass('tags-active')) {
+        entNicheTags.push({
+          lid: id,
+          lname: name
+        })
+        inputEntTagList ()
+      } else {
+        var newArr = entNicheTags.filter(function(item) {
+          return item.lid != id
+        })
+        entNicheTags = newArr
+        inputEntTagList ()
+      }
+    })
+  }
+  inputEntTagList()
+}
+// 新增标签
+function addEntTagsAjax (name) {
+  $.ajax({
+    type:'post',
+    url:'/entnicheNew/customer/addLabel',
+    data: {
+      name: name
+    },
+    dataType:'json',
+    success: function(r){
+      if (r.data) {
+        $('#entNicheTags .tag-input .clear-input').val('')
+        // 添加标签成功后 绑定标签
+        if (entNicheTags.length < 3) {
+          entNicheTags.push({
+            lid: r.data,
+            lname: name
+          })
+        }
+        geEntNicheUserTags()
+      } else {
+        // toastFn(r.error_msg, 1000)
+        toastFn('标签已经存在,无需添加', 1000)
+      }
+    }
+  })
+}
+function checkEntTagDisabled () {
+  if (entNicheTags.length >= 3) {
+    // 禁用标签
+    $('#entNicheTags .tags-list').find('.tags-item:not(.tags-active)').addClass('disabled')
+  } else {
+    // 解除禁用
+    $('#entNicheTags .tags-list').find('.disabled').removeClass('disabled')
+  }
+}
+
+// 标签输入框事件
+$('#entNicheTags.tags-box').click(function(e) {
+  e.stopPropagation()
+})
+
+$('#entNicheTags .tag-input').click(function(e) {
+  e.stopPropagation()
+  $(this).children('.tag-placeholder').hide()
+  $(this).children('input').focus()
+})
+// 标签输入框回车事件
+$('#entNicheTags .tag-input .clear-input').keydown(function(event){
+  event.stopPropagation()
+  if (event.keyCode == 13) {
+    if (!$('#entNicheTags.tags-box').is(':hidden')) {
+      $('#entNicheTags .tags-inputs .add-tag-button').trigger('click')
+    }
+  }
+})
+// 添加标签按钮事件
+$('#entNicheTags .tags-inputs .add-tag-button').on('click', function () {
+  var input = $('#entNicheTags .tag-input .clear-input')
+  if(input.val().length >= 2 && input.val().length < 6) {
+    // ajax提交自定义标签
+    addEntTagsAjax(input.val())
+  }
+})
+// 标签输入框失去焦点事件
+$('#entNicheTags .tag-input .clear-input').blur(function() {
+  if($('#entNicheTags .tag-labels').children().length == 0 && $(this).val() == '') {
+    $('.tag-placeholder').show()
+  }
+})
+
+$('#entNicheTags .tags-footer .button-cancel').on('click', function () {
+  $('.tags-box').hide(function() {
+    // 标签弹框消失时 清除上次选择的标签分类
+    entNicheTags = []
+    $('.tag-labels').empty()
+    $('.clear-input').val('')
+    $('.tags-list').find('.tags-item').removeClass('tags-active')
+    $('.tag-placeholder').show()
+  })
+})

+ 6 - 1
src/web/staticres/js/pur-busniess-index-pc.js

@@ -290,7 +290,12 @@ var vm = new Vue({
     },
     // 保存设置
     saveSetting () {
-      window.localStorage.setItem('bus-key-group-SCOPE', JSON.stringify(this.subData))
+      if (this.subData.length == 0) {
+        location.href = '/jylab/purSearch/index.html'
+      } else {
+        window.localStorage.setItem('bus-key-group-SCOPE', JSON.stringify(this.subData))
+        location.href = '/jylab/purSearch/index.html'
+      }
     }
   }
 })

+ 290 - 60
src/web/staticres/js/pur-search-index-pc.js

@@ -12,10 +12,10 @@ function getRandomString (len) {
     return randomString
 }
 // toast上限提示
-function toastFn (text, duration) {
-    if (duration) {
-      duration = 1000
-    }
+function toastFn (text, duration = 1000) {
+    // if (duration) {
+    //   duration = 1000
+    // }
     var _html = ""
     _html+='<div class="custom-toast"><div class="mask" style="background-color: transparent;"></div><div class="toast-container">'
     _html+='<span>' + text + '</span></div></div>'
@@ -25,7 +25,6 @@ function toastFn (text, duration) {
       },duration)
 }
 function formatKeywordsList (res) {
-    console.info(res)
     // if (!res || !res.a_items) return
     // const data = res.a_items
     const newArr = []
@@ -113,6 +112,7 @@ var vm = new Vue({
                 children: [],
                 id: ''
             },
+            datas: '',
             attentionName: [],
             claimcheckName: [],
             showmoreBtn: true,
@@ -165,6 +165,7 @@ var vm = new Vue({
         this.getList(1)
     },
     mounted: function () {
+        this.initCollectEvent()
         this.initDOMEvents()
         ewmMoveHover()
         this.$on('updatescope', (data) => {
@@ -173,7 +174,7 @@ var vm = new Vue({
     },
     methods: {
         updatescope(data) {
-            console.log(data)
+            // console.log(data)
         },
         // 采购单位模糊搜索
         getPreSearchList: utils.debounce(function () {
@@ -203,7 +204,7 @@ var vm = new Vue({
             this.entArea = {}
             this.indusList = []
             this.indusList1 = []
-            this.industryListMap = []
+            this.industryExp = []
             this.qyCheck = []
             this.doSearch()
         },
@@ -402,6 +403,7 @@ var vm = new Vue({
             return tempArr
         },
         doSearch: function () {
+            $('.tags-box').hide()
             this.listState.pageNum = 1
             this.getList(1, 'search')
         },
@@ -437,14 +439,16 @@ var vm = new Vue({
                         })
                         if (arrs.length == 0) {
                             this.listState.list = []
-                            if (res.error_msg) {
-                                toastFn(res.error_msg, 2000)
-                            }
                         } else {
                             _this.attentionCheck(arrs, String(arr1))
                         }
                         this.listState.total = res.data.list.length
                         this.listState.loading = false
+                    } else {
+                        if (res.error_msg) {
+                            toastFn(res.error_msg, 2000)
+                        }
+                        this.listState.list = []
                     }
                 }.bind(this),
                 complete: function () {
@@ -454,11 +458,12 @@ var vm = new Vue({
             })
         },
         onPageChange: function (p) {
+            $('.tags-box').hide()
             this.listState.pageNum = p
             this.getList(p)
         },
         goTitle(name) {
-            location.href = '/unit_portrayal/' + name
+            location.href = '/entpc/unit_portrayal/' + name
         },
         // 全选
         allChange() {
@@ -491,26 +496,24 @@ var vm = new Vue({
                 $('.check-all').prop('checked', false)
             }
             this.selectName = arr1
-            var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
-            var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
-            console.info(tempArray1)
-            console.info(tempArray2)
-            if (tempArray1.length == 0) {
-                this.follow = true
-                if (this.selectName.length == 0) {
-                    this.follow = false
-                }
-            } else {
-                this.follow = false
-            }
-            if (tempArray2.length == 0) {
-                this.claim = true
-                if (this.selectName.length == 0) {
-                    this.claim = false
-                }
-            } else {
-                this.claim = false
-            }
+            // var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
+            // var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
+            // if (tempArray1.length == 0) {
+            //     this.follow = true
+            //     if (this.selectName.length == 0) {
+            //         this.follow = false
+            //     }
+            // } else {
+            //     this.follow = false
+            // }
+            // if (tempArray2.length == 0) {
+            //     this.claim = true
+            //     if (this.selectName.length == 0) {
+            //         this.claim = false
+            //     }
+            // } else {
+            //     this.claim = false
+            // }
         },
         // 是否关注企业
         attentionCheck(arrs, item) {
@@ -577,7 +580,6 @@ var vm = new Vue({
                     D: per ? str : item.claim1
                 }
             }
-            console.info(obj)
             $.ajax({
                 url: '/entnicheNew/customer/attention',
                 method: 'POST',
@@ -586,10 +588,7 @@ var vm = new Vue({
                 success: function (res) {
                     if (res.data == false) {
                         if (res.error_msg) {
-                            _this.$message({
-                                message: res.error_msg,
-                                type: 'warning'
-                            })
+                            toastFn(res.error_msg, 2000)
                         }
                     } else {
                         _this.getList(_this.listState.pageNum)
@@ -603,20 +602,6 @@ var vm = new Vue({
                         } else {
                             this.claim = true
                         }
-                        // if (type == 1) {
-                        //     $('.tags-box').css('display', 'block')
-                        //     if (str == 'all') {
-                        //         $('.tags-box').css('top',0)
-                        //     } else {
-                        //         if (index == (this.listState.pageNum - 1) * this.listState.pageSize) {
-                        //             index = 0
-                        //         }
-                        //         $('.tags-box').css('top', (index + 1) * 91)
-                        //     }
-                        // } else {
-                        //     $('.tags-box').css('display', 'none')
-                        //     $('.tags-box').css('top',0)
-                        // }
                     }
                 }.bind(this)
             })
@@ -644,30 +629,48 @@ var vm = new Vue({
                 var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
                 if (type == 0) {
                     if (tempArray1.length == 0) {// 批量取关
-                        this.follow = true
+                        // this.follow = true
                         this.attention(String(this.selectName), type, true, 'pi') 
                     } else if (tempArray1.length == this.selectName.length) {// 批量关注
-                        this.follow = false
+                        // this.follow = false
                         this.attention(String(this.selectName), type, false, 'pi')
                     } else {
-                        toastFn('关注和取消关注不能同时进行!', 2000)
+                        toastFn('关注和取消不能同时进行!', 2000)
                     }
                 } else {
-                    console.info(this.selectName)
                     if (tempArray2.length == 0) {// 批量取认领
-                        this.claim = true
+                        // this.claim = true
                         this.attention(String(this.selectName), type, true, 'pi') 
                     } else if (tempArray2.length == this.selectName.length) {// 批量认领
-                        this.claim = false
+                        // this.claim = false
                         this.attention(String(this.selectName), type, false, 'pi')
                     } else {
-                        toastFn('认领和取消认领不能同时进行!', 2000)
+                        toastFn('认领和取消不能同时进行!', 2000)
                     }
                 }
             }
         },
-        guanAndren(item, type) {
-            this.attention(item, type, '')
+        guanAndren(item, type, index) {
+            if (type == 1) {
+                if (!item.claim1) {
+                    var top = 91 * (index + 1) + 'px'
+                    this.datas = item.Buyer
+                    $('.tags-box').slideToggle(function () {
+                        window.activeTags = []
+                        $('.tag-labels').empty()
+                        $('.clear-input').val('')
+                        $('.tags-list').find('.tags-item').removeClass('tags-active')
+                        $('.tag-placeholder').show()
+                    }).css({
+                        top: top,
+                        right: 0
+                    })
+                } else {
+                    this.attention(item, type, '')
+                }
+            } else {
+                this.attention(item, type, '')
+            }
         },
         caiIndus(val, index) {
             let arrIndex = this.caiIndex.indexOf(index);
@@ -833,6 +836,233 @@ var vm = new Vue({
             } else {
               return mUnit.test(m, type, lv)
             }
-        }
+        },
+        initCollectEvent () {
+            const _this = this
+            // 自定义标签
+            // 标签输入框事件
+            $('.tags-box').click(function (e) {
+              e.stopPropagation()
+            })
+      
+            $('.tag-input').click(function (e) {
+              e.stopPropagation()
+              $(this).children('.tag-placeholder').hide()
+              $(this).children('input').focus()
+            })
+            // 标签输入框回车事件
+            $('.tag-input .clear-input').keydown(function (event) {
+              event.stopPropagation()
+              if (event.keyCode == 13) {
+                if (!$('.tags-box').is(':hidden')) {
+                  $('.tags-inputs .add-tag-button').trigger('click')
+                }
+              }
+            })
+            // 标签输入框失去焦点事件
+            $('.tag-input .clear-input').blur(function () {
+              if ($('.tag-labels').children().length == 0 && $(this).val() == '') {
+                $('.tag-placeholder').show()
+              }
+            })
+            // 添加标签按钮事件
+            $('.tags-inputs .add-tag-button').on('click', function () {
+              var input = $('.tag-input .clear-input')
+              if (input.val().length >= 2 && input.val().length < 6) {
+                // ajax提交自定义标签
+                addTagsAjax(input.val())
+              }
+            })
+            // 点击确定按钮,绑定标签
+            $('.tags-footer .button-confirm').on('click', function () {
+              if (!$('.tags-box').is(':hidden')) {
+                var lids = ''
+                var lname = ''
+                $('.tags-item.tags-active').each(function () {
+                  if ($(this).attr('data-id')) {
+                    if (lids != '') {
+                      lids += ','
+                    }
+                    if (lname != '') {
+                      lname += ','
+                    }
+                    lids += $(this).attr('data-id')
+                    lname += $(this).text()
+                  }
+                })
+                var params = {
+                  name: _this.datas,
+                  mold: 1,
+                  D: false,
+                  label: lids
+                }
+                // 执行保存绑定标签操作
+                // if (params.label !== '') {
+                  saveChooseTags(params, function () {
+                    $('.tags-footer .button-cancel').trigger('click')
+                  })
+                // }
+              }
+            })
+      
+            $('.tags-footer .button-cancel').on('click', function () {
+              $('.tags-box').slideToggle(function () {
+                // 标签弹框消失时 清除上次选择的标签分类
+                activeTags = []
+                $('.tag-labels').empty()
+                $('.clear-input').val('')
+                $('.tags-list').find('.tags-item').removeClass('tags-active')
+                $('.tag-placeholder').show()
+              })
+            })
+      
+            window.activeTags = [] // 选中的自定义标签 作为全局变量使用
+            // 解绑自定义标签
+            function deleteInputTag (item) {
+              var index = $(item).parent().attr('data-index')
+              var id = $(item).parent().attr('data-id')
+              activeTags.splice(index, 1)
+              inputTagList()
+              $('.tags-item[data-id="' + id + '"]').removeClass('tags-active')
+            }
+      
+            window.deleteInputTag = deleteInputTag
+      
+            function inputTagList () {
+              var ht = ''
+              $('.tag-labels').html(ht)
+              activeTags.forEach(function (v, i) {
+                ht += '<span class="tag-label" data-index=' + i + ' data-id="' + v.lid + '">'
+                ht += '<em>' + v.lname + '</em>'
+                ht += '<i class="tag-close" onclick="deleteInputTag(this)"></i>'
+                ht += '</span>'
+              })
+              $('.tag-labels').html(ht)
+              if ($('.tag-labels').children('.tag-label').length > 0) {
+                $('.tag-placeholder').hide()
+              }
+              checkTagDisabled()
+            }
+      
+            // 渲染标签列表数据
+            function renderTagsList (data) {
+              if (data && data.length > 0) {
+                var ht = ''
+                data.forEach(function (v, i) {
+                  ht += '<span class="tags-item" data-count=' + v.count + ' data-id=' + v.lid + '>' + v.lanme + '</span>'
+                })
+                $('.tags-list').html(ht)
+                activeTags.forEach(function (s, j) {
+                  $('.tags-list .tags-item[data-id="' + s.lid + '"]').addClass('tags-active')
+                })
+                $('.tags-item').click(function (e) {
+                  e.stopPropagation()
+                  if ($(this).hasClass('disabled')) return
+                  var id = $(this).attr('data-id')
+                  var name = $(this).text()
+                  $(this).toggleClass('tags-active')
+                  if ($(this).hasClass('tags-active')) {
+                    activeTags.push({
+                      lid: id,
+                      lname: name
+                    })
+                    inputTagList()
+                  } else {
+                    var newArr = activeTags.filter(function (item) {
+                      return item.lid != id
+                    })
+                    activeTags = newArr
+                    inputTagList()
+                  }
+                })
+              }
+              inputTagList()
+            }
+      
+            // 获取用户自定义标签
+            function getUserTags () {
+              $.ajax({
+                type: 'post',
+                url: '/entnicheNew/customer/getLabel?t=' + Date.now(),
+                success: function (r) {
+                  if (r.error_code == 0 && $.isArray(r.data)) {
+                    renderTagsList(r.data.reverse())
+                  }
+                }
+              })
+            }
+      
+            window.getUserTags = getUserTags
+            // 添加标签后认领接口
+            function saveChooseTags (params, callback) {
+              $.ajax({
+                type: 'post',
+                url: '/entnicheNew/customer/attention',
+                contentType: 'application/json',
+                data: JSON.stringify(params),
+                dataType: 'json',
+                success: function (r) {
+                  if (r.error_code == 0 && r.data) {
+                    $('.tags-box').slideToggle()
+                    _this.getList(_this.listState.pageNum)
+                    _this.$toast('认领成功!')
+                    _this.$emit('updatelist', true)
+                    callback && callback()
+                  } else {
+                    if (r.error_msg) {
+                        toastFn(r.error_msg, 2000)
+                    }
+                  }
+                }
+              })
+            }
+      
+            // 新增标签
+            function addTagsAjax (name) {
+              $.ajax({
+                type: 'post',
+                url: '/entnicheNew/customer/addLabel',
+                data: {
+                  name: name
+                },
+                dataType: 'json',
+                success: function (r) {
+                  if (r.data) {
+                    $('.tag-input .clear-input').val('')
+                    // 添加标签成功后 绑定标签
+                    if (activeTags.length < 3) {
+                      activeTags.push({
+                        lid: r.data,
+                        lname: name
+                      })
+                    }
+                    getUserTags()
+                  } else {
+                    toastFn('标签已经存在,无需添加', 1000)
+                  }
+                }
+              })
+            }
+      
+            function checkTagDisabled () {
+              if (activeTags.length >= 3) {
+                // 禁用标签
+                $('.tags-list').find('.tags-item:not(.tags-active)').addClass('disabled')
+              } else {
+                // 解除禁用
+                $('.tags-list').find('.disabled').removeClass('disabled')
+              }
+            }
+      
+            function baiduEvent (str) {
+              try {
+                // eslint-disable-next-line no-undef
+                _hmt.push(['_trackEvent', '大会员-pc', 'click', str])
+              } catch (e) {
+                console.log('未初始化百度统计')
+              }
+            }
+            getUserTags()
+          }
     }
 })

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 1 - 1
src/web/staticres/pccss/pc-detail.css


+ 225 - 16
src/web/templates/pc/biddetail_rec.html

@@ -100,11 +100,10 @@
 			<div class="com-title" id="com-title">
 				<!--			<span style="border-bottom:1px solid #2cb7ca">{{.T.obj.title}}</span>-->
 				{{.T.obj.title}}
-
 			</div>
 			<div class="com-statusbar" id="statusbar">
 				<!-- 自定义标签弹框 -->
-				<div class="tags-box">
+				<div class="tags-box" id="collectTags">
 					<div class="tags-inputs">
 						<div class="tag-input">
 							<div class="tag-labels"></div>
@@ -172,7 +171,7 @@
 									toastFn('收藏成功')
 									$('#bidCollected').show()
 									$('#bidCollect').hide()
-									$('.tags-box').show().css('top', top)
+									$('#collectTags.tags-box').show().css({'top': top, 'right' : 0, 'left':'unset'})
 									getUserTags()
 								} else {
 									toastFn(r.error_msg)
@@ -194,44 +193,44 @@
 						})
 					})
 					// 标签输入框事件
-					$('.tags-box').click(function(e) {
+					$('#collectTags.tags-box').click(function(e) {
 						e.stopPropagation()
 					})
 
-					$('.tag-input').click(function(e) {
+					$('#collectTags .tag-input').click(function(e) {
 						e.stopPropagation()
 						$(this).children('.tag-placeholder').hide()
 						$(this).children('input').focus()
 					})
 					// 标签输入框回车事件
-					$('.tag-input .clear-input').keydown(function(event){
+					$('#collectTags .tag-input .clear-input').keydown(function(event){
 						event.stopPropagation()
 						if (event.keyCode == 13) {
 							if (!$('.tags-box').is(':hidden')) {
-								$('.tags-inputs .add-tag-button').trigger('click')
+								$('#collectTags .tags-inputs .add-tag-button').trigger('click')
 							}
 						}
 					})
 					// 添加标签按钮事件
-					$('.tags-inputs .add-tag-button').on('click', function () {
-						var input = $('.tag-input .clear-input')
+					$('#collectTags .tags-inputs .add-tag-button').on('click', function () {
+						var input = $('#collectTags .tag-input .clear-input')
 						if(input.val().length >= 2 && input.val().length < 6) {
 							// ajax提交自定义标签
 							addTagsAjax(input.val())
 						}
 					})
 					// 标签输入框失去焦点事件
-					$('.tag-input .clear-input').blur(function() {
+					$('#collectTags .tag-input .clear-input').blur(function() {
 						if($('.tag-labels').children().length == 0 && $(this).val() == '') {
 							$('.tag-placeholder').show()
 						}
 					})
 					// 点击确定按钮,绑定标签
-					$('.tags-footer .button-confirm').on('click', function () {
-						if (!$('.tags-box').is(':hidden')){
+					$('#collectTags .tags-footer .button-confirm').on('click', function () {
+						if (!$('#collectTags.tags-box').is(':hidden')){
 							var lids = ""
 							var lname = ""
-							$('.tags-item.tags-active').each(function() {
+							$('#collectTags .tags-item.tags-active').each(function() {
 								if ($(this).attr('data-id')){
 									if(lids != ""){
 										lids += ",";
@@ -253,12 +252,12 @@
 							// 执行保存绑定标签操作
 							if (params.lids !== '') {
 								saveChooseTags(params, function () {
-									$('.tags-footer .button-cancel').trigger('click')
+									$('#collectTags .tags-footer .button-cancel').trigger('click')
 								})
 							}
 						}
 					})
-					$('.tags-footer .button-cancel').on('click', function () {
+					$('#collectTags .tags-footer .button-cancel').on('click', function () {
 						$('.tags-box').hide(function() {
 							// 标签弹框消失时 清除上次选择的标签分类
 							activeTags = []
@@ -339,7 +338,72 @@
 						}
 					})
 				</script>
+        {{else if .T.isEntnicheNew }}
+        <!-- 新商机管理关注项目 -->
+          <span class="com-guanzhu" id="followedProject" style="display: none">
+            <img class="icon-title-img" src="{{Msg "seo" "cdn"}}/images/focused.png">
+                      <font>已关注</font>
+          </span>
+           <span class="com-guanzhu" id="unfollowedProject" style="display: none;cursor: pointer;">
+            <img class="icon-title-img" src="{{Msg "seo" "cdn"}}/images/focus.png">
+                      <font>关注项目</font>
+          </span>
 
+        <script>
+          $(function(){
+            var followProjectId = ""
+            var doReq = false
+
+            $.post("/entnicheNew/follow/project/check",{sid:{{.T.obj._id}}},function(res){
+              if(res.data.showFollow){
+                if( res.data.flag ){
+                  //已关注
+                  $("#followedProject").css("display","")
+                }else {
+                  //未关注
+                  $("#unfollowedProject").css("display","")
+                }
+                followProjectId= res.data.fig
+                //取消关注
+                $("#followedProject").on("click",cancelFollow)
+                //关注
+                $("#unfollowedProject").on("click",addFollow)
+              } else {
+                $('.bid_dev').hide()
+              }
+            });
+            function cancelFollow() {
+              if (followProjectId ===""||doReq){
+                return
+              }
+              doReq = true
+              $.post("/entnicheNew/follow/project/cance",{fid:followProjectId},function(r){
+                if (r.data === "success"){
+                  followProjectId= ""
+                  $("#followedProject").css("display","none")
+                  $("#unfollowedProject").css("display","")
+                }
+                doReq =	false
+              });
+            }
+            function addFollow() {
+              if (doReq){
+                return
+              }
+              doReq = true
+              $.post("/entnicheNew/follow/project/add",{sid:{{.T.obj._id}}},function(r){
+                if(r.error_code===0&&r.data!==""){
+                  followProjectId = r.data
+                  $("#unfollowedProject").css("display","none")
+                  $("#followedProject").css("display","")
+                } else {
+                  EasyAlert.show(r.error_msg, { 'max-width': 'unset' }, 1500);
+                }
+                doReq =	false
+              });
+            }
+          })
+        </script>
 				{{else}}
 				<!--非大会员用户,只能扫码跳转微信关注项目 -->
 				<span class="com-guanzhu">
@@ -636,7 +700,11 @@
 									  <div class="cont-cont portrait_img" href-data="/swordfish/page_big_pc/unit_portrayal/{{.T.obj.buyer}}" tip-data="查看采购单位画像">{{.T.obj.buyer}} </div>
 									  {{end}}
                     <div class="cont-recy" onclick="recoveryerr(this,'buyer','')">纠错</div>
+                    {{if .T.isEntnicheNew}}
+                    <div class="claim">{{if .T.obj.buyer}}认领{{end}}</div>
+                    {{else}}
                     <div class="portrait_img only-text">{{if .T.obj.buyer}}立即查看{{end}}</div>
+                    {{end}}
                     <div style="display:none;"></div>
 									{{else}}
 									<el-popover
@@ -1157,6 +1225,22 @@
 				}
 			</script>
 		</div>
+    <!-- 商机管理认领-自定义标签弹框 -->
+    <div class="tags-box" id="entNicheTags">
+      <div class="tags-inputs">
+        <div class="tag-input">
+          <div class="tag-labels"></div>
+          <input type="text" class="clear-input" maxlength="5" oninput="this.value=this.value.replace(/\s+/g,'')">
+          <div class="tag-placeholder">新增标签回车保存</div>
+        </div>
+        <div class="add-tag-button">添加并使用</div>
+      </div>
+      <div class="tags-list clearfix"></div>
+      <div class="tags-footer">
+        <div class="tags-button button-confirm">确认添加</div>
+        <div class="tags-button button-cancel">暂不添加</div>
+      </div>
+    </div>
 	</div>
 	<div id="popup" class="pop-up poperr">
 		<div class="pop-head" id="pop-head">
@@ -1200,7 +1284,8 @@ var ucbs_source="pc_rec",ucbsId="{{.T.obj.ucbsId}}";
 	<script src=//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js></script>
 	<script src="{{Msg "seo" "cdn"}}/js/pc-collect-bid-info.js?v={{Msg "seo" "version"}}"></script>
 	<script src="{{Msg "seo" "cdn"}}/js/pc-collect-user-info.js?v={{Msg "seo" "version"}}"></script>
-	<script>
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/pc_entniche_tags.js?v={{Msg "seo" "version"}}"></script>
+  <script>
     console.log({{.T.isEntnicheNew}})
 		// 广告点击事件
 		var IframeOnClick = {
@@ -3680,7 +3765,131 @@ function fromwhere(text){
 		  $('.super-vip-show').hide()
 	  }
   }
+  var isEntnicheNew = {{.T.isEntnicheNew}}
+  var isHasBuyer = {{.T.obj.buyer}}
+  console.log(isEntnicheNew, isHasBuyer)
+  // 新商机管理用户是否认领该采购单位
+  function getClaimStatus() {
+    if (!isEntnicheNew || !isHasBuyer) return
+    var params = {
+      names:{{.T.obj.buyer}}
+    }
+    $.ajax({
+      type:'post',
+      url:'/entnicheNew/customer/claimcheck',
+      contentType: "application/json",
+      data: JSON.stringify(params),
+      success: function(res){
+        if (res.data) {
+          if (res.data.iscoll) {
+            $('.claim').addClass('claim-yes').removeClass('claim-no').text('已认领')
+            // 认领
+            $('.claim-yes').unbind('click').click(function() {
+              cancelClaim()
+            })
+          } else {
+            $('.claim').addClass('claim-no').removeClass('claim-yes').text('认领')
+            // 认领
+            $('.claim-no').unbind('click').click(function(e) {
+              var top = e.target.offsetParent.offsetTop + 50
+              var left = e.target.offsetLeft
+              $('#entNicheTags.tags-box').show().css({'top': top, 'left': left})
+              geEntNicheUserTags()
+              // 点击确定按钮,绑定标签
+              $('#entNicheTags .tags-footer .button-confirm').on('click', function () {
+                if (!$('#entNicheTags.tags-box').is(':hidden')){
+                  var lids = ""
+                  var lname = ""
+                  $('#entNicheTags .tags-item.tags-active').each(function() {
+                    if ($(this).attr('data-id')){
+                      if(lids != ""){
+                        lids += ",";
+                      }
+                      if(lname != "") {
+                        lname+= ",";
+                      }
+                      lids += $(this).attr('data-id');
+                      lname += $(this).text()
+                    }
+                  })
+                  let lidArr = []
+                  activeTags.forEach(v => {
+                    lidArr.push(v.lid)
+                  })
+                  var params = {
+                    name: {{.T.obj.buyer}},
+                    mold: 1,
+                    D: false,
+                    label: lidArr.toString()
+                  }
+                  console.log(params)
+                  // 执行保存绑定标签操作
+                  if (params.name !== '') {
+                    confirmClaim(params, function(res) {
+                        if (res.data) {
+                          toastFn('认领成功', 1000)
+                          $('.claim').addClass('claim-yes').removeClass('claim-no').text('已认领')
+                          getClaimStatus()
+                        } else {
+                          toastFn(res.error_msg)
+                        }
+                      $('#entNicheTags .tags-footer .button-cancel').trigger('click')
+                    })
+                  }
+                }
+              })
+              // confirmClaim()
+            })
+          }
+        }
+      }
+    })
+  }
+  // 新商机管理-认领采购单位
+  function confirmClaim (params, callback) {
+    if (!isEntnicheNew || !isHasBuyer) return
+    $.ajax({
+      type:'post',
+      url:'/entnicheNew/customer/attention',
+      contentType: "application/json",
+      data: JSON.stringify(params),
+      success: function(res){
+        if (res.error_code == 0) {
+          callback && callback(res)
+        } else {
+          console.log(res.error_msg)
+        }
+      }
+    })
+  }
+  // 新商机管理-取消认领采购单位
+  function cancelClaim() {
+    if (!isEntnicheNew || !isHasBuyer) return
+    var params = {
+      name:{{.T.obj.buyer}},
+      mold: 1,
+      D: true, // false:认领 true:取消认领
+    }
+    $.ajax({
+      type:'post',
+      url:'/entnicheNew/customer/attention',
+      contentType: "application/json",
+      data: JSON.stringify(params),
+      success: function(res){
+        if (res.error_code == 0) {
+          if (res.data) {
+            toastFn('已取消认领', 1000)
+            $('.claim').addClass('claim-no').removeClass('claim-yes').text('认领')
+            getClaimStatus()
+          } else {
+            toastFn(res.error_msg)
+          }
+        }
+      }
+    })
+  }
   $(function() {
+    getClaimStatus()
     getFileData();
     // 定时取login.js里isAdd接口返回的用户身份(暴露给window变量) 取到清除定时器
     var timer = null

+ 4 - 1
src/web/templates/pc/entsearchindex.html

@@ -125,6 +125,9 @@
                 top: 5px;
                 opacity: 0;
             }
+            .tab-cgdw {
+                display: none;
+            }
         </style>
 	</head>
 
@@ -181,7 +184,7 @@
                         <el-tabs v-model="tabActive">
                             <el-tab-pane label="招标搜索" name="zb"></el-tab-pane>
                             <el-tab-pane label="企业搜索" name="qy"></el-tab-pane>
-                            <el-tab-pane label="采购单位搜索" name="cgdw" v-show="industryShow"></el-tab-pane>
+                            <el-tab-pane label="采购单位搜索" name="cgdw"></el-tab-pane>
                         </el-tabs>
                     </div>
                 </div>

+ 1 - 1
src/web/templates/pc/purScopebusniess.html

@@ -114,7 +114,7 @@
                 </div>
                 <div>
                   <div class="reset-tips">新增的关键词设置,将在登出时还原</div>
-                  <button type="button" class="save-btn" @click="saveSetting"><a href="/jylab/purSearch/index.html">保存设置</a></button>
+                  <button type="button" class="save-btn" @click="saveSetting">保存设置</button>
                 </div>
             </div>
         </div>

+ 2 - 215
src/web/templates/pc/pursearchindex.html

@@ -222,7 +222,7 @@
                                     <div class="img-tit" @click="goTitle(item.Buyer)">${item.Buyer}</div>
                                 </div>
                                 <div class="r-cont">
-                                    <div class="img-c" @click="guanAndren(item, 0)">
+                                    <div class="img-c" @click="guanAndren(item, 0, index)">
                                         <img src='{{Msg "seo" "cdn"}}/images/focused.png' v-if="item.follow1">
                                         <img src='{{Msg "seo" "cdn"}}/images/focus.png' v-else>
                                         <i v-if="item.follow1">已关注</i>
@@ -316,220 +316,7 @@
                     $('.bus-card').find('.right_msg').css('height','22px')
                 }
             })
-            // 自定义标签
-            // 标签输入框事件
-            $('.tags-box').click(function(e) {
-                e.stopPropagation()
-            })
-
-            $('.tag-input').click(function(e) {
-                e.stopPropagation()
-                $(this).children('.tag-placeholder').hide()
-                $(this).children('input').focus()
-            })
-            // 标签输入框回车事件
-            $('.tag-input .clear-input').keydown(function(event){
-                event.stopPropagation()
-                if (event.keyCode == 13) {
-                    if (!$('.tags-box').is(':hidden')) {
-                        $('.tags-inputs .add-tag-button').trigger('click')
-                    }
-                }
-            })
-            // 标签输入框失去焦点事件
-            $('.tag-input .clear-input').blur(function() {
-                if($('.tag-labels').children().length == 0 && $(this).val() == '') {
-                    $('.tag-placeholder').show()
-                }
-            })
-            // 添加标签按钮事件
-            $('.tags-inputs .add-tag-button').on('click', function () {
-                var input = $('.tag-input .clear-input')
-                if(input.val().length >= 2 && input.val().length < 6) {
-                    // ajax提交自定义标签
-                    addTagsAjax(input.val())
-                }
-            })
-            // 点击确定按钮,绑定标签
-            $('.tags-footer .button-confirm').on('click', function () {
-                if (!$('.tags-box').is(':hidden')){
-                var lids = ""
-                var lname = ""
-                $('.tags-item.tags-active').each(function() {
-                    if ($(this).attr('data-id')){
-                        if(lids != ""){
-                            lids += ",";
-                        }
-                        if(lname != "") {
-                            lname+= ",";
-                        }
-                        lids += $(this).attr('data-id');
-                        lname += $(this).text()
-                    }
-                })
-                var params = {
-                    lids: lids,
-                    laction: 'S',
-                    binfo: JSON.parse(sessionStorage.getItem('$save-tags-binfo'))
-                }
-
-                // 执行保存绑定标签操作
-                if (params.lids !== '') {
-                    saveChooseTags(params, function () {
-                    $('.tags-footer .button-cancel').trigger('click')
-                    })
-                }
-                }
-            })
-
-            $('.tags-footer .button-cancel').on('click', function () {
-                $('.tags-box').hide(function() {
-                // 标签弹框消失时 清除上次选择的标签分类
-                activeTags = []
-                $('.tag-labels').empty()
-                $('.clear-input').val('')
-                $('.tags-list').find('.tags-item').removeClass('tags-active')
-                $('.tag-placeholder').show()
-                })
-            })
-            var activeTags = []; //选中的自定义标签 作为全局变量使用
-            // 解绑自定义标签
-            function deleteInputTag(item) {
-                var index = $(item).parent().attr('data-index')
-                var id = $(item).parent().attr('data-id')
-                activeTags.splice(index, 1)
-                inputTagList()
-                $('.tags-item[data-id="' + id + '"]').removeClass('tags-active')
-            }
-
-            function inputTagList () {
-                var ht = '';
-                $('.tag-labels').html(ht)
-                activeTags.forEach(function(v,i) {
-                    ht+='<span class="tag-label" data-index=' + i + ' data-id="' + v.lid + '">'
-                    ht+='<em>'+ v.lname + '</em>'
-                    ht+='<i class="tag-close" onclick="deleteInputTag(this)"></i>'
-                    ht+='</span>'
-                });
-                $('.tag-labels').html(ht)
-                if ($('.tag-labels').children('.tag-label').length > 0) {
-                    $('.tag-placeholder').hide()
-                }
-                checkTagDisabled()
-            }
-            // 渲染标签列表数据
-            function renderTagsList (data) {
-                if (data && data.length > 0) {
-                    var ht = '';
-                    data.forEach(function(v,i) {
-                        ht+='<span class="tags-item" data-count=' + v.count + ' data-id=' + v.lid + '>'+ v.lanme +'</span>'
-                    });
-                    $(".tags-list").html(ht)
-                    activeTags.forEach(function(s,j){
-                        $('.tags-list .tags-item[data-id="' + s.lid +  '"]').addClass('tags-active')
-                    })
-                    $('.tags-item').click(function(e) {
-                        e.stopPropagation()
-                        if ($(this).hasClass('disabled')) return
-                        var id = $(this).attr('data-id');
-                        var name = $(this).text()
-                        $(this).toggleClass('tags-active')
-                        if ($(this).hasClass('tags-active')) {
-                            activeTags.push({
-                                lid: id,
-                                lname: name
-                            })
-                            inputTagList ()
-                        } else {
-                            var newArr = activeTags.filter(function(item) {
-                                return item.lid != id
-                            })
-                            activeTags = newArr
-                            // console.log(activeTags,newArr, 'quxiao')
-                            inputTagList ()
-                        }
-
-                    })
-                }
-                inputTagList()
-            }
-            // 获取用户自定义标签
-            function getUserTags () {
-                $.ajax({
-                    type:'post',
-                    url:'/publicapply/bidcoll/getLabel?t=' + Date.now(),
-                    success: function(r){
-                    if (r.error_code == 0 && $.isArray(r.data)) {
-                        renderTagsList(r.data.reverse())
-                    }
-                    }
-                })
-            }
-            /*
-            保存或清除标签 ajax
-            params: {
-                lids: String 标签id(加密后),  非必传
-                lname: String 标签名称,  非必传
-                laction: String  用户行为:S添加或绑定标签;D删除标签  非必传
-                binfo: Array 招标信息数组(已收藏的招标信息) 非必传
-                bid: String 招标信息加密后id  必传
-            }
-            1:lids为空;lname不为空;laction=”S”;binfo数组不为空->新增标签并且绑定收藏信息
-            2:lids不为空;laction=”S”;binfo数组不为空->收藏信息绑定标签
-            3:lids不为空;laction=”D”;->删除标签 并解绑收藏的信息
-            */
-            function saveChooseTags(params, callback) {
-                $.ajax({
-                    type:'post',
-                    url:'/publicapply/bidcoll/label',
-                    contentType: "application/json",
-                    data: JSON.stringify(params),
-                    dataType:'json',
-                    success: function(r){
-                    if (r.data) {
-                        toastFn("标签绑定成功", 1000)
-                        callback && callback()
-                    }
-                    }
-                })
-            }
-            // 新增标签
-            function addTagsAjax (name) {
-                console.info('66666666')
-                $.ajax({
-                    type:'post',
-                    url:'/publicapply/bidcoll/addLabel',
-                    data: {
-                    name: name
-                    },
-                    dataType:'json',
-                    success: function(r){
-                    if (r.data) {
-                        $('.tag-input .clear-input').val('')
-                        // 添加标签成功后 绑定标签
-                        if (activeTags.length < 3) {
-                        activeTags.push({
-                            lid: r.data,
-                            lname: name
-                        })
-                        }
-                        getUserTags()
-                    } else {
-                        // toastFn(r.error_msg, 1000)
-                        toastFn('标签已经存在,无需添加', 1000)
-                    }
-                    }
-                })
-            }
-            function checkTagDisabled () {
-                if (activeTags.length >= 3) {
-                    // 禁用标签
-                    $('.tags-list').find('.tags-item:not(.tags-active)').addClass('disabled')
-                } else {
-                    // 解除禁用
-                    $('.tags-list').find('.disabled').removeClass('disabled')
-                }
-            }
+            
         })
     </script>
     <script type="text/javascript">

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно