Parcourir la source

Merge branch 'feature/v4.7.64' of http://192.168.3.207:8080/qmx/jy into feature/v4.7.64

tsz il y a 2 ans
Parent
commit
f32b2cab88
49 fichiers modifiés avec 5293 ajouts et 1322 suppressions
  1. 58 57
      src/config.json
  2. 30 19
      src/jfw/front/dataExport.go
  3. 855 0
      src/jfw/front/searchOptimize.go
  4. 12 0
      src/jfw/front/shorturl.go
  5. 153 142
      src/jfw/front/supsearch.go
  6. 125 6
      src/jfw/front/swordfish.go
  7. 24 16
      src/jfw/front/ws_dataExport.go
  8. 15 16
      src/jfw/modules/app/src/app/front/login.go
  9. 2 1
      src/jfw/modules/app/src/app/front/swordfish.go
  10. 26 19
      src/jfw/modules/app/src/app/front/ws_dataExport.go
  11. 2 1
      src/jfw/modules/bigmember/src/config.json
  12. 1 0
      src/jfw/modules/bigmember/src/config/config.go
  13. 1 1
      src/jfw/modules/bigmember/src/service/subscribe/subscribe.go
  14. 4 4
      src/jfw/modules/bigmember/src/service/use/use.go
  15. 2 2
      src/jfw/modules/common/src/qfw/util/bidsearch/search.go
  16. 185 82
      src/jfw/modules/common/src/qfw/util/dataexport/dataexport.go
  17. 3 1
      src/jfw/modules/common/src/qfw/util/jy/bigVipPower.go
  18. 7 3
      src/jfw/modules/common/src/qfw/util/jy/jy.go
  19. 32 20
      src/jfw/modules/common/src/qfw/util/jy/payUser.go
  20. 4 2
      src/jfw/modules/publicapply/src/attachmentdow/service/service.go
  21. 250 251
      src/jfw/modules/publicapply/src/userbase/entity/entity.go
  22. 4 1
      src/jfw/modules/publicapply/src/userbase/service/service.go
  23. 47 22
      src/jfw/public/dataexport.go
  24. 465 35
      src/web/staticres/css/dev2/biddingSearch.css
  25. 21 1
      src/web/staticres/css/dev2/newBidSearch.css
  26. 5 1
      src/web/staticres/css/dev2/superSearch-inside.css
  27. 26 8
      src/web/staticres/css/dev2/superSearch.css
  28. 29 20
      src/web/staticres/css/pc/index.css
  29. BIN
      src/web/staticres/images/biddingSearch/bidding-search.png
  30. BIN
      src/web/staticres/images/biddingSearch/tab-icon5.png
  31. BIN
      src/web/staticres/images/biddingSearch/tab-icon6.png
  32. BIN
      src/web/staticres/images/pc/icon_voice.png
  33. 181 4
      src/web/staticres/js/common.js
  34. 25 4
      src/web/staticres/js/ent-search-index-pc.js
  35. 8 3
      src/web/staticres/js/login.js
  36. 1 1
      src/web/staticres/js/pc-message-index.js
  37. 18 0
      src/web/staticres/js/pur-search-index-pc.js
  38. 85 0
      src/web/staticres/js/selector/keyword-tags.js
  39. 1660 0
      src/web/staticres/js/superSearch copy.js
  40. 287 306
      src/web/staticres/js/superSearch.js
  41. 42 9
      src/web/staticres/pccss/ent-search-index-pc.css
  42. 40 7
      src/web/staticres/pccss/pur-search-index-pc.css
  43. 1 0
      src/web/staticres/public-pc/css/sub-page.css
  44. 7 6
      src/web/staticres/serviceSystem/css/serviceSystem.css
  45. 61 61
      src/web/templates/frontRouter/pc/serviceSystem/free/index.html
  46. 9 3
      src/web/templates/pc/entsearchindex.html
  47. 12 8
      src/web/templates/pc/index.html
  48. 11 5
      src/web/templates/pc/pursearchindex.html
  49. 457 174
      src/web/templates/pc/supsearch.html

+ 58 - 57
src/config.json

@@ -8,7 +8,7 @@
     "weixinrpc": "127.0.0.1:8083",
     "cacheflag": false,
     "agreement": "http",
-    "webdomain": "https://web-wky.jydev.jianyu360.com",
+    "webdomain": "https://web-ws.jydev.jianyu360.com",
     "redirect": {
         "searchinfo": "/jylab/mainSearch?msg=0",
         "rssset": "/swordfish/newhistorypush?msg=1",
@@ -233,7 +233,7 @@
         ],
         "msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d",
         "limitKey":"pc_limit_%s",
-        "noLogin":300
+        "noLogin":40
     },
     "share": {
         "forceShareEnabled": false,
@@ -334,59 +334,60 @@
 	},
 	"keywordsLimit":35,
 	"detailMosaicTxt":"略",
-    "needMosaic":{
- 		"projectname":true,
-        "projectcode":true,
-        "budget":true,
-        "bidamount":true,
-        "buyer":true,
-        "buyerperson":true,
-        "buyertel":true,
-        "buyeraddr":true,
-        "agency":true,
-        "agencyperson":true,
-        "agencytel":true,
-        "agencyaddr":true,
-        "winner":true,
-        "s_winner":true,
-        "winnerperson":true,
-        "winnertel":true,
-        "winneraddr":true,
-        "docstarttime":true,
-        "docendtime":true,
-        "bidendtime":true,
-        "bidstarttime":true,
-        "bidopentime":true,
-        "bidopenaddress":true,
-        "contractcode":true,
-        "signaturedate":true,
-        "purchasinglist":true,
-        "item":true,
-        "purchasing":true,
-        "itemname":true,
-        "brandname":true,
-        "specs":true,
-        "model":true,
-        "unitname":true,
-        "dimensions":true,
-        "number":true,
-        "unitprice":true,
-        "totalprice":true,
-        "guaranteetime":true,
-        "orderno":true,
-        "procurementlist":true,
-        "projectscope":true,
-        "reserved_amount":true,
-        "expurasingtime":true,
-        "winnerMap":true
-    },
-    "keywordsLimitNologin":25,
-	"messageCenter": {
-		"appid": "10000",
-        "dbName": "messagetest",
-        "interval": 300,
-        "createtime": "2023-01-04 00:00:00",
-        "limitDay": 7,
-        "limitCount": 3
-    }
+  "needMosaic":{
+  "projectname":true,
+      "projectcode":true,
+      "budget":true,
+      "bidamount":true,
+      "buyer":true,
+      "buyerperson":true,
+      "buyertel":true,
+      "buyeraddr":true,
+      "agency":true,
+      "agencyperson":true,
+      "agencytel":true,
+      "agencyaddr":true,
+      "winner":true,
+      "s_winner":true,
+      "winnerperson":true,
+      "winnertel":true,
+      "winneraddr":true,
+      "docstarttime":true,
+      "docendtime":true,
+      "bidendtime":true,
+      "bidstarttime":true,
+      "bidopentime":true,
+      "bidopenaddress":true,
+      "contractcode":true,
+      "signaturedate":true,
+      "purchasinglist":true,
+      "item":true,
+      "purchasing":true,
+      "itemname":true,
+      "brandname":true,
+      "specs":true,
+      "model":true,
+      "unitname":true,
+      "dimensions":true,
+      "number":true,
+      "unitprice":true,
+      "totalprice":true,
+      "guaranteetime":true,
+      "orderno":true,
+      "procurementlist":true,
+      "projectscope":true,
+      "reserved_amount":true,
+      "expurasingtime":true,
+      "winnerMap":true
+  },
+  "keywordsLimitNologin":25,
+  "messageCenter": {
+    "appid": "10000",
+    "dbName": "messagetest",
+    "interval": 300,
+    "createtime": "2023-01-04 00:00:00",
+    "limitDay": 7,
+    "limitCount": 3
+  },
+  "workDesktopUrl":"/page_workDesktop/work-bench/page?aside=0&link="
 }

+ 30 - 19
src/jfw/front/dataExport.go

@@ -384,30 +384,38 @@ func (d *DataExport) GetOrderCode(order_code string) error {
 func (d *DataExport) SuperSearchExport() error {
 	openid := util.ObjToString(d.GetSession("s_m_openid"))
 	userId := util.ObjToString(d.GetSession("userId"))
+	searchGroup, _ := d.GetInteger("searchGroup")
+	searchMode, _ := d.GetInteger("searchMode")
+	wordsMode, _ := d.GetInteger("wordsMode")
+
 	if userId == "" {
 		return errors.New("未登录")
 	}
 	//接收超级搜索页面参数
 	reqData := public.BidSearchExport{
-		Keywords:     d.GetString("keywords"),                     //搜索词
-		Publishtime:  d.GetString("publishtime"),                  //发布时间
-		Area:         d.GetString("area"),                         //地区
-		Subtype:      d.GetString("subtype"),                      //信息类型
-		Minprice:     d.GetString("minprice"),                     //最低价格
-		Maxprice:     d.GetString("maxprice"),                     //最高价格
-		Industry:     strings.TrimSpace(d.GetString("industry")),  //选中的行业
-		SelectType:   d.GetString("selectType"),                   //标题 or 全文
-		Buyerclass:   d.GetString("buyerclass"),                   //采购单位行业
-		Hasbuyertel:  d.GetString("buyertel"),                     //是否有采购电话
-		Haswinnertel: d.GetString("winnertel"),                    //是否有中标电话
-		SelectIds:    strings.TrimSpace(d.GetString("selectIds")), //选择信息id
-		Notkey:       d.GetString("notkey"),                       //排除词
-		FileExists:   d.GetString("fileExists"),                   //是否有附件
-		City:         d.GetString("city"),                         //城市
-		BidField:     d.GetString("bid_field"),                    // 领域数据类型 0101- 医疗行业
-
+		Keywords:        d.GetString("keywords"),                     //搜索词
+		Publishtime:     d.GetString("publishtime"),                  //发布时间
+		Area:            d.GetString("area"),                         //地区
+		Subtype:         d.GetString("subtype"),                      //信息类型
+		Minprice:        d.GetString("minprice"),                     //最低价格
+		Maxprice:        d.GetString("maxprice"),                     //最高价格
+		Industry:        strings.TrimSpace(d.GetString("industry")),  //选中的行业
+		SelectType:      d.GetString("selectType"),                   //标题 or 全文
+		Buyerclass:      d.GetString("buyerclass"),                   //采购单位行业
+		Hasbuyertel:     d.GetString("buyertel"),                     //是否有采购电话
+		Haswinnertel:    d.GetString("winnertel"),                    //是否有中标电话
+		SelectIds:       strings.TrimSpace(d.GetString("selectIds")), //选择信息id
+		Notkey:          d.GetString("notkey"),                       //排除词
+		FileExists:      d.GetString("fileExists"),                   //是否有附件
+		City:            d.GetString("city"),                         //城市
+		BidField:        d.GetString("bid_field"),                    // 领域数据类型 0101- 医疗行业
+		SearchGroup:     searchGroup,                                 //搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+		SearchMode:      searchMode,                                  //搜索模式:0:精准搜索;1:模糊搜索
+		WordsMode:       wordsMode,                                   //搜索关键词模式;默认0:包含所有,1:包含任意
+		AdditionalWords: d.GetString("additionalWords"),              //关键词:附加关键词(副:五组,每组最多15个字符)
 	}
-	selectType := strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).GetQueryItems(d.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
+	entId := util.IntAll(d.GetSession("entId"))
+	selectType := strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId, entId).GetQueryItems(d.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
 	//数据回显
 	d.SetSession("Echo_timeslot", d.GetString("timeslot"))
 	d.SetSession("Echo_keywords", reqData.Keywords)
@@ -425,7 +433,10 @@ func (d *DataExport) SuperSearchExport() error {
 	d.SetSession("Echo_fileExists", reqData.FileExists)
 	d.SetSession("Echo_city", reqData.City)
 	d.SetSession("Echo_bid_field", reqData.BidField) // 领域类型 0101-医疗行业
-
+	d.SetSession("Echo_searchGroup", reqData.SearchGroup)
+	d.SetSession("Echo_searchMode", reqData.SearchMode)
+	d.SetSession("Echo_wordsMode", reqData.WordsMode)
+	d.SetSession("Echo_additionalWords", reqData.AdditionalWords)
 	saveData := reqData.PassBidSearchExport()
 	saveData["selectType"] = selectType
 	saveData["s_openid"] = openid

+ 855 - 0
src/jfw/front/searchOptimize.go

@@ -0,0 +1,855 @@
+package front
+
+import (
+	"encoding/json"
+	"fmt"
+	"jfw/config"
+	"jfw/public"
+	"log"
+	"qfw/util"
+	"qfw/util/bidsearch"
+	"qfw/util/elastic"
+	"qfw/util/jy"
+	"qfw/util/redis"
+	"strconv"
+	"strings"
+	"time"
+)
+
+const (
+	multiMatch              = `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
+	query                   = `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
+	queryBoolShould         = `{"bool":{"should":[%s],"minimum_should_match": 1}}`
+	queryBoolMustBoolShould = `{"bool":{"must":[{"range":{"bidamount":{%s}}}]}},{"bool":{"must":[{"range":{"budget":{%s}}}],"must_not":[{"range":{"bidamount":{"gte":-1}}}]}}`
+	queryBoolMust           = `{"bool":{"must":[{"terms":{"s_subscopeclass":[%s]}}]}}`
+	queryBoolMustTerm       = `{"bool": {"must": [{ "term": {"isValidFile": %d }}]}}`
+	queryMissing            = `{"constant_score":{"filter":{"missing":{"field":"%s"}}}}`
+	gte                     = `"gte": %s`
+	lte                     = `"lte": %s`
+	HighlightStr            = `"%s": {"fragment_size": %d,"number_of_fragments": 1}`
+	HL                      = `"highlight": {"pre_tags": [""],"post_tags": [""],"fields": {%s}}`
+	BidSearchSort           = `{"dataweight":-1,"publishtime":-1}`
+	queryBoolMustTermDomain = `{"bool": {"must": [{ "term": {"bid_field": "%s" }}]}}` // 领域化数据类型
+)
+
+var (
+	SR              = strings.Replace
+	DefaultTopTypes = []string{
+		"招标预告,招标公告,招标结果,招标信用信息",
+		"拟建,采购意向",
+	}
+	SearchCacheKey   = "searchDataCache_%d_%s_%s"
+	SearchCacheCount = "searchCountCache_%d_%s_%s"
+	RedisNameNew     = "newother"
+)
+
+type SearchOptimize struct {
+	AppId               string `json:"appId,omitempty"`               //剑鱼默认10000
+	UserId              string `json:"userId,omitempty"`              //用户id
+	Phone               string `json:"phone,omitempty"`               //手机号
+	NewUserId           int64  `json:"newUserId,omitempty"`           //base_user_id 新用户id
+	EntId               int64  `json:"entId,omitempty"`               //企业id 没有企业 企业id=0
+	EntUserId           int64  `json:"entUserId,omitempty"`           //企业用户id  当前企业下的员工id 没有企业默认0
+	PageNum             int    `json:"pageNum,omitempty"`             //当前页码
+	PageSize            int    `json:"pageSize,omitempty"`            //每页数量
+	Province            string `json:"province,omitempty"`            //省份
+	City                string `json:"city,omitempty"`                //城市
+	Subtype             string `json:"subtype,omitempty"`             //信息类型-二级
+	TopType             string `json:"topTypeMap,omitempty"`          //信息类型-一级分类
+	PublishTime         string `json:"publishTime,omitempty"`         //发布时间
+	SelectType          string `json:"selectType,omitempty"`          //搜索范围:标题;正文等
+	Price               string `json:"price,omitempty"`               //价格
+	Industry            string `json:"industry,omitempty"`            //行业
+	BuyerClass          string `json:"buyerClass,omitempty"`          //采购单位类型
+	BuyerTel            string `json:"buyerTel,omitempty"`            //采购单位联系方式
+	WinnerTel           string `json:"winnerTel,omitempty"`           //中标单位联系方式
+	FileExists          string `json:"fileExists,omitempty"`          //是否有附件
+	SearchGroup         int    `json:"searchGroup,omitempty"`         //搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+	SearchMode          int    `json:"searchMode,omitempty"`          //搜索模式:0:精准搜索;1:模糊搜索
+	WordsMode           int    `json:"wordsMode,omitempty"`           //搜索关键词模式;默认0:包含所有,1:包含任意
+	KeyWords            string `json:"keyWords,omitempty"`            //关键词:多个空格隔开(主)
+	AdditionalWords     string `json:"additionalWords,omitempty"`     //关键词:附加关键词(副:五组,每组最多15个字符)
+	ExclusionWords      string `json:"exclusionWords,omitempty"`      //关键词:排除词(副:五组,每组最多15个字符)
+	UserType            string `json:"userType,omitempty"`            //用户状态 fType:免费用户;pType:付费用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户
+	Platform            string `json:"platform,omitempty"`            //请求平台
+	IsPay               bool   `json:"isPay,omitempty"`               //是否是付费用户
+	InterceptKeyWords   string `json:"interceptKeyWords,omitempty"`   //关键词截取后的关键词;
+	InterceptOtherWords string `json:"interceptOtherWords,omitempty"` //关键词截取后 后面三个字
+	BidField            string `json:"bidField,omitempty"`            //领域化数据
+	SearchTypeSwitch    bool   `json:"searchTypeSwitch,omitempty"`    //标题+全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
+	IsOldVip            bool   `json:"isOldVip"`                      //超级订阅老用户 超前项目权限
+	VipStatus           int    `json:"vipStatus"`
+	BigMemberStatus     int    `json:"bigMemberStatus"`
+	EntStatus           int    `json:"entStatus"`
+	HeightKeys          string `json:"heightKeys"` //需要高亮的关键词
+}
+
+// NewSearchOptimize  初始化
+func NewSearchOptimize(userId, phone, province, city, subtype, topType, publishTime, selectType, price, industry, buyerClass, buyerTel, winnerTel, fileExists, keyWords, additionalWords, exclusionWords, platform, territorialization string, pageNum, pageSize, searchGroup, searchMode, wordsMode int, userInfo jy.VipState, searchTypeSwitch bool) *SearchOptimize {
+	var so = &SearchOptimize{
+		AppId:            "10000",
+		UserId:           userId,
+		Phone:            phone,
+		PageNum:          pageNum,
+		PageSize:         pageSize,
+		Province:         province,
+		City:             city,
+		Subtype:          subtype,
+		TopType:          topType,
+		PublishTime:      publishTime,
+		SelectType:       selectType,
+		Price:            price,
+		Industry:         industry,
+		BuyerClass:       buyerClass,
+		BuyerTel:         buyerTel,
+		WinnerTel:        winnerTel,
+		FileExists:       fileExists,
+		SearchGroup:      searchGroup,
+		SearchMode:       searchMode,
+		WordsMode:        wordsMode,
+		KeyWords:         keyWords,
+		AdditionalWords:  additionalWords,
+		ExclusionWords:   exclusionWords,
+		Platform:         platform,
+		IsPay:            userInfo.IsPayedUser(),
+		BidField:         territorialization,
+		SearchTypeSwitch: searchTypeSwitch,
+		IsOldVip:         userInfo.VipState > 0 && userInfo.RegisterData < util.Int64All(config.Sysconfig["contextOldVipLimit"]),
+		VipStatus:        userInfo.VipState,
+		BigMemberStatus:  userInfo.BigMember,
+		EntStatus:        userInfo.EntMember,
+	}
+	so.SearchParamsHandle()
+	return so
+}
+
+// DefaultSearchParamsAuto 缓存查询条件初始化
+func (so *SearchOptimize) DefaultSearchParamsAuto() {
+	so.TopType = ""
+	so.City = ""
+	so.Industry = ""
+	so.FileExists = ""
+	so.WinnerTel = ""
+	so.BuyerTel = ""
+	so.BuyerClass = ""
+	so.Price = ""
+	so.SelectType = "title"
+	so.Province = ""
+	so.KeyWords = ""
+	so.AdditionalWords = ""
+	so.ExclusionWords = ""
+}
+
+// SearchParamsHandle 搜索条件 处理
+func (so *SearchOptimize) SearchParamsHandle() {
+	// so.SearchGroup 搜索分组 搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+	if so.SearchGroup < 0 || so.SearchGroup > 2 {
+		so.SearchGroup = 1
+	}
+	//信息类型
+	if so.Subtype == "" && so.TopType == "" {
+		// 所有用户都可以搜索,判断是否能使用超前项目  老版超级订阅、大会员、商机管理有权限
+		if so.SearchGroup > 0 && len(DefaultTopTypes) >= so.SearchGroup {
+			so.Subtype = DefaultTopTypes[so.SearchGroup-1]
+		}
+	}
+	// so.SearchMode 搜索模式 搜索模式:0:精准搜索;1:模糊搜索
+	// 精准搜索:不分词,完全匹配;(中间带空格的关键词组自动分词)
+	// 模糊搜索:对用户输入的单个关键词进行分词处理,但必须都存在;
+	if so.SearchMode < 0 {
+		so.SearchMode = 0
+	}
+	// so.WordsMode 搜索关键词模式;默认0:包含所有,1:包含任意
+	if so.WordsMode < 0 {
+		so.WordsMode = 0
+	}
+	//查询时间publishTime
+	if so.PublishTime == "" {
+		//so.UserId == ""||免费用户最新1年 未登录用户默认最近一年的数据
+		so.PublishTime = fmt.Sprintf("%d_%d", time.Now().AddDate(-1, 0, 0).Unix(), time.Now().Unix())
+		//付费用户最新5年
+		if so.IsPay {
+			so.PublishTime = fmt.Sprintf("%d_%d", time.Now().AddDate(-5, 0, 0).Unix(), time.Now().Unix())
+		}
+	}
+	//默认每页数据量
+	if so.PageSize <= 0 {
+		so.PageSize = 50
+	}
+	//第一页
+	if so.PageNum <= 0 {
+		so.PageNum = 1
+	}
+	//行业格式化
+	if so.Industry != "" {
+		so.Industry = strings.TrimSpace(so.Industry)
+	}
+	//默认搜索范围
+	if so.SelectType == "" {
+		so.SelectType = "title,detail"
+	}
+	//免费用户:高级筛选 采购单位类型、采购单位联系方式、中标企业联系方式、排除词、城市
+	if !so.IsPay {
+		so.BuyerClass = ""
+		so.BuyerTel = ""
+		so.WinnerTel = ""
+		so.ExclusionWords = ""
+		so.City = ""
+		so.SearchGroup = util.If(so.SearchGroup > 1, 1, so.SearchGroup).(int) //搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+		so.ExclusionWords = ""                                                //排除词
+	}
+	//判断是否有关键词
+	if so.KeyWords != "" {
+		//关键词处理
+		so.KeyWords = strings.TrimSpace(so.KeyWords)
+	}
+	//附加词 每组附加词不能超过15个字符
+	if so.AdditionalWords != "" {
+		var additionalWords []string
+		for _, ak := range strings.Split(so.AdditionalWords, ",") {
+			if len([]rune(ak)) > 15 {
+				additionalWords = append(additionalWords, string([]rune(ak)[:15]))
+			} else {
+				additionalWords = append(additionalWords, ak)
+			}
+		}
+		so.AdditionalWords = strings.Join(additionalWords, ",")
+	}
+	//合并 关键词 & 附加词
+	so.HeightKeys = so.GetSearchKeyWordsQueryStr()
+	//排除词  每组排除词不能超过15个字符
+	if so.ExclusionWords != "" {
+		var exclusionWords []string
+		for _, ak := range strings.Split(so.ExclusionWords, ",") {
+			if len([]rune(ak)) > 15 {
+				exclusionWords = append(exclusionWords, string([]rune(ak)[:15]))
+			} else {
+				exclusionWords = append(exclusionWords, ak)
+			}
+		}
+		so.ExclusionWords = strings.Join(exclusionWords, " ")
+	}
+}
+
+// GetSearchKeyWordsQueryStr 关键词处理 获取关键词查询条件
+func (so *SearchOptimize) GetSearchKeyWordsQueryStr() string {
+	// in.SearchMode 搜索模式:0:精准搜索;1:模糊搜索
+	// 精准搜索:不分词,完全匹配;(中间带空格的关键词组自动分词)
+	// 模糊搜索:对用户输入的单个关键词进行分词处理,但必须都存在;
+	var (
+		searchWords []string
+	)
+	//主关键词词组
+	if so.KeyWords != "" {
+		if so.SearchMode == 1 {
+			if ikWords := jy.HttpEs(so.KeyWords, "ik_smart", public.DbConf.Elasticsearch.Main.Address); ikWords != "" {
+				so.KeyWords = strings.ReplaceAll(ikWords, "+", " ")
+			}
+		}
+		searchWords = append(searchWords, so.KeyWords)
+	}
+	//多组附加词,每组间,号隔开。每组内如果关键词中间有空格,自动分词
+	if so.AdditionalWords != "" {
+		if so.SearchMode == 1 {
+			var (
+				addWords []string
+			)
+			for _, awv := range strings.Split(so.AdditionalWords, ",") {
+				if ikWords := jy.HttpEs(awv, "ik_smart", public.DbConf.Elasticsearch.Main.Address); ikWords != "" {
+					addWords = append(addWords, strings.ReplaceAll(ikWords, "+", " "))
+				}
+			}
+			if len(addWords) > 0 {
+				so.AdditionalWords = strings.Join(addWords, ",")
+			}
+		}
+		searchWords = append(searchWords, strings.Split(so.AdditionalWords, ",")...)
+	}
+	return strings.Join(searchWords, " ")
+}
+
+// GetBidSearchList 搜索 查询
+func (so *SearchOptimize) GetBidSearchList(isCache bool) (count, total int64, list []*map[string]interface{}) {
+	var start = (so.PageNum - 1) * so.PageSize
+	if start >= 0 {
+		t := time.Now()
+		fields := util.If(so.IsPay, BidSearchFieldOfVip, BidSearchFieldBase).(string)
+		biddingSearch := SearchByES{
+			Index:      INDEX,
+			IType:      TYPE,
+			Query:      so.GetSearchQuery(so.GetBidSearchQuery()),
+			FindFields: util.If(isCache, "title", "detail").(string),
+			Order:      BidSearchSort,
+			Fields:     util.If(so.BidField != "", BidSearchDomainField, fields).(string), //BidField ===医疗领域化数据
+			Start:      util.If(isCache, 0, start).(int),
+			Limit:      util.If(isCache, util.If(so.IsPay, bidsearch.SearchMaxPageCount_PAYED, bidsearch.SearchMaxPageCount_PC).(int), so.PageSize).(int), //缓存数据: 付费或未登录用户一次性5000条,100页数据;免费用户一次性500条,10页数据;实时数据:每页50条数据请求
+			Count:      util.If(strings.Contains(so.SelectType, "detail"), 115, 0).(int),                                                                  //高亮正文数量
+			HighLight:  util.If(strings.Contains(so.SelectType, "detail"), true, false).(bool),                                                            //是否高亮正文
+		}
+		var repl *[]map[string]interface{}
+		total, repl = biddingSearch.GetAllByNgramWithCount()
+		if repl != nil && *repl != nil && len(*repl) > 0 {
+			//格式化查询结果
+			list = SearchListFormat(so.Industry, *repl, strings.Contains(so.SelectType, "detail"))
+			count = util.If(so.IsPay, int64(bidsearch.SearchMaxPageCount_PAYED), int64(bidsearch.SearchMaxPageCount_PC)).(int64)
+			//数据如果>最大数据结果量 total==count,否则count = 付费:5000;免费:500;
+			count = util.If(count > total, total, count).(int64)
+		} else {
+			log.Println("查询数据异常")
+		}
+		log.Println("关键词 -1- 查询耗时:", time.Since(t).Seconds())
+	}
+	return
+}
+
+// GetSearchQuery  整理关键词等查询条件
+func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
+	var (
+		musts, mustNot, wordsMusts, wordsShould []string
+		findFields                              string
+		//搜索范围是否只有附件
+		//搜索范围只选择附件,是否有附件条件无效;
+		isFileSearch  = so.SelectType == "filetext"
+		selectTypeArr = strings.Split(so.SelectType, ",")
+	)
+	if mustQuery != "" {
+		musts = append(musts, mustQuery)
+	}
+	if selectTypeArr == nil || len(selectTypeArr) == 0 {
+		findFields = `"title"`
+	} else {
+		findFields = fmt.Sprintf(`"%s"`, strings.Join(selectTypeArr, "\",\""))
+	}
+	switchBool := strings.Contains(findFields, "detail") && strings.Contains(findFields, "title") && so.SearchTypeSwitch
+
+	//此时关键词中间有+进行隔离
+	if so.KeyWords != "" {
+		var (
+			keyWordsMusts []string
+		)
+		for _, v := range strings.Split(so.KeyWords, " ") {
+			if elastic.ReplaceYH(v) == "" {
+				continue
+			}
+			//单个字  搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+			if len([]rune(elastic.ReplaceYH(v))) == 1 && bidsearch.DetailFileORTitle(findFields) {
+				findFields += `,"title"`
+			} else if switchBool && len([]rune(elastic.ReplaceYH(v))) > 1 {
+				//标题 全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
+				if strings.Contains(findFields, `"title",`) {
+					findFields = strings.Replace(findFields, `"title",`, ``, -1)
+				} else if strings.Contains(findFields, `,"title"`) {
+					findFields = strings.Replace(findFields, `,"title"`, ``, -1)
+				}
+			}
+			keyWordsMusts = append(keyWordsMusts, fmt.Sprintf(fmt.Sprintf(multiMatch, "%s", findFields), elastic.ReplaceYH(v)))
+		}
+		//搜索关键词模式;默认0:包含所有,1:包含任意
+		if so.WordsMode == 1 {
+			wordsShould = append(wordsShould, fmt.Sprintf(elastic.NgramMust, strings.Join(keyWordsMusts, ",")))
+		} else {
+			wordsMusts = append(wordsMusts, keyWordsMusts...)
+		}
+	}
+	//附加词
+	if so.AdditionalWords != "" {
+		//多组附加词,每组间,号隔开。每组内如果关键词中间有空格,自动分词
+		var (
+			addWordsMusts []string
+		)
+		for _, aws := range strings.Split(so.AdditionalWords, ",") {
+			var (
+				addWordsMust []string
+			)
+			for _, v := range strings.Split(aws, " ") {
+				if elastic.ReplaceYH(v) == "" {
+					continue
+				}
+				//单个字  搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+				//detail 正文不支持单字查询
+				if len([]rune(elastic.ReplaceYH(v))) == 1 && bidsearch.DetailFileORTitle(findFields) {
+					findFields += `,"title"`
+				} else if switchBool && len([]rune(elastic.ReplaceYH(v))) > 1 {
+					//标题 全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
+					if strings.Contains(findFields, `"title",`) {
+						findFields = strings.Replace(findFields, `"title",`, ``, -1)
+					} else if strings.Contains(findFields, `,"title"`) {
+						findFields = strings.Replace(findFields, `,"title"`, ``, -1)
+					}
+				}
+				addWordsMust = append(addWordsMust, fmt.Sprintf(fmt.Sprintf(multiMatch, "%s", findFields), elastic.ReplaceYH(v)))
+				addWordsMusts = append(addWordsMusts, addWordsMust...)
+				if so.WordsMode == 0 {
+					wordsMusts = append(wordsMusts, addWordsMust...)
+				}
+				addWordsMust = []string{}
+			}
+			//搜索关键词模式;默认0:包含所有,1:包含任意
+			if so.WordsMode == 1 {
+				wordsShould = append(wordsShould, fmt.Sprintf(elastic.NgramMust, strings.Join(addWordsMusts, ",")))
+				addWordsMusts = []string{}
+			}
+		}
+	}
+	//搜索关键词模式;默认0:包含所有,1:包含任意
+	//包含任意一组
+	if len(wordsShould) > 0 {
+		musts = append(musts, fmt.Sprintf(queryBoolShould, strings.Join(wordsShould, ",")))
+	} else if len(wordsMusts) > 0 {
+		musts = append(musts, fmt.Sprintf(elastic.NgramMust, strings.Join(wordsMusts, ",")))
+	}
+	//排除词
+	if notKey := strings.TrimSpace(so.ExclusionWords); notKey != "" {
+		notKeyMultiMatch := fmt.Sprintf(multiMatch, "%s", findFields)
+		var notKeyMustNot []string
+		//多组排除词
+		for _, nks := range strings.Split(notKey, ",") {
+			//单组排除词 空格分割
+			for _, v := range strings.Split(nks, " ") {
+				v = strings.TrimSpace(v)
+				if v == "" {
+					continue
+				}
+				if len([]rune(elastic.ReplaceYH(v))) == 1 {
+					//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+					if bidsearch.DetailFileORTitle(findFields) {
+						notKeyMultiMatch = fmt.Sprintf(multiMatch, "%s", findFields+`,"title"`)
+					}
+				}
+				notKeyMustNot = append(notKeyMustNot, fmt.Sprintf(notKeyMultiMatch, elastic.ReplaceYH(v)))
+			}
+		}
+		mustNot = append(mustNot, fmt.Sprintf(queryBoolShould, strings.Join(notKeyMustNot, ",")))
+	}
+	//行业
+	if so.Industry != "" {
+		musts = append(musts, fmt.Sprintf(queryBoolMust, `"`+strings.ReplaceAll(so.Industry, ",", `","`)+`"`))
+	}
+	//价格
+	if so.Price != "" && len(strings.Split(so.Price, "-")) > 1 {
+		minPrice, maxPrice := strings.Split(so.Price, "-")[0], strings.Split(so.Price, "-")[1]
+		if minPrice != "" || maxPrice != "" {
+			sq := ``
+			if minPrice != "" {
+				min, _ := strconv.ParseFloat(minPrice, 64)
+				minPrice = fmt.Sprintf("%.0f", min*10000)
+				if minPrice == "0" {
+					minPrice = ""
+				}
+			}
+			if maxPrice != "" {
+				max, _ := strconv.ParseFloat(maxPrice, 64)
+				maxPrice = fmt.Sprintf("%.0f", max*10000)
+				if maxPrice == "0" {
+					maxPrice = ""
+				}
+			}
+			if minPrice != "" {
+				sq += fmt.Sprintf(gte, minPrice)
+			}
+			if minPrice != "" && maxPrice != "" {
+				sq += `,`
+			}
+			if maxPrice != "" {
+				sq += fmt.Sprintf(lte, maxPrice)
+			}
+			if minPrice != "" || maxPrice != "" {
+				musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(queryBoolMustBoolShould, sq, sq)))
+			}
+		}
+	}
+	//采购单位联系方式
+	hasBuyerTel := so.BuyerTel
+	if hasBuyerTel != "" {
+		if hasBuyerTel == "y" {
+			mustNot = append(mustNot, fmt.Sprintf(queryMissing, "buyertel"))
+		} else {
+			musts = append(musts, fmt.Sprintf(queryMissing, "buyertel"))
+		}
+	}
+	//中标企业联系方式
+	hasWinnerTel := so.WinnerTel
+	if hasWinnerTel != "" {
+		if hasWinnerTel == "y" {
+			mustNot = append(mustNot, fmt.Sprintf(queryMissing, "winnertel"))
+		} else {
+			musts = append(musts, fmt.Sprintf(queryMissing, "winnertel"))
+		}
+	}
+	//附件
+	fileExists := so.FileExists
+	if !isFileSearch && fileExists != "" {
+		if fileExists == "1" { //有附件
+			mustNot = append(mustNot, fmt.Sprintf(queryMissing, "isValidFile"))
+			musts = append(musts, fmt.Sprintf(queryBoolMustTerm, 1))
+		} else if fileExists == "-1" { //无附件
+			musts = append(musts, fmt.Sprintf(queryMissing, "isValidFile"))
+		}
+	}
+	// 如果是领域化数据则需要加标签
+	if so.BidField != "" {
+		musts = append(musts, fmt.Sprintf(queryBoolMustTermDomain, so.BidField))
+	}
+	qstr = fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(mustNot, ","))
+	log.Println("qstr:", qstr)
+	return
+}
+
+// GetBidSearchQuery  整理地区、城市、发布时间、信息类型、采购单位类型 查询条件
+func (so *SearchOptimize) GetBidSearchQuery() string {
+	query := ``
+	//省份
+	area := so.Province
+	if area != "" {
+		query += `{"terms":{"area":[`
+		for k, v := range strings.Split(area, ",") {
+			if k > 0 {
+				query += `,`
+			}
+			query += `"` + v + `"`
+		}
+		query += `]}}`
+	}
+	//
+	city := so.City
+	if city != "" {
+		if len(query) > 0 {
+			query += ","
+		}
+		query += `{"terms":{"city":[`
+		for k, v := range strings.Split(city, ",") {
+			if k > 0 {
+				query += `,`
+			}
+			query += `"` + v + `"`
+		}
+		query += `]}}`
+	}
+	if query != "" {
+		query = fmt.Sprintf(queryBoolShould, query)
+	}
+	//发布时间
+	publishTime := so.PublishTime
+	if publishTime != "" {
+		if len(query) > 0 {
+			query += ","
+		}
+		startTime, endTime := "", ""
+		now := time.Now()
+		if publishTime == "lately-7" { //最近7天
+			startTime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local).Unix())
+		} else if publishTime == "lately-30" { //最近30天
+			startTime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Unix())
+		} else if publishTime == "thisyear" { //最近一年
+			startTime = fmt.Sprint(time.Date(now.Year()-1, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
+			endTime = fmt.Sprint(now.Unix())
+		} else if publishTime == "threeyear" { //最近三年
+			startTime = fmt.Sprint(time.Date(now.Year()-3, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
+			endTime = fmt.Sprint(now.Unix())
+		} else if publishTime == "fiveyear" { //最近五年
+			startTime = fmt.Sprint(time.Date(now.Year()-5, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
+			endTime = fmt.Sprint(now.Unix())
+		} else if len(strings.Split(publishTime, "_")) > 1 {
+			startTime = strings.Split(publishTime, "_")[0]
+			endTime = strings.Split(publishTime, "_")[1]
+			etTime := time.Now()
+			if endTime != "" {
+				et, _ := strconv.ParseInt(endTime, 0, 64)
+				etTime = time.Unix(et, 0)
+			}
+			endTime = fmt.Sprint(time.Date(etTime.Year(), etTime.Month(), etTime.Day()+1, 0, 0, 0, 0, time.Local).Unix())
+		}
+		query += `{"range":{"publishtime":{`
+		if startTime != "" {
+			query += `"gte":` + startTime
+		}
+		if startTime != "" && endTime != "" {
+			query += `,`
+		}
+		if endTime != "" {
+			query += `"lt":` + endTime
+		}
+		query += `}}}`
+	}
+	//信息类型-二级
+	subtype := so.Subtype
+	topType := util.If(so.TopType != "", strings.Split(so.TopType, ","), []string{}).([]string)
+	allType := ``
+	//二级分类
+	if subtype != "" {
+		var typeInt = 0
+		allType += `{"terms":{"subtype":[`
+		for k, v := range strings.Split(subtype, ",") {
+			if tType := util.If(topTypeMap[v] != "" && so.TopType == "", topTypeMap[v], "").(string); tType != "" {
+				topType = append(topType, tType)
+				typeInt += 1
+				continue
+			}
+			if k > typeInt {
+				allType += `,`
+			}
+			allType += `"` + v + `"`
+		}
+		allType += `]}}`
+	}
+	//信息类型  一级分类
+	log.Println("topType:", topType)
+	if len(topType) > 0 {
+		if allType != "" {
+			allType += ","
+		}
+		allType += `{"terms":{"toptype":[`
+		for k, v := range topType {
+			if k > 0 {
+				allType += `,`
+			}
+			allType += `"` + v + `"`
+		}
+		allType += `]}}`
+	}
+
+	if allType != "" {
+		if query != "" {
+			query += ","
+		}
+		query += fmt.Sprintf(queryBoolShould, allType)
+	}
+	//采购单位类型
+	if so.BuyerClass != "" {
+		if len(query) > 0 {
+			query += ","
+		}
+		query += `{"terms":{"buyerclass":[`
+		for k, v := range strings.Split(so.BuyerClass, ",") {
+			if k > 0 {
+				query += `,`
+			}
+			query += `"` + v + `"`
+		}
+		query += `]}}`
+	}
+	return query
+}
+
+// GetBidSearchListByCache   查询缓存数据
+//未登录用户默认搜索和关键词搜索改成500条和免费用户保持一致--需求调整P260来自产品经理杨蘭20220116
+func (so *SearchOptimize) GetBidSearchListByCache() (list []*map[string]interface{}, count, total int64) {
+	//缓存数据 最大量是5000条  100页数据
+	l, c, t := func(so *SearchOptimize) (list []*map[string]interface{}, count, total int64) {
+		//缓存数据总量 - 当前平台
+		redisCountKey := fmt.Sprintf(SearchCacheCount, so.SearchGroup, util.If(so.IsPay, "v", "f").(string), util.If(so.BidField != "", so.BidField, "n").(string))
+		total = int64(redis.GetInt(RedisNameNew, redisCountKey))
+		//缓存数据: kws.SearchGroup-全部,招标信息,超前信息;kws.PageNum-当前页 免费用户 or 付费用户,BidField:领域化产品
+		redisDataKey := fmt.Sprintf(SearchCacheKey, so.SearchGroup, util.If(so.IsPay, "v", "f").(string), util.If(so.BidField != "", so.BidField, "n").(string))
+		log.Println("-------redisDataKey:------", redisDataKey)
+		sCache, err := redis.GetNewBytes(RedisNameNew, redisDataKey)
+		if err == nil {
+			if sCache != nil && len(*sCache) > 0 {
+				err = json.Unmarshal(*sCache, &list)
+				if err == nil {
+					//数据如果>最大数据结果量 total==count,否则count = 付费:5000;免费:500;
+					count = util.If(so.IsPay, int64(bidsearch.SearchMaxPageCount_PAYED), int64(bidsearch.SearchMaxPageCount_PC)).(int64)
+					count = util.If(count > total, total, count).(int64)
+					return
+				}
+			}
+		}
+		//无缓存数据 或 缓存数据查询异常
+		//查库>存redis缓存
+		//查询缓存数据 参数初始化
+		so.DefaultSearchParamsAuto()
+		//缓存数据
+		count, total, list = so.GetBidSearchList(true)
+		if len(list) > 0 {
+			redis.Put(RedisNameNew, redisCountKey, total, 16*60*60)
+			b, err := json.Marshal(list)
+			if err == nil {
+				if err = redis.PutBytes(RedisNameNew, redisDataKey, &b, 16*60*60); err != nil {
+					log.Println("默认搜索查询结果保存redis缓存异常")
+				}
+			} else {
+				log.Println("默认搜索查询数量保存redis缓存异常")
+			}
+		} else {
+			log.Println("默认搜索 暂无数据")
+		}
+		return
+	}(so)
+	if len(l) > 0 {
+		total = t
+		count = c
+		list = l[(so.PageNum-1)*so.PageSize : so.PageNum*so.PageSize]
+	}
+	return
+}
+
+// SearchByES  es搜索
+type SearchByES struct {
+	Index      string
+	IType      string
+	Query      string
+	FindFields string
+	Order      string
+	Fields     string
+	Start      int
+	Limit      int
+	Count      int
+	HighLight  bool
+}
+
+// GetAllByNgramWithCount  获取es查询结果及总数量
+func (e *SearchByES) GetAllByNgramWithCount() (int64, *[]map[string]interface{}) {
+	if e.Query != "" {
+		queryStr := e.Query
+		if e.HighLight {
+			var ws []string
+			for _, w := range strings.Split(e.FindFields, ",") {
+				ws = append(ws, fmt.Sprintf(HighlightStr, w, e.Count))
+			}
+			queryStr = queryStr[:len(queryStr)-1] + `,` + fmt.Sprintf(HL, strings.Join(ws, ",")) + `}`
+		}
+		if len(e.Fields) > 0 {
+			queryStr = queryStr[:len(queryStr)-1] + `,"_source":[` + e.Fields + "]}"
+		}
+		if len(e.Order) > 0 {
+			queryStr = queryStr[:len(queryStr)-1] + `,"sort":[` + SR(SR(SR(SR(e.Order, ",", "},{", -1), " ", "", -1), ":-1", `:"desc"`, -1), ":1", `:"asc"`, -1) + `]}`
+		}
+		if e.Start > -1 {
+			queryStr = queryStr[:len(queryStr)-1] + `,"from":` + strconv.Itoa(e.Start) + `,"size":` + strconv.Itoa(e.Limit) + "}"
+		}
+		log.Println("queryStr:", queryStr)
+		return elastic.GetWithCount(e.Index, e.IType, queryStr)
+	} else {
+		return 0, nil
+	}
+}
+
+//
+// SearchListFormat  格式化数据
+func SearchListFormat(industry string, repl []map[string]interface{}, b bool) (list []*map[string]interface{}) {
+	for _, v := range repl {
+		//正文
+		if b {
+			//正文匹配检索关键词
+			highlight, _ := v["highlight"].(map[string][]string)
+			detail := ""
+			for _, val := range highlight["detail"] {
+				detail += jy.ClearHtml.ReplaceAllString(val, "")
+			}
+			v["detail"] = detail
+		}
+		v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))                                        //加密信息id
+		v["s_subscopeclass"] = IndustryFormat(industry, strings.Trim(util.ObjToString(v["s_subscopeclass"]), ",")) //行业
+		v["industry"] = IndustryFormat(industry, strings.Trim(util.ObjToString(v["s_subscopeclass"]), ","))        //行业
+		if budget, ok := v["budget"].(float64); ok && budget > 0 {                                                 //预算
+			v["budget"] = int64(budget)
+		}
+		if bidAmount, ok := v["bidamount"].(float64); ok && bidAmount > 0 { //中标金额
+			v["bidamount"] = int64(bidAmount)
+		}
+		//附件
+		if isValidFile, _ := v["isValidFile"].(bool); isValidFile {
+			delete(v, "isValidFile")
+			v["fileExists"] = true
+		}
+		//地区链接、
+		area := v["area"].(string)
+		//信息类型链接
+		finalType, _ := v["subtype"].(string)
+		if finalType == "" {
+			finalType = util.ObjToString(v["toptype"])
+		}
+		if finalType == "" {
+			finalType = util.ObjToString(v["type"])
+			if finalType == "bid" {
+				finalType = "中标"
+			} else if finalType == "tender" {
+				finalType = "招标"
+			} else {
+				finalType = ""
+			}
+		}
+		//行业链接、
+		if industry == "" {
+			industry = util.ObjToString(v["s_subscopeclass"])
+			if industry != "" {
+				if strings.Contains(industry, "它") {
+					industry = strings.Replace(industry, "它", "他", -1)
+				}
+				industry = strings.Split(industry, ",")[0]
+			}
+		}
+		//stypeadd :信息类型链接
+		//areaadd:地址链接;
+		//indadd:行业链接
+		v["stypeadd"], v["areaadd"], v["indadd"] = classify(finalType, area, industry)
+		winnerList := util.ObjToString(v["s_winner"]) //中标企业名称集合
+		if winnerList != "" && len(strings.Split(winnerList, ",")) > 0 {
+			var winnerInfo []*WinnerInfo
+			for wk, wv := range strings.Split(winnerList, ",") {
+				var (
+					winnerId = ""
+				)
+				if v["entidlist"] != nil {
+					if entIdList := util.ObjArrToStringArr(v["entidlist"].([]interface{})); len(entIdList) > wk { //中标企业id集合
+						winnerId = entIdList[wk]
+					}
+				}
+				winnerInfo = append(winnerInfo, &WinnerInfo{
+					Winner:       wv,                                                                                                         //中标企业 需要单独处理
+					WinnerTel:    util.ObjToString(v["winnertel"]),                                                                           //中标企业联系电话
+					WinnerPerson: util.ObjToString(v["winnerperson"]),                                                                        //中标企业联系人
+					WinnerId:     util.If(winnerId != "" && len([]rune(winnerId)) > 12, util.EncodeArticleId2ByCheck(winnerId), "").(string), //中标企业加密id  存在winnerId 异常的情况
+				})
+			}
+			v["winnerInfo"] = winnerInfo
+		}
+		tmp := v
+		list = append(list, &tmp)
+	}
+	return
+}
+
+// WinnerInfo 中标企业信息
+type WinnerInfo struct {
+	Winner       string `json:"winner,omitempty"`
+	WinnerTel    string `json:"winnerTel,omitempty"`
+	WinnerPerson string `json:"winnerPerson,omitempty"`
+	WinnerId     string `json:"winnerId,omitempty"`
+}
+
+// IndustryFormat 行业处理
+func IndustryFormat(industry, subScopeClass string) (newIndustry string) {
+	commonSubstring := func(v string) (value string) {
+		bcs := strings.Split(v, "_")
+		if len(bcs) == 1 {
+			value = bcs[0]
+		} else if len(bcs) == 2 {
+			value = bcs[0]
+			if strings.TrimSpace(value) == "" {
+				value = bcs[0]
+			}
+		}
+		return
+	}
+	bct := strings.Split(subScopeClass, ",")
+	if bct == nil || len(bct) == 0 {
+		return
+	}
+	//搜索条件中没有行业的话,取查询结果中第一个行业
+	if industry == "" {
+		newIndustry = commonSubstring(bct[0])
+	} else { //搜索条件中有行业的话,取行业中和搜索条件相对应的第一个
+		industryArr := strings.Split(industry, ",")
+	L:
+		for _, bc := range bct {
+			for _, is := range industryArr {
+				if bc == is {
+					newIndustry = strings.TrimSpace(commonSubstring(bc))
+					break L
+				}
+			}
+		}
+	}
+	return
+}

+ 12 - 0
src/jfw/front/shorturl.go

@@ -392,6 +392,18 @@ func (s *Short) Article(stype, id string) error {
 			return s.Redirect(surl)
 		}
 	} else {
+		if stype == "content" {
+			//工作桌面内嵌 快照页
+			if !strings.Contains(s.Request.URL.String(), "aside") {
+				paramSuffix := "aside=0"
+				if strings.Contains(s.Request.URL.String(), "?") {
+					paramSuffix = fmt.Sprintf("&%s", paramSuffix)
+				} else {
+					paramSuffix = fmt.Sprintf("?%s", paramSuffix)
+				}
+				return s.Redirect(fmt.Sprintf("%s%s%s", config.Sysconfig["workDesktopUrl"].(string), config.Sysconfig["webdomain"].(string), url.QueryEscape(fmt.Sprintf("%s%s", s.Request.URL.String(), paramSuffix))))
+			}
+		}
 		sids := util.CommonDecodeArticle(stype, id)
 		if len(sids) == 0 || (len(sids) > 0 && sids[0] == "") {
 			s.Redirect("/notin/page", 302)

+ 153 - 142
src/jfw/front/supsearch.go

@@ -69,6 +69,9 @@ func init() {
 	if FileSignBool, _ = config.Sysconfig["fileSignBool"].(bool); FileSignBool {
 		bidSearch_field_1 = bidSearch_field_1 + bidSearch_field_file
 		bidSearch_field = bidSearch_field + bidSearch_field_file
+		//搜索优化
+		BidSearchFieldBase += BidSearchFieldFile
+		BidSearchFieldOfVip += BidSearchFieldFile
 	}
 }
 
@@ -238,80 +241,76 @@ func (p *Pcsearch) GetNewBids() error {
 	bidField := p.GetString("bid_field")
 	userId, _ := p.GetSession("userId").(string)
 	baseUserId := p.GetSession("base_user_id")
-	// 如果是领域化数据
+	entId := util.IntAll(p.GetSession("entId"))
+	searchGroup, _ := p.GetInteger("searchGroup") //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
+	vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
+	// 如果是领域化数据j
 	if bidField != "" {
 		if domainPageType, ok := DomainPageType[bidField]; ok {
 			pageType = domainPageType
+			//bidField = domainPageType
 		}
-		vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
+		//领域化数据 如果没有权限直接返回空数据
 		if (vipStatus.BigMember <= 0 && vipStatus.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
 			p.ServeJson(map[string]interface{}{
 				"list":      []map[string]interface{}{},
 				"count":     0,
 				"totalPage": 0,
+				"total":     0,
 			})
 			return nil
 		}
 	}
-	rs := Newbids(pageType, userId)
-	var list []map[string]interface{}
-	if len(rs) >= 0 {
-		//标讯数据提取
-		list = rs[(pagenum-1)*pageSize : pagenum*pageSize]
-	}
-
+	so := &SearchOptimize{
+		UserId:      userId,
+		PageNum:     pagenum,
+		PageSize:    pageSize,
+		BidField:    bidField,
+		NewUserId:   util.Int64All(baseUserId),
+		SearchGroup: searchGroup,
+		IsPay:       vipStatus.IsPayedUser(),
+	}
+	//搜索条件处理
+	so.SearchParamsHandle()
+	var (
+		list         []*map[string]interface{}
+		count, total int64
+	)
+	list, count, total = so.GetBidSearchListByCache()
 	if pageType == "" { //最新招标信息仅第一页条展示表格多字段
 		for k, v := range list {
 			if pagenum == 1 && k < 20 {
 				continue
 			}
-			// delete(v, "areaadd")
-			delete(v, "bidopentime")
-			delete(v, "buyer")
-			// delete(v, "indadd")
-			delete(v, "k")
-			delete(v, "projectcode")
-			delete(v, "projectname")
-			// delete(v, "stypeadd")
-			delete(v, "winner")
-			delete(v, "timetemp")
-			delete(v, "budget")
-			delete(v, "s_subscopeclass")
-			delete(v, "toptype")
+			delete((*v), "bidopentime")
+			delete((*v), "buyer")
+			delete((*v), "k")
+			delete((*v), "projectcode")
+			delete((*v), "projectname")
+			delete((*v), "winner")
+			delete((*v), "timetemp")
+			delete((*v), "budget")
+			delete((*v), "s_subscopeclass")
+			delete((*v), "toptype")
 		}
 	}
-	count, totalPage := 500, 10
-	if userId == "" {
-		count = bidsearch.SearchMaxPageCount_NOLOGIN
-		totalPage = 100
-	}
 	p.ServeJson(map[string]interface{}{
 		"list":      list,
 		"count":     count,
-		"totalPage": totalPage,
+		"total":     total,
+		"totalPage": (count + 1) / int64(pageSize),
 	})
 	return nil
 }
 
+// PcSearchIndex 路由搜索
 func (p *Pcsearch) PcSearchIndex(module string) error {
 	defer util.Catch()
 	p.T["logid"] = config.Seoconfig["jysslby"].(string)
-	// 领域化标识
-	bidField := p.GetString("bid_field")
 	pageSize, _ := p.GetInteger("pageSize")
 	if pageSize == 0 {
 		pageSize = 50
 	}
-
-	switch module {
-	case "medical": // 领域类型  医疗-0101
-		if bidField == "" {
-			bidField = "0101"
-		}
-	default:
-		bidField = ""
-	}
-
 	keywords := p.GetString("keywords")
 	industry := strings.TrimSpace(p.GetString("industry")) //选中的行业
 	area := p.GetString("area")                            //地区
@@ -322,9 +321,16 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	minprice := p.GetString("minprice")                    //最低价格
 	maxprice := p.GetString("maxprice")                    //最高价格
 	fileExists := p.GetString("fileExists")                //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
-
+	//搜索优化P260--start--
+	searchGroup, _ := p.GetInteger("searchGroup")     //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
+	searchMode, _ := p.GetInteger("searchMode")       //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
+	wordsMode, _ := p.GetInteger("wordsMode")         //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
+	additionalWords := p.GetString("additionalWords") //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
+	//--end--
 	userId, _ := p.GetSession("userId").(string)
+	phone, _ := p.GetSession("phone").(string)
 	baseUserId := p.GetSession("base_user_id")
+	entId := util.IntAll(p.GetSession("entId"))
 	noLoginBl := false
 	if userId == "" {
 		//未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
@@ -334,16 +340,29 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		}
 	}
 	//高级筛选 仅vip用户可查询
-	var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
-	var buyerclass string = ""                    //采购单位类别
-	var notkey string = ""                        //排除词
-	var city string = ""                          //城市 付费用户可用
-
+	var (
+		hasBuyerTel, hasWinnerTel = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
+		buyerclass                = ""     //采购单位类别
+		notkey                    = ""     //排除词
+		city                      = ""     //城市 付费用户可用
+	)
+	// 领域化标识
+	territorialization := p.GetString("bid_field")
+	switch module {
+	case "medical": // 领域类型  医疗-0101
+		if territorialization == "" {
+			territorialization = "0101"
+		}
+	default:
+		territorialization = ""
+	}
 	selectType := p.GetString("selectType")
 	if selectType == "" {
 		selectType = "title,content"
 	}
-	isPayedUser, publishtime, queryItems, _, _ := bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0, pageSize)
+	userInfo := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
+	queryItems := userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
+	isPayedUser := userInfo.IsPayedUser()
 	if isPayedUser {
 		buyerclass = p.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = p.GetString("buyertel"), p.GetString("winnertel")
@@ -367,13 +386,16 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		notkey = util.ObjToString(p.GetSession("Echo_notkey"))
 		fileExists = util.ObjToString(p.GetSession("Echo_fileExists"))
 		city = util.ObjToString(p.GetSession("Echo_city"))
-		bidField = util.ObjToString(p.GetSession("Echo_bid_field")) // 领域化数据 0101-医疗行业
-
-		_, _, queryItems, _, _ = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0, pageSize)
+		territorialization = util.ObjToString(p.GetSession("Echo_bid_field"))    // 领域化数据 0101-医疗行业
+		searchGroup = util.IntAll(p.GetSession("Echo_searchGroup"))              //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
+		searchMode = util.IntAll(p.GetSession("Echo_searchMode"))                //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
+		wordsMode = util.IntAll(p.GetSession("Echo_wordsMode"))                  //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
+		additionalWords = util.ObjToString(p.GetSession("Echo_additionalWords")) //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
+		queryItems = userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
 	}
 	keywordsLimit := util.IntAllDef(config.Sysconfig["keywordsLimit"], 35)
 	searchLimit := public.IsSearchLimit(queryItems)
-
+	//-----------------------------未登录用户支持非单字符查询--------------------------
 	if userId == "" {
 		keywordsLimit = util.IntAllDef(config.Sysconfig["keywordsLimitNologin"], 25)
 		//未登录用户标题、正文都限制,已登录用户只限制正文
@@ -383,20 +405,20 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 			keywords = ""
 		}
 	}
-	b_word, a_word, s_word := "", "", ""
+	var (
+		list                               []*map[string]interface{}
+		count, total                       int64
+		secondFlag                         = ""
+		isSearch                           = true
+		b_word, a_word, s_word, heightKeys = "", "", "", ""
+	)
 	if keywords != "" {
 		b_word, a_word, s_word = jy.InterceptSearchKW(keywords, keywordsLimit, len(industry) == 0)
 	}
-	var list *[]map[string]interface{}
-	var status = 1
-	var count, totalPage int64
-	secondFlag := ""
-	secondKWS := ""
-	isSearch := true
-	if bidField != "" {
+	//医疗领域化信息 用户前提是大会员 超级订阅,才有领域化功能的权限
+	if territorialization != "" {
 		isSearch = false
-		vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
-		if vipStatus.BigMember > 0 || vipStatus.VipState > 0 {
+		if userInfo.BigMember > 0 || userInfo.VipState > 0 {
 			if jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode) {
 				isSearch = true
 			}
@@ -404,14 +426,11 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	}
 	isLimit := 1
 	if isSearch {
-		if len(s_word) > 0 || len(industry) > 0 {
-			searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
-			status = 2
-			field := bidSearch_field_1
-			if bidField != "" { // 如果是领域化数据
-				field = bidSearch_domain_field_1
-			}
-
+		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
+		so := NewSearchOptimize(userId, phone, area, city, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, 0, pageSize, searchGroup, searchMode, wordsMode, *userInfo, searchTypeSwitch)
+		heightKeys = so.HeightKeys //主关键词和附加词合并,多组空格隔开,作为前端渲染高亮关键词使用
+		//关键词  行业 附加词
+		if len(s_word) > 0 || len(industry) > 0 || strings.TrimSpace(so.AdditionalWords) != "" {
 			if searchLimit {
 				isLimit = public.Lst.IsLimited(p.Request, p.ResponseWriter, p.Session(), isPayedUser)
 				if isLimit == 1 { //没有被限制
@@ -419,93 +438,84 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 				}
 			}
 			if isLimit == 1 {
-				secondKWS, _, _, _, secondFlag, count, totalPage, list = bidsearch.SearchData("pc", p.Request, 1, util.ObjToString(p.GetSession("userId")), secondKWS, s_word, area, city, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, fileExists, 0, true, queryItems, field, notkey, isPayedUser, searchTypeSwitch, bidField, pageSize)
+				count, total, list = so.GetBidSearchList(false)
 			}
 		} else {
 			p.DisableHttpCache()
-			pageType := ""
-			// 如果是领域化数据
-			if bidField != "" {
-				if domainPageType, ok := DomainPageType[bidField]; ok {
-					pageType = domainPageType
-				}
-			}
-			p.T["list"] = PCS_list(pageType, pageSize, userId) //Newbids("")[0]
-			count, totalPage = 500, 10
-			if userId == "" {
-				//未登录用户可查看5000条
-				count, totalPage = bidsearch.SearchMaxPageCount_NOLOGIN, 100
-			}
+			list, count, total = so.GetBidSearchListByCache()
 		}
 	}
-
-	if status == 2 {
-		secondList, tp, _ := bidsearch.LisetData(1, 0, list, secondFlag, config.Seoconfig, isPayedUser, pageSize, userId)
-		if tp == 1 {
-			p.T["secondList"] = ""
-			totalPage = 1
-		} else if len(secondList) > 0 {
-			p.T["secondList"] = secondList
-		}
-		if secondKWS != "" {
-			s_word = s_word + "+" + secondKWS
-		}
-		if noLoginBl {
-			subtype = ""
-		}
-		p.T["list"] = list
-		p.T["secondFlag"] = secondFlag
-		p.T["area"] = area
-		p.T["publishtime"] = publishtime
-		p.T["timeslot"] = timeslot
-		p.T["toptype"] = toptype
-		p.T["subtype"] = subtype
-		p.T["searchvalue"] = s_word
-		p.T["minprice"] = minprice
-		p.T["maxprice"] = maxprice
-		p.T["buyerclass"] = buyerclass
-		p.T["buyertel"] = hasBuyerTel
-		p.T["winnertel"] = hasWinnerTel
-		p.T["notkey"] = notkey
-		p.T["fileExists"] = fileExists
-		p.T["city"] = city
-		p.T["bid_field"] = bidField
-		p.SetSession("paramkey", b_word)
-		switch publishtime {
-		case "lately-7":
-			p.SetSession("parampublishtime", "最近7天")
-		case "lately-30":
-			p.SetSession("parampublishtime", "最近30天")
-		case "thisyear":
-			p.SetSession("parampublishtime", "近一年")
-		case "threeyear":
-			p.SetSession("parampublishtime", "近三年")
-		case "fiveyear":
-			p.SetSession("parampublishtime", "近五年")
-		default:
-			p.SetSession("parampublishtime", publishtime)
-		}
-		p.SetSession("paramarea", area)
-		if subtype != "" {
-			p.SetSession("paraminfotype", subtype)
-		} else {
-			p.SetSession("paraminfotype", toptype)
-		}
+	if noLoginBl {
+		subtype = ""
 	}
+	p.T["list"] = list
+	p.T["secondFlag"] = secondFlag
+	p.T["area"] = area
+	p.T["publishtime"] = publishtime
+	p.T["timeslot"] = timeslot
+	p.T["toptype"] = toptype
+	p.T["subtype"] = subtype
+	p.T["searchvalue"] = keywords //搜索关键词
+	p.T["minprice"] = minprice
+	p.T["maxprice"] = maxprice
+	p.T["buyerclass"] = buyerclass
+	p.T["buyertel"] = hasBuyerTel
+	p.T["winnertel"] = hasWinnerTel
+	p.T["notkey"] = notkey
+	p.T["fileExists"] = fileExists
+	p.T["city"] = city
+	p.T["bid_field"] = territorialization
+	p.SetSession("paramkey", b_word)
+	switch publishtime {
+	case "lately-7":
+		p.SetSession("parampublishtime", "最近7天")
+	case "lately-30":
+		p.SetSession("parampublishtime", "最近30天")
+	case "thisyear":
+		p.SetSession("parampublishtime", "近一年")
+	case "threeyear":
+		p.SetSession("parampublishtime", "近三年")
+	case "fiveyear":
+		p.SetSession("parampublishtime", "近五年")
+	default:
+		p.SetSession("parampublishtime", publishtime)
+	}
+	p.SetSession("paramarea", area)
+	if subtype != "" {
+		p.SetSession("paraminfotype", subtype)
+	} else {
+		p.SetSession("paraminfotype", toptype)
+	}
+	//}
 	p.T["selectType"] = selectType
 	p.T["login"] = p.Session().Get("user")
 	p.T["count"] = count
-	p.T["totalPage"] = totalPage
-	p.T["keywords"] = b_word
+	p.T["totalPage"] = (count + 1) / int64(pageSize)
+	p.T["keywords"] = keywords      //搜索关键词
+	p.T["heightWords"] = heightKeys //主关键词和附加词合并后
 	p.T["industry"] = industry
 	p.T["industrylist"] = industrylist
 	p.T["sortArray"] = sortArray
 	p.T["showVipScreen"] = isPayedUser
-	p.T["bidField"] = bidField
+	p.T["bidField"] = territorialization
 	p.T["module"] = module
-	p.T["interceptWord"] = a_word
+	p.T["interceptKeyWords"] = b_word   //超出限制关键词限制长度 截取后
+	p.T["interceptOtherWords"] = a_word //超出限制关键词限制长度 截取后 提示关键词
 	p.T["interceptLimit"] = keywordsLimit
 	//
+	p.T["searchGroup"] = searchGroup
+	p.T["searchMode"] = searchMode
+	p.T["wordsMode"] = wordsMode
+	p.T["additionalWords"] = additionalWords
+	p.T["total"] = total
+
+	p.T["isVip"] = userInfo.VipState > 0
+	p.T["isMember"] = userInfo.BigMember > 0
+	p.T["isEntniche"] = userInfo.EntMember > 0
+	p.T["isEntnicheNew"] = userInfo.IsNewEnt
+	p.T["isEntService"] = userInfo.EntService
+	p.T["vipBefore202209"] = userInfo.VipState > 0 && userInfo.VipStartData < util.Int64All(config.Sysconfig["contextOldVipLimit"]) //超级订阅 超强项目
+	//
 	if userId != "" {
 		//企业画像 权限
 		p.T["portraitpower"] = jylabutil.IsAuthorized(userId, "i_portraitpower")
@@ -514,6 +524,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	return p.Render("/pc/supsearch.html", &p.T)
 }
 
+// Newbids  最新招标信息
 func Newbids(p, userId string) []map[string]interface{} {
 	//fmt.Println("11111", redis.Get("newother", "index_list"))
 	nologin := ""
@@ -623,7 +634,7 @@ func duplicateRemoval(ss []map[string]interface{}) []map[string]interface{} {
 	return data
 }
 
-var topType = map[string]string{
+var topTypeMap = map[string]string{
 	"招标预告":   "预告",
 	"招标公告":   "招标",
 	"招标结果":   "结果",
@@ -646,7 +657,7 @@ func top500(subtype string, bidField string, userId string) (list *[]map[string]
 			var subTypes []string
 
 			for _, v := range strings.Split(subtype, ",") {
-				if v1, ok := topType[v]; ok {
+				if v1, ok := topTypeMap[v]; ok {
 					topTypes = append(topTypes, fmt.Sprintf(`"%s"`, v1))
 				} else {
 					subTypes = append(subTypes, fmt.Sprintf(`"%s"`, v))

+ 125 - 6
src/jfw/front/swordfish.go

@@ -37,9 +37,14 @@ var (
 	bidSearch_sort           = `{"dataweight":-1,"publishtime":-1}`
 	bidSearch_field_file     = `,"filetext","isValidFile"`
 	bidSearch_domain_field_1 = bidSearch_field_1 + `,"purchasing","s_winner","buyer"` + bidSearch_field_file //领域数据字段基本字段
+
+	BidSearchFieldBase   = `"_id","title","publishtime","dataweight","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","spidercode","site","projectname","projectcode"`                        //搜索列表基础字段
+	BidSearchFieldOfVip  = BidSearchFieldBase + `,"buyer","buyertel","buyerperson","agency","agencytel","agencyperson","s_winner","winnertel","winnerperson","signendtime","bidendtime","bidopentime","budget","projectinfo","entidlist"` //付费列表字段
+	BidSearchFieldFile   = `,"isValidFile"`
+	BidSearchDomainField = BidSearchFieldOfVip + `,"purchasing"` //领域数据字段基本字段
 )
 
-// 剑鱼标讯推送三级页点赞暂弃 改成剑鱼标讯实验室点赞功能
+// Praise 剑鱼标讯推送三级页点赞暂弃 改成剑鱼标讯实验室点赞功能
 func (m *Front) Praise() error {
 	defer util.Catch()
 	var flag = "F"
@@ -73,11 +78,122 @@ func (m *Front) Searchinfolist(p string) error {
 	return m.Redirect("/jylab/supsearch/index.html")
 }
 
-// ajax分页请求
+// PcAjaxReq ajax分页请求
 func (m *Front) PcAjaxReq() {
+	territorialization := m.GetString("bid_field") // 领域类型 0101- 医疗
+	tabularflag := m.GetString("tabularflag")
+	userId := util.ObjToString(m.GetSession("userId"))
+	phone := util.ObjToString(m.GetSession("phone"))
+	entId := util.IntAll(m.GetSession("entId"))
+	baseUserId := m.GetSession("base_user_id")
+	currentPage, _ := m.GetInteger("pageNumber")
+	pageSize, _ := m.GetInteger("pageSize")
+	if pageSize == 0 {
+		pageSize = 50
+	}
+	//userId = "63c11681800b227df5874680"//免费
+	//userId = "63d5cc0098f6fae01592ea7f" //付费
+	if tabularflag == "Y" && userId == "" {
+		//判断用户是否登录进行表格查询,否则返回基本数据
+		tabularflag = ""
+	}
+	userInfo := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
+	if territorialization != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
+		if (userInfo.BigMember <= 0 && userInfo.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
+			m.ServeJson(map[string]interface{}{
+				"list": []map[string]interface{}{},
+			})
+			return
+		}
+	}
+
+	area := m.GetString("area")
+	subtype := m.GetString("subtype")
+	toptype := m.GetString("toptype") //信息类型
+	publishtime := m.GetString("publishtime")
+	selectType := m.GetString("selectType")
+	if selectType == "" {
+		selectType = "title,content"
+	}
+	industry := strings.TrimSpace(m.GetString("industry"))
+	minprice := m.GetString("minprice")               //最低价格
+	maxprice := m.GetString("maxprice")               //最高价格
+	fileExists := m.GetString("fileExists")           //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
+	searchGroup, _ := m.GetInteger("searchGroup")     //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
+	searchMode, _ := m.GetInteger("searchMode")       //搜索模式;默认0:精准模式(不进行系统分词);1:模糊模式(进行系统分词)。
+	wordsMode, _ := m.GetInteger("wordsMode")         //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
+	additionalWords := m.GetString("additionalWords") //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
+	var (
+		//高级筛选 仅付费用户可查询
+		hasBuyerTel, hasWinnerTel string //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
+		buyerclass                string //采购单位类别
+		notkey                    string //排除词
+		isPayedUser               bool
+		queryItems                []string
+		city                      string //城市
+		count, total              int64
+		isLimit                   = 1
+		list                      []*map[string]interface{}
+		heightKeys                string //需要高亮的关键词
+	)
+	queryItems = userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
+	isPayedUser = userInfo.IsPayedUser()
+	if isPayedUser {
+		buyerclass = m.GetString("buyerclass")
+		hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
+		notkey = util.If(strings.Contains(m.GetString("notkey"), ","), strings.ReplaceAll(m.GetString("notkey"), ",", " "), m.GetString("notkey")).(string)
+		city = m.GetString("city")
+	}
+	if userId == "" {
+		//未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
+		if subtype == "" {
+			subtype = "招标预告,招标公告,招标结果,招标信用信息"
+		}
+	}
+	b_word, a_word, s_word := jy.InterceptSearchKW(m.GetString("searchvalue"), util.IntAllDef(config.Sysconfig["keywordsLimit"], 35), len(industry) == 0)
+	if len(s_word) > 0 || len(industry) > 0 || strings.TrimSpace(additionalWords) != "" {
+		searchLimit := public.IsSearchLimit(queryItems)
+		//未登录用户标题、正文都限制,已登录用户只限制正文
+		if userId == "" {
+			searchLimit = true
+		}
+		//全文检索限制
+		if searchLimit {
+			//limitFlag = public.Lst.Flag
+			isLimit = public.Lst.IsLimited(m.Request, m.ResponseWriter, m.Session(), isPayedUser)
+			if isLimit == 1 { //没有被限制
+				defer public.Lst.Limit()
+			}
+		}
+		if isLimit == 1 {
+			searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
+			so := NewSearchOptimize(userId, phone, area, city, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, currentPage, pageSize, searchGroup, searchMode, wordsMode, *userInfo, searchTypeSwitch)
+			m.SetSession("selectType", so.SelectType)
+			heightKeys = so.HeightKeys
+			count, total, list = so.GetBidSearchList(false)
+		}
+	}
+	m.ServeJson(map[string]interface{}{
+		"limitFlag":          false,
+		"status":             isLimit,
+		"list":               list,
+		"count":              count,
+		"total":              total,
+		"totalPage":          (count + 1) / int64(pageSize),
+		"interceptOtherWord": a_word,                                                //截取后 用于提示的关键词
+		"interceptKeyWords":  b_word,                                                //超出限制长度 截取后的关键词
+		"interceptLimit":     util.IntAllDef(config.Sysconfig["keywordsLimit"], 35), //限制额度
+		"keywords":           m.GetString("searchvalue"),                            //关键词
+		"heightWords":        heightKeys,                                            //需要高亮的关键词词组  主关键词和附加词合并
+	})
+}
+
+// PcAjaxReq_bak  ajax分页请求 备份
+func (m *Front) PcAjaxReq_Bak() {
 	bidField := m.GetString("bid_field") // 领域类型 0101- 医疗
 	tabularflag := m.GetString("tabularflag")
 	userId := util.ObjToString(m.GetSession("userId"))
+	entId := util.IntAll(m.GetSession("entId"))
 	baseUserId := m.GetSession("base_user_id")
 	currentPage, _ := m.GetInteger("pageNumber")
 	pageSize, _ := m.GetInteger("pageSize")
@@ -90,7 +206,7 @@ func (m *Front) PcAjaxReq() {
 	}
 	reqType := m.GetString("reqType")
 	if bidField != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
-		vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
+		vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
 		if (vipStatus.BigMember <= 0 && vipStatus.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
 			m.ServeJson(map[string]interface{}{
 				"list": []map[string]interface{}{},
@@ -137,7 +253,7 @@ func (m *Front) PcAjaxReq() {
 		start                     int
 		city                      string //城市
 	)
-	isPayedUser, publishtime, queryItems, currentPage, start = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), currentPage, pageSize)
+	isPayedUser, publishtime, queryItems, currentPage, start = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), currentPage, pageSize, entId)
 	if isPayedUser {
 		buyerclass = m.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
@@ -200,6 +316,7 @@ func (m *Front) PcAjaxReq() {
 		"status":         isLimit,
 		"list":           list,
 		"count":          count,
+		"total":          config.Sysconfig["defaultTotal"],
 		"totalPage":      totalPage,
 		"interceptWord":  a_word,
 		"interceptLimit": util.IntAllDef(config.Sysconfig["keywordsLimit"], 35),
@@ -354,6 +471,7 @@ func (m *Front) Getpage() error {
 func (m *Front) WxsearchlistPaging() {
 	defer util.Catch()
 	userId, _ := m.GetSession("userId").(string)
+	entId := util.IntAll(m.GetSession("entId"))
 	var list *[]map[string]interface{}
 	var b_word, a_word, secondFlag, secondKWS string
 	var secondList []map[string]interface{}
@@ -393,7 +511,7 @@ func (m *Front) WxsearchlistPaging() {
 			var fileExists = m.GetString("fileExists")    //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
 			var city string = ""                          //城市
 
-			vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
+			vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
 			isPayedUser = vipStatus.IsPayedUser()
 			queryItems := vipStatus.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
 			if isPayedUser {
@@ -1840,7 +1958,8 @@ func (f *Front) HistorypushPaging() error {
 func (m *Front) Subscribe() error {
 	isBuyed := false
 	if userId, _ := m.GetSession("userId").(string); userId != "" {
-		vStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
+		entId := util.IntAll(m.GetSession("entId"))
+		vStatus := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
 		isBuyed = vStatus.VipState > 0
 	}
 	m.T["isBuyed"] = isBuyed

+ 24 - 16
src/jfw/front/ws_dataExport.go

@@ -350,26 +350,34 @@ func (wd *WsDataExport) SearchExport() error {
 	if userId == "" {
 		return errors.New("未登录")
 	}
+	searchGroup, _ := wd.GetInteger("searchGroup")
+	searchMode, _ := wd.GetInteger("searchMode")
+	wordsMode, _ := wd.GetInteger("wordsMode")
 	//接收超级搜索页面参数
 	reqData := public.BidSearchExport{
-		Keywords:     wd.GetString("searchvalue"),                  //搜索词
-		Publishtime:  wd.GetString("publishtime"),                  //发布时间
-		Area:         wd.GetString("scope"),                        //地区
-		Subtype:      wd.GetString("subtype"),                      //信息类型
-		Minprice:     wd.GetString("minprice"),                     //最低价格
-		Maxprice:     wd.GetString("maxprice"),                     //最高价格
-		Industry:     strings.TrimSpace(wd.GetString("industry")),  //选中的行业
-		SelectType:   wd.GetString("selectType"),                   //标题 or 全文
-		Buyerclass:   wd.GetString("buyerclass"),                   //采购单位行业
-		Hasbuyertel:  wd.GetString("buyertel"),                     //是否有采购电话
-		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
-		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
-		Notkey:       wd.GetString("notkey"),                       //排除词
-		City:         wd.GetString("city"),                         //城市
-		FileExists:   wd.GetString("fileExists"),                   //有无附件
+		Keywords:        wd.GetString("searchvalue"),                  //搜索词
+		Publishtime:     wd.GetString("publishtime"),                  //发布时间
+		Area:            wd.GetString("scope"),                        //地区
+		Subtype:         wd.GetString("subtype"),                      //信息类型
+		Minprice:        wd.GetString("minprice"),                     //最低价格
+		Maxprice:        wd.GetString("maxprice"),                     //最高价格
+		Industry:        strings.TrimSpace(wd.GetString("industry")),  //选中的行业
+		SelectType:      wd.GetString("selectType"),                   //标题 or 全文
+		Buyerclass:      wd.GetString("buyerclass"),                   //采购单位行业
+		Hasbuyertel:     wd.GetString("buyertel"),                     //是否有采购电话
+		Haswinnertel:    wd.GetString("winnertel"),                    //是否有中标电话
+		SelectIds:       strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
+		Notkey:          wd.GetString("notkey"),                       //排除词
+		City:            wd.GetString("city"),                         //城市
+		FileExists:      wd.GetString("fileExists"),                   //有无附件
+		SearchGroup:     searchGroup,                                  //搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+		SearchMode:      searchMode,                                   //搜索模式:0:精准搜索;1:模糊搜索
+		WordsMode:       wordsMode,                                    //搜索关键词模式;默认0:包含所有,1:包含任意
+		AdditionalWords: wd.GetString("additionalWords"),              //关键词:附加关键词(副:五组,每组最多15个字符)
 	}
+	entId := util.IntAll(wd.GetSession("entId"))
 	saveData := reqData.PassBidSearchExport()
-	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).
+	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId, entId).
 		GetQueryItems(wd.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId

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

@@ -1182,7 +1182,7 @@ func afterLogin(user map[string]interface{}, session *httpsession.Session, rid,
 				}
 			}
 			//同一账号在不同设备登录,极光id不一样,给之前的设备推送自定义的下线消息,离线消息保持10天
-			if old_rid != "" && old_rid != rid && off {
+			if old_rid != "" && old_rid != rid && off && rid != "" {
 				mongodb.UpdateById("user", userid, map[string]interface{}{
 					"$addToSet": map[string]interface{}{"a_jpushid": old_rid},
 				})
@@ -1235,21 +1235,20 @@ func afterLogin(user map[string]interface{}, session *httpsession.Session, rid,
 					"s_opushid": "",
 				},
 			}, false, true)
-		}
-		set := map[string]interface{}{
-			"s_jpushid":     rid,
-			"s_opushid":     oid,
-			"s_appponetype": phoneType,
-		}
-		if o_jy, ok := user["o_jy"].(map[string]interface{}); ok && o_jy != nil && o_jy["i_apppush"] == nil {
-			set["o_jy.i_apppush"] = 1
-		}
-		mongodb.UpdateById("user", userid, map[string]interface{}{
-			"$set":  set,
-			"$pull": map[string]interface{}{"a_jpushid": rid},
-		})
-		//删除未登录的pushid
-		if rid != "" {
+
+			set := map[string]interface{}{
+				"s_jpushid":     rid,
+				"s_opushid":     oid,
+				"s_appponetype": phoneType,
+			}
+			if o_jy, ok := user["o_jy"].(map[string]interface{}); ok && o_jy != nil && o_jy["i_apppush"] == nil {
+				set["o_jy.i_apppush"] = 1
+			}
+			mongodb.UpdateById("user", userid, map[string]interface{}{
+				"$set":  set,
+				"$pull": map[string]interface{}{"a_jpushid": rid},
+			})
+			//删除未登录的pushid
 			jyutil.UnLoginPush.DeleteBuff(rid)
 		}
 	}()

+ 2 - 1
src/jfw/modules/app/src/app/front/swordfish.go

@@ -227,6 +227,7 @@ func (m *Front) WxsearchlistPaging() {
 	pageNum, _ := m.GetInteger("pageNum")
 	searchvalue := strings.TrimSpace(m.GetString("searchvalue"))
 	userid := util.ObjToString(m.GetSession("userId"))
+	entId := util.IntAll(m.GetSession("entId"))
 	if userid != "" {
 		//历史记录
 		history := redis.GetStr("other", "s_"+userid)
@@ -264,7 +265,7 @@ func (m *Front) WxsearchlistPaging() {
 		var notkey string = ""                        //排除词
 		fileExists = m.GetString("fileExists")        //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
 
-		isPayedUser, publishtime, queryItems, pageNum, _ = bidsearch.PublicSearch(userid, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), pageNum, 50)
+		isPayedUser, publishtime, queryItems, pageNum, _ = bidsearch.PublicSearch(userid, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), pageNum, 50, entId)
 		if isPayedUser {
 			buyerclass = m.GetString("buyerclass")
 			hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")

+ 26 - 19
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -330,28 +330,35 @@ func (wd *WsDataExport) SearchExport() error {
 	if userId == "" {
 		return errors.New("未登录")
 	}
+	searchGroup, _ := wd.GetInteger("searchGroup")
+	searchMode, _ := wd.GetInteger("searchMode")
+	wordsMode, _ := wd.GetInteger("wordsMode")
 	//接收超级搜索页面参数
 	reqData := public.BidSearchExport{
-		Keywords:     wd.GetString("searchvalue"),                  //搜索词
-		Publishtime:  wd.GetString("publishtime"),                  //发布时间
-		Area:         wd.GetString("scope"),                        //地区
-		Subtype:      wd.GetString("subtype"),                      //信息类型
-		Minprice:     wd.GetString("minprice"),                     //最低价格
-		Maxprice:     wd.GetString("maxprice"),                     //最高价格
-		Industry:     strings.TrimSpace(wd.GetString("industry")),  //选中的行业
-		SelectType:   wd.GetString("selectType"),                   //标题 or 全文
-		Buyerclass:   wd.GetString("buyerclass"),                   //采购单位行业
-		Winner:       wd.GetString("winner"),                       //中标单位
-		Hasbuyertel:  wd.GetString("buyertel"),                     //是否有采购电话
-		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
-		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
-		Notkey:       wd.GetString("notkey"),                       //排除词
-		City:         wd.GetString("city"),                         //城市
-		FileExists:   wd.GetString("fileExists"),                   //有无附件
-	}
-
+		Keywords:        wd.GetString("searchvalue"),                  //搜索词
+		Publishtime:     wd.GetString("publishtime"),                  //发布时间
+		Area:            wd.GetString("scope"),                        //地区
+		Subtype:         wd.GetString("subtype"),                      //信息类型
+		Minprice:        wd.GetString("minprice"),                     //最低价格
+		Maxprice:        wd.GetString("maxprice"),                     //最高价格
+		Industry:        strings.TrimSpace(wd.GetString("industry")),  //选中的行业
+		SelectType:      wd.GetString("selectType"),                   //标题 or 全文
+		Buyerclass:      wd.GetString("buyerclass"),                   //采购单位行业
+		Winner:          wd.GetString("winner"),                       //中标单位
+		Hasbuyertel:     wd.GetString("buyertel"),                     //是否有采购电话
+		Haswinnertel:    wd.GetString("winnertel"),                    //是否有中标电话
+		SelectIds:       strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
+		Notkey:          wd.GetString("notkey"),                       //排除词
+		City:            wd.GetString("city"),                         //城市
+		FileExists:      wd.GetString("fileExists"),                   //有无附件
+		SearchGroup:     searchGroup,                                  //搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+		SearchMode:      searchMode,                                   //搜索模式:0:精准搜索;1:模糊搜索
+		WordsMode:       wordsMode,                                    //搜索关键词模式;默认0:包含所有,1:包含任意
+		AdditionalWords: wd.GetString("additionalWords"),              //关键词:附加关键词(副:五组,每组最多15个字符)
+	}
+	entId := util.IntAll(wd.GetSession("entId"))
 	saveData := reqData.PassBidSearchExport()
-	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).
+	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId, entId).
 		GetQueryItems(wd.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId

+ 2 - 1
src/jfw/modules/bigmember/src/config.json

@@ -91,5 +91,6 @@
   "claim": {
     "details": "https://databi-web.jydev.jianyu360.com/nzj/app/nzj.app/nzj_claim_detail.spg",
     "listPage": "https://databi-web.jydev.jianyu360.com/nzj/app/nzj.app/nzj_claim.spg"
-  }
+  },
+  "contextOldVipLimit": 1664553600
 }

+ 1 - 0
src/jfw/modules/bigmember/src/config/config.go

@@ -60,6 +60,7 @@ type config struct {
 		Details  string `json:"details"`
 		ListPage string `json:"listPage"`
 	} `json:"claim"`
+	ContextOldVipLimit int64 `json:'contextOldVipLimit'` //超级订阅部分用户:--- 超前项目权限
 }
 
 type CustomerInfo struct {

+ 1 - 1
src/jfw/modules/bigmember/src/service/subscribe/subscribe.go

@@ -40,7 +40,7 @@ type Subscribe struct {
 func (s *Subscribe) FreeUserSubscribe() {
 	//isVip, isMember 付费用户 isEntNiche, isEntNicheNew 商机管理用户 iPpStatus 非省份订阅包 promptBool 是否今日已提醒 areaConfig 区域配置
 	var isVip, isMember, isEntNiche, isEntNicheNew, iPpStatus, searchPrompt, promptBool, isAreaConfig bool
-	userId := s.GetSession("userId").(string)
+	userId := qutil.ObjToString(s.GetSession("userId"))
 	if userId == "" {
 		fmt.Println("用户未登录,搜索词不进行校验")
 		s.ServeJson(Result{Data: M{"prompt": false, "areaSet": false, "freeArea": false}})

+ 4 - 4
src/jfw/modules/bigmember/src/service/use/use.go

@@ -623,6 +623,7 @@ type UserInfo struct {
 	EntRoleId       int                   `json:"entRoleId"`       //商机管理角色:1:企业管理员;2:部门管理员
 	MemberPowerType int64                 `json:"memberPowerType"` ////大会员权益类型 0无 1个人 2企业
 	VipPowerType    int64                 `json:"vipPowerType"`    ////超级订阅权益类型 0无 1个人 2企业
+	VipBefore202209 bool                  `json:"vipBefore202209"` //超级订阅:超前项目权限
 }
 
 //是否使用过首次使用
@@ -667,17 +668,16 @@ func (u *Use) IsAdd() {
 				IsEntService:    bigPower.IsEntService,
 				MemberPowerType: bigPower.MemberPowerType,
 				VipPowerType:    bigPower.VipPowerType,
+				VipBefore202209: bigPower.VipStatus > 0 && bigPower.VipStartDate < config.Config.ContextOldVipLimit, //超级订阅 超前项目权限
 			}
-			log.Println(entId, "----", phone)
 			if entId == 0 && phone != "" {
 				entId = initEntSess(phone)
 			}
-			log.Println(entId, "--111--", phone)
 			if entId > 0 && bigPower.EntInfo[entId] != nil {
 				userInfo.EntName = bigPower.EntInfo[entId].Name
 				userInfo.EntRoleId = bigPower.EntInfo[entId].RoleId
-				//是否是商机管理有效用户:1、管理员;2、员工已分配功能
-				userInfo.EntNiche = bigPower.EntInfo[entId].Status == 1 && (bigPower.EntInfo[entId].IsPower || bigPower.EntInfo[entId].RoleId > 0)
+				//是否是商机管理有效用户:1、管理员员工已分配功能
+				userInfo.EntNiche = bigPower.EntInfo[entId].Status == 1 && bigPower.EntInfo[entId].IsPower
 				userInfo.EntIsNew = bigPower.EntInfo[entId].IsNew && userInfo.EntNiche
 				//有商机管理服务的用户 就不是商机管理用户
 				if userInfo.IsEntService = bigPower.EntInfo[entId].IsService && bigPower.EntInfo[entId].IsPower; userInfo.IsEntService {

+ 2 - 2
src/jfw/modules/common/src/qfw/util/bidsearch/search.go

@@ -387,9 +387,9 @@ func GetSearchQuery(keyword, industry, minprice, maxprice, hasBuyerTel, hasWinne
 	return
 }
 
-func PublicSearch(userId, selectType, publishtime string, bidSearchOldUserLimit int64, currentPage, pageSize int) (bool, string, []string, int, int) {
+func PublicSearch(userId, selectType, publishtime string, bidSearchOldUserLimit int64, currentPage, pageSize, entId int) (bool, string, []string, int, int) {
 	var start int
-	vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
+	vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId, entId)
 	isPayedUser := vipStatus.IsPayedUser()
 	queryItems := vipStatus.GetQueryItems(selectType, bidSearchOldUserLimit)
 

+ 185 - 82
src/jfw/modules/common/src/qfw/util/dataexport/dataexport.go

@@ -19,6 +19,18 @@ import (
 	"time"
 )
 
+const (
+	SearchModeAccurate        = 0 // 搜索模式:0:精准搜索;
+	SearchModeFuzzy           = 1 // 搜索模式:1:模糊搜索
+	WordsModeAnd              = 0 // 搜索关键词模式;默认0:包含所有
+	WordsModeOr               = 1 // 搜索关键词模式;1:包含任意
+	SearchGroupAll            = 0 // 搜索分组:默认0:全部;
+	SearchGroupBidding        = 1 // 搜索分组:1:招标采购公告;2:超前项目
+	SearchGroupLeadingProject = 2 // 搜索分组:1:招标采购公告;2:超前项目
+	TopTypesBidding           = "招标预告,招标公告,招标结果,招标信用信息"
+	TopTypesLeadingProject    = "拟建项目,采购意向"
+)
+
 /*筛选条件--关键词*/
 type KeyWord struct {
 	Keyword  string   `json:"keyword"`  //关键词
@@ -52,6 +64,9 @@ type SieveCondition struct {
 	FileExists       string    `json:"fileExists"`       //是否有附件
 	SearchTypeSwitch bool      `json:"searchTypeSwitch"` //是否开启 正文 标题同时搜索只搜正文的开关
 	BidField         string    `json:"bid_field"`        // 领域化数据 0101-医疗行业
+	SearchGroup      int       `json:"searchGroup"`      // 搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+	SearchMode       int       `json:"searchMode"`       // 搜索模式:0:精准搜索;1:模糊搜索
+	WordsMode        int       `json:"wordsMode"`        // 搜索关键词模式;默认0:包含所有,1:包含任意
 }
 
 const (
@@ -96,12 +111,14 @@ func getDataExportSql(scd *SieveCondition) string {
 	query := `{"query":{"bool":{"must":[%s],"must_not":[%s],"should":[%s],"minimum_should_match": %d}}}`
 	//query := `{"query": {"function_score": {"query": {"bool": {"must": [%s],"must_not": [%s],"should": [%s],"minimum_should_match": %d}},"field_value_factor": {"field": "dataweight","modifier": "ln1p","missing": 0}}}}`
 	query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
+	query_bool_should_and := `{"bool":{"should":[%s],"minimum_should_match": 1 %s}}`
 	query_price := `{"bool":{"must":[{"range":{"bidamount":{%s}}}]}},{"bool":{"must":[{"range":{"budget":{%s}}}],"must_not":[{"range":{"bidamount":{"gte":-1}}}]}}`
 	query_bool_must := `{"terms":{"%s":[%s]}}`
 	query_bool_must_and := `{"bool":{"must":[%s]%s}}`
 	query_missing := `{"constant_score":{"filter":{"missing":{"field":"%s"}}}}`
 	query_bool_must_term := `{"bool": {"must": [{ "term": {"isValidFile": %d }}]}}`
 	query_bool_must_term_bidField := `{"bool": {"must": [{ "term": {"bid_field": "%s" }}]}}` // 领域化数据类型
+
 	gte := `"gte": %s`
 	lte := `"lte": %s`
 
@@ -173,12 +190,17 @@ func getDataExportSql(scd *SieveCondition) string {
 	}
 	timequery += `}}}`
 	musts = append(musts, timequery)
-
+	if scd.Subtype == "" {
+		if scd.SearchGroup == SearchGroupBidding { // 搜索分组处理  招标采购公告 超前项目
+			scd.Subtype = TopTypesBidding
+		} else if scd.SearchGroup == SearchGroupLeadingProject {
+			scd.Subtype = TopTypesLeadingProject
+		}
+	}
 	if scd.Subtype != "" {
 		var subquery string
 		var topTypes []string
 		var subTypes []string
-
 		for _, v := range strings.Split(scd.Subtype, ",") {
 			if v1, ok := topType[v]; ok {
 				topTypes = append(topTypes, fmt.Sprintf(`"%s"`, v1))
@@ -281,27 +303,34 @@ func getDataExportSql(scd *SieveCondition) string {
 		for _, v := range scd.Keyword {
 			shoulds := []string{}
 			must_not := []string{}
+			keysShoulds := []string{}
 			if v.Keyword != "" {
 				if strings.Contains(v.Keyword, "+") {
 					for _, vk := range strings.Split(v.Keyword, "+") {
+						if len(vk) == 0 {
+							continue
+						}
 						//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
 						if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(vk))) == 1 {
 							queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
 							shouldsKey := fmt.Sprintf(multi_match, "\""+vk+"\"", "\""+queryItem+"\"")
-							shoulds = append(shoulds, shouldsKey)
+							keysShoulds = append(keysShoulds, shouldsKey)
 						} else {
-							shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
+							keysShoulds = append(keysShoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
 						}
 					}
 				} else if strings.Contains(v.Keyword, " ") {
 					for _, vk := range strings.Split(v.Keyword, " ") {
+						if len(vk) == 0 {
+							continue
+						}
 						//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
 						if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(vk))) == 1 {
 							queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
 							shouldsKey := fmt.Sprintf(multi_match, "\""+vk+"\"", "\""+queryItem+"\"")
-							shoulds = append(shoulds, shouldsKey)
+							keysShoulds = append(keysShoulds, shouldsKey)
 						} else {
-							shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
+							keysShoulds = append(keysShoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
 						}
 					}
 				} else {
@@ -309,28 +338,76 @@ func getDataExportSql(scd *SieveCondition) string {
 					if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(v.Keyword))) == 1 {
 						queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
 						shouldsKey := fmt.Sprintf(multi_match, "\""+v.Keyword+"\"", "\""+queryItem+"\"")
-						shoulds = append(shoulds, shouldsKey)
+						keysShoulds = append(keysShoulds, shouldsKey)
 					} else {
-						shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+v.Keyword+"\""))
+						keysShoulds = append(keysShoulds, fmt.Sprintf(multi_match_new, "\""+v.Keyword+"\""))
 					}
 				}
+				// 单个关键词分词后都包含
+				shoulds = append(shoulds, fmt.Sprintf(query_bool_must_and, strings.Join(keysShoulds, ","), ""))
 			}
 
 			//附加词
 			for _, vv := range v.Appended {
-				shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+vv+"\""))
-			}
+				appendedShoulds := []string{}
+				if vv != "" {
+					// 附加词处理分词
+					if strings.Contains(vv, "+") {
+						for _, vk := range strings.Split(vv, "+") {
+							if len(vk) == 0 {
+								continue
+							}
+							//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+							if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(vk))) == 1 {
+								queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
+								shouldsKey := fmt.Sprintf(multi_match, "\""+vk+"\"", "\""+queryItem+"\"")
+								appendedShoulds = append(appendedShoulds, shouldsKey)
+							} else {
+								appendedShoulds = append(appendedShoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
+							}
+						}
+					} else if strings.Contains(vv, " ") {
+						for _, vk := range strings.Split(vv, " ") {
+							if len(vk) == 0 {
+								continue
+							}
 
+							//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+							if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(vk))) == 1 {
+								queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
+								shouldsKey := fmt.Sprintf(multi_match, "\""+vk+"\"", "\""+queryItem+"\"")
+								appendedShoulds = append(appendedShoulds, shouldsKey)
+							} else {
+								appendedShoulds = append(appendedShoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
+							}
+						}
+					} else {
+						appendedShoulds = append(appendedShoulds, fmt.Sprintf(multi_match_new, "\""+vv+"\""))
+
+					}
+					// 单个关键词分词后都包含
+					shoulds = append(shoulds, fmt.Sprintf(query_bool_must_and, strings.Join(appendedShoulds, ","), ""))
+				}
+			}
 			//排除词
 			for _, vv := range v.Exclude {
-				//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
-				if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(vv))) == 1 {
-					queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
-					shouldsKey := fmt.Sprintf(multi_match, "\""+vv+"\"", "\""+queryItem+"\"")
-					shoulds = append(shoulds, shouldsKey)
-				} else {
-					must_not = append(must_not, fmt.Sprintf(multi_match_new, "\""+vv+"\""))
+				if len(strings.TrimSpace(vv)) == 0 {
+					continue
+				} // 处理每组里面的空格分词
+				for _, notKeySplit := range strings.Split(vv, " ") {
+					if len(notKeySplit) == 0 {
+						continue
+					}
+					//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+					if scd.Comeinfrom == "supersearchPage" && DetailFileORTitle(selectType) && len([]rune(elastic.ReplaceYH(notKeySplit))) == 1 {
+						queryItem = strings.ReplaceAll(selectType+",title", ",", "\",\"")
+						shouldsKey := fmt.Sprintf(multi_match, "\""+notKeySplit+"\"", "\""+queryItem+"\"")
+						must_not = append(must_not, shouldsKey)
+					} else {
+						must_not = append(must_not, fmt.Sprintf(multi_match_new, "\""+notKeySplit+"\""))
+					}
 				}
+
 			}
 
 			//添加
@@ -339,7 +416,11 @@ func getDataExportSql(scd *SieveCondition) string {
 				if len(must_not) > 0 {
 					notStr = fmt.Sprintf(`,"must_not":[%s]`, strings.Join(must_not, ","))
 				}
-				bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(shoulds, ","), notStr))
+				if scd.WordsMode == WordsModeOr { // 包含任意
+					bools = append(bools, fmt.Sprintf(query_bool_should_and, strings.Join(shoulds, ","), notStr))
+				} else {
+					bools = append(bools, fmt.Sprintf(query_bool_must_and, strings.Join(shoulds, ","), notStr))
+				}
 			}
 		}
 	}
@@ -371,9 +452,7 @@ func getDataExportSql(scd *SieveCondition) string {
 	}
 	// 如果是领域化数据则需要加标签
 	if scd.BidField != "" {
-
 		musts = append(musts, fmt.Sprintf(query_bool_must_term_bidField, scd.BidField))
-
 	}
 	qstr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(must_not, ","), strings.Join(bools, ","), boolsNum)
 	return qstr
@@ -412,6 +491,9 @@ func GetSqlObjFromId(mongo mg.MongodbSim, _id string) *SieveCondition {
 		FileExists:       qutil.ObjToString((*query)["fileExists"]),
 		SearchTypeSwitch: searchTypeSwitch,
 		BidField:         qutil.ObjToString((*query)["bid_field"]), // 领域化数据
+		SearchGroup:      qutil.IntAll((*query)["searchGroup"]),    //搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+		SearchMode:       qutil.IntAll((*query)["searchMode"]),     // 搜索模式:0:精准搜索;1:模糊搜索
+		WordsMode:        qutil.IntAll((*query)["wordsMode"]),      // 搜索关键词模式;默认0:包含所有,1:包含任意
 	}
 }
 
@@ -427,41 +509,46 @@ func GetDataExportSearchCountByScdId(sim, bid mg.MongodbSim, biddingName, elasti
 }
 
 func GetDataExportSearchCountBySieveCondition(scd *SieveCondition, elasticAddress string) (count int) {
-	qstr := getDataExportSql(scd)
 	if isNullSearch(scd) {
 		return -1 //程序端返回最大值
 	}
-	log.Printf("GetDataExportSearchCountUseId-%s-sql:%s\n", scd.Id, qstr)
-	count = int(elastic.Count(INDEX, TYPE, qstr))
+	if scd.SearchMode == SearchModeAccurate {
+		qstr := getDataExportSql(scd)
+		log.Printf("GetDataExportSearchCountUseId-%s-sql:%s\n", scd.Id, qstr)
+		count = int(elastic.Count(INDEX, TYPE, qstr))
+	}
+	// 依据用户选择的搜索模式和搜索范围进行匹配,即不限制只能匹配标题,且不限制最多展示100条、针对输入的单个关键词分词后需要都包含
 	//超级搜索一致的检索(防止数据导出和超级搜索数据量不一致)
-	if scd.Comeinfrom == "supersearchPage" && (len(scd.Keyword) != 0 || len(scd.Industry) != 0) {
+	if scd.Comeinfrom == "supersearchPage" && (len(scd.Keyword) != 0 || len(scd.Industry) != 0) && scd.SearchMode == SearchModeFuzzy {
 		if len(scd.Keyword) != 0 {
+			// 关键词分词
 			searchTextSize := 0
 			if len(scd.Keyword) > 0 {
 				searchTextSize = len([]rune(scd.Keyword[0].Keyword))
 			}
-			if searchTextSize > 3 && count < 50 {
-				if strings.Index(scd.SelectType, "title") > -1 {
-					var res *[]map[string]interface{}
-					if count > 0 {
-						res = doSearch(qstr, 0, count, "")
-					}
-					if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
-						scd.Keyword[0].Keyword = secondKWS
-						scd.SelectType = "title"
-						qstr = getDataExportSql(scd)
-						res2 := doSearch(qstr, 0, 100, "")
-						result := len(*delRepeatMapArr(res, res2))
-						if result > 100 {
-							result = 100
-						}
-						log.Printf("GetDataExportSearchCountUseId-%s-count:%d-分词-sql:%s\n", scd.Id, result, qstr)
-						return result
+			if searchTextSize > 0 {
+				if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
+					scd.Keyword[0].Keyword = secondKWS
+				}
+			}
+			// 附加词分词
+			for i := 0; i < len(scd.Keyword[0].Appended); i++ {
+				appendTextSize := 0
+				if len(scd.Keyword[0].Appended[i]) > 0 {
+					appendTextSize = len([]rune(scd.Keyword[0].Appended[i]))
+				}
+				if appendTextSize > 0 {
+					if secondKWS := jy.HttpEs(scd.Keyword[0].Appended[i], "ik_smart", elasticAddress); secondKWS != "" {
+						scd.Keyword[0].Appended[i] = secondKWS
 					}
 				}
 			}
-			return
+
 		}
+		qstr := getDataExportSql(scd)
+		count = int(elastic.Count(INDEX, TYPE, qstr))
+		log.Printf("GetDataExportSearchCountUseId-%s-count:%d-分词-sql:%s\n", scd.Id, count, qstr)
+		return count
 	}
 	log.Printf("GetDataExportSearchCountUseId-%s-count:%d\n", scd.Id, count)
 	return
@@ -612,37 +699,44 @@ func GetDataExportIds(elasticAddress string, scd *SieveCondition, checkCount int
 	if scd.SelectIds != nil {
 		return scd.SelectIds, nil
 	}
-	//获取查询语句
-	qstr := getDataExportSql(scd)
-	log.Printf("GetDataExportIds-%s-sql:%s\n", scd.Id, qstr)
-
-	//数据导出数据查询
-	res := doSearchByBatch(qstr, "1", checkCount, fmt.Sprintf("%s-%s", "GetDataExportSearchResult", scd.Id))
+	var qstr string
+	if scd.SearchMode == SearchModeAccurate {
+		//获取查询语句
+		qstr = getDataExportSql(scd)
+		log.Printf("GetDataExportIds-%s-sql:%s\n", scd.Id, qstr)
+	}
 	//超级搜索一致的检索(防止数据导出和超级搜索数据量不一致)
-	if scd.Comeinfrom == "supersearchPage" && (len(scd.Keyword) != 0 || len(scd.Industry) != 0) && len(scd.SelectIds) == 0 {
+	// 依据用户选择的搜索模式和搜索范围进行匹配,即不限制只能匹配标题,且不限制最多展示100条、针对输入的单个关键词分词后需要都包含
+	if scd.Comeinfrom == "supersearchPage" && (len(scd.Keyword) != 0 || len(scd.Industry) != 0) && len(scd.SelectIds) == 0 && scd.SearchMode == SearchModeFuzzy {
 		if len(scd.Keyword) != 0 {
-			num := len(res)
 			searchTextSize := 0
+			// 关键词分词
 			if len(scd.Keyword) > 0 {
 				searchTextSize = len([]rune(scd.Keyword[0].Keyword))
 			}
-			if searchTextSize > 3 && num < 50 {
-				if strings.Index(scd.SelectType, "title") > -1 {
-					if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
-						scd.Keyword[0].Keyword = secondKWS
-						scd.SelectType = "title"
-						qstr = getDataExportSql(scd)
-						log.Printf("GetDataExportIds-%s-分词查询-sql:%s\n", scd.Id, qstr)
-						res2 := doSearch(qstr, 0, 100, "")
-						res = *delRepeatMapArr(&res, res2)
-						if len(res) > 100 {
-							res = res[:100]
-						}
+			if searchTextSize > 0 {
+				if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
+					scd.Keyword[0].Keyword = secondKWS
+				}
+			}
+			// 附加词分词
+			for i := 0; i < len(scd.Keyword[0].Appended); i++ {
+				appendTextSize := 0
+				if len(scd.Keyword[0].Appended[i]) > 0 {
+					appendTextSize = len([]rune(scd.Keyword[0].Appended[i]))
+				}
+				if appendTextSize > 0 {
+					if secondKWS := jy.HttpEs(scd.Keyword[0].Appended[i], "ik_smart", elasticAddress); secondKWS != "" {
+						scd.Keyword[0].Appended[i] = secondKWS
 					}
 				}
 			}
+
 		}
+		qstr = getDataExportSql(scd)
+		log.Printf("GetDataExportIds-%s-分词查询-sql:%s\n", scd.Id, qstr)
 	}
+	res := doSearchByBatch(qstr, "1", checkCount, fmt.Sprintf("%s-%s", "GetDataExportSearchResult", scd.Id))
 	//获取信息id
 	idArr := make([]string, 0, 0)
 	for _, v := range res {
@@ -673,36 +767,45 @@ func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress s
 		return idSelectDates, idSelectErr
 	}
 	selectType := scd.SelectType
-	//获取查询语句
-	qstr := getDataExportSql(scd)
-	log.Printf("GetDataExportSearchResult-%s-sql:%s\n", scd.Id, qstr)
-
-	//数据导出数据查询
-	res := doSearchByBatch(qstr, dataType, checkCount, fmt.Sprintf("%s-%s", "GetDataExportSearchResult", scd.Id))
+	var qstr string
+	var res []map[string]interface{}
+	if scd.SearchMode == SearchModeAccurate { // 搜索模式为精确查找
+		//获取查询语句
+		qstr = getDataExportSql(scd)
+		log.Printf("GetDataExportSearchResult-%s-sql:%s\n", scd.Id, qstr)
+		//数据导出数据查询
+		res = doSearchByBatch(qstr, dataType, checkCount, fmt.Sprintf("%s-%s", "GetDataExportSearchResult", scd.Id))
+	}
 	//超级搜索一致的检索(防止数据导出和超级搜索数据量不一致)
-	if scd.Comeinfrom == "supersearchPage" && (len(scd.Keyword) != 0 || len(scd.Industry) != 0) && len(scd.SelectIds) == 0 {
+	if scd.Comeinfrom == "supersearchPage" && (len(scd.Keyword) != 0 || len(scd.Industry) != 0) && len(scd.SelectIds) == 0 && scd.SearchMode == SearchModeFuzzy {
 		if len(scd.Keyword) != 0 {
-			num := len(res)
 			searchTextSize := 0
+			// 关键词分词
 			if len(scd.Keyword) > 0 {
 				searchTextSize = len([]rune(scd.Keyword[0].Keyword))
 			}
-			if searchTextSize > 3 && num < 50 {
-				if strings.Index(scd.SelectType, "title") > -1 {
-					if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
-						scd.Keyword[0].Keyword = secondKWS
-						scd.SelectType = "title"
-						qstr = getDataExportSql(scd)
-						log.Printf("GetDataExportSearchResult-%s-分词查询-sql:%s\n", scd.Id, qstr)
-						res2 := doSearch(qstr, 0, 100, "")
-						res = *delRepeatMapArr(&res, res2)
-						if len(res) > 100 {
-							res = res[:100]
-						}
+			if searchTextSize > 0 {
+				if secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress); secondKWS != "" {
+					scd.Keyword[0].Keyword = secondKWS
+				}
+			}
+			// 附加词分词
+			for i := 0; i < len(scd.Keyword[0].Appended); i++ {
+				appendTextSize := 0
+				if len(scd.Keyword[0].Appended[i]) > 0 {
+					appendTextSize = len([]rune(scd.Keyword[0].Appended[i]))
+				}
+				if appendTextSize > 0 {
+					if secondKWS := jy.HttpEs(scd.Keyword[0].Appended[i], "ik_smart", elasticAddress); secondKWS != "" {
+						scd.Keyword[0].Appended[i] = secondKWS
 					}
 				}
 			}
+
 		}
+		qstr = getDataExportSql(scd)
+		log.Printf("GetDataExportSearchResult-%s-分词查询-sql:%s\n", scd.Id, qstr)
+		res = doSearchByBatch(qstr, dataType, checkCount, fmt.Sprintf("%s-%s", "GetDataExportSearchResult", scd.Id))
 	}
 	//校验数量
 	if checkCount != len(res) && checkCount != -1 {

+ 3 - 1
src/jfw/modules/common/src/qfw/util/jy/bigVipPower.go

@@ -26,6 +26,7 @@ type BigVipBaseMsg struct {
 	HasTrial        bool                   `json:"has_trial"`       //是否试用过
 	Customers       int                    `json:"customers"`       //可关注客户数量
 	VipStatus       int                    `json:"vip_status"`      //超级订阅状态
+	VipStartDate    int64                  `json:"vipStartDate"`    //超级订阅开始时间
 	Vip_BuySet      BuySet                 `json:"vip_buyset"`      //超级订阅套餐内容
 	EntnicheStatus  int                    `json:"entniche_status"` //商机管理状态
 	IsUpgrade       bool                   `json:"isUpgrade"`       //是否是免费用户订阅升级用户 默认true
@@ -153,11 +154,12 @@ func GetBigVipUserBaseMsg(userId string, mysql *mysql.Mysql, mg MongodbSim) *Big
 		}
 	}
 	//大会员状态
-	data, ok := mg.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,i_member_status":1,"i_member_give":1,"s_member_mainid":1,"i_member_sub_status":1,"i_member_trial":1,"i_vip_status":1,"o_vipjy":1,"o_jy":1,"l_registedate":1,"s_myemail":1,"base_user_id":1}`)
+	data, ok := mg.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,i_member_status":1,"i_member_give":1,"s_member_mainid":1,"i_member_sub_status":1,"i_member_trial":1,"i_vip_status":1,"o_vipjy":1,"o_jy":1,"l_registedate":1,"l_vip_starttime":1,"s_myemail":1,"base_user_id":1}`)
 	if ok && *data != nil && len(*data) > 0 {
 		userPower.Email = qutil.ObjToString((*data)["s_myemail"])
 		userPower.BaseUserId = qutil.IntAll((*data)["base_user_id"])
 		userPower.Registedate = qutil.Int64All((*data)["l_registedate"])
+		userPower.VipStartDate = qutil.Int64All((*data)["l_vip_starttime"])
 		userPower.Status = qutil.IntAllDef((*data)["i_member_status"], 0)
 		//子账号被启用
 		i_member_sub_status := qutil.IntAllDef((*data)["i_member_sub_status"], 0)

+ 7 - 3
src/jfw/modules/common/src/qfw/util/jy/jy.go

@@ -49,6 +49,7 @@ func GetOldOpenid(s_m_openid, a_m_openid, s_phone string, mergeorder interface{}
 	return openid
 }
 
+var ClearHtml = regexp.MustCompile("<[^>]*>")
 var MatchSpace = regexp.MustCompile("\\s+")
 var filterReg_3 = regexp.MustCompile("(项目|公告|公示)$")
 var filterReg_2 = regexp.MustCompile("^[)\\)>》】\\]}}〕,,;;::'\"“”。.\\??、/+=\\_—*&……\\^%$¥@!!`~·(\\(<《【\\[{{〔]+$")
@@ -66,9 +67,12 @@ func FilteKey(k string) string {
 	return k
 }
 
-//超过20个字,截断
+// InterceptSearchKW 超过20个字,截断
 //返回截取后的字符串和截取掉中的前3个字
 func InterceptSearchKW(word string, keywordsLimit int, isFilter bool) (b_word, a_word, s_word string) {
+	if word == "" {
+		return
+	}
 	if isFilter {
 		word = FilteKey(word)
 	}
@@ -86,7 +90,7 @@ func InterceptSearchKW(word string, keywordsLimit int, isFilter bool) (b_word, a
 		b_word = word
 	}
 	a_word = strings.TrimSpace(a_word)
-	s_word = MatchSpace.ReplaceAllString(b_word, "+")
+	s_word = MatchSpace.ReplaceAllString(b_word, " ")
 	return
 }
 
@@ -120,7 +124,7 @@ func HttpEs(ques, analyzer, esAddress string) (res string) {
 			tokens := util.ObjArrToMapArr(resmap["tokens"].([]interface{}))
 			for _, v := range tokens {
 				token := util.ObjToString(v["token"])
-				if len([]rune(token)) == 1 && unicode.IsLetter([]rune(token)[0]) {
+				if len([]rune(token)) == 1 && !unicode.Is(unicode.Scripts["Han"], []rune(token)[0]) { //(P260保留单个汉字)
 					continue
 				}
 				if res != "" {

+ 32 - 20
src/jfw/modules/common/src/qfw/util/jy/payUser.go

@@ -19,42 +19,54 @@ type VipState struct {
 	VipState     int   //超级订阅状态(1普通 2升级版)
 	BigMember    int   //大会员状态
 	EntMember    int   //商机管理用户状态
-	registerData int64 //注册时间
+	RegisterData int64 //注册时间
+	VipStartData int64 //超级订阅开始时间
+	IsNewEnt     bool  //新版商机管理
+	EntService   bool  //企业服务权限
 }
 
-func GetVipState(mysql *mysql.Mysql, mg mongodb.MongodbSim, userId string) (vs *VipState) {
+func GetVipState(mysql *mysql.Mysql, mg mongodb.MongodbSim, userId string, entId int) (vs *VipState) {
 	vs = &VipState{}
 	if userId == "" {
 		return
 	}
 	phone := ""
-	data, ok := mg.FindById("user", userId, `"i_member_status":1,"i_vip_status":1,"s_m_phone":1,"s_phone":1,"o_vipjy":1,"l_registedate":1`)
+	data, ok := mg.FindById("user", userId, `"i_member_status":1,"i_vip_status":1,"s_m_phone":1,"s_phone":1,"o_vipjy":1,"l_registedate":1,"l_vip_starttime":1`)
 	if data != nil && len(*data) > 0 && ok {
-		i_vip_status := qu.IntAll((*data)["i_vip_status"])
-		if i_vip_status > 1 {
+		iVipStatus := qu.IntAll((*data)["i_vip_status"])
+		if iVipStatus > 1 {
 			vs.VipState = 1
-			ovipjy, _ := (*data)["o_vipjy"].(map[string]interface{})
-			if ovipjy["o_buyset"] != nil {
-				o_buyset := ovipjy["o_buyset"].(map[string]interface{})
-				if o_buyset["upgrade"] != nil {
+			oVipJY, _ := (*data)["o_vipjy"].(map[string]interface{})
+			if oVipJY["o_buyset"] != nil {
+				oBuySet := oVipJY["o_buyset"].(map[string]interface{})
+				if oBuySet["upgrade"] != nil {
 					vs.VipState = 2
 				}
 			}
 		}
-		if i_member_status := qu.IntAllDef((*data)["i_member_status"], 0); i_member_status > 0 {
-			vs.BigMember = i_member_status
+		if iMemberStatus := qu.IntAllDef((*data)["i_member_status"], 0); iMemberStatus > 0 {
+			vs.BigMember = iMemberStatus
 		}
-		if s_phone, _ := (*data)["s_phone"].(string); s_phone != "" {
-			phone = s_phone
-		} else if s_m_phone, _ := (*data)["s_m_phone"].(string); s_m_phone != "" {
-			phone = s_m_phone
+		if sPhone, _ := (*data)["s_phone"].(string); sPhone != "" {
+			phone = sPhone
+		} else if sMPhone, _ := (*data)["s_m_phone"].(string); sMPhone != "" {
+			phone = sMPhone
 		}
-		if phone != "" {
-			if mysql.CountBySql(`select count(1) from entniche_user where phone = ? and power =1`, phone) > 0 {
-				vs.EntMember = 1
+		if phone != "" && entId > 0 {
+			entNicheInfos := mysql.SelectBySql(`SELECT i.status,i.isNew,i.power_source,r.role_id,u.power FROM (entniche_user u LEFT JOIN entniche_user_role r ON r.user_id = u.id)  LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone = ? and i.id = ? `, phone, entId)
+			//商机管理用户信息判断
+			if entNicheInfos != nil && len(*entNicheInfos) > 0 {
+				entNicheInfo := (*entNicheInfos)[0]
+				vs.IsNewEnt = qu.Int64All(entNicheInfo["isNew"]) > 0
+				vs.EntService = qu.Int64All(entNicheInfo["power_source"]) > 0
+				//非企业管理服务  商机管理
+				if !vs.EntService && qu.IntAll(entNicheInfo["status"]) > 0 && (qu.IntAll(entNicheInfo["power"]) == 1 || qu.IntAll(entNicheInfo["role_id"]) > 0) {
+					vs.EntMember = 1
+				}
 			}
 		}
-		vs.registerData, _ = ((*data)["l_registedate"]).(int64)
+		vs.RegisterData, _ = ((*data)["l_registedate"]).(int64)
+		vs.VipStartData, _ = ((*data)["l_vip_starttime"]).(int64)
 	}
 	return
 }
@@ -88,7 +100,7 @@ func (vs *VipState) GetQueryItems(selectType string, limitOldTime int64) (items
 		}
 		return
 	}
-	isOldUser := vs.registerData != 0 && vs.registerData < limitOldTime
+	isOldUser := vs.RegisterData != 0 && vs.RegisterData < limitOldTime
 	for _, t := range strings.Split(selectType, ",") {
 		if t == "winner" {
 			if isOldUser {

+ 4 - 2
src/jfw/modules/publicapply/src/attachmentdow/service/service.go

@@ -33,8 +33,9 @@ func (u *Dow) SupplyInfoFileDownload() {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
 
+		entId := qu.IntAll(u.GetSession("entId"))
 		BaseMsg := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
-		vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userid)
+		vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userid, entId)
 		isPower := false
 		//大会员下载权限判断
 		if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
@@ -118,8 +119,9 @@ func (u *Dow) Subdow() {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
 
+		entId := qu.IntAll(u.GetSession("entId"))
 		BaseMsg := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
-		vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userid)
+		vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userid, entId)
 
 		var (
 			mon string

+ 250 - 251
src/jfw/modules/publicapply/src/userbase/entity/entity.go

@@ -1,306 +1,305 @@
 package entity
 
 import (
-	"config"
-	"db"
-	"encoding/json"
-	"fmt"
-	"net/url"
-	"qfw/util"
-	"qfw/util/jy"
-	"qfw/util/redis"
-	"strings"
-	"time"
-	"userbase/initjson"
-	. "userbase/initjson"
+    "config"
+    "db"
+    "encoding/json"
+    "fmt"
+    "net/url"
+    "qfw/util"
+    "qfw/util/jy"
+    "qfw/util/redis"
+    "strings"
+    "time"
+    "userbase/initjson"
 )
 
 type UserInfo struct {
-	UserId   string //用户id
-	Platform string //平台 PC WX APP
-	Names    string //功能名称
+    UserId   string //用户id
+    Platform string //平台 PC WX APP
+    Names    string //功能名称
 }
 
 type FuncNames struct {
-	Name string `json:"name"`
-	Url  string `json:"url"`
-	Img  string `json:"img"`
+    Name string `json:"name"`
+    Url  string `json:"url"`
+    Img  string `json:"img"`
 }
 
 func NewUserInfo(userId, platform, names string) *UserInfo {
-	if platform == "" {
-		platform = "PC"
-	}
-	return &UserInfo{userId, platform, names}
+    if platform == "" {
+        platform = "PC"
+    }
+    return &UserInfo{userId, platform, names}
 }
 
 //保存
 func (this *UserInfo) SaveNameByUserId() bool {
-	queryMap := map[string]interface{}{
-		"s_userId":   this.UserId,
-		"s_platform": this.Platform,
-	}
-	var namesarr = []string{}
-	if this.Names != "" {
-		for _, v := range strings.Split(this.Names, ",") {
-			if !ChargeMap[v] || IsPower(v, this.UserId) {
-				namesarr = append(namesarr, v)
-			}
-		}
-	}
-	updateMap := map[string]interface{}{
-		"$set": map[string]interface{}{
-			"l_createtime": time.Now().Unix(),
-			"s_userId":     this.UserId,
-			"s_names":      strings.Join(namesarr, ","),
-			"s_platform":   this.Platform,
-		},
-	}
-	return db.Mgo.Update(BaseFuncInfo.Cfcollotion, queryMap, updateMap, true, false)
+    queryMap := map[string]interface{}{
+        "s_userId":   this.UserId,
+        "s_platform": this.Platform,
+    }
+    var namesarr = []string{}
+    if this.Names != "" {
+        for _, v := range strings.Split(this.Names, ",") {
+            if !ChargeMap[v] || IsPower(v, this.UserId) {
+                namesarr = append(namesarr, v)
+            }
+        }
+    }
+    updateMap := map[string]interface{}{
+        "$set": map[string]interface{}{
+            "l_createtime": time.Now().Unix(),
+            "s_userId":     this.UserId,
+            "s_names":      strings.Join(namesarr, ","),
+            "s_platform":   this.Platform,
+        },
+    }
+    return db.Mgo.Update(initjson.BaseFuncInfo.Cfcollotion, queryMap, updateMap, true, false)
 }
 
 //获取用户已选功能或基本功能
 func (this *UserInfo) GetNameByUserId() (fns []*FuncNames) {
-	queryMap := map[string]interface{}{
-		"s_userId":   this.UserId,
-		"s_platform": this.Platform,
-	}
-	res, ok := db.Mgo.FindOne(BaseFuncInfo.Cfcollotion, queryMap)
-	if ok && len(*res) > 0 {
-		names := util.ObjToString((*res)["s_names"])
-		if names != "" {
-		L:
-			for _, nv := range strings.Split(names, ",") {
-				if len(fns) >= BaseFuncInfo.Total {
-					break
-				}
-				for _, v := range BaseFuncInfo.CommonFunctions {
-					if v.Name == nv {
-						fns = append(fns, &FuncNames{
-							Name: v.Name,
-							Url:  thisByPlat(this.Platform, "url", &v),
-							Img:  thisByPlat(this.Platform, "img", &v),
-						})
-						continue L
-					}
-				}
-			}
-		}
-	} else {
-		for _, v := range BaseFuncInfo.CommonFunctions {
-			if v.Isbase {
-				if v.Name == "订阅管理" && !IsPower(v.Name, this.UserId) {
-					continue
-				}
-				fns = append(fns, &FuncNames{
-					Name: v.Name,
-					Url:  thisByPlat(this.Platform, "url", &v),
-					Img:  thisByPlat(this.Platform, "img", &v),
-				})
-			}
-			if len(fns) >= BaseFuncInfo.Total {
-				break
-			}
-		}
-	}
-	return fns
+    queryMap := map[string]interface{}{
+        "s_userId":   this.UserId,
+        "s_platform": this.Platform,
+    }
+    res, ok := db.Mgo.FindOne(initjson.BaseFuncInfo.Cfcollotion, queryMap)
+    if ok && len(*res) > 0 {
+        names := util.ObjToString((*res)["s_names"])
+        if names != "" {
+        L:
+            for _, nv := range strings.Split(names, ",") {
+                if len(fns) >= initjson.BaseFuncInfo.Total {
+                    break
+                }
+                for _, v := range initjson.BaseFuncInfo.CommonFunctions {
+                    if v.Name == nv {
+                        fns = append(fns, &FuncNames{
+                            Name: v.Name,
+                            Url:  thisByPlat(this.Platform, "url", &v),
+                            Img:  thisByPlat(this.Platform, "img", &v),
+                        })
+                        continue L
+                    }
+                }
+            }
+        }
+    } else {
+        for _, v := range initjson.BaseFuncInfo.CommonFunctions {
+            if v.Isbase {
+                if v.Name == "订阅管理" && !IsPower(v.Name, this.UserId) {
+                    continue
+                }
+                fns = append(fns, &FuncNames{
+                    Name: v.Name,
+                    Url:  thisByPlat(this.Platform, "url", &v),
+                    Img:  thisByPlat(this.Platform, "img", &v),
+                })
+            }
+            if len(fns) >= initjson.BaseFuncInfo.Total {
+                break
+            }
+        }
+    }
+    return fns
 }
 
 var ChargeMap = map[string]bool{}
 
 //获取所有用户可用功能
 func (this *UserInfo) AllNames() (fns []*FuncNames) {
-	for _, v := range BaseFuncInfo.CommonFunctions {
-		ChargeMap[v.Name] = v.Charge
-		if !v.Charge || IsPower(v.Name, this.UserId) {
-			fns = append(fns, &FuncNames{
-				Name: v.Name,
-				Url:  thisByPlat(this.Platform, "url", &v),
-				Img:  thisByPlat(this.Platform, "img", &v),
-			})
-		}
-	}
-	return fns
+    for _, v := range initjson.BaseFuncInfo.CommonFunctions {
+        ChargeMap[v.Name] = v.Charge
+        if !v.Charge || IsPower(v.Name, this.UserId) {
+            fns = append(fns, &FuncNames{
+                Name: v.Name,
+                Url:  thisByPlat(this.Platform, "url", &v),
+                Img:  thisByPlat(this.Platform, "img", &v),
+            })
+        }
+    }
+    return fns
 }
 
 //
 func thisByPlat(platform, name string, bcv *initjson.BaseFunc) (res string) {
-	switch platform {
-	case "APP":
-		switch name {
-		case "url":
-			res = bcv.APP.Url
-		case "img":
-			res = bcv.APP.Img
-		}
-	case "WX":
-		switch name {
-		case "url":
-			res = bcv.WX.Url
-		case "img":
-			res = bcv.WX.Img
-		}
-	default:
-		switch name {
-		case "url":
-			res = bcv.PC.Url
-		case "img":
-			res = bcv.PC.Img
-		}
-	}
-	return
+    switch platform {
+    case "APP":
+        switch name {
+        case "url":
+            res = bcv.APP.Url
+        case "img":
+            res = bcv.APP.Img
+        }
+    case "WX":
+        switch name {
+        case "url":
+            res = bcv.WX.Url
+        case "img":
+            res = bcv.WX.Img
+        }
+    default:
+        switch name {
+        case "url":
+            res = bcv.PC.Url
+        case "img":
+            res = bcv.PC.Img
+        }
+    }
+    return
 }
 
 //查看是否有使用此功能的权限
 func IsPower(name, userId string) (b bool) {
-	BigPower := jy.GetBigVipUserBaseMsg(userId, db.Mysql, db.Mgo)
-	if BigPower.Status > 0 {
-		switch name {
-		case "企业情报监控":
-			b = BigPower.PowerMap[4] || BigPower.PowerMap[12] || BigPower.PowerMap[13]
-		case "潜在客户挖掘", "客户关注":
-			b = BigPower.PowerMap[7]
-		case "潜在竞争对手/合作伙伴挖掘":
-			b = BigPower.PowerMap[8]
-		case "中标企业预测":
-			b = BigPower.PowerMap[15]
-		case "投标决策分析":
-			b = BigPower.PowerMap[6]
-		case "潜在项目预测":
-			b = BigPower.PowerMap[9]
-		case "周报", "月报", "定制化分析报告":
-			b = BigPower.PowerMap[10]
-		case "订阅管理":
-			b = util.If(BigPower.Pid == "", true, false).(bool)
-		default:
-			b = true
-		}
-	}
-	return b
+    BigPower := jy.GetBigVipUserBaseMsg(userId, db.Mysql, db.Mgo)
+    if BigPower.Status > 0 {
+        switch name {
+        case "企业情报监控":
+            b = BigPower.PowerMap[4] || BigPower.PowerMap[12] || BigPower.PowerMap[13]
+        case "潜在客户挖掘", "客户关注":
+            b = BigPower.PowerMap[7]
+        case "潜在竞争对手/合作伙伴挖掘":
+            b = BigPower.PowerMap[8]
+        case "中标企业预测":
+            b = BigPower.PowerMap[15]
+        case "投标决策分析":
+            b = BigPower.PowerMap[6]
+        case "潜在项目预测":
+            b = BigPower.PowerMap[9]
+        case "周报", "月报", "定制化分析报告":
+            b = BigPower.PowerMap[10]
+        case "订阅管理":
+            b = util.If(BigPower.Pid == "", true, false).(bool)
+        default:
+            b = true
+        }
+    }
+    return b
 }
 
 // HasIndustryTag  是否有行业标签
-func HasIndustryTag(userId string) bool {
-	cacheKey := fmt.Sprintf("industryTag_%s", userId) // 缓存的key
-	cacheTimeout := 60 * 3                            // 缓存的时间-三分钟
-	//// 查缓存
-	if res := redis.Get("newother", cacheKey); res != nil {
-		return res.(bool)
-	}
-	var hasTag bool
-	vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userId)
-	if vipStatus.VipState > 0 || vipStatus.BigMember > 0 || vipStatus.EntMember > 0 { // 仅免费用户查询
-		redis.Put("newother", cacheKey, hasTag, cacheTimeout)
-		return hasTag
-	}
-	// 查免费用户订阅的关键词
-	rs, b := db.Mgo.FindById("user", userId, `"o_jy":1`)
-	if !b || rs == nil || len(*rs) == 0 || (*rs)["o_jy"] == nil {
-		// 没查到关键词
-		redis.Put("newother", cacheKey, hasTag, cacheTimeout)
-		return hasTag
-	}
-	oJY := (*rs)["o_jy"].(map[string]interface{})
-	if oJY["a_key"] == nil || oJY["a_key"].([]interface{}) == nil {
-		return hasTag
-	}
-	keys := util.ObjArrToMapArr(oJY["a_key"].([]interface{}))
-	if len(keys) == 0 {
-		redis.Put("newother", cacheKey, hasTag, cacheTimeout)
-		return hasTag
-	}
-	var valuesList []string
-	for i := 0; i < len(keys); i++ {
-		if key, b := keys[i]["key"]; b {
-			tmp := key.([]interface{})
-			if len(tmp) > 0 {
-				valuesList = append(valuesList, util.ObjToString(tmp[0]))
-			}
-		}
-	}
-	// 查是否是标签用户
-	q := "select id FROM rule_equipment where `key` regexp ?  LIMIT 1"
-	existRs := db.MysqlMedical.SelectBySql(q, strings.Join(valuesList, "|"))
-	if existRs == nil || len(*existRs) == 0 {
-		hasTag = false
-	} else {
-		hasTag = true
-	}
-	redis.Put("newother", cacheKey, hasTag, cacheTimeout) // 存缓存
-	return hasTag
+func HasIndustryTag(userId string, entId int) bool {
+    cacheKey := fmt.Sprintf("industryTag_%s", userId) // 缓存的key
+    cacheTimeout := 60 * 3                            // 缓存的时间-三分钟
+    //// 查缓存
+    if res := redis.Get("newother", cacheKey); res != nil {
+        return res.(bool)
+    }
+    var hasTag bool
+    vipStatus := jy.GetVipState(db.Mysql, db.Mgo, userId, entId)
+    if vipStatus.VipState > 0 || vipStatus.BigMember > 0 || vipStatus.EntMember > 0 { // 仅免费用户查询
+        redis.Put("newother", cacheKey, hasTag, cacheTimeout)
+        return hasTag
+    }
+    // 查免费用户订阅的关键词
+    rs, b := db.Mgo.FindById("user", userId, `"o_jy":1`)
+    if !b || rs == nil || len(*rs) == 0 || (*rs)["o_jy"] == nil {
+        // 没查到关键词
+        redis.Put("newother", cacheKey, hasTag, cacheTimeout)
+        return hasTag
+    }
+    oJY := (*rs)["o_jy"].(map[string]interface{})
+    if oJY["a_key"] == nil || oJY["a_key"].([]interface{}) == nil {
+        return hasTag
+    }
+    keys := util.ObjArrToMapArr(oJY["a_key"].([]interface{}))
+    if len(keys) == 0 {
+        redis.Put("newother", cacheKey, hasTag, cacheTimeout)
+        return hasTag
+    }
+    var valuesList []string
+    for i := 0; i < len(keys); i++ {
+        if key, b := keys[i]["key"]; b {
+            tmp := key.([]interface{})
+            if len(tmp) > 0 {
+                valuesList = append(valuesList, util.ObjToString(tmp[0]))
+            }
+        }
+    }
+    // 查是否是标签用户
+    q := "select id FROM rule_equipment where `key` regexp ?  LIMIT 1"
+    existRs := db.MysqlMedical.SelectBySql(q, strings.Join(valuesList, "|"))
+    if existRs == nil || len(*existRs) == 0 {
+        hasTag = false
+    } else {
+        hasTag = true
+    }
+    redis.Put("newother", cacheKey, hasTag, cacheTimeout) // 存缓存
+    return hasTag
 }
 
 func SellerTokenDecrypt(token string) (uId, sName string, sid int, desc map[string]interface{}, err error) {
-	if token == "" {
-		err = fmt.Errorf("缺少token")
-		return
-	}
-	param, err := url.ParseQuery(util.SE.Decode4Hex(token))
-	if err != nil {
-		err = fmt.Errorf("token格式异常")
-		return
-	}
-	//if qutil.Int64All(param.Get("t")) < time.Now().Unix()-int64(60*5) {
-	//	err = fmt.Errorf("链接已失效")
-	//	return
-	//}
-	//取参数
-	err = json.Unmarshal([]byte(param.Get("desc")), &desc)
-	if err != nil {
-		err = fmt.Errorf("token参数格式异常")
-		return
-	}
+    if token == "" {
+        err = fmt.Errorf("缺少token")
+        return
+    }
+    param, err := url.ParseQuery(util.SE.Decode4Hex(token))
+    if err != nil {
+        err = fmt.Errorf("token格式异常")
+        return
+    }
+    //if qutil.Int64All(param.Get("t")) < time.Now().Unix()-int64(60*5) {
+    //	err = fmt.Errorf("链接已失效")
+    //	return
+    //}
+    //取参数
+    err = json.Unmarshal([]byte(param.Get("desc")), &desc)
+    if err != nil {
+        err = fmt.Errorf("token参数格式异常")
+        return
+    }
 
-	uId = param.Get("uid")
-	sName = param.Get("sName")
-	sid = util.IntAll(param.Get("sid"))
+    uId = param.Get("uid")
+    sName = param.Get("sName")
+    sid = util.IntAll(param.Get("sid"))
 
-	if uId == "" || sName == "" || sid == 0 || len(desc) == 0 {
-		err = fmt.Errorf("缺少参数")
-		return
-	}
-	return
+    if uId == "" || sName == "" || sid == 0 || len(desc) == 0 {
+        err = fmt.Errorf("缺少参数")
+        return
+    }
+    return
 }
 
 //用户一次性弹窗信息集合
 type TipInfoStruct struct {
-	UserId  string
-	DoType  string
-	TipName string
+    UserId  string
+    DoType  string
+    TipName string
 }
 
 //
 func NewTipInfo(userId, doType, tipName string) *TipInfoStruct {
-	return &TipInfoStruct{
-		UserId:  userId,
-		DoType:  doType,
-		TipName: tipName,
-	}
+    return &TipInfoStruct{
+        UserId:  userId,
+        DoType:  doType,
+        TipName: tipName,
+    }
 }
 
 //
 func (this *TipInfoStruct) GetTipInfo() (flag bool) {
-	queryMap := map[string]interface{}{
-		"s_userId": this.UserId,
-	}
-	if this.DoType == "know" { //我知道了 更新
-		flag = db.Mgo.Update("tip_info", queryMap, map[string]interface{}{
-			"$set": map[string]interface{}{
-				this.TipName: 1,
-				fmt.Sprintf("l_%s_updatetime", this.TipName): time.Now().Unix(),
-			},
-		}, true, false)
-	} else { //查询是否提示弹框
-		//判断是否严重用户注册时间
-		if config.Config.TipInfo[this.TipName] > 0 {
-			userBase := jy.GetBigVipUserBaseMsg(this.UserId, db.Mysql, db.Mgo)
-			//此时间点后注册的新用户
-			if userBase.Registedate > config.Config.TipInfo[this.TipName] {
-				return true
-			}
-		}
-		queryMap[this.TipName] = 1
-		flag = db.Mgo.Count("tip_info", queryMap) > 0
-	}
-	return flag
+    queryMap := map[string]interface{}{
+        "s_userId": this.UserId,
+    }
+    if this.DoType == "know" { //我知道了 更新
+        flag = db.Mgo.Update("tip_info", queryMap, map[string]interface{}{
+            "$set": map[string]interface{}{
+                this.TipName: 1,
+                fmt.Sprintf("l_%s_updatetime", this.TipName): time.Now().Unix(),
+            },
+        }, true, false)
+    } else { //查询是否提示弹框
+        //判断是否严重用户注册时间
+        if config.Config.TipInfo[this.TipName] > 0 {
+            userBase := jy.GetBigVipUserBaseMsg(this.UserId, db.Mysql, db.Mgo)
+            //此时间点后注册的新用户
+            if userBase.Registedate > config.Config.TipInfo[this.TipName] {
+                return true
+            }
+        }
+        queryMap[this.TipName] = 1
+        flag = db.Mgo.Count("tip_info", queryMap) > 0
+    }
+    return flag
 }

+ 4 - 1
src/jfw/modules/publicapply/src/userbase/service/service.go

@@ -83,6 +83,7 @@ func (this *ServiceStruct) IndustryTag() {
 	token := this.GetString("token")
 	var userId string
 	var err error
+	var entId int
 	if token != "" {
 		userId, _, _, _, err = entity.SellerTokenDecrypt(token)
 		if err != nil {
@@ -91,13 +92,15 @@ func (this *ServiceStruct) IndustryTag() {
 		}
 	} else {
 		userId, _ = this.GetSession("userId").(string)
+		entId = qu.IntAll(this.GetSession("entId"))
+
 	}
 	defer qu.Catch()
 	r := func() Result {
 		if this.Method() != "POST" {
 			return Result{Data: nil, Error_msg: Error_msg_1005}
 		}
-		return Result{Data: entity.HasIndustryTag(userId)}
+		return Result{Data: entity.HasIndustryTag(userId, entId)}
 	}()
 	this.ServeJson(r)
 }

+ 47 - 22
src/jfw/public/dataexport.go

@@ -95,23 +95,27 @@ func GetPriceDes_SieveCondition(minPrice, maxPrice string) string {
 
 //招标数据导出筛选
 type BidSearchExport struct {
-	Keywords     string //搜索词
-	Publishtime  string //发布时间
-	Area         string //地区
-	Subtype      string //信息类型
-	Minprice     string //最低价格
-	Maxprice     string //最高价格
-	Industry     string //选中的行业
-	SelectType   string //标题 or 全文
-	Winner       string //中标单位
-	Buyerclass   string //采购单位行业
-	Hasbuyertel  string //是否有采购电话
-	Haswinnertel string //是否有中标电话
-	SelectIds    string //选择单条信息id
-	Notkey       string //排除词
-	FileExists   string //是否有附件
-	City         string //城市
-	BidField     string // 领域化数据: 0101 医疗
+	Keywords        string //搜索词
+	Publishtime     string //发布时间
+	Area            string //地区
+	Subtype         string //信息类型
+	Minprice        string //最低价格
+	Maxprice        string //最高价格
+	Industry        string //选中的行业
+	SelectType      string //标题 or 全文
+	Winner          string //中标单位
+	Buyerclass      string //采购单位行业
+	Hasbuyertel     string //是否有采购电话
+	Haswinnertel    string //是否有中标电话
+	SelectIds       string //选择单条信息id
+	Notkey          string //排除词 排除词(副:五组,每组最多15个字符)
+	FileExists      string //是否有附件
+	City            string //城市
+	BidField        string // 领域化数据: 0101 医疗
+	SearchGroup     int    // 搜索分组:默认0:全部;1:招标采购公告;2:超前项目
+	SearchMode      int    // 搜索模式:0:精准搜索;1:模糊搜索
+	WordsMode       int    // 搜索关键词模式;默认0:包含所有,1:包含任意
+	AdditionalWords string // 关键词:附加关键词(副:五组,每组最多15个字符)
 }
 
 func (this *BidSearchExport) PassBidSearchExport() (returnData map[string]interface{}) {
@@ -137,14 +141,32 @@ func (this *BidSearchExport) PassBidSearchExport() (returnData map[string]interf
 	}
 
 	KeyWordSave := []dataexport.KeyWord{}
-	if len(this.Keywords) > 0 {
+	if len(this.Keywords) > 0 || len(this.AdditionalWords) > 0 {
 		_, _, keywords := jy.InterceptSearchKW(this.Keywords, util.IntAllDef(config.Sysconfig["keywordsLimit"], 35), len(this.Industry) == 0)
 		keywords = strings.Replace(keywords, "+", " ", -1)
-		excludes := []string{}
-		if this.Notkey != "" && len(strings.Split(this.Notkey, " ")) > 0 {
-			excludes = strings.Split(this.Notkey, " ")
+		excludes := []string{}    // 排除词
+		appendWords := []string{} // 附加词
+		//排除词  每组排除词不能超过15个字符
+		if this.Notkey != "" && len(strings.Split(this.Notkey, ",")) > 0 {
+			for _, ak := range strings.Split(this.Notkey, ",") {
+				if len([]rune(ak)) > 15 {
+					excludes = append(excludes, string([]rune(ak)[:15]))
+				} else {
+					excludes = append(excludes, ak)
+				}
+			}
+		}
+		//附加词 每组附加词不能超过15个字符
+		if this.AdditionalWords != "" && len(strings.Split(this.AdditionalWords, ",")) > 0 {
+			for _, ak := range strings.Split(this.AdditionalWords, ",") {
+				if len([]rune(ak)) > 15 {
+					appendWords = append(appendWords, string([]rune(ak)[:15]))
+				} else {
+					appendWords = append(appendWords, ak)
+				}
+			}
 		}
-		KeyWordSave = append(KeyWordSave, dataexport.KeyWord{Keyword: keywords, Exclude: excludes})
+		KeyWordSave = append(KeyWordSave, dataexport.KeyWord{Keyword: keywords, Exclude: excludes, Appended: appendWords})
 	}
 
 	//时间
@@ -185,6 +207,9 @@ func (this *BidSearchExport) PassBidSearchExport() (returnData map[string]interf
 		"fileExists":   this.FileExists,
 		"comeintime":   now.Unix(),
 		"bid_field":    this.BidField,
+		"searchGroup":  this.SearchGroup,
+		"searchMode":   this.SearchMode,
+		"wordsMode":    this.WordsMode,
 	}
 	//选择信息id
 	if this.SelectIds != "" {

+ 465 - 35
src/web/staticres/css/dev2/biddingSearch.css

@@ -15,15 +15,16 @@
 /*白色字体*/
 #searchInner .searchHeader {
   /*头部*/
+  margin-top: 24px;
   /* height: 110px; */
-  background-color: #f5f5fb;
-  border-top: 1px solid #e0e0e0;
+  /* background-color: #f5f5fb; */
+  /* border-top: 1px solid #e0e0e0; */
 }
 
 #searchInner .searchHeader .searchHeader-container {
   height: inherit;
   box-sizing: border-box;
-  padding: 24px 0 24px 110px;
+  /* padding: 24px 0 24px 110px; */
 }
 
 #searchInner .searchHeader .searchHeader-container .control-tabBtn {
@@ -87,43 +88,54 @@
 
 #searchInner .searchHeader .searchHeader-container .searchInput {
   /*搜索框*/
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+#searchInner .searchHeader .searchHeader-container .searchInput .searchInput-left{
+  display: flex;
+  align-items: center;
+  flex: 1;
 }
 
 #searchInner .searchHeader .searchHeader-container .searchInput form {
   float: left;
   position: relative;
+  margin-top: 4px;
+  flex-shrink: 0;
 }
 
 #searchInner .searchHeader .searchHeader-container .searchInput form input[type='search'] {
   float: left;
-  width: 540px;
-  height: 42px;
+  width: 448px;
+  height: 36px;
   box-sizing: border-box;
-  padding-left: 58px;
+  padding-left: 34px;
   padding-right:45px;
-  background: #fff url("/images/biddingSearch/search-icon1.png") 18px center no-repeat;
+  background: #fff url("/images/biddingSearch/bidding-search.png") 10px center no-repeat;
   border: 2px solid #2cb7ca;
   font-size: 14px;
-	border-top-left-radius: 4px;
-    border-bottom-left-radius: 4px;
+	border-top-left-radius: 8px;
+  border-bottom-left-radius: 8px;
+  background-size: 20px 20px;
 }
 
 
-@media only screen and (max-width:1440px),only screen and (max-device-width:1440px){
+/* @media only screen and (max-width:1440px),only screen and (max-device-width:1440px){
   #searchInner .searchHeader .searchHeader-container .searchInput form input[type='search'] {
     width: 500px;
   }
-}
+} */
 
 
 #searchInner .searchHeader .searchHeader-container .searchInput form input[type='submit'] {
   float: left;
-  width: 100px;
-  height: 42px;
+  width: 80px;
+  height: 36px;
   color: #ffffff;
   background-color: #2cb7ca;
   text-align: center;
-  font-size: 18px;
+  font-size: 16px;
   border: 2px solid #2cb7ca;
   border-left: none;
   cursor: pointer;
@@ -131,17 +143,17 @@
 
 #searchInner .searchHeader .searchHeader-container .searchInput form input[type='button'] {
   float: left;
-  width: 100px;
-  height: 42px;
+  width: 80px;
+  height: 36px;
   color: #ffffff;
   background-color: #2cb7ca;
   text-align: center;
-  font-size: 18px;
+  font-size: 16px;
   border: 2px solid #2cb7ca;
   border-left: none;
   cursor: pointer;
-    border-top-right-radius: 4px;
-    border-bottom-right-radius: 4px;
+    border-top-right-radius: 8px;
+    border-bottom-right-radius: 8px;
 }
 
 #searchInner .searchHeader .searchHeader-container .searchInput form .searchSlideText {
@@ -378,7 +390,7 @@ margin-left: 176px;
 
 #searchInner .searchControl .searchTender .leftTitle {
   float: left;
-  width: 94px;
+  width: 98px;
   text-align: right;
   color: #686868;
   padding: 4px 15px 4px 0px;
@@ -629,7 +641,7 @@ border-radius:2px;
   vertical-align: middle;
   margin-top: 2px;
   margin-right: 10px;
-  margin-left: 8px !important;
+  margin-left: 2px !important;
 }
 
 #searchInner .searchControl .searchTender .information .info-content span {
@@ -704,7 +716,7 @@ border-radius:2px;
 
 #searchInner .searchControl .seaTender-inner .tabTitle {
   line-height: 46px;
-  border: 1px solid #e0e0e0;
+  border-bottom: 1px solid #e0e0e0;
 /*  background-color: #f5f4f9;*/
 }
 
@@ -748,6 +760,7 @@ position: absolute;
   background-color: transparent;
   font-size:14px;
   display:flex;
+  justify-content: flex-end;
 }
 #searchInner .right-tabBtn-superSearch{
   width: 265px;
@@ -765,12 +778,13 @@ position: absolute;
   border-radius: 2px;
   background-color: transparent;
   cursor: pointer;
+  flex-shrink: 0;
 }
 
 #searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(1) {
+  width: 100px!important;
   background: transparent url("/images/biddingSearch/tab-icon4.png") 10px center no-repeat;
   background-size: 16px 14px;
-/*margin-right:20px;*/
 }
 
 #searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(1).active {
@@ -780,20 +794,45 @@ position: absolute;
 }
 
 #searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(2) {
+  width: 100px!important;
+  background: transparent url("/images/biddingSearch/tab-icon5.png") 10px center no-repeat;
+  background-size: 20px 20px;
+}
+
+#searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(2).active {
+  background: #fff url("/images/biddingSearch/tab-icon6.png") 10px center no-repeat;
+  color: #2cb7ca;
+  background-size: 20px 20px;
+}
+
+#searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(3) {
   background: transparent url("/images/biddingSearch/tab-icon2.png") 10px center no-repeat;
   background-size: 16px 14px;
 }
 
-#searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(2).active {
+#searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(3).active {
   background: #fff url("/images/biddingSearch/tab-icon1.png") 10px center no-repeat;
   color: #2cb7ca;
   background-size: 16px 14px;
 }
 
-#searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(3) {
+#searchInner .searchControl .seaTender-inner .tabTitle .right-tabBtn button:nth-of-type(4) {
   background: transparent url("/images/biddingSearch/icons-export.png") 10px center no-repeat;
   background-size: 18px 16px;
 }
+#searchInner .tab-detail-list{
+  position: relative;
+}
+#searchInner .tab-detail-list::after{
+  position: absolute;
+  content: '';
+  top: -8px;
+  right: -4px;
+  width: 32px;
+  height: 14px;
+  background: url('/images/biddingSearch/VIP.png') no-repeat right center;
+  background-size: contain;
+}
 
 #right-export{
 	width: 100px !important;
@@ -822,7 +861,7 @@ position: absolute;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li {
-  padding: 15px 0px 0;
+  /* padding: 15px 0px 0; */
   overflow: hidden;
   font-size: 16px;
 }
@@ -830,8 +869,9 @@ position: absolute;
   background-color: #F5F6F7;
   box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.05);
 }
+
 #searchInner .searchControl .seaTender-inner .tabContainer-2 .lucene li {
-  padding: 15px 0px 0px;
+  /* padding: 15px 0px 0px; */
   overflow: hidden;
   font-size: 16px;
 }
@@ -847,12 +887,12 @@ position: absolute;
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .liLuceneList {
   border-bottom: 1px solid #EBEBEB;
   overflow: hidden;
-  padding:0px 15px 15px;
-width:1200px;
+  width:1200px;
+  padding: 16px;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer-2 .lucene li .liLuceneList {
-	padding: 0px 15px 0;
+	/* padding: 0px 15px 0; */
 }
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-left {
   float: left;
@@ -917,9 +957,9 @@ width:1200px;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-field{
-  float: left;
+  /* float: left;
   margin: 0 0 10px 22px;
-  width: calc(100% - 34px);
+  width: calc(100% - 34px); */
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-field .nowrap{
@@ -945,7 +985,7 @@ width:1200px;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-field>div{
-  padding-bottom: 10px;
+  /* padding-bottom: 10px; */
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-field>div:nth-child(1){
@@ -962,7 +1002,7 @@ width:1200px;
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-field>div:last-child{
-  padding-bottom: 8px;
+  /* padding-bottom: 8px; */
 }
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-right a {
@@ -1266,7 +1306,7 @@ width:1200px;
 .haveFile{
   padding: 0px 8px;
   margin: 4px 0 0 15px;
-  width: 52px;
+  /* width: 52px; */
   height: 20px;
   border-radius: 4px;
   border: 1px solid #2CB7CA;
@@ -1275,3 +1315,393 @@ width:1200px;
   color: #2CB7CA;
   line-height: 18px;
 }
+.search-tabs{
+  padding: 0 16px;
+  border-bottom: 1px solid #ECECEC;
+}
+.search-tabs .search-tab-item{
+  display: inline-block;
+  height: 48px;
+  padding: 12px 16px 10px;
+  font-size: 16px;
+  line-height: 24px;
+  color: #686868;
+  cursor: pointer;
+}
+.search-tabs .search-tab-item.tab-active{
+  position: relative;
+  color: #2CB7CA;
+}
+.search-tabs .search-tab-item.tab-active::after{
+  position: absolute;
+  content: '';
+  bottom: 0;
+  left: 50%;
+  width: 32px;
+  height: 2px;
+  transform: translateX(-50%);
+  background: #2CB7CA;
+}
+.search-tabs .search-tab-item.badge-recommend{
+  position: relative;
+}
+.search-tabs .search-tab-item.badge-recommend::before{
+  position: absolute;
+  content: '推荐';
+  top: 0;
+  right: -8px;
+  width: 36px;
+  height: 16px;
+  line-height: 16px;
+  text-align: center;
+  background: #FF3A20;
+  border-radius: 10px 10px 10px 0;
+  color: #fff;
+  font-size: 12px;
+}
+.in-iframe[data-page-name=supsearch] #searchInner .searchHeader .searchHeader-container{
+  padding-right: 0;
+}
+.searchInput{
+  padding: 16px 24px 16px 32px;
+}
+.search-type{
+  position: relative;
+  margin-left: 16px;
+  color: #2CB7CA;
+  font-size: 14px;
+  line-height: 22px;
+  cursor: pointer;
+  flex-shrink: 0;
+}
+.search-type .icon-caret-top-gold,
+.search-type .icon-caret-bottom-gold
+{
+  display: inline-block;
+  width: 16px;
+  height: 16px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+.search-type .icon-caret-top-gold {
+  background: url('/images/biddingSearch/icon-caret-top-gold.png') no-repeat center;
+  background-size: contain;
+}
+.search-type .icon-caret-bottom-gold {
+  background: url('/images/biddingSearch/icon-caret-bottom-gold.png') no-repeat center;
+  background-size: contain;
+}
+.search-type .search-type-dialog{
+  position: absolute;
+  bottom: -70px;
+  left: 50%;
+  width: 104px;
+  padding: 4px 0;
+  border: 1px solid #2CB7CA;
+  border-radius: 4px;
+  transform: translateX(-50%);
+  overflow: hidden;
+  z-index: 9;
+}
+.search-type .s-t-d-item{
+  padding: 4px 16px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #1D1D1D;
+  background: #fff;
+}
+.search-type .s-t-d-item.selected,
+.search-type .s-t-d-item:hover{
+  background: #ECECEC;
+}
+.checkbox-keyword{
+  margin-left: 16px;
+  flex-shrink: 0;
+}
+.checkbox-keyword .search-list-checkbox{
+  padding-left: 20px;
+  cursor: pointer;
+  background: url(/images/biddingSearch/icon-checkbox.png) no-repeat center left;
+  background-size: 14px 14px;
+  border: 0;
+  font-size: 14px;
+  vertical-align: middle;
+}
+.checkbox-keyword .search-list-checkbox.checkbox-checked{
+  background: url(/images/biddingSearch/icon-checked.png) no-repeat center left;
+  background-size: 14px 14px;
+}
+.tooltip-help-class{
+  width: 360px;
+  padding: 16px!important;
+  background: rgba(0, 0, 0, 0.75)!important;
+  border-radius: 4px!important;
+}
+.el-tooltip__popper .popper__arrow{
+  opacity: 0.85!important;
+}
+.tooltip-help-btn{
+  width: 15px;
+  height: 15px;
+  margin: 0 4px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+.tooltip-slot-content{
+  text-align: justify;
+  font-size: 12px;
+  line-height: 18px;
+}
+.add-keyword-input{
+  width: auto!important;
+}
+.add-keyword-input > .el-input__inner{
+  width: 280px;
+  height: 30px;
+  line-height: 30px;
+  border: 1px solid #E0E0E0;
+  border-radius: 4px;
+}
+.keyword-input-container{
+  display: flex;
+  align-items: center;
+  padding: 0 32px 24px;
+  flex-wrap: wrap;
+}
+.add-keyword-container{
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+}
+.add-keyword-btn{
+  margin-left: 8px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #999999;
+  cursor: pointer;
+}
+.add-keyword-btn.focus{
+  color: #2CB7CA;
+}
+.add-keyword-tags{
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+}
+.add-keyword-tags .el-tag{
+  margin-top: 6px;
+  height: 24px;
+  line-height: 22px;
+  padding: 0 8px;
+  background: #F5F6F7;
+  border: 1px solid #ECECEC;
+  border-radius: 4px;
+  margin-right: 8px;
+  color: #1D1D1D;
+  font-size: 14px;
+}
+.add-keyword-tags .el-tag .el-tag__close{
+  color: #AAAAAA;
+}
+.add-keyword-tags .el-tag:hover{
+  color: #2CB7CA;
+  border: 1px solid #2ABED1;
+  background: #fff;
+}
+.add-keyword-tags .el-tag:hover .el-tag__close{
+  background-color: transparent;
+  color: #2CB7CA;
+}
+.keyword-radio-group {
+  margin-left: 16px;
+  margin-top: 6px;
+  display: flex!important;
+}
+.keyword-radio-group .el-radio__label{
+  padding-left: 6px;
+}
+.keyword-radio-group  .el-radio{
+  display: flex;
+  align-items: center;
+  margin-right: 8px;
+}
+.keyword-radio-group .el-radio__input.is-checked+.el-radio__label{
+  color: #686868;
+}
+/* 标讯列表新样式 */
+.liLuceneList {
+  display: flex;
+}
+.liLuceneList .custom-checkbox{
+  float: none;
+  flex-shrink: 0;
+}
+.liLuceneList .list-container{
+  padding-left: 16px;
+  flex: 1;
+  width: calc(100% - 32px);
+}
+.liLuceneList .bid-list-title{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.liLuceneList .list-title-flex {
+  display: flex;
+}
+.liLuceneList .list-title-flex > a{
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  margin-right: 60px!important;
+}
+.liLuceneList .list-title-flex .visited-hd{
+  margin-right: 8px;
+  font-size: 16px;
+  line-height: 24px;
+  color: #1D1D1D;
+  text-decoration: none;
+}
+.liLuceneList .bid-list-title .com-time{
+  color: #999999;
+  font-size: 12px;
+  line-height: 18px;
+  flex-shrink: 0;
+}
+#searchInner .searchControl .seaTender-inner .tabContainer .lucene li:hover .list-title-flex > a,
+#searchInner .searchControl .seaTender-inner .tabContainer .lucene li:hover .list-title-flex > em
+{
+  /* color: #2CB7CA!important; */
+}
+.liLuceneList .bid-list-content {
+  padding: 8px 120px 0 0;
+  font-size: 14px;
+  line-height: 22px;
+  color: #686868;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  text-align: justify
+}
+.liLuceneList .bid-list-tags{
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  margin-top: 8px;
+}
+.liLuceneList .bid-list-tags .tags-item{
+  display: inline-block;
+  padding: 1px 8px;
+  line-height: 18px;
+  font-size: 12px;
+  border-radius: 4px;
+  margin-right: 8px;
+  background: #F5F5FB;
+  color: #686868;
+  box-sizing: border-box;
+  border: 1px solid #ECECEC;
+}
+.liLuceneList .bid-list-tags .tags-item.tags-publish{
+  color: #FF3A20;
+  background: rgba(254, 115, 122, 0.16);
+}
+.liLuceneList .tags-item.tags-file{
+  color: #2CB7CA;
+  background: #fff;
+  border: 1px solid #2CB7CA;
+}
+.liLuceneList .bid-list-tags .icon-collect{
+  position: relative;
+  width: 54px;
+  background-size: 20px 20px;
+  background-position: left center;
+}
+.liLuceneList .bid-list-tags .icon-collect::after{
+  position: absolute;
+  content: '收藏';
+  left: 24px;
+  width: 32px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #1D1D1D;
+}
+.liLuceneList .bid-list-tags .icon-collect.checked{
+  width: 68px;
+}
+.liLuceneList .bid-list-tags .icon-collect.checked::after{
+  position: absolute;
+  content: '已收藏';
+  left: 24px;
+  width: 48px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #1D1D1D;
+}
+.liLuceneList  .luce-field{
+  margin-top: 16px;
+}
+/* .liLuceneList .bid-detail-info{
+  padding-top: 8px;
+} */
+.liLuceneList .bid-detail-info .d-i-item{
+  margin-top: 8px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #686868;
+}
+.liLuceneList .bid-detail-info .d-i-item:nth-child(1) {
+  margin-top: 16px;
+}
+.liLuceneList .bid-detail-info .d-i-item > span{
+  margin-right: 32px;
+  color: #1d1d1d;
+}
+.liLuceneList .bid-detail-info .d-i-item-label{
+  color: #686868;
+}
+.highlight-text{
+  color: #2cb7ca !important;
+  cursor: pointer;
+}
+.highlight-text:hover,
+.highlight-text:active,
+.highlight-text:focus
+{
+  text-decoration: none;
+}
+.over-run-tips{
+  position: absolute;
+  top: 30px;
+  right: 20px;
+  color: #686868;
+  text-align: right;
+  font-size: 14px;
+  line-height: 22px;
+}
+.notkey-component .el-input.is-disabled .el-input__inner{
+  cursor: text!important;
+  background-color: #fff;
+}
+.q-mark-buyer{
+  width: 16px;
+  height: 16px;
+}
+.change-search-input{
+  padding: 16px 24px 10px 32px;
+}
+/* 未登录页面样式调整为与嵌入页面一样 */
+body{
+  background: #f2f2f4;
+}
+#searchInner .searchControl .searchTender,
+#searchInner .searchHeader-container,
+#searchInner .filter-header{
+  background: #fff;
+}
+#searchInner .searchHeader-container,
+#searchInner .searchControl .searchTender{
+  border-radius: 8px;
+}
+#searchInner .searchControl .searchTender{
+  border: 0;
+}

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

@@ -168,14 +168,27 @@
   border: 1px solid #E0E0E0;
   border-radius: 3px;
   background-color: #fff;
-  margin: 8px 16px 0 0!important;
+  margin: 4px 0 0 0!important;
 }
 .all-text-checkbox{
   margin: 4px 16px 0 0!important;
 }
 .check-all{
+  position: relative;
   margin: 16px 0 0 15px!important;
 }
+.check-all.custom-checkbox:checked::before,
+.check-all::before{
+  position: absolute;
+  content: '全选';
+  left: 28px;
+  width: 40px;
+  height: 24px;
+  top: 50%;
+  transform: translateY(-50%);
+  z-index: 9;
+  font-size: 16px;
+}
 .custom-checkbox:checked{
   width: 14px;
   height: 14px;
@@ -186,6 +199,13 @@
 .custom-checkbox:checked:disabled{
   opacity: 0.5;
 }
+.tab-bid-count{
+  float: left;
+  margin: 12px 0 0 60px;
+  font-size: 14px;
+  color: #686868;
+  line-height: 22px;
+}
 #bid-collect{
   width: 100px!important;
   background: transparent url(/images/collect.png) 10px center no-repeat;

+ 5 - 1
src/web/staticres/css/dev2/superSearch-inside.css

@@ -145,6 +145,8 @@
 	        transform: scale(1.2);
 }
 .j-clearicon{
+  width: 18px;
+  height: 18px;
 	right:118px !important;
 }
 .lucene-table tr{
@@ -274,12 +276,14 @@
   color: #999!important;
 }
 .publish-button {
-  margin-left: 40px;
+  margin-left: 24px;
 }
 .publish-button .el-button--primary {
   background-color: #2cb7ca;
   border-color: #2cb7ca;
   color: #fff;
+  padding: 10px 24px!important;
+  border-radius: 8px;
 }
 .publish-button .el-badge__content {
   padding: 0 6px;

+ 26 - 8
src/web/staticres/css/dev2/superSearch.css

@@ -133,16 +133,16 @@
   display: flex;
   justify-content: space-between;
   align-items: center;
-  padding: 0 16px 0 30px;
+  padding: 0 16px 0 22px;
   margin: 0 -15px;
   height: 50px;
   line-height: 50px;
   background: #F5F5FB;
-  border: 1px solid #ECECEC;
+  border-bottom: 1px solid #ECECEC;
 }
 .filter-header .f-h-label{
   width: 100px;
-  padding-left: 16px;
+  padding-left: 10px;
   background-repeat: no-repeat;
   background-position: right center;
   background-size: 16px 16px;
@@ -166,7 +166,7 @@
   align-items: center;
 }
 .filter-header .f-h-action .action-item{
-  min-width: 90px;
+  padding: 0 10px;
   height: 30px;
   line-height: 30px;
   border-radius: 4px;
@@ -219,6 +219,8 @@
   padding: 0 0 32px!important;
 }
 .has-filter-dialog > .el-dialog__body{
+  width: 686px;
+  overflow: hidden;
   padding: 0!important;
 }
 .has-filter-dialog .el-dialog__headerbtn{
@@ -242,6 +244,7 @@
   flex: 1;
   color: #1D1D1D;
   text-align: left;
+  font-size: 12px;
 }
 .filter-save-item .save-value-bg{
   margin-bottom: 8px;
@@ -256,6 +259,12 @@
 .filter-save-item .save-value-bg > span{
   color: #636467;
 }
+.filter-save-item .search_model{
+  margin-top: 4px;
+  font-size: 12px;
+  line-height: 18px;
+  color: #686868;
+}
 .filter-dialog .btn-group,
 .filter-messagebox .btn-group{
   width: 132px;
@@ -280,10 +289,14 @@
 .filter-data-container{
   max-height: 400px;
   overflow-y: scroll;
+  width: 694px;
 }
 .filter-dialog ::-webkit-scrollbar {
   /*滚动条整体样式*/
-  width: 0px!important;
+  width: 8px!important;
+}
+.filter-data-container {
+  scrollbar-width: thin
 }
 .filter-data-container .filter-data-list{
   margin-top: 12px;
@@ -292,7 +305,7 @@
   border-radius: 4px;
 }
 .filter-data-container  .f-l-title{
-  padding: 8px 0;
+  padding: 8px 0 2px;
 }
 .filter-data-container .f-l-content {
   padding: 12px 0;
@@ -328,19 +341,24 @@
   cursor: pointer;
   background-size: contain;
 }
+.filter-data-list .has-search-model{
+  padding:0 0 8px 22px;
+  font-size: 12px;
+  line-height: 18px;
+}
 .filter-data-list .f-l-title{
   display: flex;
   align-items: center;
   justify-content: space-between;
   cursor: pointer;
   font-size: 14px;
-  min-height: 38px;
+  min-height: 22px;
   color: #1D1D1D;
 }
 .filter-data-list .f-l-title .f-l-title-text{
   flex: 1;
   text-align: justify;
-  font-size: 12px;
+  font-size: 14px;
   line-height: 22px;
   max-width: 582px;
 }

+ 29 - 20
src/web/staticres/css/pc/index.css

@@ -65,13 +65,9 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
-  width: 1200px;
-  height: 80px;
-  margin: auto;
-  border-radius: 8px;
-  border: 1px solid #2CB7CA;
-  margin-top: 20px;
-  padding: 0 16px;
+  width: 960px;
+  height: 24px;
+  margin: 24px auto 0;
 }
 .jy-index .noActive {
   margin-top: 56px;
@@ -81,6 +77,11 @@
   flex-direction: initial;
   align-items: center;
 }
+.jy-index .list-msg .l-msg .words .icon_voice{
+  margin-right: 4px;
+  width: 24px;
+  height: 24px;
+}
 .jy-index .list-msg .l-msg .words:nth-child(2) {
   margin-top: 8px;
 }
@@ -98,14 +99,14 @@
 }
 .jy-index .list-msg .l-msg .words h3 {
   font-size: 16px;
-  font-weight: bold;
-  color: #2CB7CA;
+  font-weight: 400;
+  color: #1D1D1D;
   line-height: 24px;
 }
 .jy-index .list-msg .l-msg .words span {
   font-size: 14px;
   color: #1D1D1D;
-  line-height: 22px;
+  line-height: 24px;
   margin: 0 16px;
 }
 .jy-index .list-msg .l-msg .words span:hover {
@@ -115,7 +116,7 @@
 .jy-index .list-msg .l-msg .words p {
   font-size: 12px;
   color: #999999;
-  line-height: 18px;
+  line-height: 24px;
 }
 .jy-index .list-msg .l-msg .words .isActive {
   margin-left: 15px;
@@ -139,7 +140,7 @@
   object-fit: cover;
 }
 .jy-index-banner .custom-dot {
-  bottom: 48px;
+  bottom: 28px;
 }
 .jy-index-banner .custom-dot .swiper-pagination-bullet{
   width: 40px;
@@ -148,6 +149,14 @@
   background: rgba(0, 0, 0, 0.2);
   border-radius: 10px;
   cursor: pointer;
+  opacity: 1;
+}
+.jy-index-banner .custom-dot.light-swiper-bg-light-color .swiper-pagination-bullet {
+  background: rgba(255, 255, 255, 0.32);
+  opacity: 1;
+}
+.jy-index-banner .custom-dot.light-swiper-bg-light-color .swiper-pagination-bullet-active {
+  background: #fff
 }
 .jy-index-banner .custom-dot .swiper-pagination-bullet-active{
   background: #2CB7CA;
@@ -159,7 +168,7 @@
 .jy-index-search{
   position: relative;
   width: 1200px;
-  margin: -20px auto 0;
+  margin: 32px auto 0;
   background: transparent;
   z-index: 1;
 }
@@ -167,12 +176,12 @@
   position: relative;
   display: flex;
   align-items: center;
-  width: 856px;
+  width: 960px;
   margin: 0 auto;
 }
 
 .jy-index-search .search{
-  width: 856px;
+  width: 960px;
   position: relative;
   text-align: center;
   position: relative;
@@ -180,10 +189,10 @@
 }
 
 .jy-index-search .ser {
-  width: 788px;
+  width: 888px;
   height: 48px;
   padding: 0 24px;
-  border: 1px solid #2ABED1;
+  border: 2px solid #2ABED1;
   border-radius: 8px 0 0 8px;
   color: #1d1d1d;
   box-sizing: border-box;
@@ -260,7 +269,7 @@
 .jy-index-search .tips{
   display: inline-block;
   /* width: 620px; */
-  margin-top: 8px;
+  /* margin-top: 8px; */
   text-align: left;
   font-size: 14px;
   line-height: 22px;
@@ -269,7 +278,7 @@
 }
 .jy-index-search .tips i{
   position: absolute;
-  top: 4px;
+  top: 41px;
   left: 58px;
   display: inline-block;
   width: 14px;
@@ -324,7 +333,7 @@
 
 /* 热点事件 */
 .jy-index-hot{
-  margin-top: 32px;
+  margin-top: 48px;
 }
 .jy-index-hot > .hot-container{
   display: flex;

BIN
src/web/staticres/images/biddingSearch/bidding-search.png


BIN
src/web/staticres/images/biddingSearch/tab-icon5.png


BIN
src/web/staticres/images/biddingSearch/tab-icon6.png


BIN
src/web/staticres/images/pc/icon_voice.png


+ 181 - 4
src/web/staticres/js/common.js

@@ -361,7 +361,7 @@ function keyWordHighlight (value, oldChars, newChar) {
   lastArr = lastArr.sort(function (a, b) {
     return b.length - a.length
   })
-  
+
   if (notStrReplacer.length) {
     for (var j = 0; j < notStrReplacer.length; j++) {
       // 正则替换
@@ -371,7 +371,7 @@ function keyWordHighlight (value, oldChars, newChar) {
   if (lastArr.length) {
     value = value.replace(new RegExp('(' + lastArr.join('|') + ')', 'gmi'), newChar)
   }
-  
+
   return value
 }
 function getWxVersion(){
@@ -845,7 +845,7 @@ function isElementVisible (el) {
 	var rect = el.getBoundingClientRect()
 	var vWidth = window.innerWidth || document.documentElement.clientWidth
 	var vHeight = window.innerHeight || document.documentElement.clientHeight
-  
+
 	if (
 	  rect.right < 0 ||
 	  rect.bottom < 0 ||
@@ -854,6 +854,183 @@ function isElementVisible (el) {
 	) {
 	  return false
 	}
-  
+
 	return true
 }
+
+/**
+ * 适用于快速集成不同搜索页面与顶部导航搜索模块的通信
+ * 1. 监听容器 scroll 事件,更新顶部搜索可见状态
+ * 2. 监听容器 input 事件,更新顶部搜索 input 值
+ * 3. 监听顶部搜索 change 事件,更新页面 input 值
+ * 4. 监听顶部搜索 submit 事件,执行传递的页面 submit 函数
+ * 5. 监听 window.onbeforeunload 事件,销毁上述事件监听
+ * 6. 返回 { off: fn, syncInput: fn } 提供手动 off 函数,用于手动销毁上述事件监听, syncInput 用于手动触发同步 input
+ * 7. 初始化时自动触发 change, scroll 事件更新状态
+ *
+ * // 对应支持的搜索类型
+ * types: [
+ *   {
+ *     label: '招标采购搜索',
+ *     key: 'bidding',
+ *   },
+ *   {
+ *     label: '企业搜索',
+ *     key: 'company'
+ *   },
+ *   {
+ *     label: '采购单位搜索',
+ *     key: 'buyer'
+ *   },
+ *   {
+ *     label: '供应搜索',
+ *     key: 'supplier'
+ *   }
+ * ]
+ * @param config
+ * @param config.el - 当前页面 input 搜索框的父容器
+ * @param config.type - 当前页面搜索类型, 对应 key 见上方类型
+ * @param config.submit - 用于实现当前页面搜索事件函数
+ * @param config.change - 用于实现当前页面输入框值改变事件回调函数,vue页面需要使用该函数更新 v-model 值
+ * @param config.inputSelector - 用于实现当前页面搜索 input 输入框选择器特殊处理,默认 input
+ * @param config.submitSelector - 用于实现当前页面搜索提交按钮选择器特殊处理,默认 button
+ * @returns {{off: fn, syncInput: fn}}
+ */
+function initSearchPageEvent (config) {
+  // el 对应容器 submit 自定义提交函数
+  var el = config.el
+  var inputSelector = config.inputSelector || 'input'
+  var submitSelector = config.submitSelector || 'button'
+  // 默认提交函数处理,仅处理相同 type
+  var searchType = config.type || ''
+  var submit = function (item, next) {
+    if (item.params.type === searchType) {
+      return triggerFormSubmit()
+    } else {
+      return next(item)
+    }
+  }
+  if (typeof config.submit === 'function') {
+    submit = config.submit
+  }
+
+  // 需要的工具函数集
+
+  /**
+   * 触发原表单提交按钮点击事件
+   */
+  function triggerFormSubmit () {
+    $(el).find(submitSelector).trigger('click')
+  }
+
+  /**
+   * 返回当前容器可见状态
+   * @returns {boolean}
+   */
+  function getElementVisible () {
+    if (!$(el).get(0)) return false
+    var elRect = $(el).get(0).getBoundingClientRect()
+    var headerTop = 0
+    if ($("#public-nav").is(':visible')) {
+      headerTop = $("#public-nav").height() || 0
+    }
+    return (elRect.top + elRect.height - headerTop) >= 0
+  }
+
+  /**
+   * 检查并更新顶部搜索模块可见状态
+   */
+  function checkShowSearchModule () {
+    if (window.$BRACE && typeof window.$BRACE.$emit === 'function') {
+      window.$BRACE.$emit('nav-search', {
+        type: 'change',
+        params: {
+          show: !getElementVisible()
+        }
+      })
+    }
+  }
+
+  /**
+   * 监听输入值更新并通知顶部搜索模块更新
+   * @param e
+   */
+  function onChangeInput (e) {
+    var nowInput = e.target.value
+    if (window.$BRACE && typeof window.$BRACE.$emit === 'function') {
+      window.$BRACE.$emit('nav-search', {
+        type: 'change',
+        from: 'page',
+        params: {
+          input: nowInput,
+          type: searchType
+        }
+      })
+    }
+  }
+
+  /**
+   * 监听顶部导航搜索模块输入值 change 事件,同步页面 input
+   * @param data
+   */
+  function onListenNavbarSearchChange (data) {
+    if (data.from === 'nav-search' && data.type === 'change') {
+      if (data.params.input !== $(inputEl).val()) {
+        $(inputEl).val(data.params.input)
+        if (typeof config.change === 'function') {
+          config.change(data.params.input)
+        }
+      }
+    }
+  }
+
+  // 绑定滚动事件,切换顶部搜索模块展示
+  $(window).on('scroll', checkShowSearchModule)
+  checkShowSearchModule()
+
+  // 绑定输入事件,通过钩子更新同步搜索 input 值
+  var inputEl = $(el).find(inputSelector)
+  $(inputEl).on('input', onChangeInput)
+  $(inputEl).trigger('input')
+
+  // 绑定提交事件,接手 submit 提交事件
+  if (typeof submit === 'function') {
+    if (window.$BRACE && typeof window.$BRACE.$on === 'function') {
+      window.$BRACE.$on('nav-search-submit', submit)
+    }
+  }
+  // 监听顶部导航搜索模块输入值 change 事件,同步页面 input
+  try {
+    window.$BRACE.$on('nav-search', onListenNavbarSearchChange)
+  } catch (e) {
+    console.warn(e)
+  }
+
+  // 解绑提交事件
+  function offEvent () {
+    $(window).off('scroll', checkShowSearchModule)
+    $(inputEl).off('input', onChangeInput)
+    try {
+      window.$BRACE.$off('nav-search-submit', submit)
+      window.$BRACE.$off('nav-search', onListenNavbarSearchChange)
+    } catch (e) {
+      console.warn(e)
+    }
+  }
+
+  window.onbeforeunload = function () {
+    offEvent()
+  }
+
+  return {
+    off: function () {
+      offEvent()
+    },
+    syncInput: function (val) {
+      if (typeof val === 'string') {
+        $(inputEl).val(val)
+      }
+      $(inputEl).trigger('input')
+    }
+  }
+}

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

@@ -175,7 +175,7 @@ var vm = new Vue({
                 entClass: '', // 单位类型
                 entContact: '', // 联系方式
                 establish:[],//成立时间
-                
+
             },
             listState: {
                 loaded: false, // 是否已经搜索过
@@ -288,6 +288,20 @@ var vm = new Vue({
         // 全选按钮逻辑
         // this.searchTypeChange([], true)
         this.industryTab()
+        /**
+         * 初始化页面搜索框与工作台顶部搜索联动事件函数,详情见对应函数 common.js
+         * 需要在 dom 初始化后调用来监听事件,Vue中需要额外在 input 对应事件额外手动触发事件
+         */
+        if (goTemplateData.inIframe) {
+          this._$SearchEvent = initSearchPageEvent({
+            type: 'company',
+            el: '.search-header-top .input-container',
+            submitSelector: '.search-button',
+            change: (val) => {
+              this.searchContent = val
+            }
+          })
+        }
     },
     methods: {
         industryTab: function() {
@@ -486,7 +500,7 @@ var vm = new Vue({
                             // thisList.push(_this.getTimeDate(10)+'-'+_this.getTimeDate(1))
                             thisList.push('10y-')
                             break;
-                    
+
                         default:
                             break;
                     }
@@ -543,7 +557,7 @@ var vm = new Vue({
                     this.endDate = this.getThisDate(e);
                 }
             }
-            
+
         },
         //成立时间自定义区间搜索按钮
         establishSearch:function () {
@@ -664,6 +678,13 @@ var vm = new Vue({
             Object.assign(this.listState, state)
         },
         getPreSearchList: utils.debounce(function () {
+            /**
+             * 初始化页面搜索框与工作台顶部搜索联动事件函数,详情见对应函数 common.js
+             * 需要在 dom 初始化后调用来监听事件,Vue中需要额外在 input 对应事件额外手动触发事件
+             */
+            if (this._$SearchEvent) {
+              this._$SearchEvent.syncInput()
+            }
             var data = {
                 name: this.searchContent.trim()
             }
@@ -980,4 +1001,4 @@ function baiduEvent(name) {
   } catch (e) {
     console.log('未初始化百度统计')
   }
-}
+}

+ 8 - 3
src/web/staticres/js/login.js

@@ -337,6 +337,7 @@ function checkBigStatus () {
         window.entniche = res.data.entniche // 商机管理用户
         window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
         window.isLogin = true // 用于其他页面判断是否已登录
+        window.isNewEntNiche = res.data.entIsNew
         sessionStorage.setItem('bidPower', JSON.stringify(res.data.power))
         if (res.data.memberStatus > 0) {
           $(".myorderDiv.lastBox").show()
@@ -493,15 +494,19 @@ var logic = function(data,num){
       phone: '',
       avatar: data.s_headimage || ''
     })
+    if (typeof window.GuideIntroDialog === 'function') {
+      window.guideIntroDialog = new GuideIntroDialog()
+    }
     try{
       checkBigStatus()
       infoListCss();
       message.init()
       checkCounts()
-      initIndexMsgList()
-      window.guideIntroDialog = new GuideIntroDialog()
+      if (typeof window.initIndexMsgList === 'function') {
+        initIndexMsgList()
+      }
 		} catch (e) {
-      console.error(e)
+      console.warn(e)
     }
 	}
 }

+ 1 - 1
src/web/staticres/js/pc-message-index.js

@@ -1,4 +1,4 @@
-var temp = '<div class="list-msg" v-if="lists.length"><div class="l-msg"><div class="words" v-for="item in lists" :key="item.id"><i v-show="item.isRead == 0"></i><h3 :class="{isActive: item.isRead == 1}">@@item.msg_type@@</h3><span @click="titleGoto(item)">@@item.title@@</span><p>@@item.createtime@@</p></div></div><img @click="gotoUrl" class="r-msg" src="/images/pc/msg-arrow.png"></div>'
+var temp = '<div class="list-msg" v-if="lists.length"><div class="l-msg"><div class="words" v-for="item in lists" :key="item.id"><img class="icon_voice" src="/images/pc/icon_voice.png" v-show="item.isRead == 0" /><h3 :class="{isActive: item.isRead == 1}">@@item.msg_type@@</h3><span @click="titleGoto(item)">@@item.title@@</span><p>@@item.createtime@@</p></div></div></div>'
 
 var vmMesg = new Vue({
   // el: '#vue-message-index-pc',

+ 18 - 0
src/web/staticres/js/pur-search-index-pc.js

@@ -184,6 +184,17 @@ var vm = new Vue({
         this.$on('updatescope', (data) => {
             this.setData.keyList = data
         })
+        /**
+         * 初始化页面搜索框与工作台顶部搜索联动事件函数,详情见对应函数 common.js
+         * 需要在 dom 初始化后调用来监听事件,Vue中需要额外在 input 对应事件额外手动触发事件
+         */
+        if (goTemplateData.inIframe) {
+          this._$SearchEvent = initSearchPageEvent({
+            type: 'buyer',
+            el: '.search-header-top .input-container',
+            submitSelector: '.search-button'
+          })
+        }
     },
     methods: {
         updatescope(data) {
@@ -197,6 +208,13 @@ var vm = new Vue({
         },
         // 采购单位模糊搜索
         getPreSearchList: utils.debounce(function () {
+            /**
+             * 初始化页面搜索框与工作台顶部搜索联动事件函数,详情见对应函数 common.js
+             * 需要在 dom 初始化后调用来监听事件,Vue中需要额外在 input 对应事件额外手动触发事件
+             */
+            if (this._$SearchEvent) {
+              this._$SearchEvent.syncInput()
+            }
             var data = {
                 name: this.searchContent.trim()
             }

+ 85 - 0
src/web/staticres/js/selector/keyword-tags.js

@@ -0,0 +1,85 @@
+var keywordTagsComponentTemplate = `
+  <div class="add-keyword-container">
+    <div class="add-keyword-tags">
+      <el-tag
+        :key="tag"
+        v-for="tag in list"
+        closable
+        :disable-transitions="false"
+        @close="handleClose(tag)">
+        {{tag}}
+      </el-tag>
+    </div>
+    <div v-if="list.length < maxListLength" style="margin-top:6px;">
+      <el-input
+        class="add-keyword-input"
+        type="text"
+        :placeholder="placeholder"
+        v-model="addKeywordVal"
+        :maxlength="maxLength"
+        show-word-limit
+        :disabled="disabled"
+        @keyup.native="onKeyup"
+      ></el-input>
+      <span class="add-keyword-btn" :class="{'focus': addKeywordVal}" @click="addKeyTags">添加</span>
+    </div>
+    <slot name="radio"></slot>
+  </div>
+`
+
+// var keywordTagsComponentTemplate = "\n<div class=\"selector-content select-list-content\" ref=\"selectContainer\">\n    <span class=\"action-button show-more\" @click=\"showMore = !showMore\" v-if=\"needShowMore\">\n        <span class=\"action-text\">{{ showMore ? '\u6536\u8D77' : '\u66F4\u591A' }}</span>\n        <span class=\"el-icon-arrow-down\" :class=\"showMore ? 'rotate180' : ''\"></span>\n    </span>\n    <div class=\"select-group-container\" v-if=\"selectButtonType === 'checkbox'\">\n        <el-checkbox\n            v-for=\"(item, index) in selectList\"\n            :key=\"index\"\n            :name=\"item.value\"\n            ref=\"selectItem\"\n            v-model=\"item.selected\"\n            v-show=\"showAll(item)\"\n            @change=\"changeState(item)\"\n        >{{ item.label }}</el-checkbox>\n    </div>\n    <div class=\"select-group-container\" v-else-if=\"selectButtonType === 'button'\">\n        <div\n            v-for=\"(item, index) in selectList\"\n            :key=\"index\"\n            ref=\"selectItem\"\n            class=\"j-button-item bgc\"\n            v-show=\"showAll(item)\"\n            :class=\"{\n                active: item.selected,\n                all: item.label === selectItemExp.label\n            }\"\n            @click=\"changeState(item)\"\n        >{{ item.label }}</div>\n    </div>\n</div>\n";
+
+var keywordTagsComponent = {
+    name: 'keyword-tags-pc',
+    template: keywordTagsComponentTemplate,
+    props: {
+      placeholder: {
+        type: String,
+        default: '请输入关键词'
+      },
+      // 输入框可输入最大长度
+      maxLength: {
+        type: Number,
+        default: 15
+      },
+      list: {
+        type: Array,
+        default: function () {
+          return []
+        }
+      },
+      // 数组最大长度
+      maxListLength: {
+        type: Number,
+        default: 5
+      },
+      // 输入框是否禁用
+      disabled: Boolean,
+      beforeChange: Function
+    },
+    data: function () {
+      return {
+        addKeywordVal: ''
+      }
+    },
+    mounted: function () {},
+    methods: {
+      addKeyTags: function () {
+        var beforeChange = this.beforeChange()
+        if (!beforeChange) return
+        if (!this.addKeywordVal) return
+        this.list.push(this.addKeywordVal.replace(/\s*$/g,''))
+        console.log(this.list);
+        this.$emit('change', this.list)
+        this.addKeywordVal = ''
+      },
+      handleClose: function (tag) {
+        this.list.splice(this.list.indexOf(tag), 1)
+        this.$emit('change', this.list)
+      },
+      onKeyup: function () {
+        // this.addKeywordVal = this.addKeywordVal.replace(/^\s+|\s+$/g, '')
+        this.addKeywordVal = this.addKeywordVal.replace(/^\s*/g, '')
+      }
+    }
+}

+ 1660 - 0
src/web/staticres/js/superSearch copy.js

@@ -0,0 +1,1660 @@
+var pageSize = 50;
+var nbflag = false;//是否显示的是最新招标数据
+var currentPage = 1;//当前页
+var submitflag = true;
+var tabularflag = "Y";
+$(function() {
+	priceTime();
+	$(".Price-content").find("span:first-child").click(function(){
+		$(this).addClass("active");
+		$(".pricefat").removeClass("active");
+		beforeSubmit();
+	})
+	$(".timer").find("ul li:first-child").click(function(){
+		timeshow = false;
+		$("#starttime").css({"border-color":""});
+		$("#endtime").css({"border-color":""});
+		$("#timebut").hide();
+		$(".timerInput").removeClass("customtime-active");
+		$(this).addClass("active");
+		$(".timerInput").removeClass("active");
+	})
+	//
+	$(".pricebut").click(function(){
+		priceCss();
+		beforeSubmit();
+	})
+	//
+	$("#timebut").click(function(){
+		timeshow=false;
+		$(this).hide();
+		$(".timerInput").removeClass("customtime-active");
+		if($("#starttime").val()==""&&$("#endtime").val()==""){
+			$("#starttime").css({"border-color":""});
+			$("#endtime").css({"border-color":""});
+			$("#timebut").hide();
+			$(".timerInput").removeClass("customtime-active");
+			$("#timerAll").addClass("active");
+			$(".timerInput").removeClass("active");
+		}else{
+			$(".timerInput").addClass("active");
+			$(".timer").find("ul li:first-child").removeClass("active");
+			$(".release-time .timer li").removeClass("active");
+		}
+		beforeSubmit()
+	})
+	//
+	$(".nbprev").click(function(){
+		$(window).scrollTop(0);
+		$('.custom-checkbox.check-all').prop('checked', false)
+		prev();
+	})
+	$(".nbnext").click(function(){
+    	$(window).scrollTop(0);
+    	$('.custom-checkbox.check-all').prop('checked', false)
+		next();
+
+	})
+	//筛选关闭和打开
+	//根据cookie值设置筛选是否显示 移除该需求操作
+	// var rsw = localStorage.getItem("hideorshow");
+	// if(rsw!=null){
+	// 	if(rsw=="D"){
+	// 		$("#screenBtn").addClass("down");
+  //     $(".searchTender").show();
+  //     $('#fold').show()
+	// 	}else{
+	// 		$("#screenBtn").removeClass("down");
+  //     $(".searchTender").hide();
+  //     $('#fold').hide()
+	// 	}
+	// }
+	//记录用户刷选按钮状态
+	$("#screenBtn").click(function(){
+		if($(this).attr("class").indexOf("down")>0){
+      // localStorage.setItem("hideorshow", "D");
+      $('#fold').show()
+		}else{
+      // localStorage.setItem("hideorshow", "U");
+      $('#fold').hide()
+		}
+	})
+	//
+	var iuod = localStorage.getItem("industryuod");
+	if(iuod!=null){
+		if(iuod=="U"){
+			$(".stop").click();
+		}
+	}
+	//
+	$(".stop").click(function(){
+		if($(this).attr("class").indexOf("up")>0){
+			localStorage.setItem("industryuod", "U");
+		}else{
+			localStorage.setItem("industryuod", "D");
+		}
+	})
+	//全文检索和标题检索切换
+	$("#newsclass li:nth-child(2)").click(function(){
+    // searchInnerVue.listState.total = totalPage
+    // 重置全选按钮
+    $('.custom-checkbox.check-all').prop('checked', false)
+		$(".tabContainer-2 .lucene ul").html("");
+		$("#zbSeatchT [name='selectType']").val("all");
+		$("#right-list").addClass("active").siblings().removeClass("active");
+		$("#allnews .lucene").show().siblings().hide();
+		$(".tabContainer-2").hide();
+		currentPage=1;
+		if(submitflag){
+			$(".hasNoData").hide();
+      $(".working").show();
+      // 隐藏页码
+      searchInnerVue.showPage = false
+			$(".tabContainer").css("min-height","600px");
+			selectType = "all";
+			searchOnsubmit();
+      submitflag=false;
+    }
+	})
+	$("#newsclass li:nth-child(1)").click(function(){
+    // 重置全选按钮
+    $('.custom-checkbox.check-all').prop('checked', false)
+		$("#allnews .lucene ul").html("");
+		$("#zbSeatchT [name='selectType']").val("title");
+		$("#right-list").addClass("active").siblings().removeClass("active");
+		$(".tabContainer-2 .lucene").show().siblings().hide();
+		$("#allnews").hide();
+		currentPage=1;
+		if(submitflag){
+			$(".hasNoData").hide();
+      $(".working").show();
+      // 隐藏页码
+      searchInnerVue.showPage = false
+			$(".tabContainer").css("min-height","600px");
+			selectType = "title";
+			searchOnsubmit();
+      submitflag=false;
+		}
+	})
+
+  $('#entsearch, #pursearch, #gysearch').on('click', function () {
+    if($(this).attr('datahref')){
+      location.href= $(this).attr('datahref')
+    }
+
+  })
+})
+//
+function next(){
+	if($(".nbnext").hasClass("disabled")){
+		return false;
+	}
+	$(".hasNoData").hide();
+	$(".working").show();
+	$(".tabContainer").hide();
+	$("#allnews").hide();
+	$(".pagination").hide();
+	currentPage = parseInt($(".pagination-inner").find("span").text())+parseInt(1)
+	if(currentPage==10){
+		$(".nbnext").addClass("disabled");
+	}else if(currentPage==2){
+		$(".nbprev").removeClass("disabled");
+	}
+	if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()){
+		getNewBids(currentPage);
+	}else{
+		if(!$("#right-table").hasClass("active")){
+			if(secondFlag=="T"){
+				$(".tabContainer").show();
+				$(".hasNoData").hide();
+				$(".nbnext").addClass("disabled");
+				appendDatas(secondList,true,false);
+			}else if(!nbflag&&currentPage<11){
+				getNewBiddings();
+			}else{
+				searchOnsubmit(true);
+			}
+		}else{
+//表格点击下一页
+//			if(secondFlag=="T"){
+//				$(".tabContainer").show();
+//				$(".hasNoData").hide();
+//				$(".nbnext").addClass("disabled");
+//				appendDatas(secondList,true,false);
+//			}else{
+//				getVIPData(true);
+//			}
+		}
+	}
+}
+function prev(){
+	if($(".nbprev").hasClass("disabled")){
+		return false;
+	}
+	$(".hasNoData").hide();
+	$(".working").show();
+	$(".tabContainer").hide();
+	$("#allnews").hide();
+	$(".pagination").hide();
+	currentPage = parseInt($(".pagination-inner").find("span").text())-parseInt(1)
+	if(currentPage==1){
+		$(".nbprev").addClass("disabled");
+	}else if(currentPage<10){
+		$(".nbnext").removeClass("disabled");
+	}
+	if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()){
+		getNewBids(currentPage);
+	}else{
+		if(!$("#right-table").hasClass("active")){
+			if(secondFlag=="T"){
+				$(".tabContainer").show();
+				$(".hasNoData").hide();
+				//$(".nbnext").addClass("disabled");
+				appendDatas(list,true,false);
+			}else if(!nbflag&&currentPage>0){
+				getNewBiddings();
+			}else{
+				searchOnsubmit(true);
+			}
+		}else{
+//表格点击上一页
+//			getVIPData(true);
+		}
+	}
+}
+
+//取redis里的数据
+function getNewBids(pnum, size){
+	$.post("/jylab/supsearch/getNewBids",{pageNumber:pnum,pageSize: size? size : pageSize, pageType:"", fileExists: $("#zbSeatchT [name='fileExists']").val(),bid_field: $("#zbSeatchT [name='bid_field']").val()},function(r){
+		if(r&&r.list!=null&&r.list.length>0){
+			$(".tabContainer").show();
+			//$(".pagination").show();
+			$(".hasNoData").hide();
+			//$(".pagination-inner").find("span").text(currentPage);
+			if(r.list.length<pageSize||currentPage==10){
+				$(".nbnext").addClass("disabled");
+			}else{
+				$(".nbnext").removeClass("disabled");
+      }
+      searchInnerVue.listState.total = Math.ceil(r.count/pageSize)
+      searchInnerVue.checkPageNumAdd1()
+      if (size) {
+        appendDatas(r.list,false,true, true);
+      } else {
+        appendDatas(r.list,false,true);
+      }
+		}else{
+			submitflag=true;
+			$(".tabContainer").hide();
+			$(".pagination").hide();
+			$(".working").hide();
+      $(".hasNoData").show();
+      // 隐藏页码
+      searchInnerVue.showPage = false
+    }
+    // getBidIsColl()
+	})
+}
+
+////最新招标信息
+function getNewBiddings(num, size){
+	// $("#newsclass").hide();
+	// $("#newsnow").show();
+	if(currentPage==1){
+		$(".nbprev").addClass("disabled");
+	}
+	var param = {
+    pageNumber: num ? num : currentPage,
+    pageSize: size ? size : pageSize,
+    reqType: "lastNews",
+    tabularflag: "Y",
+    searchvalue: $("#zbSeatchT [name='keywords']").val(),
+    area: $("#zbSeatchT [name='area']").val(),
+    subtype: $("#zbSeatchT [name='subtype']").val(),
+    publishtime: $("#zbSeatchT [name='publishtime']").val(),
+    selectType : $("#zbSeatchT [name='selectType']").val() || 'title,content',
+    minprice : $("#zbSeatchT [name='minprice']").val(),
+    maxprice : $("#zbSeatchT [name='maxprice']").val(),
+    industry : $("#zbSeatchT [name='industry']").val(),
+    buyerclass: $("#zbSeatchT [name='buyerclass']").val(),
+    buyertel: $("#zbSeatchT [name='buyertel']").val(),
+    winnertel: $("#zbSeatchT [name='winnertel']").val(),
+    notkey: $(".not-key-input-group input").val().slice(0, 10),
+    fileExists: $("#zbSeatchT [name='fileExists']").val(),
+    city: $("#zbSeatchT [name='city']").val(),
+    bid_field: $("#zbSeatchT [name='bid_field']").val()
+  };
+	$.post("/front/pcAjaxReq",param,function(r){
+		if(r&&r.list!=null&&r.list.length>0){
+      // 计算总页码
+      if (currentPage == 1) {
+        searchInnerVue.listState.total = Math.ceil(r.count/pageSize)
+        searchInnerVue.checkPageNumAdd1()
+      }
+			$(".tabContainer").show();
+			//$(".pagination").show();
+			$(".hasNoData").hide();
+			//$(".pagination-inner").find("span").text(currentPage);
+			if(r.list.length<pageSize||currentPage==10){
+				$(".nbnext").addClass("disabled");
+			}else{
+				$(".nbnext").removeClass("disabled");
+			}
+      if (size && num === 1) {
+			  appendDatas(r.list,true,true, true);
+      } else {
+        appendDatas(r.list,false,false);
+      }
+		}else{
+			if(currentPage>1){
+				$(".nbnext").addClass("disabled");
+				if(currentPage==2){
+					$(".nbprev").addClass("disabled");
+				}
+				currentPage = currentPage-1;
+				return false
+			}
+			submitflag=true;
+			$(".tabContainer").hide();
+			$(".pagination").hide();
+			$(".working").hide();
+      $(".hasNoData").show();
+      // 隐藏页码
+      searchInnerVue.showPage = false
+    }
+	})
+}
+//
+
+function appendDatas(datas,flag,isNew,onlyUpdateTable){
+  // flag // 是否有输入
+  let is_field=$("#zbSeatchT [name='bid_field']").val() //是否是领域化
+  let selectContext=selectType.indexOf('content') > -1 //是否正文搜索
+  console.log('selectType: ' + selectType,',flag: ',flag)
+	var listHtml = '';
+	var tableHtml = '';
+	$(".working").hide();
+  $(".pagination").show();
+  // 显示页码
+  searchInnerVue.showPage = true
+	var searchvalueArray = searchvalue.split("+");
+	$(".pagination-inner").find("span").text(currentPage);
+	if(datas.length<pageSize){
+		$(".nbnext").addClass("disabled");
+	}
+	if(!isNew && typeof(totalPage) != "undefined"){
+		if(currentPage == totalPage){
+			$(".nbnext").addClass("disabled");
+		}else{
+			$(".nbnext").removeClass("disabled");
+		}
+	}
+	//(数据够20条显示查看更多遮罩层)
+	if (currentPage==1){//第一页得时候需要判断 是否显示遮罩层
+		if(datas.length>=20){
+			$(".shade_table").css("display","");
+		}else{
+			$(".shade_table").css("display","none");
+		}
+	}
+	for(var i=0;i<datas.length;i++){
+		var index = (currentPage - 1) * pageSize + i + 1;
+		var title = datas[i].title;
+		var detail = datas[i].detail;
+    var fileExists = datas[i].fileExists
+		if(detail){
+			detail = detail.replace(/[^\{\u4e00-\u9fa5]{1,90}{[^\}\u4e00-\u9fa5]+?}/g,"")
+			if(detail.length>200){
+				detail = detail.substring(0,200)+"..."
+			}
+		}
+		if(flag){
+			title = keyWordHighlight(title,searchvalueArray,"<font class='com-highlight'>$1</font>");
+			title=title.replace(/\<br>/g,"")
+			detail = keyWordHighlight(detail,searchvalueArray,"<font class='com-highlight'>$1</font>");
+		}
+		if(title.length<40){
+				title=title+"<span style='color:#fff;display:none;'>"+Math.random().toString(36).substring(2)+"<span>";
+		}
+		var type = datas[i].subtype;
+		if(typeof(type) == "undefined" || type == null || type == ""){
+			type = datas[i].toptype;
+		}
+		if(typeof(type) == "undefined" || type == null || type == ""){
+			type = datas[i].type;
+			if(type == "bid"){
+				type = "中标";
+				datas[i].stypeadd="ZHB"
+			}else if(type == "tender"){
+				datas[i].stypeadd="ZB"
+				type = "招标";
+			}else{
+				type = "";
+			}
+		}
+
+		if (!onlyUpdateTable){ //是否仅更新table
+			listHtml += '<li>'
+			//if(datas.length==(i+1)){
+			//	listHtml +='<div class="liLuceneList">'
+			//}else{
+				listHtml +='<div class="liLuceneList" style="border-bottom: 1px solid #EBEBEB;">'
+      //}
+      // 标题搜索 选择框
+      if (!selectContext || !flag) {
+        listHtml += '<input class="custom-checkbox title-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
+        listHtml +='<div class="luce-left">'
+		if(datas[i].site == '剑鱼信息发布平台') {
+			listHtml += '<span class="userPublish">用户发布</span>'
+		}
+		listHtml += '<em class="visited-hd">'+index+'.</em>'
+						+'<div class="left-title" style="width:auto;max-width:700px">'
+						+'<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a>'
+        if(fileExists) {
+          listHtml+='<span class="haveFile">'+'有附件'+'</span>'
+        }
+        listHtml+='</div>'
+      }
+      // 全文搜索
+			if(flag && selectContext){
+				listHtml +='<div class="luce-left">'
+				if(datas[i].site == '剑鱼信息发布平台') {
+					listHtml += '<span class="userPublish">用户发布</span>'
+					listHtml += '<em class="visited-hd">'+index+'.</em>'
+						+'<div class="left-title" style="width:auto;max-width:1080px">'
+						+'<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a>'
+				} else {
+					listHtml +='<em class="visited-hd" style="padding-left:30px;">'+index+'.</em>'
+						+'<div class="left-title" style="width:auto;max-width:1080px">'
+						+'<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a>'
+				}
+				if(fileExists) {
+					listHtml+='<span class="haveFile">'+'有附件'+'</span>'
+				}
+				listHtml+='</div>'
+				// 全文搜索选择框
+				listHtml += '<div class="left-content" style="width:100%;padding:0;">'
+					+ '<input class="custom-checkbox all-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
+					+'<a style="float:left;width:calc(100% - 32px)" href="javascript:volid(0);">'+detail+'...</a>'
+					+'</div>'
+			}
+			listHtml += '</div><div class="luce-right">'
+			if($.trim(datas[i].area) != "" && datas[i].area != "A"){
+
+          listHtml += '<a href="javascript:;"'+'onclick="gologin('+"'/list/area/"+datas[i].areaadd+".html')"+'">'+datas[i].area+'</a>';
+			}else{
+				listHtml += '<a href="#" style="display:none;"></a>';
+			}
+			if(typeof(type) != "undefined" && type != null && type != ""){
+				// listHtml += '<a href="/list/stype/'+datas[i].stypeadd+'.html">'+type+'</a>';
+        listHtml += '<a href="javascript:;"'+'onclick="gologin('+"'/list/stype/"+datas[i].stypeadd+".html')"+'">'+type+'</a>';
+			}else{
+				listHtml += '<a href="#" style="display:none;"></a>';
+			}
+			//
+			if(typeof(datas[i].industry) != "undefined" && datas[i].industry != null && datas[i].industry != ""&&!is_field){
+				// listHtml += '<a href="/list/industry/'+datas[i].indadd+'.html">'+datas[i].industry+'</a>';
+        listHtml += '<a href="javascript:;"'+'onclick="gologin('+"'/list/industry/"+datas[i].indadd+".html')"+'">'+datas[i].industry+'</a>';
+			}else{
+				listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
+      }
+      // vipState付费用户显示采购单位类型 免费用户不显示
+      // if(typeof(datas[i].buyerclass) != "undefined" && datas[i].buyerclass != null && datas[i].buyerclass != "" && vipState){
+			// 	listHtml += '<a href="javascript:;">'+datas[i].buyerclass+'</a>';
+			// }else{
+			// 	listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
+			// }
+
+			var amount= getacount(datas[i].bidamount,datas[i].budget)
+			if(amount!=""){
+				listHtml += '<a>'+conversionMoeny(amount)+'</a>';
+			}else{
+				listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
+			}
+
+			//
+			if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
+				var diff = utils.dateFromNow(Number(datas[i].publishtime+"000"));
+				if(diff != null){
+					listHtml += '<span class="com-time">'+diff+'</span>';
+				}
+      }
+      // 是否收藏
+      listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
+      // 是否山川应用嵌入环境 添加操作按钮
+      var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+      if (inInjectBI) {
+        listHtml += '<button class="bi-report-inject-button" data-id="'+datas[i]._id+'">添加</button>'
+      }
+      listHtml += '</div>'
+
+
+      //领域化展示 商品&采购单位&中标单位
+      if (is_field && !selectContext){
+        listHtml += '<div class="luce-field">'
+        if (typeof(datas[i].purchasing) != "undefined" && datas[i].purchasing != null && datas[i].purchasing != ""){
+          listHtml += '<div class="nowrap"><span>产品</span><span>'+datas[i].purchasing +'</span></div>'
+        }
+
+        let secondLine=''
+        if (typeof(datas[i].buyer) != "undefined" && datas[i].buyer != null && datas[i].buyer != ""){
+          secondLine += '<div class="nowrap"><span>采购单位</span><span>'+datas[i].buyer +'</span></div>'
+        }
+
+        if (typeof(datas[i].s_winner) != "undefined" && datas[i].s_winner != null && datas[i].s_winner != ""){
+          secondLine += '<div class="nowrap"><span>中标单位</span><span>'+datas[i].s_winner +'</span></div>'
+        }
+
+        if (secondLine!=='') {
+          listHtml += '<div class="secondLine">'+secondLine+'</div>'
+        }
+
+        listHtml += '</div>'
+      }
+
+      listHtml += '</div></li>';
+
+			if(i == 5) {
+				listHtml += '<div data-list-ad class="_t3di2018y5"></div>'
+			}
+			if(i == 26) {
+				listHtml += '<div data-list-ad class="_6omliqck79a"></div>'
+			}
+		}
+
+		//表格仅显示前20条信息
+		if (i >= 20||currentPage!=1){
+			continue
+		}
+		tableHtml +='<tr onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank">'
+				+'<td width="48"><div>'+index+'</div></td>'
+		if(typeof(datas[i].projectname) != "undefined" && datas[i].projectname != null && datas[i].projectname != ""){
+			datas[i].projectname = keyWordHighlight(datas[i].projectname,searchvalueArray,"<font class='com-highlight'>$1</font>");
+			tableHtml += '<td class="tt-l" width="315"><div>'+datas[i].projectname+'</div></td>';
+		}else{
+			let title=datas[i].title.replace(/\<br>/g,"")
+			tableHtml += '<td class="tt-l" width="315"><div>'+title+'</div></td>';
+		}
+
+		if(typeof(type) != "undefined" && type != null && type != ""){
+			tableHtml += '<td width="84"><div>'+type+'公告</div></td>';
+		}else{
+			tableHtml += '<td width="84"><div></div></td>';
+		}
+
+		if(typeof(datas[i].budget) != "undefined" && datas[i].budget != null && datas[i].budget != ""){
+      var budget = tableFormatMoney(datas[i].budget, {
+        type: 'number',
+        digit: 2,
+        level: 1
+      })
+			tableHtml += '<td class="tt-r" width="73"><div>'+budget+'</div></td>';
+		}else{
+			tableHtml += '<td class="tt-r" width="73"><div></div></td>';
+		}
+		if(typeof(datas[i].buyer) != "undefined" && datas[i].buyer != null && datas[i].buyer != ""){
+			tableHtml += '<td class="tt-l" width="181"><div>'+datas[i].buyer+'</div></td>';
+		}else{
+			tableHtml += '<td class="tt-l" width="181"><div></div></td>';
+		}
+		if(typeof(datas[i].bidopentime) != "undefined" && datas[i].bidopentime != null && datas[i].bidopentime != ""){
+			var diff = formatDate(Number(datas[i].bidopentime),"l");
+			tableHtml += '<td width="103"><div>'+diff+'</div></td>';
+		}else{
+			tableHtml += '<td width="103"><div></div></td>';
+		}
+		if(typeof(datas[i].winner) != "undefined" && datas[i].winner != null && datas[i].winner != ""){
+			tableHtml += '<td class="tt-l" width="174"><div>'+datas[i].winner+'</div></td>';
+		}else{
+			tableHtml += '<td class="tt-l" width="174"><div></div></td>';
+		}
+		if(typeof(datas[i].bidamount) != "undefined" && datas[i].bidamount != null && datas[i].bidamount != ""){
+      var bidamount = tableFormatMoney(datas[i].bidamount, {
+        type: 'number',
+        digit: 2,
+        level: 1
+      })
+			tableHtml += '<td class="tt-r" width="76"><div>'+bidamount+'</div></td>';
+		}else{
+			tableHtml += '<td class="tt-r" width="76"><div></div></td>';
+		}
+
+		if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
+			var diff = formatDate(Number(datas[i].publishtime),"s");
+			if(diff != null){
+				tableHtml += '<td width="103"><div>'+diff+'</div></td>';
+			}
+		}else{
+			tableHtml += '<td width="103"><div></div></td>';
+		}
+			tableHtml+='</tr>'
+  }
+  // 搜索框有输入词
+	if(flag){
+    if(selectContext) {
+      $("#allnews").show();
+      $(".tabContainer-2").hide();
+    } else {
+      $("#allnews").hide();
+		  $(".tabContainer-2").show();
+    }
+	}else{
+		$("#allnews").hide();
+		$(".tabContainer-2").show();
+	}
+
+	if (currentPage!=1){
+		tableHtml = sessionStorage.getItem("table_first_context")
+	}else{
+		sessionStorage.setItem("table_first_context",tableHtml)
+	}
+  //console.log(listHtml)
+  // 没有关键词或者没有选中正文
+	if(!flag||!selectContext){
+		if (!onlyUpdateTable){
+			$(".tabContainer-2 .lucene ul").html(listHtml);
+		}
+		$(".tabContainer-2 .lucene-table table tbody").html(tableHtml);
+	}else{
+		if(selectContext){
+			if (!onlyUpdateTable){
+				$("#allnews .lucene ul").html(listHtml);
+			}
+			$("#allnews .lucene-table table tbody").html(tableHtml);
+		}
+	}
+	$(".tabContainer").css("min-height","");
+	submitflag=true;
+  // backTopAdjust();
+  // 生成dom之后再查标讯有无收藏
+  getBidIsColl()
+  checkVisited()
+  // 生成dom之后再查询是否勾选
+  getCheckList()
+  /**
+   * @date 2022/12/15 山川环境嵌入搜索
+   * 更新是否已添加状态
+   */
+  InBIInjectHooks.check()
+}
+
+function getacount(bidamount,budget){
+	if(typeof(bidamount) != "undefined" && bidamount != null && bidamount != ""){
+		return bidamount
+	}
+	if(typeof(budget) != "undefined" && budget != null && budget != ""){
+		return budget
+	}
+	return ""
+}
+
+//金额转化   金额:0-万元以下单位为元  ,万元以上至亿元以下单位为万元 ,亿元以上单位为亿元。保留 小数点后 2 位,不进行四舍五入。
+function conversionMoeny(money){
+	var m = ""+money;
+	var m_arr = m.split(".")
+	var m_1 = m_arr[0]
+	var len_m1 = m_1.length;
+	if (len_m1 >= 9 ){
+		m = m_1.substring(0,len_m1-8) + "." + m_1.substring(len_m1-8,len_m1-6) + "亿元"
+	} else if (len_m1 >= 5) {
+		m =m_1.substring(0,len_m1-4) + "." + m_1.substring(len_m1-4,len_m1-2) + "万元"
+	} else {
+		if(m_arr.length == 1) {
+			return m + ".00元"
+		}
+		var m_2 = m_arr[1]
+		if (m_2.length > 1) {
+			m_2 = m_2.substring(0,2)
+		} else {
+			m_2 = m_2.substring(0,1) + "0"
+		}
+		m = m_1 + "." + m_2 + "元"
+	}
+	return m
+}
+
+//关闭遮罩层
+function layerClose(){
+	$("#myModal").modal("hide");
+}
+//
+function formatDate(date,sl)   {
+	var myDate = new Date(date*1000);
+    var   year=myDate.getFullYear();
+    var   month=myDate.getMonth()+1;
+    var   date=myDate.getDate();
+	var hour = myDate.getHours()
+	var min = myDate.getMinutes()
+	if(sl=="l"){
+		if(hour<10){
+			hour="0"+hour
+		}
+		if(min<10){
+			min="0"+min
+		}
+		return   year+"-"+month+"-"+date+"<br>"+hour+":"+min;
+	}else{
+		return   year+"-"+month+"-"+date;
+	}
+}
+//
+function onpicking(dp,obj){
+	var time = new Date(dp.cal.newdate.y,dp.cal.newdate.M-1,dp.cal.newdate.d).getTime()+"";
+	time = time.substring(0,time.length - 3);
+	$(obj).attr("data-value",time);
+}
+//
+function onclearing(obj){
+	$(obj).attr("data-value","");
+	//localStorage.removeItem($(obj).attr("id"))
+	if($(".customtime").hasClass("active") && getInputTime().join("") == ""){
+		$(".customtime").removeClass("active");
+		$("#publishtime #alltime").addClass("active");
+	}
+}
+//
+function picked(dp,obj){
+	//localStorage.setItem($(obj).attr("id"),$(obj).val()+"_"+$(obj).attr("data-value"))
+}
+//
+function getInputTime(){
+	var starttime = $("#starttime").attr("data-value");
+	if(starttime){
+		starttime = $.trim(starttime);
+	}else{
+		starttime = "";
+	}
+	var endtime = $("#endtime").attr("data-value");
+	if(endtime){
+		endtime = $.trim(endtime);
+	}else{
+		endtime = "";
+	}
+	return [starttime,endtime]
+}
+
+//---取VIP数据---
+function getVIPData(clickpaging){
+	var this_selectType = $("#zbSeatchT [name='selectType']").val();
+	if(this_selectType != "all"){
+		LimitClass.limitFlag = false;
+		LimitClass.result = null;
+		LimitClass.list = null;
+	}else{
+		if(LimitClass.limitFlag){
+			if(clickpaging){
+				LimitClass.paging(currentPage);
+			}else{
+				$(".tabContainer .lucene").hide();
+				$(".tabContainer .lucene-table").show();
+			}
+			return true;
+		}
+	}
+	var tlflag = false;
+	$(".tabContainer-2 .lucene").hide();
+  $("#allnews").hide();
+	$(".pagination").hide();
+  $(".working").show();
+  // 隐藏页码
+  searchInnerVue.showPage = false
+	if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()){
+		$(".working").hide();
+    $(".pagination").show();
+    // 显示页码
+    searchInnerVue.showPage = true
+		return true;
+	}
+	var tabflag = false;
+	if($("#zbSeatchT [name='keywords']").val()!=""){
+		// $("#newsclass").show();
+		// $("#newsnow").hide();
+		tlflag = true;
+	}else{
+		// $("#newsclass").hide();
+		// $("#newsnow").show();
+		tlflag = false;
+	}
+	if(currentPage==1){
+		$(".nbprev").addClass("disabled");
+	}
+	var reqType="bidSearch";
+	if($("#zbSeatchT [name='keywords']").val()==""){
+		reqType="lastNews";
+	}
+	var param = {
+				pageNumber: 1,
+        pageSize: pageSize,
+				reqType: reqType,
+				searchvalue: $("#zbSeatchT [name='keywords']").val(),
+				area: $("#zbSeatchT [name='area']").val(),
+				subtype: $("#zbSeatchT [name='subtype']").val(),
+				publishtime: $("#zbSeatchT [name='publishtime']").val(),
+				selectType : this_selectType || 'title,content',
+				minprice : $("#zbSeatchT [name='minprice']").val(),
+				maxprice : $("#zbSeatchT [name='maxprice']").val(),
+				industry : $("#zbSeatchT [name='industry']").val(),
+        tabularflag : tabularflag,
+        buyerclass: $("#zbSeatchT [name='buyerclass']").val(),
+        buyertel: $("#zbSeatchT [name='buyertel']").val(),
+        winnertel: $("#zbSeatchT [name='winnertel']").val(),
+		    notkey: $(".not-key-input-group input").val().slice(0, 10),
+        fileExists: $("#zbSeatchT [name='fileExists']").val(),
+        city: $("#zbSeatchT [name='city']").val(),
+        bid_field: $("#zbSeatchT [name='bid_field']").val()
+      };
+	$.ajax({
+       type:'post',
+       url:'/front/pcAjaxReq',
+       async:false,
+	   data:param,
+       dataType:'json',
+       success:function(r){
+			afterAjaxReq(r);
+			if(r&&r.list!=null&&r.list.length>0){
+				$(".hasNoData").hide();
+				if(r.list.length<pageSize||currentPage==10){
+					$(".nbnext").addClass("disabled");
+				}else{
+					$(".nbnext").removeClass("disabled");
+				}
+				// appendDatas(r.list,tlflag,true,true);
+				appendDatas(r.list,tlflag,true,false);
+			}else{
+				$(".working").hide();
+        $(".hasNoData").show();
+        // 隐藏页码
+        searchInnerVue.showPage = false
+			}
+      tabflag = true;
+		}
+	})
+	return tabflag
+}
+///
+function beforeSubmit(n){
+  // n有值即执行的是点击搜索按钮或回车搜索事件
+  // n有值且关键词不为空时 存sessionStorage值
+  if ($("#zbSeatchT [name='keywords']").val() !=="") {
+    sessionStorage.setItem('is-click-search', 1)
+  } else {
+    sessionStorage.removeItem('is-click-search')
+  }
+  // 重置全选按钮
+  $('.custom-checkbox.check-all').prop('checked', false)
+	$(".hasNoData").hide();
+  $(".working").show();
+  // 隐藏页码
+  searchInnerVue.showPage = false
+	//$(".tabContainer-2 .lucene ul").html("");
+	//$(".tabContainer-2 .lucene-table table tbody").html("");
+	$(".tabContainer .lucene ul").html("");
+	//$(".tabContainer .lucene-table table tbody").html("");
+	$(".tabContainer").css("min-height","600px");
+	$("#right-list").addClass("active").siblings().removeClass("active");
+	$(".tabContainer-2 .lucene").show().siblings().hide();
+	$("#right-list").addClass("active").siblings().removeClass("active");
+	$("#allnews .lucene").show().siblings().hide();
+	$(".tabContainer-2").hide();
+	$("#allnews").hide();
+	$(".pagination").hide();
+	setTimeout(function(){
+    currentPage=1;
+    // 重置element ui页码为1
+    searchInnerVue.listState.num = 1
+		//时间
+		if(currentPage==1){
+			$(".nbprev").addClass("disabled");
+		}
+		var publishtime = null;
+		var timeslot = getInputTime().join("_");
+		if($(".timerInput").hasClass("active")){
+			if(timeslot != "_"){
+				$("#zbSeatchT [name='publishtime']").val(timeslot);
+			}else{
+				$("#zbSeatchT [name='publishtime']").val("");
+			}
+		}else{
+			publishtime = $(".timer .active").attr("data-value");
+			if(typeof(publishtime) != "undefined"){
+				$("#zbSeatchT [name='publishtime']").val(publishtime);
+			}else{
+				$("#zbSeatchT [name='publishtime']").val("");
+			}
+		}
+		if(timeslot != "_"){
+			$("#zbSeatchT [name='timeslot']").val(timeslot);
+		}else{
+			$("#zbSeatchT [name='timeslot']").val("");
+		}
+		//地区
+		// var selectAreas = "";
+		// $(".region-content .active:not(.parent-node)").each(function(){
+		// 	var thisText = $(this).text();
+		// 	if(thisText != "全国"){
+		// 		if(selectAreas != ""){
+		// 			selectAreas += ",";
+		// 		}
+		// 		selectAreas += thisText;
+		// 	}
+		// });
+		// $("#zbSeatchT [name='area']").val(selectAreas);
+		//类型
+		var selectSubTypes = "";
+		$(".info-content .active:not(.parent-node)").each(function(){
+			if($(this).attr("id") == "whole"||$(this).attr("id") == "infoBtn"){
+				return true;
+			}
+			var thisText = $(this).attr("data-value");
+			if (thisText!=undefined){
+				if(selectSubTypes != ""){
+				selectSubTypes += ",";
+				}
+				selectSubTypes += thisText;
+			}
+		});
+    // 信息类型二级分类全选只传一级分类文案
+    $(".info-content .parent-node").each(function(){
+			if($(this).attr("id") == "whole"||$(this).attr("id") == "infoBtn"){
+				return true;
+			}
+			var thisHaveClass = $(this).hasClass("active");
+      let thisText = $(this).text()
+			if (thisHaveClass){
+        if(thisText == '招标预告') {
+          selectSubTypes = selectSubTypes.replace(/预告,预审,预审结果,论证意见,需求公示/, "招标预告")
+        } else if(thisText == '招标公告') {
+          selectSubTypes = selectSubTypes.replace(/招标,邀标,询价,竞谈,单一,竞价,变更/, "招标公告")
+        } else if(thisText == '招标结果') {
+          selectSubTypes = selectSubTypes.replace(/中标,成交,废标,流标/, "招标结果")
+        } else if(thisText == '招标信用信息') {
+          selectSubTypes = selectSubTypes.replace(/合同,验收,违规/, "招标信用信息")
+        }
+			}
+		});
+		$("#zbSeatchT [name='subtype']").val(selectSubTypes);
+		//行业
+		var selectIndustrys = "";
+		var thisText = "";
+		$(".industry-content .active").each(function(){
+			if($(this).attr("id") == "induAll"){
+				return true;
+			}else if($(this).hasClass("active")&&$(this).hasClass("parent-node")){
+				$(this).nextUntil(".diver").each(function(){
+					thisText = $(this).attr("data-value");
+					if(selectIndustrys != ""){
+						selectIndustrys += ",";
+          }
+					selectIndustrys += thisText;
+				});
+			}else{
+				thisText = $(this).attr("data-value");
+				if(selectIndustrys != ""){
+					selectIndustrys += ",";
+				}
+				selectIndustrys += thisText;
+			}
+    });
+		$("#zbSeatchT [name='industry']").val(selectIndustrys);
+		//价格
+		if(!$("#priceAll").hasClass("active")){
+			var selectMinPrices = $(".PriceInput [name='minprice']").val();
+			var selectMaxPrices =  $(".PriceInput [name='maxprice']").val();
+			$("#zbSeatchT [name='minprice']").val(selectMinPrices);
+			$("#zbSeatchT [name='maxprice']").val(selectMaxPrices);
+		}else{
+			$("#zbSeatchT [name='minprice']").val("");
+			$("#zbSeatchT [name='maxprice']").val("");
+		}
+		//搜索关键词
+		var searchname = $("#zbSeatchT input[name='keywords']").val();
+    //$("#zbSeatchT input[name='searchvalue']").val($.trim(searchname));
+    // 采购单位类型
+    var buyerTypeArr = ""
+    var buyerText = ""
+    $(".buyclass .active").each(function(){
+      if ($(this).hasClass('buyclass-all')) {
+        return true
+      } else if ($(this).hasClass('buy-list')) {
+        if ($(this).attr("data-value")) {
+          buyerText = $(this).attr("data-value");
+          if(buyerTypeArr != ""){
+            buyerTypeArr += ",";
+          }
+          buyerTypeArr += buyerText;
+        }
+      }
+    })
+    //采购单位类型
+    $("#zbSeatchT [name='buyerclass']").val(buyerTypeArr)
+    // $("#buyerInput").val(buyerTypeArr);
+	//采购单位联系方式有无
+    $("#zbSeatchT [name='buyertel']").val($(".custom-input[name='buyertel']").attr('data-value'));
+    //中标单位联系方式有无
+    $("#zbSeatchT [name='winnertel']").val($(".custom-input[name='winnertel']").attr('data-value'));
+    //排除词
+	$("#zbSeatchT [name='notkey']").val($(".not-key-input-group input").val().slice(0, 10));
+		if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()&&n!="F"){
+			getNewBids(currentPage);
+		}else{
+			if(n!="F"){
+				if(submitflag){
+					if($.trim(searchname)==""){
+						getNewBiddings();
+						nbflag = false;
+					}else{
+						searchvalue = $.trim(searchname);
+						searchOnsubmit();
+						nbflag = true;
+					}
+					submitflag=false;
+				}
+				setTimeout(function(){
+					submitflag=true
+				},200);
+			}else{
+				if($.trim(searchname)!=""){
+					nbflag = true;
+				}
+			}
+		}
+		return true
+	},200)
+}
+var LimitClass = {
+	prevNoLimitFlag: false,
+	limitFlag: false,
+	list: null,
+	result: null,
+	paging: function(cp){
+		if(LimitClass.list != null){
+			var start = (cp-1)*pageSize;
+			var end = start+pageSize;
+			if(end > LimitClass.list.length){
+				end = LimitClass.list.length;
+			}
+			LimitClass.result.list = LimitClass.list.slice(start,end);
+		}
+		pcAjaxReqCallBack(LimitClass.result);
+	}
+};
+//搜索关键词信息
+function searchOnsubmit(clickpaging){
+	var this_selectType = $("#zbSeatchT [name='selectType']").val();
+	if(this_selectType != "all"){
+		LimitClass.limitFlag = false;
+		LimitClass.result = null;
+		LimitClass.list = null;
+	}else{
+		if(clickpaging&&LimitClass.limitFlag){
+			LimitClass.paging(currentPage);
+			return;
+		}
+	}
+	// $("#newsclass").show();
+	// $("#newsnow").hide();
+	if(currentPage==1){
+		$(".nbprev").addClass("disabled");
+	}
+	var param = {
+    pageNumber: currentPage,
+    pageSize: pageSize,
+    reqType: "bidSearch",
+    searchvalue: $("#zbSeatchT [name='keywords']").val(),
+    area: $("#zbSeatchT [name='area']").val(),
+    subtype: $("#zbSeatchT [name='subtype']").val(),
+    publishtime: $("#zbSeatchT [name='publishtime']").val(),
+    selectType : this_selectType || 'title,content',
+    minprice : $("#zbSeatchT [name='minprice']").val(),
+    maxprice : $("#zbSeatchT [name='maxprice']").val(),
+    industry : $("#zbSeatchT [name='industry']").val(),
+    tabularflag: "Y",
+    buyerclass: $("#zbSeatchT [name='buyerclass']").val(),
+    buyertel: $("#zbSeatchT [name='buyertel']").val(),
+    winnertel: $("#zbSeatchT [name='winnertel']").val(),
+    notkey: $(".not-key-input-group input").val().slice(0, 10),
+    fileExists: $("#zbSeatchT [name='fileExists']").val(),
+    city: $("#zbSeatchT [name='city']").val(),
+    bid_field: $("#zbSeatchT [name='bid_field']").val()
+  };
+	$.post("/front/pcAjaxReq",param,function(r){
+		if(r.limitFlag){
+			LimitClass.limitFlag = true;
+			LimitClass.result = r;
+			LimitClass.list = r.list;
+			LimitClass.paging(currentPage);
+      LimitClass.prevNoLimitFlag = false;
+      // 重新分页
+      searchInnerVue.listState.total = r.totalPage
+      searchInnerVue.checkPageNumAdd1()
+		}else{
+			LimitClass.prevNoLimitFlag = true;
+      LimitClass.limitFlag = false;
+      pcAjaxReqCallBack(r);
+    }
+    // getBidIsColl()
+	});
+}
+function showSearchTipForTimeRange (type) {
+	var tempDom = $("#hasNoData_tiptext>font:eq(0)")
+	var tipMap = {
+    'fiveyear': '近5年',
+    'threeyear': '近3年',
+		'thisyear': '近1年',
+		'lately-7': '近7天',
+		'lately-30': '近30天'
+	}
+	var tempStr = ''
+	var defaultRange =  $("#zbSeatchT [name='publishtime']").val() || selectPublishtime
+	if (tipMap[defaultRange]) {
+		tempStr = tipMap[defaultRange]
+	} else {
+		var tempTimeList = defaultRange.split('_')
+		if (tempTimeList[0]) {
+			tempStr = new Date(tempTimeList[0] * 1000).pattern('yyyy/MM/dd')
+		}
+		if (tempTimeList[1]) {
+			if (tempStr.length) {
+				tempStr += '-'
+			}
+			tempStr += new Date(tempTimeList[1] * 1000).pattern('yyyy/MM/dd')
+		}
+	}
+	tempDom.find('span').text(tempStr)
+	if (type !== false) {
+		tempDom.show();
+	}
+}
+$(function () {
+	setTimeout(function(){
+		showSearchTipForTimeRange(false);
+	},500)
+})
+function pcAjaxReqCallBack(r){
+	afterAjaxReq(r);
+  var isAllSearch = $("#zbSeatchT [name='selectType']").val()=="all";
+	if(r.list == null || r.list.length == 0){
+		$("#hasNoData_tiptext>font").hide();
+		if(r.status==-1){
+			$("#hasNoData_tiptext>font:eq(1)").show();
+		}else if (r.status==-2){
+			$("#hasNoData_tiptext>font:eq(2)").show();
+		}else{
+			showSearchTipForTimeRange()
+		}
+		if(isAllSearch){
+			$("#allSearchModel").hide();
+		}else{
+			// $("#allSearchModel").show();
+		}
+		//分页过程中,突然切换控制状态
+		if(r.limitFlag && LimitClass.prevNoLimitFlag){
+			$("#hasNoData_tiptext>font").hide();
+			$("#hasNoData_tiptext>font:eq(1)").show();
+		}else{
+			if(currentPage>1){
+				$(".nbnext").addClass("disabled");
+				if(currentPage==2){
+					$(".nbprev").addClass("disabled");
+				}
+				currentPage = currentPage-1;
+				return false
+			}
+		}
+		$(".tabContainer").hide();
+		$(".pagination").hide();
+		$(".working").hide();
+    $(".hasNoData").show();
+    // 隐藏页码
+    searchInnerVue.showPage = false
+		submitflag=true;
+	}else{
+		//$(".tabContainer").show();
+		$(".hasNoData").hide();
+		appendDatas(r.list,true,false)
+	}
+}
+function afterAjaxReq(r){
+	secondFlag=r.secondFlag;
+	if(r.interceptWord != ""){
+      	$("#intercept .interceptWord").text(r.interceptWord);
+      	$("#intercept .interceptLimit").text(r.interceptLimit);
+		$("#intercept").removeClass("hidden");
+	}else{
+		$("#intercept").addClass("hidden");
+	}
+	if(r.keywords != null && typeof(r.keywords) != "undefined"){
+		$(".searchname").val(r.keywords);
+	}
+	$(".side-bar-bottom-font").text("“"+$.trim($(".searchname").val()).replace(/\s+/," ")+"”");
+	if(secondFlag==""&&typeof(r.searchvalue) != "undefined"){
+		searchvalue = r.searchvalue;
+	}
+	if(r.pcAjaxFlag=="T"){
+		searchvalue = r.searchvalue;
+		totalPage = r.totalPage;
+		list= r.list;
+    secondList= r.secondList;
+    // vue 重置总页数
+    searchInnerVue.listState.total = totalPage
+    searchInnerVue.checkPageNumAdd1()
+	}
+	if(secondFlag==""&&typeof(totalPage) != "undefined" && currentPage == 1){
+		if (r.totalPage==1){
+			totalPage = parseInt(r.count/pageSize)+1;
+			if(totalPage>10){
+				totalPage=10;
+      }
+      // vue 重置总页数
+      searchInnerVue.listState.total = totalPage
+      searchInnerVue.checkPageNumAdd1()
+		}else{
+      totalPage = r.totalPage;
+      searchInnerVue.listState.total = totalPage
+      searchInnerVue.checkPageNumAdd1()
+		}
+	}
+}
+
+function getCheckList() {
+  var getSelectNum = 0 // 获取这一页有多少个选中
+  var $dom = $('.custom-checkbox:not(.check-all)[name="bid-list"]')
+  $.each($dom,function(i, value) {
+    if(selectDataIds.length == 0) return
+    selectDataIds.forEach(function(item,index) {
+      let dataid = $(value).attr('dataid')
+      if (item == dataid) {
+        getSelectNum++
+        $(this).attr('checked', true)
+      }
+    })
+  })
+  if(getSelectNum>=50) {
+    $('.custom-checkbox').prop("checked",true)
+  } else {
+    $('.custom-checkbox').prop("checked",false)
+    $dom.each(function(i, dNode) {
+      if(selectDataIds.length == 0) return
+      selectDataIds.forEach(function(item,index) {
+        let dataid = $(dNode).attr('dataid')
+        if (item == dataid) {
+          getSelectNum++
+          $(dNode).prop('checked', true)
+        }
+      })
+    })
+  }
+}
+
+/*
+  招标信息是否被收藏接口ajax
+  bids: String, // 招标信息id(多个用,号拼接) 必填
+*/
+function getBidIsColl () {
+  collectClick()
+  var bids = ""
+  var dataId = ""
+  // 区分标题搜索和全文搜索收藏
+  var allSearch = selectType.indexOf('content') > -1 && $("#zbSeatchT [name='keywords']").val() !==""
+  // console.log('当前是否显示的是全文',allSearch)
+  var $dom = allSearch ? $('.all-text-checkbox[name="bid-list"]') : $('.title-text-checkbox[name="bid-list"]')
+  $dom.each(function() {
+    if ($(this).attr('dataid')) {
+      dataId = $(this).attr("dataid");
+      if(bids != ""){
+        bids += ",";
+      }
+      bids += dataId;
+    }
+  })
+  $.ajax({
+    type:'post',
+    url:'/publicapply/bidcoll/isColl?t=' + Date.now(),
+    data: {
+      bids: bids
+    },
+    dataType:'json',
+    success: function(r){
+      if (r.data) {
+        var data = r.data
+        $('.icon-collect').removeClass('checked')
+        data.forEach(function(item,index){
+          if (selectType == 'title') {
+            $('.icon-collect[dataid="' + item + '"]').addClass('checked')
+          } else {
+            $('.icon-collect[dataid="' + item + '"]').addClass('checked')
+          }
+        })
+      }
+    }
+  })
+}
+
+// 收藏点击事件
+function collectClick() {
+  // console.log(vipState, '是否是超级订阅用户')
+  // 单个收藏点击事件
+  $('.icon-collect').unbind('click').on('click',function(e) {
+    // 登录判断
+    if (!loginflag) {
+      openLoginDig()
+      return
+    }
+    baiduEvent('列表页标讯收藏-星标') // 百度统计代码
+    e.stopPropagation()
+    var $that = $(this)
+    var checked = $(this).hasClass('checked')
+    var checkedId =  $(this).attr('dataid')
+    var binfo = [{
+      bid: checkedId
+    }]
+    if (checked) {
+      // 单个取消收藏行为
+      collBidAction('R', binfo, function(res) {
+        if (res.data) {
+          if (selectType == 'title') {
+            // 标题搜索下相关样式
+            // $that.removeClass('checked').parents().siblings('input[type="checkbox"]').prop("checked",false).removeAttr('disabled')
+            $that.removeClass('checked')
+          } else {
+            // 全文搜索下相关样式
+            // $that.removeClass('checked').parents('.luce-right').siblings().find('input[type="checkbox"]').prop("checked",false).removeAttr('disabled')
+            $that.removeClass('checked')
+          }
+          toastFn('已取消收藏', 800)
+        } else {
+          toastFn(res.error_msg, 1000)
+        }
+      })
+    } else {
+      // 单个收藏行为
+      vm.dialogTitle = '重要项目一键创建标签收藏!请完善个人信息,为您匹配精准服务'
+      // 查询是否需要用户留资料 不需要 则执行下一步回调(收藏标讯行为)
+      vm.isNeedSubmit('article_collection',function() {
+        sessionStorage.setItem('$save-tags-binfo', JSON.stringify(binfo)) // 将本次收藏的标讯id缓存起来 用于绑定标签时使用
+        collBidAction('C', binfo, function(res) {
+          if (res.data) {
+            toastFn('收藏成功', 1500)
+            if (selectType == 'title') {
+              $that.addClass('checked')
+            } else {
+              $that.addClass('checked')
+            }
+            var top = (parseInt($that.position().top) + 50 ) + 'px';
+            $('.tags-box').show(function(){
+              activeTags = []
+              $('.tag-labels').empty()
+              $('.clear-input').val('')
+              $('.tags-list').find('.tags-item').removeClass('tags-active')
+              $('.tag-placeholder').show()
+            }).css('top', top)
+            getUserTags()
+          } else {
+            // 是超级订阅用户或者其他付费用户
+            if (vipState || res.error_msg.indexOf('付费') > -1) {
+              toastFn('您的标讯收藏上限为5000条,请联系客服人员。', 1500)
+            } else {
+              updateVipDialog('标讯收藏满100条-去升级')
+            }
+          }
+        })
+      }, $(this))
+    }
+  })
+  // 批量收藏
+  $('#bid-collect').off('click').bind('click',function(e){
+    // 登录判断
+    if (!loginflag) {
+      openLoginDig()
+      return
+    }
+    baiduEvent('列表页标讯收藏-星标') // 百度统计代码
+    e.stopPropagation()
+    var top = (parseInt($(this).position().top) + 60 ) + 'px';
+    var len = $('.custom-checkbox:not(".check-all"):checked').length;
+    var checkedId = [] // 提交后端需要的标讯id数组
+    var leftArr = [] // checkbox选中的数据
+    var rightArr = [] // 当前已收藏过的数据
+    var notSameArr = [] // 选中的数据 与 收藏过的数据相比不同的数组
+    $('.custom-checkbox:not(".check-all"):checked').each(function(){
+      if ($(this).attr('dataid')) {
+        checkedId.push({
+          bid: $(this).attr('dataid')
+        })
+        leftArr.push($(this).attr('dataid'))
+      }
+    })
+    $('.icon-collect.checked').each(function() {
+      if ($(this).attr('dataid')) {
+        rightArr.push($(this).attr('dataid'))
+      }
+    })
+    var $that = $(this)
+    // 判断有无选中的标讯信息
+    if (len > 0 || selectDataIds.length > 0) {
+      selectDataIds.forEach(function(v) {
+        checkedId.push({
+          bid: v
+        })
+      })
+      checkedId = arrUnique(checkedId)
+      if(leftArr.length <= rightArr.length) {
+        for (key in leftArr) {
+          var stra = leftArr[key];
+          var count = 0;
+          for (var j = 0; j < rightArr.length; j++) {
+            var strb = rightArr[j];
+            if (stra == strb) {
+              count++;
+            }
+          }
+          if (count === 0) { //表示数组1的这个值没有重复的,放到notSameArr列表中
+            notSameArr.push(stra);
+          }
+        }
+        // 如果没有不同的值 即为选中的标讯都已收藏过 有不同的值即为有未收藏的标讯
+        // console.log(notSameArr, 'notSameArr')
+        if(notSameArr.length == 0) {
+          toastFn('已收藏', 800)
+          return
+        }
+      }
+      vm.dialogTitle = '重要项目一键创建标签收藏!请完善个人信息,为您匹配精准服务'
+      // 查询是否需要用户留资料 不需要 则执行下一步回调(批量收藏标讯行为)
+      vm.isNeedSubmit('article_collection', function() {
+        sessionStorage.setItem('$save-tags-binfo', JSON.stringify(checkedId)) // 将本次收藏的标讯id缓存起来 用于绑定标签时使用
+        collBidAction('C', checkedId, function(res) {
+          if (res.data) {
+            toastFn('收藏成功', 1500)
+            if (selectType == 'title') {
+              $('.custom-checkbox:not(".check-all"):checked').siblings().children('.icon-collect').addClass('checked')
+            } else {
+              $('.custom-checkbox:not(".check-all"):checked').parents('.liLuceneList').find('.icon-collect').addClass('checked')
+            }
+            // 收藏成功后再查一次收藏状态,为了区分达到收藏上限点时部分收藏成功,部分收藏失败
+            getBidIsColl()
+            // 弹出标签弹框时 清除上次选择的标签
+            $('.tags-box').show().css('top', top)
+            getUserTags()
+          } else {
+            // 是超级订阅用户或者其他付费用户
+            if (vipState || res.error_msg.indexOf('付费') > -1) {
+              toastFn('您的标讯收藏上限为5000条,请联系客服人员。', 1500)
+            } else {
+              updateVipDialog('标讯收藏满100条-去升级')
+            }
+          }
+        })
+      })
+    } else {
+      toastFn('尚未选择标讯,请选择', 1000)
+    }
+  })
+}
+
+/**
+ * @date 2022/12/15 山川环境嵌入搜索
+ * 山川应用嵌入环境 特殊处理
+ */
+
+var InBIInjectHooks = {
+  // 已添加的标讯信息
+  ids: [],
+  // 获取已添加的标讯信息
+  getInfoIds: function () {
+    $.ajax({
+      url: '/jyapi/biService/getInfoId',
+      type: 'POST',
+      success: function (res) {
+        if (Array.isArray(res.data)) {
+          this.ids = res.data
+          this.upDateView()
+        }
+      }.bind(this)
+    })
+  },
+  // 添加标讯信息
+  setInfoId (ids) {
+    $.ajax({
+      url: '/jyapi/biService/addProject',
+      type: 'POST',
+      contentType: 'application/json',
+      data: JSON.stringify({
+        info_id: ids.join(','),
+        source: 2
+      }),
+      success: function () {
+        this.getInfoIds()
+        if (ids.length > 1) {
+          selectDataIds = []
+          $('.custom-checkbox').prop("checked", false)
+        }
+      }.bind(this)
+    })
+  },
+  // 刷新视图
+  upDateView () {
+    var _this = this
+    $(".liLuceneList").each(function () {
+      var nowId = $(this).find('.custom-checkbox').attr('dataid')
+      var hasNowId = _this.ids.indexOf(nowId) !== -1
+
+      // 刷新 dom 状态
+      $(this).find('.bi-report-inject-button').text(hasNowId ? '已添加' : '添加')
+      $(this).find('.custom-checkbox').prop('disabled', hasNowId)
+    })
+  },
+  getCheckIds () {
+    return selectDataIds || []
+  },
+  checkInBI () {
+    var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+    return inInjectBI
+  },
+  check () {
+    if (this.checkInBI()) {
+      // 获取数据
+      this.getInfoIds()
+    }
+  },
+  inject () {
+    if (this.checkInBI()) {
+      $("body").addClass('in-iframe in-bi')
+
+      // 仅展示信息-结果类型
+      $(".bi-mark.parent-node").trigger('click')
+
+      var _this = this
+      // 添加按钮点击事件
+      $("body").on('click', '.bi-report-inject-button', function () {
+        var nowStatus = $(this).text() === '已添加'
+        if (nowStatus) {
+          return
+        }
+        var nowId = $(this).attr('data-id')
+        var isAllButton = nowId === 'all'
+        // 批量添加
+        if (isAllButton) {
+          _this.setInfoId(_this.getCheckIds())
+        } else {
+          // 单个添加
+          _this.setInfoId([nowId])
+        }
+      })
+
+      // 获取数据
+      this.getInfoIds()
+    }
+  }
+}
+
+$(function () {
+  InBIInjectHooks.inject()
+})
+
+function arrUnique(arr){
+  let ojb = {};
+  arr = arr.reduce(function(prevArr, currentItem) {
+    //利用对象的键名无法重复的特点,mch_id是唯一区别的属性值
+      ojb[currentItem.bid] ? '' : ojb[currentItem.bid] = true && prevArr.push(currentItem);
+      return prevArr
+  }, [])
+  return arr;
+}
+
+function openBigMemberDialog (str, content) {
+  $('.auth-dialog').show()
+  $('.auth-dialog .dialog-title').text('您暂无使用权限')
+  $('.auth-dialog .dialog-content').html(content ||  '开通大会员,查看更多招标项目,畅享商机不受限!')
+  $('.auth-dialog .default-btn').click(function () {
+    $('.auth-dialog').hide(300)
+  })
+  $('.auth-dialog .confirm-btn').text('免费体验')
+  $('.auth-dialog .confirm-btn').off('click').bind('click',function () {
+    var advName = '招标搜索' + str + '-去开通'
+    baiduEvent(advName) // 点击去开通事件 百度统计
+    $('.auth-dialog').hide(300)
+    vm.dialogTitle = '免费用户查看超过500条招标搜索结果'
+    vm.isNeedSubmit('jylab_see500_plus', function () {
+      vm.showSuccess = true
+    })
+  })
+}
+
+// 开通提醒弹框
+function  openVipDialog(str, content) {
+  $('.auth-dialog').show()
+	$('.auth-dialog .dialog-title').text('开通超级订阅')
+  $('.auth-dialog .dialog-content').html(content ||  '立享更多搜索权限,寻找商机更精准')
+  $('.auth-dialog .default-btn').click(function () {
+    $('.auth-dialog').hide(300)
+  })
+	$('.auth-dialog .confirm-btn').text('去开通')
+  $('.auth-dialog .confirm-btn').off('click').bind('click',function () {
+    var advName = '招标搜索' + str + '-去开通'
+    baiduEvent(advName) // 点击去开通事件 百度统计
+    window.open('/swordfish/page_big_pc/free/svip/buy')
+  })
+}
+// 升级提醒弹框
+function  updateVipDialog(str) {
+  $('.update-dialog').show()
+  $('.update-dialog .default-btn').click(function () {
+    $('.update-dialog').hide(300)
+  })
+  $('.update-dialog .confirm-btn').off('click').bind('click',function () {
+    baiduEvent(str) // 点击去升级事件 百度统计
+    window.open('/front/subscribe.html')
+  })
+}
+// 列表页收藏点击事件 百度统计
+function baiduEvent(name) {
+  // console.log(name, 'name')
+  try {
+    _hmt.push(['_trackEvent', '超级订阅-pc', 'click', name]);
+  } catch (e) {
+    console.log('未初始化百度统计')
+  }
+}
+
+// toast上限提示
+function toastFn (text, duration) {
+  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>'
+  $('body').append(_html)
+	setTimeout(function(){
+		$(".custom-toast").fadeOut().remove();
+	},duration)
+}
+function gologin (link) {
+    window.location.href=link
+
+}
+
+// 是否有权限
+// isPower()
+function isPower () {
+  $.ajax({
+    type:'post',
+    url:'/publicapply/bidcoll/power?t=' + Date.now(),
+    success: function(r){
+      if (r.data) {
+        var entniche = r.data.entniche
+        var member = r.data.member
+        var vip = r.data.vip
+        if (entniche || member || vip > 0) {
+          return 'true'
+        } else {
+          return 'false'
+        }
+      } else {
+        return 'false'
+      }
+    }
+  })
+}
+

+ 287 - 306
src/web/staticres/js/superSearch.js

@@ -3,6 +3,17 @@ var nbflag = false;//是否显示的是最新招标数据
 var currentPage = 1;//当前页
 var submitflag = true;
 var tabularflag = "Y";
+console.log(vipState, goTemplateData);
+var tParams = goTemplateData.params
+if (!(tParams.isEntniche || tParams.isVip || tParams.isMember)) {
+  localStorage.setItem('login-clear-bidsearch-list-model', 'S')
+}
+var listModel = localStorage.getItem('login-clear-bidsearch-list-model') || 'S' // 列表精简or详细 S:精简 D:详细
+// 采购单位画像中转页
+var buyerLink = '/swordfish/page_big_pc/free/loading/buyer/'
+// 企业画像中转页
+var winnerLink = '/swordfish/page_big_pc/free/loading/ent/'
+
 $(function() {
 	priceTime();
 	$(".Price-content").find("span:first-child").click(function(){
@@ -44,17 +55,7 @@ $(function() {
 		beforeSubmit()
 	})
 	//
-	$(".nbprev").click(function(){
-		$(window).scrollTop(0);
-		$('.custom-checkbox.check-all').prop('checked', false)
-		prev();
-	})
-	$(".nbnext").click(function(){
-    	$(window).scrollTop(0);
-    	$('.custom-checkbox.check-all').prop('checked', false)
-		next();
 
-	})
 	//筛选关闭和打开
 	//根据cookie值设置筛选是否显示 移除该需求操作
 	// var rsw = localStorage.getItem("hideorshow");
@@ -96,7 +97,7 @@ $(function() {
 	})
 	//全文检索和标题检索切换
 	$("#newsclass li:nth-child(2)").click(function(){
-    // searchInnerVue.listState.total = totalPage
+    // searchInnerVue.listState.totalPage = totalPage
     // 重置全选按钮
     $('.custom-checkbox.check-all').prop('checked', false)
 		$(".tabContainer-2 .lucene ul").html("");
@@ -144,100 +145,22 @@ $(function() {
 
   })
 })
-//
-function next(){
-	if($(".nbnext").hasClass("disabled")){
-		return false;
-	}
-	$(".hasNoData").hide();
-	$(".working").show();
-	$(".tabContainer").hide();
-	$("#allnews").hide();
-	$(".pagination").hide();
-	currentPage = parseInt($(".pagination-inner").find("span").text())+parseInt(1)
-	if(currentPage==10){
-		$(".nbnext").addClass("disabled");
-	}else if(currentPage==2){
-		$(".nbprev").removeClass("disabled");
-	}
-	if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()){
-		getNewBids(currentPage);
-	}else{
-		if(!$("#right-table").hasClass("active")){
-			if(secondFlag=="T"){
-				$(".tabContainer").show();
-				$(".hasNoData").hide();
-				$(".nbnext").addClass("disabled");
-				appendDatas(secondList,true,false);
-			}else if(!nbflag&&currentPage<11){
-				getNewBiddings();
-			}else{
-				searchOnsubmit(true);
-			}
-		}else{
-//表格点击下一页
-//			if(secondFlag=="T"){
-//				$(".tabContainer").show();
-//				$(".hasNoData").hide();
-//				$(".nbnext").addClass("disabled");
-//				appendDatas(secondList,true,false);
-//			}else{
-//				getVIPData(true);
-//			}
-		}
-	}
-}
-function prev(){
-	if($(".nbprev").hasClass("disabled")){
-		return false;
-	}
-	$(".hasNoData").hide();
-	$(".working").show();
-	$(".tabContainer").hide();
-	$("#allnews").hide();
-	$(".pagination").hide();
-	currentPage = parseInt($(".pagination-inner").find("span").text())-parseInt(1)
-	if(currentPage==1){
-		$(".nbprev").addClass("disabled");
-	}else if(currentPage<10){
-		$(".nbnext").removeClass("disabled");
-	}
-	if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()){
-		getNewBids(currentPage);
-	}else{
-		if(!$("#right-table").hasClass("active")){
-			if(secondFlag=="T"){
-				$(".tabContainer").show();
-				$(".hasNoData").hide();
-				//$(".nbnext").addClass("disabled");
-				appendDatas(list,true,false);
-			}else if(!nbflag&&currentPage>0){
-				getNewBiddings();
-			}else{
-				searchOnsubmit(true);
-			}
-		}else{
-//表格点击上一页
-//			getVIPData(true);
-		}
-	}
-}
 
 //取redis里的数据
 function getNewBids(pnum, size){
-	$.post("/jylab/supsearch/getNewBids",{pageNumber:pnum,pageSize: size? size : pageSize, pageType:"", fileExists: $("#zbSeatchT [name='fileExists']").val(),bid_field: $("#zbSeatchT [name='bid_field']").val()},function(r){
+	$.post("/jylab/supsearch/getNewBids",{
+    pageNumber:pnum,
+    pageSize: size? size : pageSize, 
+    pageType:"", 
+    fileExists: $("#zbSeatchT [name='fileExists']").val(),
+    bid_field: $("#zbSeatchT [name='bid_field']").val(),
+    searchGroup: $("#zbSeatchT [name='searchGroup']").val()
+  },function(r){
 		if(r&&r.list!=null&&r.list.length>0){
 			$(".tabContainer").show();
-			//$(".pagination").show();
 			$(".hasNoData").hide();
-			//$(".pagination-inner").find("span").text(currentPage);
-			if(r.list.length<pageSize||currentPage==10){
-				$(".nbnext").addClass("disabled");
-			}else{
-				$(".nbnext").removeClass("disabled");
-      }
-      searchInnerVue.listState.total = Math.ceil(r.count/pageSize)
-      searchInnerVue.checkPageNumAdd1()
+      searchInnerVue.listState.totalPage = Math.ceil(r.count/pageSize)
+      // searchInnerVue.checkPageNumAdd1()
       if (size) {
         appendDatas(r.list,false,true, true);
       } else {
@@ -252,17 +175,14 @@ function getNewBids(pnum, size){
       // 隐藏页码
       searchInnerVue.showPage = false
     }
+    allCount = r.total
+    searchInnerVue.listState.allCount = r.total
     // getBidIsColl()
 	})
 }
 
 ////最新招标信息
 function getNewBiddings(num, size){
-	// $("#newsclass").hide();
-	// $("#newsnow").show();
-	if(currentPage==1){
-		$(".nbprev").addClass("disabled");
-	}
 	var param = {
     pageNumber: num ? num : currentPage,
     pageSize: size ? size : pageSize,
@@ -279,27 +199,27 @@ function getNewBiddings(num, size){
     buyerclass: $("#zbSeatchT [name='buyerclass']").val(),
     buyertel: $("#zbSeatchT [name='buyertel']").val(),
     winnertel: $("#zbSeatchT [name='winnertel']").val(),
-    notkey: $(".not-key-input-group input").val().slice(0, 10),
+    notkey: $("#zbSeatchT [name='notkey']").val(),
     fileExists: $("#zbSeatchT [name='fileExists']").val(),
     city: $("#zbSeatchT [name='city']").val(),
-    bid_field: $("#zbSeatchT [name='bid_field']").val()
+    bid_field: $("#zbSeatchT [name='bid_field']").val(),
+    searchGroup: $("#zbSeatchT [name='searchGroup']").val(),
+    searchMode: $("#zbSeatchT [name='searchMode']").val(),
+    wordsMode: $("#zbSeatchT [name='wordsMode']").val(),
+    additionalWords: $("#zbSeatchT [name='additionalWords']").val()
   };
 	$.post("/front/pcAjaxReq",param,function(r){
+    heightWords = r.heightWords
 		if(r&&r.list!=null&&r.list.length>0){
       // 计算总页码
       if (currentPage == 1) {
-        searchInnerVue.listState.total = Math.ceil(r.count/pageSize)
-        searchInnerVue.checkPageNumAdd1()
+        searchInnerVue.listState.totalPage = Math.ceil(r.count/pageSize)
+        allCount = r.total
+        searchInnerVue.listState.allCount = r.total
+        // searchInnerVue.checkPageNumAdd1()
       }
 			$(".tabContainer").show();
-			//$(".pagination").show();
 			$(".hasNoData").hide();
-			//$(".pagination-inner").find("span").text(currentPage);
-			if(r.list.length<pageSize||currentPage==10){
-				$(".nbnext").addClass("disabled");
-			}else{
-				$(".nbnext").removeClass("disabled");
-			}
       if (size && num === 1) {
 			  appendDatas(r.list,true,true, true);
       } else {
@@ -307,10 +227,6 @@ function getNewBiddings(num, size){
       }
 		}else{
 			if(currentPage>1){
-				$(".nbnext").addClass("disabled");
-				if(currentPage==2){
-					$(".nbprev").addClass("disabled");
-				}
 				currentPage = currentPage-1;
 				return false
 			}
@@ -321,7 +237,10 @@ function getNewBiddings(num, size){
       $(".hasNoData").show();
       // 隐藏页码
       searchInnerVue.showPage = false
+      allCount = 0
+      searchInnerVue.listState.allCount = 0
     }
+    autoModelFn(r)
 	})
 }
 //
@@ -335,20 +254,16 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
 	var tableHtml = '';
 	$(".working").hide();
   $(".pagination").show();
-  // 显示页码
-  searchInnerVue.showPage = true
-	var searchvalueArray = searchvalue.split("+");
+  // 列表模式下显示页码 表格模式下隐藏
+  if (searchInnerVue.dataTab == 'list') {
+    searchInnerVue.showPage = true
+  } else {
+    searchInnerVue.showPage = false
+  }
+	var searchvalueArray = heightWords.split(" ");
+  // console.log('需要高亮的关键词、附加词组:' + searchvalueArray)
 	$(".pagination-inner").find("span").text(currentPage);
-	if(datas.length<pageSize){
-		$(".nbnext").addClass("disabled");
-	}
-	if(!isNew && typeof(totalPage) != "undefined"){
-		if(currentPage == totalPage){
-			$(".nbnext").addClass("disabled");
-		}else{
-			$(".nbnext").removeClass("disabled");
-		}
-	}
+
 	//(数据够20条显示查看更多遮罩层)
 	if (currentPage==1){//第一页得时候需要判断 是否显示遮罩层
 		if(datas.length>=20){
@@ -368,14 +283,16 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
 				detail = detail.substring(0,200)+"..."
 			}
 		}
-		if(flag){
+		// if(flag){
 			title = keyWordHighlight(title,searchvalueArray,"<font class='com-highlight'>$1</font>");
 			title=title.replace(/\<br>/g,"")
-			detail = keyWordHighlight(detail,searchvalueArray,"<font class='com-highlight'>$1</font>");
-		}
-		if(title.length<40){
-				title=title+"<span style='color:#fff;display:none;'>"+Math.random().toString(36).substring(2)+"<span>";
-		}
+      if (detail) {
+			  detail = keyWordHighlight(detail,searchvalueArray,"<font class='com-highlight'>$1</font>");
+      }
+		// }
+		// if(title.length<40){
+		// 		title=title+"<span style='color:#fff;display:none;'>"+Math.random().toString(36).substring(2)+"<span>";
+		// }
 		var type = datas[i].subtype;
 		if(typeof(type) == "undefined" || type == null || type == ""){
 			type = datas[i].toptype;
@@ -395,133 +312,159 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
 
 		if (!onlyUpdateTable){ //是否仅更新table
 			listHtml += '<li>'
-			//if(datas.length==(i+1)){
-			//	listHtml +='<div class="liLuceneList">'
-			//}else{
-				listHtml +='<div class="liLuceneList" style="border-bottom: 1px solid #EBEBEB;">'
-      //}
-      // 标题搜索 选择框
-      if (!selectContext || !flag) {
-        listHtml += '<input class="custom-checkbox title-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
-        listHtml +='<div class="luce-left">'
-		if(datas[i].site == '剑鱼信息发布平台') {
-			listHtml += '<span class="userPublish">用户发布</span>'
-		}
-		listHtml += '<em class="visited-hd">'+index+'.</em>'
-						+'<div class="left-title" style="width:auto;max-width:700px">'
-						+'<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a>'
-        if(fileExists) {
-          listHtml+='<span class="haveFile">'+'有附件'+'</span>'
-        }
-        listHtml+='</div>'
-      }
-      // 全文搜索
-			if(flag && selectContext){
-				listHtml +='<div class="luce-left">'
-				if(datas[i].site == '剑鱼信息发布平台') {
-					listHtml += '<span class="userPublish">用户发布</span>'
-					listHtml += '<em class="visited-hd">'+index+'.</em>'
-						+'<div class="left-title" style="width:auto;max-width:1080px">'
-						+'<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a>'
-				} else {
-					listHtml +='<em class="visited-hd" style="padding-left:30px;">'+index+'.</em>'
-						+'<div class="left-title" style="width:auto;max-width:1080px">'
-						+'<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a>'
-				}
-				if(fileExists) {
-					listHtml+='<span class="haveFile">'+'有附件'+'</span>'
-				}
-				listHtml+='</div>'
-				// 全文搜索选择框
-				listHtml += '<div class="left-content" style="width:100%;padding:0;">'
-					+ '<input class="custom-checkbox all-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
-					+'<a style="float:left;width:calc(100% - 32px)" href="javascript:volid(0);">'+detail+'...</a>'
-					+'</div>'
-			}
-			listHtml += '</div><div class="luce-right">'
-			if($.trim(datas[i].area) != "" && datas[i].area != "A"){
-
-          listHtml += '<a href="javascript:;"'+'onclick="gologin('+"'/list/area/"+datas[i].areaadd+".html')"+'">'+datas[i].area+'</a>';
-			}else{
-				listHtml += '<a href="#" style="display:none;"></a>';
-			}
-			if(typeof(type) != "undefined" && type != null && type != ""){
-				// listHtml += '<a href="/list/stype/'+datas[i].stypeadd+'.html">'+type+'</a>';
-        listHtml += '<a href="javascript:;"'+'onclick="gologin('+"'/list/stype/"+datas[i].stypeadd+".html')"+'">'+type+'</a>';
-			}else{
-				listHtml += '<a href="#" style="display:none;"></a>';
-			}
-			//
-			if(typeof(datas[i].industry) != "undefined" && datas[i].industry != null && datas[i].industry != ""&&!is_field){
-				// listHtml += '<a href="/list/industry/'+datas[i].indadd+'.html">'+datas[i].industry+'</a>';
-        listHtml += '<a href="javascript:;"'+'onclick="gologin('+"'/list/industry/"+datas[i].indadd+".html')"+'">'+datas[i].industry+'</a>';
-			}else{
-				listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
-      }
-      // vipState付费用户显示采购单位类型 免费用户不显示
-      // if(typeof(datas[i].buyerclass) != "undefined" && datas[i].buyerclass != null && datas[i].buyerclass != "" && vipState){
-			// 	listHtml += '<a href="javascript:;">'+datas[i].buyerclass+'</a>';
-			// }else{
-			// 	listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
-			// }
-
-			var amount= getacount(datas[i].bidamount,datas[i].budget)
-			if(amount!=""){
-				listHtml += '<a>'+conversionMoeny(amount)+'</a>';
-			}else{
-				listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
-			}
-
-			//
-			if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
-				var diff = utils.dateFromNow(Number(datas[i].publishtime+"000"));
-				if(diff != null){
-					listHtml += '<span class="com-time">'+diff+'</span>';
-				}
-      }
-      // 是否收藏
-      listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
-      // 是否山川应用嵌入环境 添加操作按钮
-      var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
-      if (inInjectBI) {
-        listHtml += '<button class="bi-report-inject-button" data-id="'+datas[i]._id+'">添加</button>'
-      }
-      listHtml += '</div>'
-
-
-      //领域化展示 商品&采购单位&中标单位
-      if (is_field && !selectContext){
-        listHtml += '<div class="luce-field">'
-        if (typeof(datas[i].purchasing) != "undefined" && datas[i].purchasing != null && datas[i].purchasing != ""){
-          listHtml += '<div class="nowrap"><span>产品</span><span>'+datas[i].purchasing +'</span></div>'
-        }
-
-        let secondLine=''
-        if (typeof(datas[i].buyer) != "undefined" && datas[i].buyer != null && datas[i].buyer != ""){
-          secondLine += '<div class="nowrap"><span>采购单位</span><span>'+datas[i].buyer +'</span></div>'
-        }
-
-        if (typeof(datas[i].s_winner) != "undefined" && datas[i].s_winner != null && datas[i].s_winner != ""){
-          secondLine += '<div class="nowrap"><span>中标单位</span><span>'+datas[i].s_winner +'</span></div>'
-        }
-
-        if (secondLine!=='') {
-          listHtml += '<div class="secondLine">'+secondLine+'</div>'
-        }
-
-        listHtml += '</div>'
-      }
-
-      listHtml += '</div></li>';
-
-			if(i == 5) {
+        listHtml +='<div class="liLuceneList" style="border-bottom: 1px solid #EBEBEB;">'
+          listHtml += '<input class="custom-checkbox title-text-checkbox" name="bid-list" type="checkbox" dataid="'+datas[i]._id+'" />'
+          listHtml +='<div class="list-container">'
+            // 标题、推送时间
+            listHtml += '<div class="bid-list-title">'
+                     + '<div class="list-title-flex  ellipsis"><em class="visited-hd">'+index+'.</em>'
+                     + '<a class="visited-hd" onclick="noIn(this)" dataid="'+datas[i]._id+'" dataindustry="'+datas[i].industry+'" target="_blank"> '+title+ '</a></div>'
+                     if(typeof(datas[i].publishtime) != "undefined" && datas[i].publishtime != null && datas[i].publishtime != ""){
+                      var diff = utils.dateFromNow(Number(datas[i].publishtime+"000"));
+                      if(diff != null){
+                        listHtml += '<span class="com-time">'+diff+'</span>';
+                      }
+                    }
+            listHtml += '</div>'
+            // 正文
+            if(selectContext && detail) {
+              listHtml += '<div class="bid-list-content">' + detail + '</div>'
+            }
+            // 分类标签、收藏
+            listHtml += '<div class="bid-list-tags">'
+                +'<div>'
+                if (datas[i].site == '剑鱼信息发布平台') {
+                  listHtml += '<span class="tags-item tags-publish">用户发布</span>'
+                }
+                if ($.trim(datas[i].area) != "" && datas[i].area != "A") {
+                  listHtml += '<a class="tags-item" href="javascript:;"'+'onclick="gologin('+"'/list/area/"+datas[i].areaadd+".html')"+'">'+datas[i].area+'</a>';
+                } else {
+                  listHtml += '<a href="#" style="display:none;"></a>';
+                }
+                if (typeof(type) != "undefined" && type != null && type != "") {
+                  listHtml += '<a class="tags-item" href="javascript:;"'+'onclick="gologin('+"'/list/stype/"+datas[i].stypeadd+".html')"+'">'+type+'</a>';
+                } else {
+                  listHtml += '<a href="#" style="display:none;"></a>';
+                }
+                if (typeof(datas[i].industry) != "undefined" && datas[i].industry != null && datas[i].industry != ""&&!is_field) {
+                  listHtml += '<a class="tags-item tags-industry" href="javascript:;"'+'onclick="gologin('+"'/list/industry/"+datas[i].indadd+".html')"+'">'+datas[i].industry+'</a>';
+                } else {
+                  listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
+                }
+                var amount= getacount(datas[i].bidamount,datas[i].budget)
+                if (amount!="") {
+                  listHtml += '<a class="tags-item">'+conversionMoeny(amount)+'</a>';
+                } else {
+                  listHtml += '<a href="javascript:volid(0);" style="display:none;"></a>';
+                }
+                // 附件
+                if (fileExists) {
+                  listHtml+='<span class="tags-item tags-file">'+'有附件'+'</span>'
+                }
+                listHtml+='</div>'
+                // // 是否收藏
+                listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
+                // 是否山川应用嵌入环境 添加操作按钮
+                var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+                if (inInjectBI) {
+                  listHtml += '<button class="bi-report-inject-button" data-id="'+datas[i]._id+'">添加</button>'
+                }
+            listHtml += '</div>'
+            // 详细列表内容
+            if (listModel === 'D') {
+              listHtml += '<div class="bid-detail-info" data-subtype='+ datas[i].subtype +'>'
+                if (datas[i].buyer || datas[i].buyertel || datas[i].budget) {
+                  listHtml += '<p class="d-i-item">'
+                    if (datas[i].buyer) {
+                      listHtml += '<span><i class="d-i-item-label">采购单位:</i>'
+                      // 可能是多个采购单位(测试环境出现过)
+                      if (datas[i].buyer.indexOf('、') > -1) {
+                        var buyerArr = datas[i].buyer.split('、')
+                        console.log(buyerArr);
+                        for(var j = 0; j< buyerArr.length;j++) {
+                          var dun = j != buyerArr.length - 1 ? '<i class="highlight-text">、</i>' : ''
+                          listHtml += '<a class="highlight-text" href="' + buyerLink + buyerArr[j] +'" target="_blank">'+ buyerArr[j]+ '</a>' + dun
+                        }
+                      } else {
+                        listHtml += '<a class="highlight-text" href="' + buyerLink + datas[i].buyer +'" target="_blank">'+ datas[i].buyer+ '</a>'
+                      }
+                      listHtml += '</span>'
+                    }
+                    if (datas[i].buyertel) {
+                      datas[i].buyerperson = datas[i].buyerperson  ? datas[i].buyerperson +',' : ''
+                      listHtml += '<span><i class="d-i-item-label">采购单位联系方式:</i>'+ datas[i].buyerperson + datas[i].buyertel + '<a class="highlight-text" href="' + buyerLink + datas[i].buyer + '?position=contact" target="_blank"> 获取更多</a></span>'
+                    }
+                    if (datas[i].budget) {
+                      listHtml += '<span><i class="d-i-item-label">预算金额:</i>' + conversionMoeny(datas[i].budget) + '</span>'
+                    }
+                  listHtml +='</p>'
+                }
+                if (datas[i].agency || datas[i].agencytel) {
+                  listHtml += '<p class="d-i-item">'
+                    if (datas[i].agency) {
+                      listHtml += '<span><i class="d-i-item-label">代理机构:</i>' + datas[i].agency + '</span>'
+                    }
+                    if (datas[i].agencytel) {
+                      datas[i].agencyperson = datas[i].agencyperson  ? datas[i].agencyperson +',' : ''
+                      listHtml += '<span><i class="d-i-item-label">代理机构联系方式:</i>' + datas[i].agencyperson + datas[i].agencytel + '</span>'
+                    }
+                  listHtml +='</p>'
+                }
+                if (datas[i].winnerInfo || datas[i].winnertel || datas[i].bidamount) {
+                  listHtml += '<p class="d-i-item">'
+                    if (datas[i].winnerInfo) {
+                      listHtml += '<span><i class="d-i-item-label">中标单位:</i>'
+                      for(var j=0;j<datas[i].winnerInfo.length;j++) {
+                        var dun = j != datas[i].winnerInfo.length - 1 ? '<i class="highlight-text">、</i>' : ''
+                        listHtml +='<a class="highlight-text" href="' + winnerLink + datas[i].winnerInfo[j].winnerId +'" target="_blank">'+ datas[i].winnerInfo[j].winner+ '</a>'+ dun
+                      }
+                      listHtml +='</span>'
+                    }
+                    if (datas[i].winnertel && datas[i].winnerInfo) {
+                      // 如果有两个中标单位则不显示‘获取更多’,只有一个中标单位显示‘获取更多’并跳到画像通讯录锚点位置
+                      var moreWinnerTel = datas[i].winnerInfo && datas[i].winnerInfo.length > 1 ? '' :'<a class="highlight-text" href="' + winnerLink + datas[i].winnerInfo[0].winnerId + '?position=contact" target="_blank"> 获取更多</a></span>'
+                      datas[i].winnerperson = datas[i].winnerperson  ? datas[i].winnerperson +',' : ''
+                      listHtml += '<span><i class="d-i-item-label">中标单位联系方式:</i>' + datas[i].winnerperson + datas[i].winnertel + moreWinnerTel +'</span>'
+                    }
+                    if (datas[i].bidamount) {
+                      listHtml += '<span><i class="d-i-item-label">中标金额:</i>'+ conversionMoeny(datas[i].bidamount) +'</span>'
+                    }
+                  listHtml +='</p>'
+                }
+                if (datas[i].signendtime || datas[i].bidendtime || datas[i].bidopentime) {
+                  listHtml += '<p class="d-i-item">'
+                    if (datas[i].signendtime) {
+                      listHtml += '<span><i class="d-i-item-label">报名截止日期:</i>' + utils.dateFromNow(Number(datas[i].signendtime+"000")) +'</span>'
+                    }
+                    if (datas[i].bidendtime) {
+                      listHtml += '<span><i class="d-i-item-label">投标截止日期:</i>' + utils.dateFromNow(Number(datas[i].bidendtime+"000")) + '</span>'
+                    }
+                    if (datas[i].bidopentime) {
+                      listHtml += '<span><i class="d-i-item-label">开标日期:</i>' + utils.dateFromNow(Number(datas[i].bidopentime+"000")) + '</span>'
+                    }
+                  listHtml +='</p>'
+                }
+                //领域化展示 商品&采购单位&中标单位
+                if (is_field){
+                  listHtml += '<p class="d-i-item">'
+                    if (datas[i].purchasing) {
+                      listHtml += '<span><i class="d-i-item-label">产品:</i>' + datas[i].purchasing +'</span>'
+                    }
+                  listHtml +='</p>'
+                }
+              listHtml += '</div>'
+            }
+          listHtml += '</div>'
+        listHtml +='</div>'
+      listHtml += '</li>'
+      if(i == 5) {
 				listHtml += '<div data-list-ad class="_t3di2018y5"></div>'
 			}
 			if(i == 26) {
 				listHtml += '<div data-list-ad class="_6omliqck79a"></div>'
 			}
 		}
-
+ 
 		//表格仅显示前20条信息
 		if (i >= 20||currentPage!=1){
 			continue
@@ -636,6 +579,12 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
    * 更新是否已添加状态
    */
   InBIInjectHooks.check()
+  // 信息类型是“采购意向”和“拟建项目”,无采购意向和拟建项目权限的超级订阅用户(老超级订阅用户),即使选择详细列表,也按照精简列表展示
+  // 大会员、商机管理、超级订阅(配置时间之前的老用户)有超前项目权限
+  if (!goTemplateData.params.vipBefore202209 && !goTemplateData.params.isMember && !goTemplateData.params.isEntniche) {
+    $('.bid-detail-info[data-subtype="拟建"]').hide()
+    $('.bid-detail-info[data-subtype="采购意向"]').hide()
+  }
 }
 
 function getacount(bidamount,budget){
@@ -775,9 +724,6 @@ function getVIPData(clickpaging){
 		// $("#newsnow").show();
 		tlflag = false;
 	}
-	if(currentPage==1){
-		$(".nbprev").addClass("disabled");
-	}
 	var reqType="bidSearch";
 	if($("#zbSeatchT [name='keywords']").val()==""){
 		reqType="lastNews";
@@ -798,10 +744,14 @@ function getVIPData(clickpaging){
         buyerclass: $("#zbSeatchT [name='buyerclass']").val(),
         buyertel: $("#zbSeatchT [name='buyertel']").val(),
         winnertel: $("#zbSeatchT [name='winnertel']").val(),
-		    notkey: $(".not-key-input-group input").val().slice(0, 10),
+		    notkey: $("#zbSeatchT [name='notkey']").val(),
         fileExists: $("#zbSeatchT [name='fileExists']").val(),
         city: $("#zbSeatchT [name='city']").val(),
-        bid_field: $("#zbSeatchT [name='bid_field']").val()
+        bid_field: $("#zbSeatchT [name='bid_field']").val(),
+        searchGroup: $("#zbSeatchT [name='searchGroup']").val(),
+        searchMode: $("#zbSeatchT [name='searchMode']").val(),
+        wordsMode: $("#zbSeatchT [name='wordsMode']").val(),
+        additionalWords: $("#zbSeatchT [name='additionalWords']").val()
       };
 	$.ajax({
        type:'post',
@@ -813,11 +763,6 @@ function getVIPData(clickpaging){
 			afterAjaxReq(r);
 			if(r&&r.list!=null&&r.list.length>0){
 				$(".hasNoData").hide();
-				if(r.list.length<pageSize||currentPage==10){
-					$(".nbnext").addClass("disabled");
-				}else{
-					$(".nbnext").removeClass("disabled");
-				}
 				// appendDatas(r.list,tlflag,true,true);
 				appendDatas(r.list,tlflag,true,false);
 			}else{
@@ -827,6 +772,7 @@ function getVIPData(clickpaging){
         searchInnerVue.showPage = false
 			}
       tabflag = true;
+      autoModelFn(r)
 		}
 	})
 	return tabflag
@@ -851,21 +797,20 @@ function beforeSubmit(n){
 	$(".tabContainer .lucene ul").html("");
 	//$(".tabContainer .lucene-table table tbody").html("");
 	$(".tabContainer").css("min-height","600px");
-	$("#right-list").addClass("active").siblings().removeClass("active");
+	// $("#right-list").addClass("active").siblings().removeClass("active");
 	$(".tabContainer-2 .lucene").show().siblings().hide();
-	$("#right-list").addClass("active").siblings().removeClass("active");
+	// $("#right-list").addClass("active").siblings().removeClass("active");
 	$("#allnews .lucene").show().siblings().hide();
 	$(".tabContainer-2").hide();
 	$("#allnews").hide();
 	$(".pagination").hide();
+  searchInnerVue.dataTab = 'list'
+  searchInnerVue.listModel = localStorage.getItem('login-clear-bidsearch-list-model')
 	setTimeout(function(){
     currentPage=1;
     // 重置element ui页码为1
     searchInnerVue.listState.num = 1
 		//时间
-		if(currentPage==1){
-			$(".nbprev").addClass("disabled");
-		}
 		var publishtime = null;
 		var timeslot = getInputTime().join("_");
 		if($(".timerInput").hasClass("active")){
@@ -993,8 +938,8 @@ function beforeSubmit(n){
     //中标单位联系方式有无
     $("#zbSeatchT [name='winnertel']").val($(".custom-input[name='winnertel']").attr('data-value'));
     //排除词
-	$("#zbSeatchT [name='notkey']").val($(".not-key-input-group input").val().slice(0, 10));
-		if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()&&n!="F"){
+	$("#zbSeatchT [name='notkey']").val($("#zbSeatchT [name='notkey']").val());
+		if(!$("#zbSeatchT [name='keywords']").val()&&!$("#zbSeatchT [name='industry']").val()&&n!="F" && !$("#zbSeatchT [name='additionalWords']").val()){
 			getNewBids(currentPage);
 		}else{
 			if(n!="F"){
@@ -1051,11 +996,7 @@ function searchOnsubmit(clickpaging){
 			return;
 		}
 	}
-	// $("#newsclass").show();
-	// $("#newsnow").hide();
-	if(currentPage==1){
-		$(".nbprev").addClass("disabled");
-	}
+	
 	var param = {
     pageNumber: currentPage,
     pageSize: pageSize,
@@ -1072,12 +1013,17 @@ function searchOnsubmit(clickpaging){
     buyerclass: $("#zbSeatchT [name='buyerclass']").val(),
     buyertel: $("#zbSeatchT [name='buyertel']").val(),
     winnertel: $("#zbSeatchT [name='winnertel']").val(),
-    notkey: $(".not-key-input-group input").val().slice(0, 10),
+    notkey: $("#zbSeatchT [name='notkey']").val(),
     fileExists: $("#zbSeatchT [name='fileExists']").val(),
     city: $("#zbSeatchT [name='city']").val(),
-    bid_field: $("#zbSeatchT [name='bid_field']").val()
+    bid_field: $("#zbSeatchT [name='bid_field']").val(),
+    searchGroup: $("#zbSeatchT [name='searchGroup']").val(),
+    searchMode: $("#zbSeatchT [name='searchMode']").val(),
+    wordsMode: $("#zbSeatchT [name='wordsMode']").val(),
+    additionalWords: $("#zbSeatchT [name='additionalWords']").val()
   };
 	$.post("/front/pcAjaxReq",param,function(r){
+    heightWords = r.heightWords
 		if(r.limitFlag){
 			LimitClass.limitFlag = true;
 			LimitClass.result = r;
@@ -1085,13 +1031,16 @@ function searchOnsubmit(clickpaging){
 			LimitClass.paging(currentPage);
       LimitClass.prevNoLimitFlag = false;
       // 重新分页
-      searchInnerVue.listState.total = r.totalPage
-      searchInnerVue.checkPageNumAdd1()
+      searchInnerVue.listState.totalPage = Math.ceil(r.count / pageSize)
+      allCount = r.total
+      searchInnerVue.listState.allCount = r.total
+      // searchInnerVue.checkPageNumAdd1()
 		}else{
 			LimitClass.prevNoLimitFlag = true;
       LimitClass.limitFlag = false;
       pcAjaxReqCallBack(r);
     }
+    autoModelFn(r)
     // getBidIsColl()
 	});
 }
@@ -1130,6 +1079,33 @@ $(function () {
 		showSearchTipForTimeRange(false);
 	},500)
 })
+
+function autoModelFn (r) {
+  var keywordFlag = $("#zbSeatchT [name='keywords']").val()
+  var addkeyFlag = $("#zbSeatchT [name='additionalWords']").val()
+  var sModel = $("#zbSeatchT [name='searchMode']").val()
+  // console.log(autoSwitchModel, sModel, (keywordFlag || addkeyFlag), r.list);
+  var jzFlag = !autoSwitchModel && sModel == 0 && (keywordFlag || addkeyFlag) && r.list == null
+  var mhFlag = autoSwitchModel && sModel == 1 && (keywordFlag || addkeyFlag)
+  if (jzFlag) {
+    console.log(jzFlag, '精准flag');
+    $("#zbSeatchT [name='searchMode']").val(1)
+    searchInnerVue.keywordSearchType = 1
+    beforeSubmit()
+    autoSwitchModel = true
+  }
+  if (mhFlag) {
+    console.log(mhFlag, '模糊flag');
+    if (r.list && r.list.length > 0) {
+      toastFn('精准搜索无结果,已为您自动切换到模糊搜索', 5000)
+      autoSwitchModel = false
+    } else {
+      $("#zbSeatchT [name='searchMode']").val(0)
+      searchInnerVue.keywordSearchType = 0
+    }
+  }
+}
+
 function pcAjaxReqCallBack(r){
 	afterAjaxReq(r);
   var isAllSearch = $("#zbSeatchT [name='selectType']").val()=="all";
@@ -1153,10 +1129,6 @@ function pcAjaxReqCallBack(r){
 			$("#hasNoData_tiptext>font:eq(1)").show();
 		}else{
 			if(currentPage>1){
-				$(".nbnext").addClass("disabled");
-				if(currentPage==2){
-					$(".nbprev").addClass("disabled");
-				}
 				currentPage = currentPage-1;
 				return false
 			}
@@ -1171,13 +1143,17 @@ function pcAjaxReqCallBack(r){
 	}else{
 		//$(".tabContainer").show();
 		$(".hasNoData").hide();
+    searchInnerVue.listState.totalPage = Math.ceil(r.count / pageSize);
 		appendDatas(r.list,true,false)
+    
 	}
+  allCount = r.total
+  searchInnerVue.listState.allCount = r.total
 }
 function afterAjaxReq(r){
 	secondFlag=r.secondFlag;
-	if(r.interceptWord != ""){
-      	$("#intercept .interceptWord").text(r.interceptWord);
+	if(r.interceptOtherWord){
+      	$("#intercept .interceptWord").text(r.interceptOtherWord);
       	$("#intercept .interceptLimit").text(r.interceptLimit);
 		$("#intercept").removeClass("hidden");
 	}else{
@@ -1187,17 +1163,20 @@ function afterAjaxReq(r){
 		$(".searchname").val(r.keywords);
 	}
 	$(".side-bar-bottom-font").text("“"+$.trim($(".searchname").val()).replace(/\s+/," ")+"”");
-	if(secondFlag==""&&typeof(r.searchvalue) != "undefined"){
-		searchvalue = r.searchvalue;
-	}
+	// if(secondFlag==""&&typeof(r.heightWords) != "undefined"){
+	// 	heightWords = r.heightWords;
+	// }
+  heightWords = r.heightWords;
 	if(r.pcAjaxFlag=="T"){
-		searchvalue = r.searchvalue;
-		totalPage = r.totalPage;
+		// heightWords = r.heightWords;
+    totalPage = Math.ceil(r.count / pageSize)
 		list= r.list;
     secondList= r.secondList;
     // vue 重置总页数
-    searchInnerVue.listState.total = totalPage
-    searchInnerVue.checkPageNumAdd1()
+    searchInnerVue.listState.totalPage = Math.ceil(r.count / pageSize);
+    allCount = r.total
+    searchInnerVue.listState.allCount = r.total
+    // searchInnerVue.checkPageNumAdd1()
 	}
 	if(secondFlag==""&&typeof(totalPage) != "undefined" && currentPage == 1){
 		if (r.totalPage==1){
@@ -1206,13 +1185,15 @@ function afterAjaxReq(r){
 				totalPage=10;
       }
       // vue 重置总页数
-      searchInnerVue.listState.total = totalPage
-      searchInnerVue.checkPageNumAdd1()
+      searchInnerVue.listState.totalPage = totalPage
+      // searchInnerVue.checkPageNumAdd1()
 		}else{
-      totalPage = r.totalPage;
-      searchInnerVue.listState.total = totalPage
-      searchInnerVue.checkPageNumAdd1()
+      totalPage = Math.ceil(r.count / pageSize);
+      searchInnerVue.listState.totalPage = Math.ceil(r.count / pageSize)
+      // searchInnerVue.checkPageNumAdd1()
 		}
+    allCount = r.total
+    searchInnerVue.listState.allCount = r.total
 	}
 }
 
@@ -1619,7 +1600,7 @@ function baiduEvent(name) {
 
 // toast上限提示
 function toastFn (text, duration) {
-  if (duration) {
+  if (!duration) {
     duration = 1000
   }
   var _html = ""
@@ -1631,8 +1612,8 @@ function toastFn (text, duration) {
 	},duration)
 }
 function gologin (link) {
-    window.location.href=link
-
+    // window.location.href=link
+    window.open(link)
 }
 
 // 是否有权限

+ 42 - 9
src/web/staticres/pccss/ent-search-index-pc.css

@@ -23,7 +23,7 @@
     min-height: 400px;
 }
 .search-header {
-    padding: 29px 0 15px;
+    /* padding: 29px 0 15px; */
     background-color: #f5f5fb;
 }
 .search-content {
@@ -32,7 +32,8 @@
 }
 
 .search-header-content {
-    padding-left: 125px;
+    /* padding-left: 125px; */
+    padding: 24px 24px 24px 32px;
 }
 .search-header-top {
     display: flex;
@@ -45,7 +46,7 @@
     display: flex;
     align-items: center;
     padding: 0 20px;
-    height: 36px;
+    /* height: 36px; */
     cursor: pointer;
 }
 .input-container {
@@ -56,14 +57,17 @@
     align-items: center;
 }
 
-.el-input__prefix {
+.input-container .el-input__prefix {
     display: flex;
     align-items: center;
     justify-content: center;
-    left: 18px;
+    left: 16px;
 }
-.el-input--prefix .el-input__inner {
-    padding-left: 50px;
+.input-container .el-input--prefix .el-input__inner {
+    padding-left: 44px;
+    height: 36px;
+    line-height: 36px;
+    border-radius: 8px 0 0 8px;
 }
 .input-prefix-icon {
     display: flex;
@@ -74,7 +78,7 @@
     display: block;
 }
 .input-container .el-input-group {
-    width: 640px;
+    width: 528px;
 }
 .input-container .el-input__inner,
 .input-container .el-input-group__append {
@@ -83,9 +87,10 @@
 }
 .input-container .el-input-group__append {
     padding: 0;
-    font-size: 18px;
+    font-size: 16px;
     color: #fff;
     background-color: #2cb7ca;
+    border-radius: 0 8px 8px 0;
 }
 .pre-search-list {
     padding: 20px 0;
@@ -376,3 +381,31 @@
     color: #1d1d1d;
     line-height: 22px;
 }
+.search-header-tab{
+  padding: 0 16px;
+  height: 48px;
+  line-height: 48px;
+  border-bottom: 1px solid #ececec;
+}
+.tab-item{
+  display: inline-block;
+  padding: 0 16px;
+  height: 100%;
+  font-size: 16px;
+  cursor: pointer;
+}
+.tab-item.tab-active{
+  position: relative;
+  color: #2cb7ca;
+}
+.tab-item.tab-active::before{
+  position: absolute;
+  content: '';
+  left: 50%;
+  bottom: 0;
+  width: 64px;
+  height: 2px;
+  background: #2cb7ca;
+  transform: translateX(-50%);
+  z-index: 9;
+}

+ 40 - 7
src/web/staticres/pccss/pur-search-index-pc.css

@@ -23,7 +23,7 @@
     min-height: 400px;
 }
 .search-header {
-    padding: 29px 0 15px;
+    /* padding: 29px 0 15px; */
     background-color: #f5f5fb;
 }
 .search-content {
@@ -31,7 +31,8 @@
 }
 
 .search-header-content {
-    padding-left: 125px;
+    /* padding-left: 125px; */
+    padding: 24px 24px 24px 32px;
 }
 .search-header-top {
     display: flex;
@@ -44,7 +45,7 @@
     display: flex;
     align-items: center;
     padding: 0 20px;
-    height: 36px;
+    /* height: 36px; */
     cursor: pointer;
 }
 .input-container {
@@ -62,10 +63,13 @@
     display: flex;
     align-items: center;
     justify-content: center;
-    left: 18px;
+    left: 16px;
 }
 .el-input--prefix .el-input__inner {
-    padding-left: 50px;
+    padding-left: 44px;
+    height: 36px;
+    line-height: 36px;
+    border-radius: 8px 0 0 8px;
 }
 .input-prefix-icon {
     display: flex;
@@ -76,7 +80,7 @@
     display: block;
 }
 .input-container .el-input-group {
-    width: 640px;
+    width: 528px;
 }
 .input-container .el-input__inner,
 .input-container .el-input-group__append {
@@ -85,9 +89,10 @@
 }
 .input-container .el-input-group__append {
     padding: 0;
-    font-size: 18px;
+    font-size: 16px;
     color: #fff;
     background-color: #2cb7ca;
+    border-radius: 0 8px 8px 0;
 }
 .pre-search-list {
     padding: 20px 0;
@@ -985,3 +990,31 @@
     color: #fff;
     background: #2CB7CA;
 }
+.search-header-tab{
+  padding: 0 16px;
+  height: 48px;
+  line-height: 48px;
+  border-bottom: 1px solid #ececec;
+}
+.tab-item{
+  display: inline-block;
+  padding: 0 16px;
+  height: 100%;
+  font-size: 16px;
+  cursor: pointer;
+}
+.tab-item.tab-active{
+  position: relative;
+  color: #2cb7ca;
+}
+.tab-item.tab-active::before{
+  position: absolute;
+  content: '';
+  left: 50%;
+  bottom: 0;
+  width: 64px;
+  height: 2px;
+  background: #2cb7ca;
+  transform: translateX(-50%);
+  z-index: 9;
+}

+ 1 - 0
src/web/staticres/public-pc/css/sub-page.css

@@ -37,6 +37,7 @@ body.in-iframe {
 
 /* 标讯搜索 页面 */
 .in-iframe[data-page-name=supsearch] #searchInner .searchHeader {
+  margin-top: 0;
   border-top: unset;
 }
 .in-iframe[data-page-name=supsearch] #searchInner .searchHeader .searchHeader-container {

+ 7 - 6
src/web/staticres/serviceSystem/css/serviceSystem.css

@@ -143,7 +143,7 @@
     height: 56px;
     display: block;
     margin-top: -12px;
-    
+
 }
 
 .auto-w-1200 {
@@ -1248,6 +1248,7 @@
 .table_content_r_item {
     display: flex;
     /* box-sizing: border-box; */
+    border: 1px solid transparent;
     border-top: 1px solid #ECECEC;
 }
 
@@ -1385,7 +1386,7 @@
     padding-left: 350px;
 }
 .all_border_warn{
-        border-top: 1px solid #ECECEC;      
+        border-top: 1px solid #ECECEC;
 }
 .table_header_112 {
     height: 112px !important;
@@ -1534,8 +1535,8 @@ i.free::before {
     left: 0;
     position:absolute;
     top: 14px
-    
-    
+
+
 }
 .text_box .lh_30_img{
     width: 8px;
@@ -1637,7 +1638,7 @@ i.free::before {
     margin-top: 42px !important;
 }
 .position{
-    
+
 }
 
 clearfix:after {
@@ -2391,4 +2392,4 @@ clearfix:after {
 .CfadeInUp {
     opacity: 0;
     animation: 1s ease forwards alternate;
-}
+}

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

@@ -56,7 +56,7 @@
                     </div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            商务服务  
+                            商务服务
                         </p>
                         <p class="service_text">供应商招募</p>
                         <p class="service_text">供应商资格预审</p>
@@ -67,7 +67,7 @@
                     <div class="fl ml-29"><img src="/serviceSystem/img/xin.png" alt=""></div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            推荐服务  
+                            推荐服务
                         </p>
                         <p class="service_text">优秀供应商推荐</p>
                         <p class="service_text">供应商名录</p>
@@ -79,7 +79,7 @@
                     <div class="fl ml-29"><img src="/serviceSystem/img/bing.png" alt=""></div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            数据分析  
+                            数据分析
                         </p>
                         <p class="service_text">通讯录</p>
                         <p class="service_text">各类招标方式占比</p>
@@ -91,7 +91,7 @@
                     <div class="fl ml-29"><img src="/serviceSystem/img/dingwei.png" alt=""></div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            信息发布  
+                            信息发布
                         </p>
                         <p class="service_text">招标信息发布</p>
                         <p class="service_text">采购信息发布</p>
@@ -128,7 +128,7 @@
                         <div class="line"></div>
                         <div class="blue_btn_long" @click="consultation('1')">立即咨询</div>
                     </div>
-                    
+
                     <div class="item bg_bule mr-40">
                         <p class="tit">高级会员</p>
                         <p class="price">¥<span class="fz-24">19,999</span>/年</p>
@@ -437,7 +437,7 @@
                                     <div class="table_content_sortcell"><span class="tit">部分可用</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
-                                </div>              
+                                </div>
                             </div>
                         </div>
                         <div class="table_headline">
@@ -500,7 +500,7 @@
                                     </div>
                                     <div class="table_content_textcell"><span class="tit">即将上线,敬请期待</span></div>
                                 </div>
-                                
+
                             </div>
                         </div>
                         <div class="table_headline">
@@ -523,11 +523,11 @@
                                         <p class="text">
                                             搜索范围支持项目名称/标的物、采购单位、中标企业、招标代理机构,项目地区支持地市级,发布时间支持自定义,支持采购单位类型、有无联系方式、排除词等高级筛选。支持查看拟建项目、采购意向标讯详情,提前获取商机。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><span class="tit">部分可用</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
-                                   
+
                                 </div>
                                 <div class="table_content_r_item ">
                                     <div class="table_content_longcell">
@@ -568,7 +568,7 @@
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                 </div>
-                                
+
                             </div>
                          </div>
                          <div class="table_headline">
@@ -591,7 +591,7 @@
                                         <p class="text">
                                             可将业务范围、产品名称、甲方单位名称、业务需求等设置为订阅关键词,及时获取精准项目信息。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><span class="tit">部分可用</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -601,9 +601,9 @@
                          <div class="warn_text clearfix">
                             <p>注:以上仅为部分服务项目,请联系客户经理查看全部内容!</p>
                             <div class="btn_" @click="consultation('1')">立即咨询</div>
-                         </div>       
+                         </div>
                 </div>
-            </div>    
+            </div>
         </div>
         <!-- 招标代理机构服务 -->
         <div class="content" v-if="tabs==2">
@@ -627,7 +627,7 @@
                     </div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            商务服务  
+                            商务服务
                         </p>
                         <p class="service_text">供应商招募</p>
                         <p class="service_text">供应商资格预审</p>
@@ -638,7 +638,7 @@
                     <div class="fl ml-29"><img src="/serviceSystem/img/xin.png" alt=""></div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            推荐服务  
+                            推荐服务
                         </p>
                         <p class="service_text">采购单位推荐</p>
                         <p class="service_text">优秀供应商推荐</p>
@@ -649,7 +649,7 @@
                     <div class="fl ml-29"><img src="/serviceSystem/img/bing.png" alt=""></div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            数据分析  
+                            数据分析
                         </p>
                         <p class="service_text">招标方式占比</p>
                         <p class="service_text">代理项目规模分布</p>
@@ -661,7 +661,7 @@
                     <div class="fl ml-29"><img src="/serviceSystem/img/dingwei.png" alt=""></div>
                     <div class="fl ml-20">
                         <p class="service_title">
-                            信息发布  
+                            信息发布
                         </p>
                         <p class="service_text">招标信息发布</p>
                         <p class="service_text">采购信息发布</p>
@@ -699,7 +699,7 @@
                         <div class="line"></div>
                         <div class="blue_btn_long" @click="consultation('2')">立即咨询</div>
                     </div>
-                    
+
                     <div class="item bg_bule mr-40">
                         <p class="tit">高级会员</p>
                         <p class="price">¥<span class="fz-24">19,999</span>/年</p>
@@ -882,7 +882,7 @@
                                     </div>
                                     <div class="table_content_textcell"><span>即将上线,敬请期待</span></div>
                                 </div>
-                                
+
                             </div>
                          </div>
                          <div class="table_headline">
@@ -1048,7 +1048,7 @@
                                     <div class="table_content_sortcell"><span class="tit">部分可用</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
-                                </div>              
+                                </div>
                             </div>
                         </div>
                         <div class="table_headline">
@@ -1111,7 +1111,7 @@
                                     </div>
                                     <div class="table_content_textcell"><span class="tit">即将上线,敬请期待</span></div>
                                 </div>
-                                
+
                             </div>
                         </div>
                         <div class="table_headline">
@@ -1134,11 +1134,11 @@
                                         <p class="text">
                                             搜索范围支持项目名称/标的物、采购单位、中标企业、招标代理机构,项目地区支持地市级,发布时间支持自定义,支持采购单位类型、有无联系方式、排除词等高级筛选。支持查看拟建项目、采购意向标讯详情,提前获取商机。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><span class="tit">部分可用</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
-                                   
+
                                 </div>
                                 <div class="table_content_r_item ">
                                     <div class="table_content_longcell">
@@ -1179,7 +1179,7 @@
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                 </div>
-                                
+
                             </div>
                          </div>
                          <div class="table_headline">
@@ -1202,7 +1202,7 @@
                                         <p class="text">
                                             可将业务范围、产品名称、甲方单位名称、业务需求等设置为订阅关键词,及时获取精准项目信息。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><span class="tit">部分可用</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -1212,9 +1212,9 @@
                          <div class="warn_text clearfix">
                             <p>注:以上仅为部分服务项目,请联系客户经理查看全部内容!</p>
                             <div class="btn_" @click="consultation('2')">立即咨询</div>
-                         </div>       
+                         </div>
                 </div>
-            </div>    
+            </div>
         </div>
         <!-- 供应商开始 -->
         <div class="content" v-if="tabs==0">
@@ -1256,7 +1256,7 @@
                               <p class="text"><img src="/serviceSystem/img/ic_v.png" alt="">客户线索实时记录、动态跟踪</p>
                               <p class="text"><img src="/serviceSystem/img/ic_v.png" alt="">招投标项目进度可视化报表展示</p>
                         </div>
-                        
+
                     </div>
                     <div class="item lr">
                       <img src="/serviceSystem/img/gysMine2@2x.png" alt="" class="item_img w-475">
@@ -1351,7 +1351,7 @@
                             <div class="sort_cell_block serve_bg_blue he-110">
                                 <span class="table_serve_head_text">超级订阅</span>
                                 <div class="cell_blue_btn" v-if="loginFlag&&isbuy_vip" @click="goplay('vip')">立即使用</div>
-                                <div class="cell_blue_btn" v-else @click="gobuy('vip')">立即购买</div>  
+                                <div class="cell_blue_btn" v-else @click="gobuy('vip')">立即购买</div>
                             </div>
                             <div class="sort_cell_block_nob  serve_bg_yellow he-110">
                                 <span class="table_serve_head_text2">大会员</span>
@@ -1381,7 +1381,7 @@
                             <div class="sort_cell_block serve_bg_blue he-110">
                                 <span class="table_serve_head_text">超级订阅</span>
                                 <div class="cell_blue_btn" v-if="loginFlag&&isbuy_vip" @click="goplay('vip')">立即使用</div>
-                                <div class="cell_blue_btn" v-else @click="gobuy('vip')">立即购买</div>  
+                                <div class="cell_blue_btn" v-else @click="gobuy('vip')">立即购买</div>
                             </div>
                             <div class="sort_cell_block_nob  serve_bg_yellow he-110">
                                 <span class="table_serve_head_text2">大会员</span>
@@ -1620,11 +1620,11 @@
                                             监控招标大数据,一旦关注企业中标,及时推送企业的中标项目、时间等公告信息。
                                         </p>
                                     </div>
-                                    <div class="table_content_sortcell"><span class="tit">10个项目</span></div>
-                                    <div class="table_content_sortcell"><span class="tit">10个项目</span></div>
-                                    <div class="table_content_sortcell"><span class="tit">100个项目</span></div>
-                                    <div class="table_content_sortcell"><span class="tit">500个项目</span></div>
-                                    <div class="table_content_sortcell"><span class="tit">500个项目</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">10个企业</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">10个企业</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">100个企业</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">500个企业</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">500个企业</span></div>
                                 </div>
                                 <div class="table_content_r_item cell_wite">
                                     <div class="table_content_longcell">
@@ -1637,9 +1637,9 @@
                                     </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
-                                    <div class="table_content_sortcell"><span class="tit">100个项目</span></div>
-                                    <div class="table_content_sortcell"><span class="tit">500个项目</span></div>
-                                    <div class="table_content_sortcell"><span class="tit">500个项目</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">100个企业</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">500个企业</span></div>
+                                    <div class="table_content_sortcell"><span class="tit">500个企业</span></div>
                                 </div>
                             </div>
                         </div>
@@ -1759,7 +1759,7 @@
                                         <p class="text">
                                             大数据预测企业中标概率、企业排名,帮助分析潜在投标企业、辅助投标决策。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
@@ -1780,7 +1780,7 @@
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><span class="tit">200次</span></div>
                                     <div class="table_content_sortcell"><span class="tit">200次</span></div>
-                                </div> 
+                                </div>
                             </div>
                          </div>
                          <div class="table_content">
@@ -1798,7 +1798,7 @@
                                         <p class="text">
                                             通过大数据分析统计,提供类似项目评标专家的频次排名、类似项目的热点中标企业、项目区域分布、采购单位类型分布、项目标书编制周期、类型项目折扣率分析等,帮助投标人员编制标书,判断是否参与投标。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
@@ -1822,12 +1822,12 @@
                                         <p class="text">
                                             提供汇总后的采购单位历史招标项目负责人及其联系方式。
                                         </p>
-                                    </div> 
-                                    <div class="table_content_sortcell"><i class="free"></i></div>
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
+                                    <div class="table_content_sortcell"><i class="right"></i></div>
                                 </div>
                                 <div class="table_content_r_item cell_wite">
                                     <div class="table_content_longcell">
@@ -1837,7 +1837,7 @@
                                         <p class="text">
                                             提供采购单位的采购项目动态、近5年招标采购项目数量及项目金额统计、采购预算区间、招标方式占比、采购领域平均节支率、重点合作的企业分析、重点合作代理机构明细等多维度分析。洞察采购单位采购需求,用于开发新客户、客户维护。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><span class="tit">每购买1个省份,每月可查看5个采购单位画像,上限80个</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -1861,7 +1861,7 @@
                                         <p class="text">
                                             提供汇总后的企业历史中标项目负责人及其联系方式。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -1876,7 +1876,7 @@
                                         <p class="text">
                                             掌控企业董监高、股东及投资比例、注册资本、企业地址、经营范围、公司注销/吊销、新公司设立变动信息。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -1891,7 +1891,7 @@
                                         <p class="text">
                                             提供企业年度历史中标项目清单、项目数量及项目金额统计、市场区域分布情况统计图、各业务线折扣率、合作客户类型分布图、各行业的重点合作客户等多维度数据。帮助快速了解企业竞争力。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><span class="tit">每购买1个省份,每月可查看50个企业画像,上限800个</span></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
@@ -1920,7 +1920,7 @@
                                         <p class="text">
                                             月新增招标和开标的项目数量、项目预算、项目规模统计,以及关注企业中标项目明细,开标项目提醒、规模TOP10采购行业;中标企业区域、资本分布统计;采购单位、中标企业排行等。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
@@ -1935,7 +1935,7 @@
                                         <p class="text">
                                             自定义分析范围(分析内容、区域、行业、采购单位类型、时间),对市场规模、采购单位、中标单位进行分析,包含细分业务市场的项目数量、金额分布情况、以及各细分业务市场的重点中标单位中标数量明细等。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
@@ -1959,7 +1959,7 @@
                                         <p class="text">
                                             本周/字段明细:省份、城市、公告标题、公告类别、公告内容、发布时间、公告地址、剑鱼标讯地址、项目名称、项目范围、预算金额、中标金额、开标日期、采购单位、采购单位信息(采购单位联系人、采购单位联系电话、招标代理机构)、中标单位信息(中标单位、中标单位联系人、中标单位联系电话)(来源:招标公告网站)、中标单位信息(中标单位联系人、中标单位联系电话、电子邮箱)(来源:国家企业公示网站)。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><span class="tit">每日导出量
@@ -1985,14 +1985,14 @@
                                         <p class="text">
                                             采购单位/招标代理机构会将部分项目通过剑鱼标讯进行公开或邀请招标,剑鱼标讯为客户提供项目的采购单位/招标代理机构联系方式,方便客户联系。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                 </div>
-                          
+
                                 <div class="table_content_r_item ">
                                     <div class="table_content_longcell">
                                         <p class="tit">
@@ -2001,7 +2001,7 @@
                                         <p class="text">
                                             剑鱼标讯与众多采购单位/招标代理机构都有良好的合作关系,部分优质项目在剑鱼标讯进行公开或邀请招标,可以根据客户的企业资质、综合实力、成功案例等,直接推荐给采购单位。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
@@ -2016,7 +2016,7 @@
                                         <p class="text">
                                             剑鱼标讯与众多采购单位/招标代理机构拥有良好的合作关系,部分优质项目在剑鱼标讯进行公开或邀请招标。剑鱼标讯将根据客户企业资质、综合实力、成功案例,向采购单位方推荐。客户在使用唯一推荐权益后,剑鱼标讯将不再向采购单位方推荐其他供应商。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
@@ -2040,21 +2040,21 @@
                                         <p class="text">
                                             提供专业的售后客服服务,定期电话回访,及时解决服务中的任何问题,例如:帮助客户优化订阅关键词、培训系统操作等。
                                         </p>
-                                    </div> 
+                                    </div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="free"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
                                     <div class="table_content_sortcell"><i class="right"></i></div>
-                                    <div class="table_content_sortcell"><i class="right"></i></div> 
+                                    <div class="table_content_sortcell"><i class="right"></i></div>
                                 </div>
                             </div>
                          </div>
                          <div class="all_border_warn warn_text clearfix">
                             <p>注:以上仅为部分服务项目,请联系客户经理查看全部内容!</p>
                             <div class="btn_" @click="consultation('0')">立即咨询</div>
-                         </div>       
+                         </div>
                 </div>
-            </div>  
+            </div>
         </div>
         <div class="model_" v-show="isshow"  @click.self="close('isshow')">
             <div class="pop-up">
@@ -2064,7 +2064,7 @@
                     <img :src="url" alt="">
                 </div>
                 <p class="text">{text}</p>
-            </div> 
+            </div>
         </div>
         <div class="model_" v-show="vipshow"  @click.self="close('vipshow')">
             <div class="modal-dialog modal-dialog-subvip modal-sm" role="document">
@@ -2094,10 +2094,10 @@
     </script>
     <script src='{{Msg "seo" "cdn"}}/serviceSystem/js/serviceSystem.js?v={{Msg "seo" "version"}}'></script>
     <!--S-百度统计-->
-    
+
     {{include "/common/pcbottom.html"}}
     {{include "/common/baiducc.html"}}
     <!--E-百度统计-->
 </body>
 
-</html>
+</html>

+ 9 - 3
src/web/templates/pc/entsearchindex.html

@@ -131,6 +131,9 @@
             .tab-cgdw {
                 display: none;
             }
+            .in-iframe[data-page-name=entSearch] .search-header .search-header-content {
+              padding-right: 24px;
+            }
         </style>
 	</head>
 
@@ -139,6 +142,9 @@
 	<section class="search-container">
         <div class="vue-search-container" v-cloak>
             <div class="search-header">
+                <div class="search-header-tab">
+                  <span class="tab-item tab-active">企业搜索</span>
+                </div>
                 <div class="search-header-content w">
                     <div class="search-header-top">
                         <div class="input-container flex">
@@ -152,7 +158,7 @@
                                 @keyup.enter.native="doSearch">
                                 <template slot="prefix">
                                     <div class="input-prefix-icon">
-                                        <img src="/images/biddingSearch/search-icon1.png">
+                                        <img src="/images/biddingSearch/bidding-search.png">
                                     </div>
                                 </template>
                                 <template slot="append">
@@ -183,14 +189,14 @@
                             </div>
                         </div>
                     </div>
-                    <div class="search-header-bottom">
+                    <!-- <div class="search-header-bottom">
                         <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"></el-tab-pane>
                             <el-tab-pane label="供应搜索" name="gy"></el-tab-pane>
                         </el-tabs>
-                    </div>
+                    </div> -->
                 </div>
             </div>
             <div class="search-content w">

+ 12 - 8
src/web/templates/pc/index.html

@@ -47,8 +47,15 @@
         <!-- 搜索框区域 -->
         <div class="jy-index-search">
           <div class="search">
+            <div class="tips">
+              <span class="active spa1" data-id="zb">招标采购搜索</span>
+              <span class="spa1" data-id="qy">企业搜索</span>
+              <span id="buyUnits" class="spa1 cai-gou" data-id="cg">采购单位搜索</span>
+              <span class="spa1" data-id="gy">供应搜索</span>
+              <i></i>
+            </div>
             <form method="post" action="/jylab/supsearch/index.html" class="form-search" id="zbIndex" name="zbIndex" target="stop" onsubmit="return false">
-              <input class="ser" onkeydown="onkeydownSearch()" autocomplete="off"  type="text" name="keywords" placeholder="请输入您想要查询的招标信息,多个关键词用空格隔开" id="keywords" value="" />
+              <input class="ser" onkeydown="onkeydownSearch()" autocomplete="off"  type="text" name="keywords" placeholder="请输入项目名称等关键词,例如:医疗设备" id="keywords" value="" />
               <input type="hidden" name="searchvalue">
               <input type="hidden" name="selectType" value="title">
               <input type="hidden">
@@ -59,13 +66,6 @@
               <ul>
               </ul>
             </div>
-            <div class="tips">
-              <span class="active spa1" data-id="zb">招标采购搜索</span>
-              <span class="spa1" data-id="qy">企业搜索</span>
-              <span id="buyUnits" class="spa1 cai-gou" data-id="cg">采购单位搜索</span>
-              <span class="spa1" data-id="gy">供应搜索</span>
-              <i></i>
-            </div>
             <div class="pre-search-list" style="display: none;"></div>
           </div>
         </div>
@@ -511,12 +511,16 @@
                 if (theme === 'light') {
                   setTimeout(function(){
                     $('.public-nav').addClass('light-bg-dark-color').removeClass('light-bg-light-color')
+                    $('.swiper-pagination').addClass('light-swiper-bg-dark-color').removeClass('light-swiper-bg-light-color')
                     $('.loginBtn').css('color', '#1d1d1d')
                   }, 100)
                 } else {
                   setTimeout(function(){
                     $('.public-nav').addClass('light-bg-light-color').removeClass('light-bg-dark-color')
                     $('.loginBtn').css('color', '#fff')
+                    var a = $('.jy-index .jy-index-banner .custom-dot .swiper-pagination-bullet-active')
+                    // $('.jy-index .jy-index-banner .custom-dot .swiper-pagination-bullet').css('background', 'rgba(255, 255, 255, 0.32)')
+                    $('.swiper-pagination').addClass('light-swiper-bg-light-color').removeClass('light-swiper-bg-dark-color')
                   }, 100)
                 }
               }

+ 11 - 5
src/web/templates/pc/pursearchindex.html

@@ -33,8 +33,8 @@
             }
 
             .in-iframe .search-header-content {
-              padding-left: 86px;
-              padding-right: 86px;
+              /* padding-left: 86px;
+              padding-right: 86px; */
             }
             .in-iframe .search-header,
             .in-iframe .search-pur-container,
@@ -46,6 +46,9 @@
               border: none;
               border-bottom: 1px solid #EBEBEB;
             }
+            .in-iframe[data-page-name=entSearch] .search-header .search-header-content {
+              padding-right: 24px;
+            }
         </style>
 	</head>
 
@@ -54,6 +57,9 @@
 	<section class="search-container">
         <div class="vue-search-container" id="pur-search-container" v-cloak>
             <div class="search-header">
+                <div class="search-header-tab">
+                  <span class="tab-item tab-active">采购单位搜索</span>
+                </div>
                 <div class="search-header-content w">
                     <div class="search-header-top">
                         <div class="input-container flex">
@@ -67,7 +73,7 @@
                                 @keyup.enter.native="doSearch">
                                 <template slot="prefix">
                                     <div class="input-prefix-icon">
-                                        <img src="/images/biddingSearch/search-icon1.png">
+                                        <img src="/images/biddingSearch/bidding-search.png">
                                     </div>
                                 </template>
                                 <template slot="append">
@@ -98,14 +104,14 @@
                             </div>
                         </div>
                     </div>
-                    <div class="search-header-bottom">
+                    <!-- <div class="search-header-bottom">
                         <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"></el-tab-pane>
                             <el-tab-pane label="供应搜索" name="gy"></el-tab-pane>
                         </el-tabs>
-                    </div>
+                    </div> -->
                 </div>
             </div>
             <div class="search-content w">

Fichier diff supprimé car celui-ci est trop grand
+ 457 - 174
src/web/templates/pc/supsearch.html


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff