فهرست منبع

Merge branch 'master' into feature/v4.7.13

unknown 3 سال پیش
والد
کامیت
7d7af132b8
100فایلهای تغییر یافته به همراه4756 افزوده شده و 776 حذف شده
  1. 10 5
      src/config.json
  2. 43 0
      src/jfw/filter/baseuserfilter.go
  3. 3 0
      src/jfw/filter/filter.go
  4. 17 2
      src/jfw/front/dataExport.go
  5. 5 8
      src/jfw/front/entsearch.go
  6. 2 0
      src/jfw/front/front.go
  7. 11 5
      src/jfw/front/frontRouter.go
  8. 20 1
      src/jfw/front/login.go
  9. 11 1
      src/jfw/front/org_structure.go
  10. 2 2
      src/jfw/front/pcIndex.go
  11. 11 0
      src/jfw/front/pchelper.go
  12. 25 29
      src/jfw/front/search.go
  13. 92 4
      src/jfw/front/shorturl.go
  14. 23 4
      src/jfw/front/supsearch.go
  15. 33 18
      src/jfw/front/swordfish.go
  16. 11 1
      src/jfw/front/ws_dataExport.go
  17. 5 1
      src/jfw/jyutil/jyutil.go
  18. 43 0
      src/jfw/modules/app/src/app/filter/baseuserfilter.go
  19. 3 0
      src/jfw/modules/app/src/app/filter/filter.go
  20. 3 0
      src/jfw/modules/app/src/app/filter/loginfilter.go
  21. 7 4
      src/jfw/modules/app/src/app/front/frontRouter.go
  22. 59 5
      src/jfw/modules/app/src/app/front/login.go
  23. 10 2
      src/jfw/modules/app/src/app/front/logoffuser.go
  24. 4 0
      src/jfw/modules/app/src/app/front/me.go
  25. 41 23
      src/jfw/modules/app/src/app/front/search.go
  26. 1 1
      src/jfw/modules/app/src/app/front/shorturl.go
  27. 5 0
      src/jfw/modules/app/src/app/front/structedData.go
  28. 7 3
      src/jfw/modules/app/src/app/front/swordfish.go
  29. 5 4
      src/jfw/modules/app/src/app/front/vipsubscribe.go
  30. 11 1
      src/jfw/modules/app/src/app/front/ws_dataExport.go
  31. 4 1
      src/jfw/modules/app/src/config.json
  32. 14 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/public.css
  33. 5 1
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/client_buyer_project_news.js
  34. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/client_portrayal.js
  35. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js
  36. 1 0
      src/jfw/modules/app/src/web/staticres/jyapp/css/dev2/biddingSearch.css
  37. 19 1
      src/jfw/modules/app/src/web/staticres/jyapp/css/p13.css
  38. 1 0
      src/jfw/modules/app/src/web/staticres/jyapp/css/subscribe.css
  39. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/css/wxinfocontent.css
  40. 95 41
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  41. 72 13
      src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js
  42. 20 5
      src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js
  43. 1 1
      src/jfw/modules/app/src/web/templates/big-member/component_client_set_scope.html
  44. 1 1
      src/jfw/modules/app/src/web/templates/big-member/component_set_scope2.html
  45. 1 1
      src/jfw/modules/app/src/web/templates/big-member/header.html
  46. 2 1
      src/jfw/modules/app/src/web/templates/big-member/page_client_buyer_project_news.html
  47. 12 2
      src/jfw/modules/app/src/web/templates/big-member/page_client_list.html
  48. 2 1
      src/jfw/modules/app/src/web/templates/big-member/page_free_buyer_project_news.html
  49. 2 1
      src/jfw/modules/app/src/web/templates/big-member/page_free_ent_project_news.html
  50. 3 3
      src/jfw/modules/app/src/web/templates/common/baiducc.html
  51. 375 0
      src/jfw/modules/app/src/web/templates/frontRouter/activity/sess/task-202207.html
  52. 0 2
      src/jfw/modules/app/src/web/templates/frontRouter/activity/sess/task.html
  53. 64 0
      src/jfw/modules/app/src/web/templates/frontRouter/bidedoc/free/index.html
  54. 28 9
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html
  55. 61 2
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_solution.html
  56. 61 2
      src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html
  57. 6 2
      src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html
  58. 298 0
      src/jfw/modules/app/src/web/templates/frontRouter/enptc/free/app_enptc.html
  59. 557 0
      src/jfw/modules/app/src/web/templates/frontRouter/enptc/free/write_infor.html
  60. 50 0
      src/jfw/modules/app/src/web/templates/frontRouter/enptc/free/write_result.html
  61. 166 0
      src/jfw/modules/app/src/web/templates/frontRouter/partner/free/index.html
  62. 174 0
      src/jfw/modules/app/src/web/templates/frontRouter/partner/free/partner.html
  63. 179 0
      src/jfw/modules/app/src/web/templates/frontRouter/solution/free/index.html
  64. 16 1
      src/jfw/modules/app/src/web/templates/me/login.html
  65. 1 1
      src/jfw/modules/app/src/web/templates/me/setting.html
  66. 21 21
      src/jfw/modules/app/src/web/templates/staticpage/permission_rules.html
  67. 21 21
      src/jfw/modules/app/src/web/templates/staticpage/permission_rules_client.html
  68. 19 2
      src/jfw/modules/app/src/web/templates/structeddata/marketing.html
  69. 1 1
      src/jfw/modules/app/src/web/templates/vipsubscribe/manageWord.html
  70. 7 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html
  71. 113 66
      src/jfw/modules/app/src/web/templates/weixin/historypush.html
  72. 1 0
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  73. 70 4
      src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html
  74. 7 28
      src/jfw/modules/bigmember/src/config.json
  75. 8 1
      src/jfw/modules/bigmember/src/config/config.go
  76. 3 3
      src/jfw/modules/bigmember/src/service/analysis/potential.go
  77. 128 70
      src/jfw/modules/bigmember/src/service/use/use.go
  78. 125 45
      src/jfw/modules/common/src/qfw/util/bidsearch/search.go
  79. 181 83
      src/jfw/modules/common/src/qfw/util/dataexport/dataexport.go
  80. 51 28
      src/jfw/modules/common/src/qfw/util/jy/bigVipPower.go
  81. 4 2
      src/jfw/modules/common/src/qfw/util/jy/payUser.go
  82. 232 49
      src/jfw/modules/common/src/qfw/util/jy/subscribepush.go
  83. 4 2
      src/jfw/modules/common/src/qfw/util/jy/userMerge.go
  84. 6 1
      src/jfw/modules/entsesearch/src/search/entsesearch.go
  85. 54 37
      src/jfw/modules/entsesearch/src/web/staticres/jylab/entsesearch/js/common.js
  86. 54 37
      src/jfw/modules/followent/src/web/staticres/jylab/followent/js/common.js
  87. 1 0
      src/jfw/modules/publicapply/src/ad/entity/struct.go
  88. 26 29
      src/jfw/modules/publicapply/src/bidcollection/entity/entity.go
  89. 1 1
      src/jfw/modules/publicapply/src/bidcollection/service/action.go
  90. 1 1
      src/jfw/modules/publicapply/src/bidcollection/service/service.go
  91. 2 1
      src/jfw/modules/publicapply/src/config.json
  92. 1 0
      src/jfw/modules/publicapply/src/config/config.go
  93. 4 0
      src/jfw/modules/publicapply/src/customer/entity/entiy.go
  94. 8 1
      src/jfw/modules/publicapply/src/dataexport/service/action.go
  95. 251 2
      src/jfw/modules/publicapply/src/subscribePush/entity/historyPush.go
  96. 241 0
      src/jfw/modules/publicapply/src/subscribePush/entity/service/entity.go
  97. 260 0
      src/jfw/modules/publicapply/src/subscribePush/entity/service/matchjob.go
  98. 4 1
      src/jfw/modules/publicapply/src/subscribePush/entity/vrew.go
  99. 26 19
      src/jfw/modules/publicapply/src/subscribePush/service/pushList.go
  100. 3 1
      src/jfw/modules/subscribepay/src/config.json

+ 10 - 5
src/config.json

@@ -201,7 +201,7 @@
         "appid": "wxdedd73f450993685",
         "appsecret": "d55898fde0b7887e5fe4660bd2494700"
     },
-    "industry": "分类综合测试",
+    "industry": "行业分类",
     "recommendEntLimit": "50",
     "jyapp": {
         "domain": "https://web-jydev-wcj.jianyu360.cn",
@@ -222,14 +222,15 @@
         }
     },
     "limitSearchText": {
-        "flag": false,
-        "count": 3,
+        "flag": true,
+        "count": 40,
         "timeout": 60,
         "totalPage": 10,
         "percentage":80,
         "userIds": [
         ],
-        "msg": "f 开关状态:%s //-2 从配置文件重置,-1 关闭,1 打开<br><br>c 并发数:%d //-2 不限制并发数,-1 无条件直接限制,>0 限制并发数<br><br>t 个人查询限制时间:%ds //-1 不限制<br><br>p 限制页数:%d"
+        "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"
     },
     "share": {
         "forceShareEnabled": false,
@@ -318,5 +319,9 @@
     "indexcontentTimeOut":86400,
     "seoBeforeTimeHour":12160,
     "canReadNotice": 3,
-    "smsServiceRpc":"127.0.0.1:932"
+    "smsServiceRpc":"127.0.0.1:932",
+    "searchTypeSwitch": true,
+    "fileSignBool":true,
+    "baseUserFilterFlag":false,
+    "userCenterApi":"https://web-zxl.jydev.jianyu360.com"
 }

+ 43 - 0
src/jfw/filter/baseuserfilter.go

@@ -0,0 +1,43 @@
+package filter
+
+import (
+	"jfw/config"
+	"jfw/public"
+	"log"
+	"net/http"
+	"qfw/util"
+
+	"github.com/go-xweb/httpsession"
+)
+
+type baseUserFilter struct {
+	W          http.ResponseWriter
+	R          *http.Request
+	Session    *httpsession.Session
+	GetSession map[string]interface{}
+}
+
+//判断session中是否存在base_user_id 不存在则更新
+
+func (this *baseUserFilter) Do() bool {
+	if flag, _ := config.Sysconfig["baseUserFilterFlag"].(bool); !flag {
+		return true
+	}
+	if this.R.Method == "POST" {
+		return true
+	}
+	if uid := this.GetSession["userId"]; uid != nil && uid != "" {
+		base_user_id := this.GetSession["base_user_id"]
+		if base_user_id == nil || base_user_id == 0 {
+			data, ok := public.MQFW.FindById("user", util.ObjToString(uid), `{"base_user_id":1}`)
+			if data != nil && ok && len(*data) > 0 {
+				if base_user_id := util.Int64All((*data)["base_user_id"]); base_user_id > 0 {
+					this.Session.Set("base_user_id", (*data)["base_user_id"])
+				} else {
+					log.Printf("%s用户暂无base_user_id", uid)
+				}
+			}
+		}
+	}
+	return true
+}

+ 3 - 0
src/jfw/filter/filter.go

@@ -52,5 +52,8 @@ func (f *Filter) Do(w http.ResponseWriter, r *http.Request) bool {
 	if !(&pcFilter{w, r, session, getSession}).Do() {
 		return false
 	}
+	if !(&baseUserFilter{w, r, session, getSession}).Do() {
+		return false
+	}
 	return true
 }

+ 17 - 2
src/jfw/front/dataExport.go

@@ -387,7 +387,10 @@ func (d *DataExport) SuperSearchExport() error {
 		Haswinnertel: d.GetString("winnertel"),                    //是否有中标电话
 		SelectIds:    strings.TrimSpace(d.GetString("selectIds")), //选择信息id
 		Notkey:       d.GetString("notkey"),                       //排除词
+		FileExists:   d.GetString("fileExists"),                   //是否有附件
+		City:         d.GetString("city"),                         //城市
 	}
+	selectType := strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).GetQueryItems(d.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
 	//数据回显
 	d.SetSession("Echo_timeslot", d.GetString("timeslot"))
 	d.SetSession("Echo_keywords", reqData.Keywords)
@@ -402,15 +405,27 @@ func (d *DataExport) SuperSearchExport() error {
 	d.SetSession("Echo_hasBuyertel", reqData.Hasbuyertel)
 	d.SetSession("Echo_hasWinnertel", reqData.Haswinnertel)
 	d.SetSession("Echo_notkey", reqData.Notkey)
+	d.SetSession("Echo_fileExists", reqData.FileExists)
+	d.SetSession("Echo_city", reqData.City)
 
 	saveData := reqData.PassBidSearchExport()
-	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).
-		GetQueryItems(d.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")
+	saveData["selectType"] = selectType
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId
 	saveData["comeinfrom"] = "supersearchPage"
+	//是否开启 正文 标题同时搜索只搜正文的开关
+	saveData["searchTypeSwitch"], _ = config.Sysconfig["searchTypeSwitch"].(bool)
+
+	region := util.If(reqData.Area == "全国", "", reqData.Area).(string)
+	if region != "" && reqData.City != "" {
+		region += "," + reqData.City
+	} else {
+		region = reqData.City
+	}
+	saveData["region"] = util.If(region != "", strings.Split(region, ","), []string{}).([]string)
 	//存入数据库
 	_id := mongodb.Save(dataexport.ExportTable, saveData)
+	log.Println(_id, "saveData:", saveData)
 	return d.Redirect("/front/dataExport/toCreateOrderPage/" + util.SE.Encode2Hex(_id))
 }
 func (d *DataExport) ToCreateOrderPage(_id string) error {

+ 5 - 8
src/jfw/front/entsearch.go

@@ -14,13 +14,12 @@ import (
 
 type Entsearch struct {
 	*xweb.Action
-	bidsearchforentindex xweb.Mapper `xweb:"/jylab/bidsearchforent/index.html"`
-	pcSearchZbqyAjax     xweb.Mapper `xweb:"/jylab/pcSearchZbqyAjax"`
-	recList              xweb.Mapper `xweb:"/jylab/bidsearchforent/recList"`
-	entSearchIndex       xweb.Mapper `xweb:"/jylab/entSearch/index.html"`
+	bidsearchforentindex  xweb.Mapper `xweb:"/jylab/bidsearchforent/index.html"`
+	pcSearchZbqyAjax      xweb.Mapper `xweb:"/jylab/pcSearchZbqyAjax"`
+	recList               xweb.Mapper `xweb:"/jylab/bidsearchforent/recList"`
+	entSearchIndex        xweb.Mapper `xweb:"/jylab/entSearch/index.html"`
 	pushSearchIndex       xweb.Mapper `xweb:"/jylab/purSearch/index.html"`
-	purScopebusniessIndex       xweb.Mapper `xweb:"/jylab/purScopebusniess/index.html"`
-
+	purScopebusniessIndex xweb.Mapper `xweb:"/jylab/purScopebusniess/index.html"`
 }
 
 func init() {
@@ -65,8 +64,6 @@ func (e *Entsearch) PurScopebusniessIndex() error {
 	return e.Render("/pc/purScopebusniess.html", &e.T)
 }
 
-
-
 func (e *Entsearch) Bidsearchforentindex() error {
 	defer util.Catch()
 	var shareid = e.GetString("id")

+ 2 - 0
src/jfw/front/front.go

@@ -637,6 +637,7 @@ func (f *Front) SignOut() error {
 	if userId != "" {
 		redis.Del("other", jyutil.LoginRedisKey(userId))
 		jy.DelUnlimitSessionId(fmt.Sprint(f.Session().Id()), userId) //多账号
+		jy.ClearBigVipUserPower(userId)
 	}
 	f.DelSession("rpcBackUserInfo")
 	f.DelSession("user")
@@ -655,6 +656,7 @@ func (f *Front) SignOut() error {
 	f.DelSession("entUserId")
 	f.DelSession("frameworkEntId")
 	f.DelSession("frameworkEntName")
+	f.DelSession("base_user_id")
 	f.ServeJson("ok")
 	return nil
 }

+ 11 - 5
src/jfw/front/frontRouter.go

@@ -3,8 +3,10 @@ package front
 import (
 	"fmt"
 	"jfw/config"
+	"jfw/jyutil"
 	"jfw/public"
 	"jfw/wx"
+	"net/url"
 	"qfw/util/jy"
 	"regexp"
 	"strings"
@@ -67,13 +69,17 @@ func init() {
 func (this *CommonRouter) WxCommonPage(folder, loginSign, htmlPage string) error {
 	if loginSign != "free" {
 		openid, _ := this.GetSession("s_m_openid").(string)
-		if openid != "" {
-			ok, _, _ := FindUserAndCreateSess(openid, this.Session(), "wx", false)
-			if !ok {
-				openid = ""
+		if openid == "" || (openid != "" && !CheckUserIsSubscribe(openid)) {
+			stateKey := this.GetString("state")
+			if stateKey == "" { //公众号回调
+				return this.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(this.Site()+this.Url()), "wx"), 302)
+			}
+			openid = jyutil.Getopenid(this.GetString("code"))
+			if ok, _, _ := FindUserAndCreateSess(openid, this.Session(), "wx", false); !ok {
+				return this.Redirect("/swordfish/about")
 			}
 		}
-		if openid == "" {
+		if !CheckUserIsSubscribe(openid) {
 			return this.Redirect("/swordfish/about")
 		}
 	}

+ 20 - 1
src/jfw/front/login.go

@@ -7,6 +7,7 @@ import (
 	. "mongodb"
 	qutil "qfw/util"
 	"qfw/util/jy"
+	"qfw/util/usercenter"
 	"regexp"
 	"strings"
 	"time"
@@ -23,7 +24,6 @@ type Login struct {
 	forgetPwd xweb.Mapper `xweb:"/phone/forgetPwd"` //忘记密码
 	register  xweb.Mapper `xweb:"/phone/register"`  //注册
 	phoneBind xweb.Mapper `xweb:"/phone/bind"`      //绑定手机号
-
 }
 
 var (
@@ -132,6 +132,19 @@ func (l *Login) Login() error {
 					}
 					_id := mongodb.Save("user", data)
 					if _id != "" {
+						func(phone, userid string) {
+							//用户中台存储  开始
+							formdata := map[string]interface{}{
+								"appid": "10000",
+								"phone": phone,
+							}
+							if s_company != "" {
+								formdata["company"] = s_company
+							}
+							ck, _ := l.GetCookie("SESSIONID")
+							usercenter.AddBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, formdata, ck)
+							//用户中台存储  结束
+						}(phone, _id)
 						jy.ClearPhoneIdentSession(l.Session())
 						ok, _, userInfo := afterLogin(phone, l.Session())
 						nsqPath, _ := config.Sysconfig["nsq"].(string)
@@ -249,6 +262,12 @@ func (l *Login) ForgetPwd() error {
 				"$unset": map[string]interface{}{
 					"s_m_phone": "",
 				}}, false, false) {
+				userid := BsonIdToSId(user["_id"])
+				//用户中台存储  开始
+				ck, _ := l.GetCookie("SESSIONID")
+				usercenter.UpdateBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, ck)
+
+				//用户中台存储  结束
 				l.DelSession("forgetPwdStep")
 				jy.ClearPhoneIdentSession(l.Session())
 				return "y"

+ 11 - 1
src/jfw/front/org_structure.go

@@ -17,6 +17,7 @@ import (
 	"time"
 
 	"qfw/util"
+	"qfw/util/usercenter"
 
 	"github.com/SKatiyar/qr"
 	"github.com/go-xweb/xweb"
@@ -180,7 +181,16 @@ func (this *OrgStructure) AutoLogon() error {
 			if source != "" {
 				data["s_tracksource"] = source
 			}
-			if mongodb.Save("user", data) != "" {
+			if id := mongodb.Save("user", data); id != "" {
+				ck, _ := this.GetCookie("SESSIONID")
+				usercenter.AddBaseUser(mongodb, util.ObjToString(config.Sysconfig["userCenterApi"]), id, map[string]interface{}{
+					"phone":    phone,
+					"appid":    "10000",
+					"nickname": name,
+					"openid":   openId,
+					"unionid":  unionId,
+				}, ck)
+
 				rb = true
 			}
 		}

+ 2 - 2
src/jfw/front/pcIndex.go

@@ -151,7 +151,7 @@ func GetNewArticle(typ int) (list []map[string]interface{}) {
 	if l, ok := redis.Get("other", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
 		list = util.ObjArrToMapArr(l)
 	} else {
-		_, _, lists := bidsearch.GetPcBidSearchData("", "", "", subtype, "", "", "", "", "", "", "", 1, bidsearch.SearchPageSize_PC, false, nil, bidSearch_field_1, "", false)
+		_, _, lists := bidsearch.GetPcBidSearchData("", "", "", "", subtype, "", "", "", "", "", "", "", "", 1, bidsearch.SearchPageSize_PC, false, nil, bidSearch_field_1, "", false, false)
 		if lists != nil && len(*lists) > 5 {
 			*lists = (*lists)[0:6]
 			for _, v := range *lists {
@@ -442,7 +442,7 @@ func (f *PcIndex) SearchResult(at, name string) error {
 				// if datas != nil && len(*datas) > limitcount {
 				// 	*datas = (*datas)[0:limitcount]
 				// } else {
-				_, _, datas = bidsearch.GetPcBidSearchData(keywords, "", "", "", key_industry, "", "", "", "", "", "", 0, bidsearch.SearchPageSize_PC, true, nil, bidSearch_field_1, "", false)
+				_, _, datas = bidsearch.GetPcBidSearchData(keywords, "", "", "", "", key_industry, "", "", "", "", "", "", "", 0, bidsearch.SearchPageSize_PC, true, nil, bidSearch_field_1, "", false, false)
 				if datas != nil && len(*datas) > limitcount {
 					*datas = (*datas)[0:limitcount]
 				}

+ 11 - 0
src/jfw/front/pchelper.go

@@ -12,6 +12,7 @@ import (
 	"qfw/util"
 	"qfw/util/jy"
 	"qfw/util/redis"
+	"qfw/util/usercenter"
 	"strings"
 	"time"
 
@@ -133,6 +134,16 @@ func (l *PcHelper) Login() error {
 						}
 						_id := mongodb.Save("user", data)
 						if _id != "" {
+							//用户中台存储  开始
+							func(phone, userId string) {
+								formdata := map[string]interface{}{
+									"appid": "10000",
+									"phone": phone,
+								}
+								ck, _ := l.GetCookie("SESSIONID")
+								usercenter.AddBaseUser(mongodb, util.ObjToString(config.Sysconfig["userCenterApi"]), userId, formdata, ck)
+							}(phone, _id)
+							//用户中台存储  结束
 							jy.ClearPhoneIdentSession(l.Session())
 							reToken = getUToken(mac, phone)
 							reOpenId = phone

+ 25 - 29
src/jfw/front/search.go

@@ -2,19 +2,14 @@ package front
 
 import (
 	"fmt"
+	"github.com/go-xweb/xweb"
 	"jfw/config"
 	"jfw/jyutil"
-	"jfw/public"
 	"jfw/wx"
 	"net/url"
 	"qfw/util"
-	"qfw/util/bidsearch"
-	"qfw/util/jy"
 	"qfw/util/redis"
 	"strings"
-	"time"
-
-	"github.com/go-xweb/xweb"
 )
 
 type Search struct {
@@ -88,29 +83,30 @@ func (s *Search) MainSearch() error {
 	if userid == nil {
 		return s.Redirect("/swordfish/about")
 	}
-	if len(industrylist) > 0 {
-		s.T["industry"] = industrylist
-		s.T["sortArray"] = sortArray
-	} else {
-		industry, sortA := jy.Getindustrys(util.ObjToString(config.Sysconfig["industry"]), public.MQFW)
-		s.T["industry"] = industry
-		s.T["sortArray"] = sortA
-	}
-	s.T["pageSize"] = bidsearch.SearchPageSize_WX
-	//搜索列表增加分享
-	s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
-	myopenid, _ := s.Session().Get("s_m_openid").(string)
-	s.T["openid"] = se.EncodeString(myopenid)
-	mynickname, _ := s.Session().Get("s_nickname").(string)
-	myavatar, _ := s.Session().Get("s_avatar").(string)
-	s.T["nickname"] = mynickname
-	s.T["avatar"] = myavatar
-	s.T["searchWord"] = s.GetString("searchWord")
-	//直播活动和预热活动期间
-	if config.ActiveConfig.Live_Active_End > time.Now().Unix() && time.Now().Unix() > config.ActiveConfig.Live_Preheat_Start {
-		s.T["LiveState"] = true
-	}
-	return s.Render("/weixin/search/mainSearch.html", &s.T)
+	// 	if len(industrylist) > 0 {
+	// 		s.T["industry"] = industrylist
+	// 		s.T["sortArray"] = sortArray
+	// 	} else {
+	// 		industry, sortA := jy.Getindustrys(util.ObjToString(config.Sysconfig["industry"]), public.MQFW)
+	// 		s.T["industry"] = industry
+	// 		s.T["sortArray"] = sortA
+	// 	}
+	// 	s.T["pageSize"] = bidsearch.SearchPageSize_WX
+	// 	//搜索列表增加分享
+	// 	s.T["signature"] = wx.SignJSSDK(s.Site() + s.Url())
+	// 	myopenid, _ := s.Session().Get("s_m_openid").(string)
+	// 	s.T["openid"] = se.EncodeString(myopenid)
+	// 	mynickname, _ := s.Session().Get("s_nickname").(string)
+	// 	myavatar, _ := s.Session().Get("s_avatar").(string)
+	// 	s.T["nickname"] = mynickname
+	// 	s.T["avatar"] = myavatar
+	// 	s.T["searchWord"] = s.GetString("searchWord")
+	// 	//直播活动和预热活动期间
+	// 	if config.ActiveConfig.Live_Active_End > time.Now().Unix() && time.Now().Unix() > config.ActiveConfig.Live_Preheat_Start {
+	// 		s.T["LiveState"] = true
+	// 	}
+	// 	return s.Render("/weixin/search/mainSearch.html", &s.T)
+	return s.Redirect("/jy_mobile/tabbar/home")
 }
 
 func (s *Search) SearchKeyword(searchWord string) error {

+ 92 - 4
src/jfw/front/shorturl.go

@@ -37,6 +37,7 @@ var mobileReg = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
 var DateFullLayout = "2006-01-02 15:04:05"
 var Map_stype = map[string]bool{
 	"content":      true,
+	"entservice":   true,
 	"bdprivate":    true,
 	"mailprivate":  true,
 	"bdcontent":    true,
@@ -126,6 +127,94 @@ func (s *Short) Article(stype, id string) error {
 		if stype == "bdcontent" {
 			stype = "content"
 		}
+	} else if stype == "entservice" { //大客户数据快照展示
+		//SE := util.SimpleEncrypt{"entservice"}
+		sid := util.SE3.DecodeString(id)
+		if len(sid) == 0 || (len(sid) > 0 && sid == "") {
+			s.Redirect("/notin/page", 302)
+			return nil
+		}
+		catchKey := fmt.Sprintf("jypcdetail_%s_%s_%s", userId, stype, sid)
+		if res := redis.Get("newother", catchKey); res == nil || res == "" {
+			industry := s.GetString("industry")
+			var shareid = s.GetString("id")
+			if len(shareid) == 0 {
+				shareid = "10"
+			}
+			s.T["logid"] = config.Seoconfig["jysskzy"].(string)
+			s.T["shareid"] = se.EncodeString(shareid)
+			s.T["keywords"] = s.GetString("kds")
+			ssOpenid := s.Session().Get("s_m_openid")
+
+			po, bo, wo, obj := pcVRT(sid, industry, true)
+			if obj != nil && len(obj) > 0 {
+
+				if len(po) > 0 {
+					s.T["projectOther"] = po
+				}
+				if len(bo) > 0 {
+					s.T["buyerOther"] = bo
+				}
+				if len(wo) > 0 {
+					s.T["winnerOther"] = wo
+				}
+				obj["urlpath"] = s.Uri()
+				obj["industry"] = industry
+				if ssOpenid != nil {
+					obj["ucbsId"] = util.EncodeArticleId2ByCheck("ucbs#" + ssOpenid.(string) + "#" + id)
+				}
+				if isbid(obj["subtype"]) {
+					obj["winner_enttel"] = getwinnertel(obj["winner"])
+				}
+				//判断时间 //如果是seo页面超过时间访问的进入首页
+				comeinTime := time.Unix(util.Int64All(obj["comeintime"]), 0)
+				if stype == "indexcontent" {
+					if count := public.MQFW.Count("seobidding", map[string]interface{}{"bid": sid}); count <= 0 && comeinTime.Before(time.Now().Add(time.Duration(-util.IntAll(config.Sysconfig["seoBeforeTimeHour"]))*time.Hour)) {
+						return s.Redirect("/")
+					}
+				}
+				FieldProcessing(obj, ssOpenid, industry, id, from_userid, userId, stype, true, false)
+
+				if obj["projectname"] != nil {
+					s.SetSession("projectname", obj["projectname"])
+				}
+				if obj["entidlist"] != nil { //大会员中标企业跳转至画像
+					if winner := util.ObjToString(obj["winner"]); winner != "" {
+						s_winner := util.ObjToString(obj["s_winner"])
+						idObjs, _ := obj["entidlist"].([]interface{})
+						winnerId := ""
+						if names := strings.Split(s_winner, ","); len(names) > 1 {
+							index := 0
+							for i := 0; i < len(names); i++ {
+								if names[i] == winner {
+									index = i
+									break
+								}
+							}
+							if len(idObjs) > index {
+								winnerId = util.ObjToString(idObjs[index])
+							}
+						} else { //中标企业仅一个
+							if len(idObjs) > 0 {
+								winnerId = util.ObjToString(idObjs[0])
+							}
+						}
+						if winnerId != "" && winnerId != "-" {
+							obj["entId"] = util.EncodeArticleId2ByCheck(winnerId)
+						}
+					}
+				}
+				s.T["url"] = s.Uri()
+				s.T["obj"] = obj
+
+				content, _ := s.Render4Cache("/pc/biddetail_rec.html", &s.T)
+				timeout := 60 * 20
+				redis.Put("newother", catchKey, string(content), timeout)
+				return s.SetBody(content)
+			}
+		} else {
+			return s.SetBody([]byte(res.(string)))
+		}
 	}
 	ssOpenid := s.Session().Get("s_m_openid")
 	var res *map[string]interface{}
@@ -276,14 +365,13 @@ func (s *Short) Article(stype, id string) error {
 		} else {
 			nodeStr = "false"
 		}
-		fmt.Println(s.T["canRead"])
 		if userId != "" && stype == "indexcontent" { //已登录用户直接跳转至正常三级页
 			return s.Redirect(fmt.Sprintf("/article/content/%s.html", util.CommonEncodeArticle("content", sid)))
 		}
 
 		catchKey := fmt.Sprintf("jypcdetail_%s_%s_%s_%v_%v_%v_%s", userId, stype, sid, isVip, isEntniche, isMember, nodeStr)
 		//缓存读取
-		if res := redis.Get("other", catchKey); res == nil || res == "" {
+		if res := redis.Get("newother", catchKey); res == nil || res == "" {
 			industry := s.GetString("industry")
 			var shareid = s.GetString("id")
 			if len(shareid) == 0 {
@@ -369,7 +457,7 @@ func (s *Short) Article(stype, id string) error {
 				if stype == "indexcontent" {
 					timeout = util.IntAllDef(config.Sysconfig["indexcontentTimeOut"], 86400)
 				}
-				redis.Put("other", catchKey, string(content), timeout)
+				redis.Put("newother", catchKey, string(content), timeout)
 				return s.SetBody(content)
 			}
 		} else {
@@ -414,7 +502,7 @@ func CNode(userId string) bool {
 			rM["company"] = util.ObjToString((*userinfo)["s_company"])
 		}
 	}
-	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
+	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" && rM["companyType"] != "" {
 
 		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
 			return false

+ 23 - 4
src/jfw/front/supsearch.go

@@ -37,6 +37,7 @@ var sortArray []string
 var PCS_index map[string]interface{}
 var PCS_time int
 var PCSLock = &sync.Mutex{}
+var FileSignBool = false
 
 //
 func init() {
@@ -51,6 +52,11 @@ func init() {
 	PCSLock.Lock()
 	PCS_index = map[string]interface{}{}
 	PCSLock.Unlock()
+	//搜索字段添加 附件标识
+	if FileSignBool, _ = config.Sysconfig["fileSignBool"].(bool); FileSignBool {
+		bidSearch_field_1 = bidSearch_field_1 + bidSearch_field_file
+		bidSearch_field = bidSearch_field + bidSearch_field_file
+	}
 }
 
 //定时清理搜索列表页 从redis获取存入内存中的数据
@@ -119,7 +125,7 @@ func (p *Pcsearch) ProposedProject() error {
 	var count int64
 	if len(s_word) > 0 {
 		status = 2
-		count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, "", "", "", "", "", "", "", 0, bidsearch.SearchPageSize_PC, true, nil, bidSearch_field_1, "", false)
+		count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, "", publishtime, subtype, "", "", "", "", "", "", "", "", 0, bidsearch.SearchPageSize_PC, true, nil, bidSearch_field_1, "", false, false)
 		listSize := 0
 		if list != nil {
 			listSize = len(*list)
@@ -253,6 +259,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 	subtype := p.GetString("subtype")                      //信息类型
 	minprice := p.GetString("minprice")                    //最低价格
 	maxprice := p.GetString("maxprice")                    //最高价格
+	fileExists := p.GetString("fileExists")                //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
 
 	userId, _ := p.GetSession("userId").(string)
 
@@ -260,6 +267,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 	var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
 	var buyerclass string = ""                    //采购单位类别
 	var notkey string = ""                        //排除词
+	var city string = ""                          //城市 付费用户可用
 
 	selectType := p.GetString("selectType")
 	if selectType == "" {
@@ -269,7 +277,8 @@ func (p *Pcsearch) PcSearchIndex() error {
 	if isPayedUser {
 		buyerclass = p.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = p.GetString("buyertel"), p.GetString("winnertel")
-		notkey = p.GetString("notkey")
+		notkey = util.If(strings.Contains(p.GetString("notkey"), ","), strings.ReplaceAll(p.GetString("notkey"), ",", " "), p.GetString("notkey")).(string)
+		city = p.GetString("city") //城市 付费用户可用
 	}
 	//历史导出数据回显
 	if strings.Contains(p.Url(), "?goback") {
@@ -286,6 +295,9 @@ func (p *Pcsearch) PcSearchIndex() error {
 		hasWinnerTel = util.ObjToString(p.GetSession("Echo_hasWinnertel"))
 		industry = util.ObjToString(p.GetSession("Echo_industry"))
 		notkey = util.ObjToString(p.GetSession("Echo_notkey"))
+		fileExists = util.ObjToString(p.GetSession("Echo_fileExists"))
+		city = util.ObjToString(p.GetSession("Echo_city"))
+		_, _, queryItems, _, _ = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), 0)
 	}
 
 	b_word, s_word := "", ""
@@ -298,8 +310,9 @@ func (p *Pcsearch) PcSearchIndex() error {
 	secondFlag := ""
 	secondKWS := ""
 	if len(s_word) > 0 || len(industry) > 0 {
+		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 		status = 2
-		secondKWS, _, _, _, secondFlag, count, totalPage, list = bidsearch.SearchData("pc", p.Request, 1, util.ObjToString(p.GetSession("userId")), secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, queryItems, bidSearch_field_1, notkey, isPayedUser)
+		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, bidsearch.SearchPageSize_PC, true, queryItems, bidSearch_field_1, notkey, isPayedUser, searchTypeSwitch)
 	} else {
 		p.DisableHttpCache()
 		p.T["list"] = PCS_list("") //Newbids("")[0]
@@ -331,6 +344,8 @@ func (p *Pcsearch) PcSearchIndex() error {
 		p.T["buyertel"] = hasBuyerTel
 		p.T["winnertel"] = hasWinnerTel
 		p.T["notkey"] = notkey
+		p.T["fileExists"] = fileExists
+		p.T["city"] = city
 		p.SetSession("paramkey", b_word)
 		switch publishtime {
 		case "lately-7":
@@ -394,7 +409,7 @@ func Newbids(p string) []interface{} {
 		}
 
 		for i := 0; i < 10; i++ {
-			_, list = getLastNewsData("", "", "", subtype, "", "", "", "", "", "", "Y", intns[i], true, false, "")
+			_, list = getLastNewsData("", "", "", "", subtype, "", "", "", "", "", "", "", "Y", intns[i], true, false, "")
 			for k, v := range *list {
 				v["k"] = (k + 1) + i*50
 				t := time.Unix(util.Int64All(v["publishtime"]), 0)
@@ -413,6 +428,10 @@ func Newbids(p string) []interface{} {
 				area, _ := v["area"].(string)
 				indtry := util.ObjToString(v["industry"])
 				v["stypeadd"], v["areaadd"], v["indadd"] = classify(stp, area, indtry)
+				if v["filetext"] != nil {
+					delete(v, "filetext")
+					v["fileExists"] = true
+				}
 			}
 			pages = append(pages, list)
 		}

+ 33 - 18
src/jfw/front/swordfish.go

@@ -32,10 +32,11 @@ import (
 	"go.mongodb.org/mongo-driver/bson/primitive"
 )
 
-const (
-	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass"`
-	bidSearch_field   = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
-	bidSearch_sort    = `{"publishtime":-1}`
+var (
+	bidSearch_field_1    = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","spidercode","site"`
+	bidSearch_field      = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
+	bidSearch_sort       = `{"publishtime":-1}`
+	bidSearch_field_file = `,"filetext","isValidFile"`
 )
 
 //剑鱼标讯推送三级页点赞暂弃 改成剑鱼标讯实验室点赞功能
@@ -100,8 +101,9 @@ func (m *Front) PcAjaxReq() {
 	publishtime := m.GetString("publishtime")
 	selectType := m.GetString("selectType")
 	industry := strings.TrimSpace(m.GetString("industry"))
-	minprice := m.GetString("minprice") //最低价格
-	maxprice := m.GetString("maxprice") //最高价格
+	minprice := m.GetString("minprice")     //最低价格
+	maxprice := m.GetString("maxprice")     //最高价格
+	fileExists := m.GetString("fileExists") //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
 	var (
 		//高级筛选 仅vip用户可查询
 		hasBuyerTel, hasWinnerTel string //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
@@ -110,12 +112,15 @@ func (m *Front) PcAjaxReq() {
 		isPayedUser               bool
 		queryItems                []string
 		start                     int
+		city                      string //城市
 	)
 	isPayedUser, publishtime, queryItems, currentPage, start = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), currentPage)
 	if isPayedUser {
 		buyerclass = m.GetString("buyerclass")
 		hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
-		notkey = m.GetString("notkey")
+		//notkey = m.GetString("notkey")
+		notkey = util.If(strings.Contains(m.GetString("notkey"), ","), strings.ReplaceAll(m.GetString("notkey"), ",", " "), m.GetString("notkey")).(string)
+		city = m.GetString("city")
 	}
 	m.SetSession("selectType", selectType)
 	//只有前20条 有全字段,
@@ -137,7 +142,9 @@ func (m *Front) PcAjaxReq() {
 	secondFlag := ""
 	secondKWS := ""
 	pcAjaxFlag := ""
+	second := ""
 	if len(s_word) > 0 || len(industry) > 0 {
+		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 		//全文检索限制
 		if searchLimit {
 			//limitFlag = public.Lst.Flag
@@ -147,14 +154,13 @@ func (m *Front) PcAjaxReq() {
 			}
 		}
 		if isLimit == 1 {
-			_, _, _, pcAjaxFlag, secondFlag, count, totalPage, list = bidsearch.SearchData("pc", m.Request, currentPage, util.ObjToString(m.GetSession("userId")), secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, queryItems, field, notkey, isPayedUser)
+			second, _, _, pcAjaxFlag, secondFlag, count, totalPage, list = bidsearch.SearchData("pc", m.Request, currentPage, util.ObjToString(m.GetSession("userId")), secondKWS, s_word, area, city, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, fileExists, start, bidsearch.SearchPageSize_PC, true, queryItems, field, notkey, isPayedUser, searchTypeSwitch)
 		}
 	}
 	_secondList, _totalPage, _ := bidsearch.LisetData(1, currentPage, list, secondFlag, config.Seoconfig, isPayedUser) //只有前20条
 	if secondFlag == "T" {
 		secondList, totalPage = _secondList, _totalPage
 	}
-	// TODO
 	m.ServeJson(map[string]interface{}{
 		"limitFlag":     false,
 		"status":        isLimit,
@@ -163,17 +169,17 @@ func (m *Front) PcAjaxReq() {
 		"totalPage":     totalPage,
 		"interceptWord": a_word,
 		"keywords":      b_word,
-		"searchvalue":   s_word,
+		"searchvalue":   util.If(second != "", fmt.Sprintf("%s+%s", s_word, second), s_word).(string),
 		"secondFlag":    secondFlag,
 		"secondList":    secondList,
 		"pcAjaxFlag":    pcAjaxFlag,
 	})
 }
 
-func getLastNewsData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, buyerclass, hasBuyerTel, hasWinnerTel, tabularflag string, start int, isGetCount bool, highlight bool, notkey string) (count int64, list *[]map[string]interface{}) {
+func getLastNewsData(searchvalue, area, city, publishtime, subtype, industry, minprice, maxprice, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, tabularflag string, start int, isGetCount bool, highlight bool, notkey string) (count int64, list *[]map[string]interface{}) {
 	//最新招标信息
 	findfields := `"title"`
-	qstr := bidsearch.GetSearchQuery(searchvalue, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, findfields, bidsearch.GetBidSearchQuery(area, publishtime, subtype, "", buyerclass), notkey)
+	qstr := bidsearch.GetSearchQuery(searchvalue, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, findfields, bidsearch.GetBidSearchQuery(area, city, publishtime, subtype, "", buyerclass), notkey, false)
 	if isGetCount && start == 0 {
 		count = elastic.Count(INDEX, TYPE, qstr)
 	}
@@ -343,6 +349,8 @@ func (m *Front) WxsearchlistPaging() {
 			var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
 			var buyerclass string = ""                    //采购单位类别
 			var notkey string = ""                        //排除词
+			var fileExists = m.GetString("fileExists")    //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
+			var city string = ""                          //城市
 
 			vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
 			isPayedUser = vipStatus.IsPayedUser()
@@ -357,6 +365,7 @@ func (m *Front) WxsearchlistPaging() {
 				buyerclass = m.GetString("buyerclass")
 				hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
 				notkey = m.GetString("notkey")
+				city = m.GetString("city")
 			} else {
 				//免费用户最多500条数据
 				if pageNum > bidsearch.SearchMaxPageNum_WX {
@@ -379,7 +388,8 @@ func (m *Front) WxsearchlistPaging() {
 				}
 			}
 			if isLimit == 1 {
-				secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData("wx", m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser)
+				searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
+				secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData("wx", m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, city, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, fileExists, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser, searchTypeSwitch)
 			}
 			//新增历史记录
 			arrs = bidsearch.AddHistory(history, searchvalue)
@@ -525,7 +535,7 @@ func ObjData(isPayUser bool, sid string, lent int) (t bool, obj map[string]inter
 				goto env
 			}
 			for k, _ := range obj {
-				if k != "title" && k != "area" && k != "subtype" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" {
+				if k != "title" && k != "area" && k != "subtype" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" && k != "site" && k != "spidercode" && k != "recommended_service" {
 					delete(obj, k)
 				}
 			}
@@ -609,7 +619,7 @@ func pcVRT(sid, industry string, isPayUser bool) (po, bo, wo []map[string]interf
 			objdata = obj
 			queryStr := ""
 			commonQuery := func(mustquery string) *[]map[string]interface{} {
-				return elastic.GetPage("bidding", "bidding", queryStr, bidSearch_sort, `"_id","title","publishtime","toptype","subtype","type","area","href","s_subscopeclass"`, 0, 11)
+				return elastic.GetPage("bidding", "bidding", queryStr, bidSearch_sort, `"_id","title","publishtime","toptype","subtype","type","area","href","s_subscopeclass","spidercode","site"`, 0, 11)
 			}
 			//同一个项目的其他招标信息
 			projectName, _ := obj["projectname"].(string)
@@ -1755,7 +1765,8 @@ func (f *Front) HasPushHistory() {
 				isread = (*user)["isread"].(bool)
 			}
 			o_vipjy, _ = (*user)["o_vipjy"].(map[string]interface{})
-			industry_ = util.ObjArrToStringArr(o_vipjy["a_buyerclass"].([]interface{}))
+			a_buyerclass, _ := o_vipjy["a_buyerclass"].([]interface{})
+			industry_ = util.ObjArrToStringArr(a_buyerclass)
 			if o_vipjy["a_items"] != nil {
 				a_itmes := util.ObjArrToMapArr(o_vipjy["a_items"].([]interface{}))
 				hasKeyFlag = len(a_itmes) > 0
@@ -1807,6 +1818,8 @@ func (f *Front) HasPushHistory() {
 		Subscopeclass: f.GetString("subscopeclass"),
 		Key:           f.GetString("key"),
 		City:          f.GetString("city"),
+		Price:         f.GetString("price"),      //价格
+		FileExists:    f.GetString("fileExists"), //附件
 	}
 	hasNextPage, _, list := jy.NewSubscribePush().Datas(spqp)
 	if hasKeyFlag && len(list) == 0 && spqp.IsEmpty() && !isVipFlag {
@@ -1819,7 +1832,7 @@ func (f *Front) HasPushHistory() {
 			}
 		}
 	}
-	jy.NewSubscribePush().MakeCollection(userId, public.Mysql, list)
+	jy.NewSubscribePush().MakeCollection(userId, public.Mysql, list, FileSignBool)
 	//
 	f.ServeJson(map[string]interface{}{
 		"haskey":      hasKeyFlag,
@@ -1901,8 +1914,10 @@ func (f *Front) HistorypushPaging() error {
 			Subscopeclass: f.GetString("subscopeclass"),
 			Key:           f.GetString("key"),
 			City:          f.GetString("city"),
+			Price:         f.GetString("price"),      //价格
+			FileExists:    f.GetString("fileExists"), //附件
 		})
-		jy.NewSubscribePush().MakeCollection(userId, public.Mysql, list)
+		jy.NewSubscribePush().MakeCollection(userId, public.Mysql, list, FileSignBool)
 		//		hasNextPage, list, _ := public.HistoryPush.Datas(userId, pageNum, firstPushTime, formatTime)
 		f.ServeJson(map[string]interface{}{
 			"hasNextPage": hasNextPage,

+ 11 - 1
src/jfw/front/ws_dataExport.go

@@ -366,6 +366,8 @@ func (wd *WsDataExport) SearchExport() error {
 		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
 		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
 		Notkey:       wd.GetString("notkey"),                       //排除词
+		City:         wd.GetString("city"),                         //城市
+		FileExists:   wd.GetString("fileExists"),                   //有无附件
 	}
 	saveData := reqData.PassBidSearchExport()
 	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).
@@ -373,7 +375,15 @@ func (wd *WsDataExport) SearchExport() error {
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId
 	saveData["comeinfrom"] = "supersearchPage"
-
+	region := util.If(reqData.Area == "全国", "", reqData.Area).(string)
+	if region != "" && reqData.City != "" {
+		region += "," + reqData.City
+	} else {
+		region = reqData.City
+	}
+	saveData["region"] = strings.Split(region, ",")
+	//是否开启 正文 标题同时搜索只搜正文的开关
+	saveData["searchTypeSwitch"], _ = config.Sysconfig["searchTypeSwitch"].(bool)
 	//存入数据库
 	_id := mongodb.Save(dataexport.ExportTable, saveData)
 

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

@@ -77,7 +77,7 @@ func Getopenid(code string) (openid string) {
 
 //
 func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[string]interface{}) {
-	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1,"i_ispush":1,"i_unlimited":1,"s_jyname":1}`)
+	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1,"i_ispush":1,"i_unlimited":1,"s_jyname":1,"base_user_id":1}`)
 	sessionVal := make(map[string]interface{})
 	if !ok || person == nil || len(*person) == 0 {
 		return nil, sessionVal
@@ -111,6 +111,10 @@ func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[strin
 	}
 	sessionVal["phone"] = phone
 	sessionVal["i_unlimited"] = util.IntAll((*person)["i_unlimited"])
+	base_uid := util.IntAllDef((*person)["base_user_id"], 0)
+	if base_uid != 0 {
+		sessionVal["base_user_id"] = base_uid //用户中台的uid
+	}
 	return person, sessionVal
 }
 

+ 43 - 0
src/jfw/modules/app/src/app/filter/baseuserfilter.go

@@ -0,0 +1,43 @@
+package filter
+
+import (
+	"jfw/config"
+	"jfw/public"
+	"log"
+	"net/http"
+	"qfw/util"
+
+	"github.com/go-xweb/httpsession"
+)
+
+type baseUserFilter struct {
+	W          http.ResponseWriter
+	R          *http.Request
+	Session    *httpsession.Session
+	GetSession map[string]interface{}
+}
+
+//判断session中是否存在base_user_id 不存在则更新
+
+func (this *baseUserFilter) Do() bool {
+	if flag, _ := config.Sysconfig["baseUserFilterFlag"].(bool); !flag {
+		return true
+	}
+	if this.R.Method == "POST" {
+		return true
+	}
+	if uid := this.GetSession["userId"]; uid != nil && uid != "" {
+		base_user_id := this.GetSession["base_user_id"]
+		if base_user_id == nil || base_user_id == 0 {
+			data, ok := public.MQFW.FindById("user", util.ObjToString(uid), `{"base_user_id":1}`)
+			if data != nil && ok && len(*data) > 0 {
+				if base_user_id := util.Int64All((*data)["base_user_id"]); base_user_id > 0 {
+					this.Session.Set("base_user_id", (*data)["base_user_id"])
+				} else {
+					log.Printf("%s用户暂无base_user_id", uid)
+				}
+			}
+		}
+	}
+	return true
+}

+ 3 - 0
src/jfw/modules/app/src/app/filter/filter.go

@@ -48,5 +48,8 @@ func (f *Filter) Do(w http.ResponseWriter, r *http.Request) bool {
 	if !(&phoneFilter{w, r, session, getSession}).Do() {
 		return false
 	}
+	if !(&baseUserFilter{w, r, session, getSession}).Do() {
+		return false
+	}
 	return true
 }

+ 3 - 0
src/jfw/modules/app/src/app/filter/loginfilter.go

@@ -19,6 +19,9 @@ var urls = []*regexp.Regexp{
 	regexp.MustCompile("^/jyapp/tencentcloud/.*"),
 	regexp.MustCompile("/jyapp/filemanage/upload"),
 	regexp.MustCompile("^/jyapp/account/.*"),
+	regexp.MustCompile("^/jyapp/frontPage/.*/free/.*"),
+	regexp.MustCompile("^/jyapp/vipsubscribe/introducePage"),
+	regexp.MustCompile("^/jyapp/structed/index"),
 }
 
 type loginFilter struct {

+ 7 - 4
src/jfw/modules/app/src/app/front/frontRouter.go

@@ -2,6 +2,8 @@ package front
 
 import (
 	"fmt"
+	"log"
+
 	"github.com/go-xweb/xweb"
 )
 
@@ -17,10 +19,11 @@ func init() {
 }
 
 func (this *CommonRouter) AppCommonPage(folder, loginSign, htmlPage string) error {
-	if loginSign != "free" {
-		if userid, _ := this.GetSession("userId").(string); userid == "" {
-			return this.Redirect("/jyapp/swordfish/about")
-		}
+	userid, _ := this.GetSession("userId").(string)
+	if loginSign != "free" && userid == "" {
+		return this.Redirect("/jyapp/swordfish/about")
 	}
+	log.Println(userid != "", "---------------", userid)
+	this.T["loginFlag"] = userid != ""
 	return this.Render(fmt.Sprintf("/frontRouter/%s/%s/%s.html", folder, loginSign, htmlPage))
 }

+ 59 - 5
src/jfw/modules/app/src/app/front/login.go

@@ -13,6 +13,7 @@ import (
 	"qfw/util/jy"
 	"qfw/util/redis"
 	qrpc "qfw/util/rpc"
+	"qfw/util/usercenter"
 	"regexp"
 	"strings"
 	"sync"
@@ -180,7 +181,7 @@ func (l *Login) Login() error {
 				deviceId := l.GetString("deviceId")
 				if user == nil || len(user) == 0 {
 					client := l.Header("User-Agent")
-					log.Println("client:", client)
+					log.Println(client)
 					//clearRidByRid(rid)
 					data := map[string]interface{}{
 						"i_appid":       2,
@@ -202,6 +203,15 @@ func (l *Login) Login() error {
 					data["s_regsource"] = isAndroidOrIOS(l.Header("User-Agent"))
 					_id := mongodb.Save("user", data)
 					if _id != "" {
+						//用户中台同步
+						func(userid string) {
+							formdata := map[string]interface{}{
+								"appid": "10000",
+								"phone": phone,
+							}
+							ck, _ := l.GetCookie("SESSIONID")
+							usercenter.AddBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, formdata, ck)
+						}(_id)
 						jy.ClearPhoneIdentSession(l.Session())
 						returnSign = afterLogin(data, l.Session(), rid, oid, phoneType, channel, deviceId, true, l.ResponseWriter)
 						addr, _ := config.Sysconfig["nsq"].(string)
@@ -442,6 +452,11 @@ func (l *Login) Register() error {
 						"$unset": map[string]interface{}{"s_m_phone": ""},
 					}, false, false)
 					data["_id"] = wxuid
+					//用户中台同步
+					func(userid string) {
+						ck, _ := l.GetCookie("SESSIONID")
+						usercenter.UpdateBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, ck)
+					}(qutil.ObjToString(wxuid))
 				} else {
 					data["i_appid"] = 2
 					data["l_registedate"] = time.Now().Unix()
@@ -457,6 +472,17 @@ func (l *Login) Register() error {
 					saveSuccess = saveid != ""
 				}
 				if saveSuccess && saveid != "" {
+					//用户中台同步
+					func(userid string) {
+						formdata := map[string]interface{}{
+							"appid":    "10000",
+							"phone":    phone,
+							"password": qutil.GetMd5String(password),
+							"company":  s_entname,
+						}
+						ck, _ := l.GetCookie("SESSIONID")
+						usercenter.AddBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, formdata, ck)
+					}(saveid)
 					addr := config.Sysconfig["nsq"].(string)
 					topic := config.Sysconfig["nsq_topic"].(string)
 					go func() {
@@ -570,9 +596,14 @@ func (l *Login) WxLogin() {
 			if qutil.ObjToString((*user)["s_nickname"]) == "" && qutil.ObjToString((*user)["s_jyname"]) == "" {
 				upSet["s_jyname"] = jy.GetUserName("newother", config.Sysconfig["namePrefix"].(string))
 			}
-			go mongodb.UpdateById("user", BsonIdToSId((*user)["_id"]), map[string]interface{}{
-				"$set": upSet,
-			})
+			go func(userid string) {
+				mongodb.UpdateById("user", BsonIdToSId((*user)["_id"]), map[string]interface{}{
+					"$set": upSet,
+				})
+				ck, _ := l.GetCookie("SESSIONID")
+				usercenter.UpdateBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, ck)
+			}(BsonIdToSId((*user)["_id"]))
+
 			returnSign = afterLogin(*user, l.Session(), rid, oid, phoneType, channel, deviceId, false, l.ResponseWriter)
 			return 1
 		} else {
@@ -604,6 +635,18 @@ func (l *Login) WxLogin() {
 			}
 			newUser["s_regsource"] = isAndroidOrIOS(l.Header("User-Agent")) //用户注册终端 ios 安卓 pc
 			if _id := mongodb.Save("user", newUser); _id != "" {
+				//用户中台同步
+				func(userid string) {
+					formdata := map[string]interface{}{
+						"appid":    "10000",
+						"nickname": qutil.If(u.Nickname == "", newUser["s_jyname"], u.Nickname),
+						"headimg":  u.HeadImageUrl,
+						"a_openid": u.OpenId,
+						"unionid":  u.UnionId,
+					}
+					ck, _ := l.GetCookie("SESSIONID")
+					usercenter.AddBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, formdata, ck)
+				}(_id)
 				returnSign = afterLogin(newUser, l.Session(), rid, oid, phoneType, channel, deviceId, true, l.ResponseWriter)
 				if disWord != "" {
 					redisDis := redis.GetStr("other", "DIS_"+disWord[1:])
@@ -705,6 +748,10 @@ func (l *Login) ForgetPwd() error {
 				}}, false, false) {
 				l.DelSession("forgetPwdStep")
 				jy.ClearPhoneIdentSession(l.Session())
+				func(userid string) {
+					ck, _ := l.GetCookie("SESSIONID")
+					usercenter.UpdateBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, ck)
+				}(BsonIdToSId(user["_id"]))
 				return "y"
 			}
 			return "saveError"
@@ -747,6 +794,7 @@ func (l *Login) SignOut() {
 		}()
 	}
 	jy.DelUnlimitSessionId(fmt.Sprint(l.Session().Id()), userid) //多账号
+	go jy.ClearBigVipUserPower(userid)
 	ClearSession(l.Session())
 	l.ServeJson(map[string]interface{}{
 		"status": status,
@@ -911,7 +959,7 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 		default:
 			return false
 		}
-		field := `{"s_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_headimageurl":1,"s_phone":1,"s_nickname":1,"s_appversion":1,"i_unlimited":1,"s_jyname":1}`
+		field := `{"s_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_headimageurl":1,"s_phone":1,"s_nickname":1,"s_appversion":1,"i_unlimited":1,"s_jyname":1,"base_user_id":1}`
 		data, ok := mongodb.FindOneByField("user", query, field)
 		if !ok {
 			return false
@@ -939,6 +987,9 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 	s.Set("s_appversion", person["s_appversion"])
 	s.Set("s_headimageurl", strings.Replace(qutil.ObjToString(person["s_headimageurl"]), "http://", "https://", 1))
 	s.Set("i_unlimited", qutil.IntAll(person["i_unlimited"]))
+	if base_userid := qutil.IntAllDef(person["base_user_id"], 0); base_userid != 0 {
+		s.Set("base_user_id", base_userid)
+	}
 	if qutil.ObjToString(person["s_phone"]) != "" {
 		phone := person["s_phone"].(string)
 		s.Set("s_phone", phone)
@@ -1011,6 +1062,9 @@ func ClearSession(s *httpsession.Session) {
 	s.Del("phone")
 	s.Del("i_unlimited")
 	s.Del("s_jyname")
+	s.Del("base_user_id")
+	s.Del("user")
+	s.Del("nickname")
 }
 
 //生成签名,返回手机端

+ 10 - 2
src/jfw/modules/app/src/app/front/logoffuser.go

@@ -2,9 +2,12 @@ package front
 
 import (
 	. "api"
+	"jfw/config"
 	"jfw/public"
 	"log"
+	"net/http"
 	qutil "qfw/util"
+	"qfw/util/usercenter"
 	"time"
 
 	"github.com/go-xweb/xweb"
@@ -114,15 +117,20 @@ func LogOffAppUser(user_id, cause string) bool {
 	//存库
 	ok := mongodb.Save("delete_user", delete_data)
 	if ok != "" {
+		//删除用户中台
+		ck := &http.Cookie{}
+		base_userid_del := usercenter.GetBaseUserId(mongodb, user_id)
+		usercenter.PostUserCenter(qutil.ObjToString(config.Sysconfig["userCenterApi"])+usercenter.UserCenterDelete, usercenter.ContentType_Json, user_id, map[string]interface{}{
+			"appid": "10000",
+			"id":    base_userid_del,
+		}, ck)
 		//删除以前数据
 		_id, _ := primitive.ObjectIDFromHex(user_id)
 		if mongodb.Del("user", map[string]interface{}{
 			"_id": _id,
-			// "_id": bson.ObjectIdHex(ok),
 		}) {
 			return true
 		}
-		// return true
 	}
 	return false
 }

+ 4 - 0
src/jfw/modules/app/src/app/front/me.go

@@ -9,6 +9,7 @@ import (
 	qutil "qfw/util"
 	"qfw/util/jy"
 	"qfw/util/redis"
+	"qfw/util/usercenter"
 	"strings"
 	"time"
 
@@ -195,6 +196,9 @@ func (l *Me) Updatepwd() error {
 				"l_updatepwdtime": time.Now().Unix(), //增加修改密码时间
 			},
 		}) {
+			//调用用户中台
+			ck, _ := l.GetCookie("SESSIONID")
+			usercenter.UpdateBaseUser(mongodb, qutil.ObjToString(config.Sysconfig["userCenterApi"]), userid, ck)
 			return "y"
 		} else {
 			return "saveError"

+ 41 - 23
src/jfw/modules/app/src/app/front/search.go

@@ -1,18 +1,14 @@
 package front
 
 import (
-	app_config "app/config"
 	"app/jylabutil"
 	. "app/jyutil"
 	"app/tag"
+	"fmt"
 	. "jfw/config"
-	"jfw/public"
 	"qfw/util"
-	"qfw/util/bidsearch"
-	"qfw/util/jy"
 	"qfw/util/redis"
 	"strings"
-	"time"
 
 	"github.com/go-xweb/xweb"
 )
@@ -24,31 +20,53 @@ type Search struct {
 	getstatus           xweb.Mapper `xweb:"/jyapp/jylab/supsearch/getstatus"`
 	getHK               xweb.Mapper `xweb:"/jyapp/jylab/mainSearch/getHK"` //获取历史记录,订阅关键词
 	updateSearchHistory xweb.Mapper `xweb:"/jyapp/jylab/updateSearchHistory"`
+	site                xweb.Mapper `xweb:"/jyapp/free/site"`
 }
 
 func init() {
 	xweb.AddAction(&Search{})
 }
 
-func (s *Search) MainSearch() error {
-	if len(industrylist) > 0 {
-		s.T["industry"] = industrylist
-		s.T["sortArray"] = sortArray
-	} else {
-		industry, sortA := jy.Getindustrys(util.ObjToString(Sysconfig["industry"]), public.MQFW)
-		s.T["industry"] = industry
-		s.T["sortArray"] = sortA
-	}
-	s.T["pageSize"] = bidsearch.SearchPageSize_APP
-	//搜索列表增加分享
-	s.T["searchWord"] = s.GetString("searchWord")
-	if now_unix := time.Now().Unix(); now_unix >= app_config.Active.Pullnew.StartTime && now_unix <= app_config.Active.Pullnew.EndTime {
-		s.T["pullnew"] = true
-	} else {
-		s.T["pullnew"] = false
+//
+func (s *Search) Site() error {
+	//l:是否需要登录访问 0:不需要登录;1:需要登录
+	l := s.GetString("l")
+	//u:访问地址
+	userid := util.ObjToString(s.GetSession("userId"))
+	u := s.GetString("u")
+	if l != "" && u != "" {
+		//需要登录 且 未登录状态
+		if l == "1" && userid == "" {
+			u = fmt.Sprintf("/jyapp/free/login?url=%s", u)
+		}
+		return s.Redirect(u)
+	} else if userid == "" {
+		s.Redirect("/jyapp/free/login?back=index")
 	}
-	s.T["isIosExam"], s.T["isIosExamPhone"], _, _ = IosExamInfo(s.Action, false, false)
-	return s.Render("/weixin/search/mainSearch.html", &s.T)
+	return s.Redirect("/jyapp/jylab/mainSearch")
+}
+
+//
+func (s *Search) MainSearch() error {
+	return s.Redirect("/jy_mobile/tabbar/home")
+	// 	if len(industrylist) > 0 {
+	// 		s.T["industry"] = industrylist
+	// 		s.T["sortArray"] = sortArray
+	// 	} else {
+	// 		industry, sortA := jy.Getindustrys(util.ObjToString(Sysconfig["industry"]), public.MQFW)
+	// 		s.T["industry"] = industry
+	// 		s.T["sortArray"] = sortA
+	// 	}
+	// 	s.T["pageSize"] = bidsearch.SearchPageSize_APP
+	// 	//搜索列表增加分享
+	// 	s.T["searchWord"] = s.GetString("searchWord")
+	// 	if now_unix := time.Now().Unix(); now_unix >= app_config.Active.Pullnew.StartTime && now_unix <= app_config.Active.Pullnew.EndTime {
+	// 		s.T["pullnew"] = true
+	// 	} else {
+	// 		s.T["pullnew"] = false
+	// 	}
+	// 	s.T["isIosExam"], s.T["isIosExamPhone"], _, _ = IosExamInfo(s.Action, false, false)
+	// 	return s.Render("/weixin/search/mainSearch.html", &s.T)
 }
 func (p *Search) SearchIndex() {
 	isIosExam, isIosExamPhone, _, _ := IosExamInfo(p.Action, false, false)

+ 1 - 1
src/jfw/modules/app/src/app/front/shorturl.go

@@ -220,7 +220,7 @@ func CNode(userId string) bool {
 			rM["company"] = util.ObjToString((*userinfo)["s_company"])
 		}
 	}
-	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
+	if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" && rM["companyType"] != "" {
 
 		if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
 			return false

+ 5 - 0
src/jfw/modules/app/src/app/front/structedData.go

@@ -235,7 +235,12 @@ func (t *StructedData) SendMailVerify() {
 }
 
 func (t *StructedData) Index() error {
+	userId := util.ObjToString(t.GetSession("userId"))
 	t.T["source"] = "app_sy_dh_5"
+	t.T["loginFlag"] = false
+	if userId != "" {
+		t.T["loginFlag"] = true
+	}
 	return t.Render("/structeddata/marketing.html", &t.T)
 }
 

+ 7 - 3
src/jfw/modules/app/src/app/front/swordfish.go

@@ -24,7 +24,7 @@ const (
 	INDEX             = "bidding"
 	TYPE              = "bidding"
 	FINDF             = `"title"`
-	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","s_subscopeclass","buyerclass","bidamount","budget"`
+	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","s_subscopeclass","buyerclass","bidamount","budget","spidercode","site"`
 	bidSearch_field   = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
 )
 
@@ -244,6 +244,8 @@ func (m *Front) WxsearchlistPaging() {
 		isPayedUser    bool
 		hasNextPage    bool
 		secondList     []map[string]interface{}
+		fileExists     = ""
+		city           = ""
 	)
 
 	if searchvalue != "" {
@@ -259,12 +261,14 @@ func (m *Front) WxsearchlistPaging() {
 		var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
 		buyerclass := ""                              //采购单位类别
 		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)
 		if isPayedUser {
 			buyerclass = m.GetString("buyerclass")
 			hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
 			notkey = m.GetString("notkey")
+			city = m.GetString("city")
 		}
 		//校验是否有大会员中标企业查询权限
 		if jy.GetBigVipUserBaseMsg(userid, public.Mysql, public.MQFW).CheckBigVipBackPower("search") {
@@ -285,7 +289,7 @@ func (m *Front) WxsearchlistPaging() {
 			filed = bidSearch_field
 		}
 		if isLimit == 1 {
-			secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData("app", m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser)
+			secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData("app", m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser, false)
 		}
 	}
 
@@ -489,7 +493,7 @@ func wxvisitD(sid, userId string, isPayUser bool) (objdata map[string]interface{
 		if ok && obj != nil && len(obj) >= 3 {
 			if !isPayUser && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
 				for k, _ := range obj {
-					if k != "title" && k != "area" && k != "subtype" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" {
+					if k != "title" && k != "area" && k != "subtype" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" && k != "site" && k != "spidercode" && k != "recommended_service" {
 						delete(obj, k)
 					}
 				}

+ 5 - 4
src/jfw/modules/app/src/app/front/vipsubscribe.go

@@ -144,9 +144,11 @@ func (s *Subscribepay) ToChangeTime() {
 
 //vip订阅介绍页
 func (s *Subscribepay) Introduce() error {
+	s.T["disWord"] = s.GetString("disWord")
+	s.T["isIosExam"], s.T["isIosExamPhone"], _, _ = IosExamInfo(s.Action, false, false)
 	userId := util.ObjToString(s.GetSession("userId"))
 	if userId == "" {
-		return s.Redirect("/jyapp/login")
+		return s.Render("/vipsubscribe/vip_introduce.html")
 	}
 	m, _ := public.MQFW.FindById("user", userId, `{"o_vipjy":1,"i_vip_status":1}`)
 	if len(*m) == 0 {
@@ -162,12 +164,11 @@ func (s *Subscribepay) Introduce() error {
 				return s.Redirect("/jy_mobile/common/order/create/svip?type=renew/jy_mobile/common/order/create/svip?type=renew&disWord=" + s.GetString("disWord"))
 			}
 		}
-		return s.Redirect("/jyapp/vipsubscribe/toSubVipSetPage")
+		return s.Redirect("/jyapp/vipsubscribe/toSubVipSetPage?vSwitch=v")
 	}
 	obj := util.ObjToMap((*m)["o_vipjy"])
 	s.T["notShowTrial"] = util.IntAll((*obj)["i_trial"]) == -1 || (*m)["i_vip_status"] != nil
-	s.T["isIosExam"], s.T["isIosExamPhone"], _, _ = IosExamInfo(s.Action, false, false)
-	s.T["disWord"] = s.GetString("disWord")
+	s.T["loginFlag"] = true
 	return s.Render("/vipsubscribe/vip_introduce.html")
 }
 

+ 11 - 1
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -349,6 +349,8 @@ func (wd *WsDataExport) SearchExport() error {
 		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
 		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
 		Notkey:       wd.GetString("notkey"),                       //排除词
+		City:         wd.GetString("city"),                         //城市
+		FileExists:   wd.GetString("fileExists"),                   //有无附件
 	}
 
 	saveData := reqData.PassBidSearchExport()
@@ -357,7 +359,15 @@ func (wd *WsDataExport) SearchExport() error {
 	saveData["s_openid"] = openid
 	saveData["s_userid"] = userId
 	saveData["comeinfrom"] = "supersearchPage"
-
+	region := util.If(reqData.Area == "全国", "", reqData.Area).(string)
+	if region != "" && reqData.City != "" {
+		region += "," + reqData.City
+	} else {
+		region = reqData.City
+	}
+	saveData["region"] = strings.Split(region, ",")
+	//是否开启 正文 标题同时搜索只搜正文的开关
+	saveData["searchTypeSwitch"], _ = config.Sysconfig["searchTypeSwitch"].(bool)
 	//存入数据库
 	_id := mongodb.Save(dataexport.ExportTable, saveData)
 

+ 4 - 1
src/jfw/modules/app/src/config.json

@@ -163,5 +163,8 @@
     "criticality":2,
     "canReadNotice": 3,
     "namePrefix":"JY_%s",
-    "smsServiceRpc":"127.0.0.1:932"
+    "smsServiceRpc":"127.0.0.1:932",
+    "searchTypeSwitch": true,
+    "baseUserFilterFlag":true,
+    "userCenterApi":"https://web-zxl.jydev.jianyu360.com"
 }

+ 14 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/public.css

@@ -204,6 +204,19 @@ input::placeholder {
     background: #fff;
     z-index: 9;
 }
+.jy-app-header .icon-back::before,
+.jy-app-header .icon-back-white::before {
+   content: unset;
+}
+.jy-app-header .icon-back-white {
+    display: none;
+}
+.jy-app-header.transparent-header .icon-back-white {
+    display: inline-block;
+}
+.jy-app-header.transparent-header .icon-back {
+   display: none;
+}
 
 .j-header .header-left,
 .j-header .header-title,
@@ -248,6 +261,7 @@ input::placeholder {
 .j-container .j-header.transparent-header:after {
     content: unset;
 }
+.j-header.transparent-header .header-right,
 .j-header.transparent-header .header-left,
 .j-header.transparent-header .header-title {
     color: #fff;

+ 5 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/client_buyer_project_news.js

@@ -539,7 +539,11 @@ var vConfig = {
               console.info(_this.colList)
               _this.colList.forEach((item)=>{
                 item.bidstatus = item.bidstatus
-                item.bidsta = item.bidstatus + "公告"
+                if (item.bidstatus) {
+                  item.bidsta = item.bidstatus + "公告"
+                } else {
+                  item.bidsta = ''
+                }
                 if(item.winner && item.winner.length>0){
                   item.winner = item.winner[0]
                 }

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/client_portrayal.js

@@ -145,7 +145,7 @@ var vNode = {
           getNewMsgObj: {},
           isSC: 0, //0未收藏 1收藏
           idx: [],
-          
+          list:[]
       }
   },
   computed: {

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -1667,7 +1667,7 @@ var vNode = {
       `
       // 判断是否购买全国,全国直接跳转到到充值页面, 非全国显示弹窗
       if(usage.provin == -1) {
-        location.href = '/jy_mobile/common/order/create/areapack?type=1'
+        location.href = '/jy_mobile/common/order/create/buyerpack?type=1'
       } else {
         this.$dialog.confirm({
           title: '请选择充值方式',

+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/dev2/biddingSearch.css

@@ -706,6 +706,7 @@ width:1160px;
 
 #searchInner .searchControl .seaTender-inner .tabContainer .lucene li .luce-left .left-title {
   float: left;
+  max-width: 700px;
   line-height: 30px;
     width: 750px;
 	overflow: hidden;

+ 19 - 1
src/jfw/modules/app/src/web/staticres/jyapp/css/p13.css

@@ -483,4 +483,22 @@
     font-size: .22rem;
     color: #9B9CA3;
     line-height: .48rem;
-}
+}
+
+/*S-用户发布样式-S */
+.userPublish{
+  position: absolute;
+  top: 0;
+  left: 0;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 0 .16rem;
+  height: .36rem;
+  background: rgba(255, 58, 32, 0.1);
+  border-radius: 0px 0px 12px 0px;
+  font-size: .24rem;
+  font-weight: 500;
+  color: #FF3A20;
+}
+/* E-用户发布样式-E */

+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/css/subscribe.css

@@ -133,6 +133,7 @@ img{
 	padding: 17px 0px 17px 0px;
 }
 .resnumb .two{
+  margin-top: .08rem;
   width: 100%;
 	font-size:16px;
 	font-weight:500;

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/css/wxinfocontent.css

@@ -1056,7 +1056,7 @@ ul {
     font-size: 8px !important;
     color: #999;
     position: absolute;
-    left: 1.95rem;
+    left: 1.75rem;
     top: 0.8rem;
 }
 

+ 95 - 41
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -926,43 +926,59 @@ function pcredirect (link, sid) {
 var isNumber = /^[0-9]+$/
 var isLetter = /^[a-zA-Z]+$/
 function keyWordHighlight (value, oldChars, newChar) {
-  if (typeof (oldChars) == "undefined" || oldChars == null || typeof (newChar) == "undefined" || newChar == null || newChar == "") {
+  if(typeof(oldChars) == "undefined" || oldChars == null || typeof(newChar) == "undefined" || newChar == null || newChar == ""){
     return value;
   }
   var array = [];
-  if (oldChars instanceof Array) {
+  if(oldChars instanceof Array){
     array = oldChars.concat();
-  } else {
+  }else{
     array.push(oldChars);
   }
-  try {
-    var map = {};
-    for (var i = 0; i < array.length; i++) {
-      var oldChar = array[i];
-      if (oldChar.replace(/\s+/g, "") == "" || map[oldChar] || isNumber.test(oldChar) || isLetter.test(oldChar)) {
-        continue;
-      }
-      map[oldChar] = true;
-      oldChar = oldChar.replace(/\$/g, "\\$");
-      oldChar = oldChar.replace(/\(/g, "\\(");
-      oldChar = oldChar.replace(/\)/g, "\\)");
-      oldChar = oldChar.replace(/\*/g, "\\*");
-      oldChar = oldChar.replace(/\+/g, "\\+");
-      oldChar = oldChar.replace(/\./g, "\\.");
-      oldChar = oldChar.replace(/\[/g, "\\[");
-      oldChar = oldChar.replace(/\]/g, "\\]");
-      oldChar = oldChar.replace(/\?/g, "\\?");
-      oldChar = oldChar.replace(/\\/g, "\\");
-      oldChar = oldChar.replace(/\//g, "\\/");
-      oldChar = oldChar.replace(/\^/g, "\\^");
-      oldChar = oldChar.replace(/\{/g, "\\{");
-      oldChar = oldChar.replace(/\}/g, "\\}");
-      oldChar = oldChar.replace(/\|/g, "\\|");
-      value = value.replace(new RegExp("(" + oldChar + ")", 'gmi'), newChar);
+
+  for (var i = 0; i < array.length; i++) {
+    if (!array[i]) {
+      continue
+    } else {
+      // if (isNumber.test(array[i])) {
+      //   array[i] = ''
+      //   continue
+      // }
+      array[i] = array[i].replace(/([\$\(\)\*\+\.\[\]\?\/\\\^\{\}\|])/g, '\\$1').replace(/\s+/g, '')
+
+      // array[i] = array[i].replace(/\$/g,"\\$");
+      // array[i] = array[i].replace(/\(/g,"\\(");
+      // array[i] = array[i].replace(/\)/g,"\\)");
+      // array[i] = array[i].replace(/\*/g,"\\*");
+      // array[i] = array[i].replace(/\+/g,"\\+");
+      // array[i] = array[i].replace(/\./g,"\\.");
+      // array[i] = array[i].replace(/\[/g,"\\[");
+      // array[i] = array[i].replace(/\]/g,"\\]");
+      // array[i] = array[i].replace(/\?/g,"\\?");
+      // array[i] = array[i].replace(/\\/g,"\\");
+      // array[i] = array[i].replace(/\//g,"\\/");
+      // array[i] = array[i].replace(/\^/g,"\\^");
+      // array[i] = array[i].replace(/\{/g,"\\{");
+      // array[i] = array[i].replace(/\}/g,"\\}");
+      // array[i] = array[i].replace(/\|/g,"\\|");
     }
-  } catch (e) {
   }
-  return value;
+
+  // 数组去空
+  var lastArr = []
+  array.forEach(function (item) {
+    if (item) {
+      lastArr.push(item)
+    }
+  })
+  if (lastArr.length === 0) {
+    return value
+  }
+  lastArr = lastArr.sort(function (a, b) {
+    return b.length - a.length
+  })
+
+  return value.replace(new RegExp('(' + lastArr.join('|') + ')', 'gmi'), newChar)
 }
 
 function getWxVersion () {
@@ -1113,6 +1129,14 @@ function keepQuest() {
 }
 
 function loginSuccess (result) {
+  // 清除缓存
+  clearObjKeyForRegFn(sessionStorage, /-login-clear/)
+  clearObjKeyForRegFn(localStorage, /-login-clear/)
+
+  // 清除订阅页面缓存
+  sessionStorage.removeItem('$data-historypush')
+  JyObj.refreshAppointTab('subscribe', 1)
+
   JyObj.saveUserToken(result.sign);
   // 数据包默认选中企业需请求默认企业接口
   try {
@@ -1354,14 +1378,51 @@ function mySysIsIos () {
 
 }
 
-function appQuit (isKicked) {
+function clearObjKeyForRegFn (obj, reg) {
+  if (obj) {
+    for(var k in obj) {
+      if (reg.test(k)) {
+        obj.removeItem(k)
+      }
+    }
+  }
+}
+
+function clearRefreshStorage (isKicked) {
   //清除小红点缓存
   localStorage.removeItem("redSpotLastAjaxTime");
+  // 清除缓存
+  clearObjKeyForRegFn(sessionStorage, /-login-clear/)
+  clearObjKeyForRegFn(localStorage, /-login-clear/)
   //清除token
+  try {
+    $.cookie('SESSIONID', '', { expires: -1, path: '/' })
+  } catch (e) {
+    console.warn(e)
+  }
+  //订阅设置页面缓存
+  sessionStorage.removeItem('$data-historypush')
+  // 退出登录清除首页商机管理权限缓存
+  sessionStorage.removeItem("setEntStatus")
+  sessionStorage.removeItem("userMergeFlag");
+  // 刷新首页
+  try {
+    JyObj.refreshAppointTab('search', 1)
+    JyObj.refreshAppointTab('subscribe', 1)
+    JyObj.hiddenBottom(0)
+  } catch (e) {
+    console.warn(e)
+  }
+  if (!isKicked) {
+    window.location.href = "/jyapp/free/login?back=index&flag=quit";
+  }
+}
+
+function appQuit (isKicked) {
   var sign = JyObj.getUserToken();
-  JyObj.removeUserToken();
   //隐藏小红点
   try {
+    JyObj.removeUserToken();
     JyObj.hideRedSpotOnMenu("my");
     JyObj.hideRedSpotOnMenu("subscribe");
   } catch (e) {
@@ -1371,18 +1432,11 @@ function appQuit (isKicked) {
     type: "post",
     data: { isKicked: isKicked, sign: sign },
     dataType: "json",
-    success: function (r) {
-      // 退出登录清除首页商机管理权限缓存
-      sessionStorage.removeItem("setEntStatus")
-      if (!isKicked) {
-        window.location.href = "/jyapp/free/login?back=index&flag=quit";
-      }
-      sessionStorage.removeItem("userMergeFlag");
+    success: function () {
+      clearRefreshStorage(isKicked)
     },
     error: function () {
-      if (!isKicked) {
-        window.location.href = "/jyapp/free/login?back=index&flag=quit";
-      }
+      clearRefreshStorage(isKicked)
     }
   });
 }

+ 72 - 13
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -1,6 +1,7 @@
 
 var vm = new Vue({
   el: '#select-meau',
+  delimiters: ['${', '}'],
   components: {
     dateComponent: dateComponent,
     areaCityMobile: areaCityMobileComponent,
@@ -8,7 +9,8 @@ var vm = new Vue({
     cateComponent: cateComponent,
     keywordComponent: keywordComponent,
     noticeComponent: noticeComponent,
-    rootComponent: rootComponent
+    rootComponent: rootComponent,
+    moneyComponent: moneyComponent
   },
   data: function() {
     return {
@@ -85,12 +87,35 @@ var vm = new Vue({
       protype: 'vip', // 关键词接口动态修改
       entinfo: {},
       isEntniche: false,// 是否是商机管理
-      address: '' // 商机管理订阅管理跳转地址
+      address: '', // 商机管理订阅管理跳转地址
+      moneyTags: [
+        {
+          name: '全部',
+          value: '',
+          selected: true
+        }
+      ],
+      fileTags: [
+        {
+          key: '',
+          label: '全部'
+        },
+        {
+          key: '1',
+          label: '有附件'
+        },
+        {
+          key: '-1',
+          label: '无附件'
+        },
+      ],
+      selectFile: '',
+      selectMoney: ''
     }
   },
   computed: {
     selectedMoreCancelDisabled: function () {
-      return !(this.buyerclass || this.key || this.subtype)
+      return !(this.buyerclass || this.key || this.subtype || this.selectFile || this.selectMoney)
     },
     selectedMoreProduct: function () {
       return !!(this.rootInfo.vipStatus > 0 && this.rootInfo.memberStatus > 0) || !!(this.rootInfo.vipStatus > 0 && this.isEntniche) || !!(this.rootInfo.memberStatus > 0 && this.isEntniche)
@@ -114,6 +139,7 @@ var vm = new Vue({
     }else {
       firstTime = this.time
     }
+    // console.log(this.selectPro, '用户身份');
   },
   mounted () {
     var recover = this.recover()
@@ -152,7 +178,7 @@ var vm = new Vue({
           doType: data
         },
         success: function(res) {
-          console.log(res)
+          // console.log(res)
           if(res) {
             if(!data) {
               if(res.flag) {
@@ -211,7 +237,7 @@ var vm = new Vue({
         // this.ajaxUrl = '/publicapply/subscribe/historyPush?t=' + new Date().getTime()
         this.RemoveClass('big')
         this.getBmStatus(this.rootInfo)
-        initpage()
+        // initpage()
       } else if(data == 'vip') {
         productType = 1
         historyVt = 'v'
@@ -224,7 +250,7 @@ var vm = new Vue({
         $('.user_pro').css('color', '#D69E55')
         $(".switch .switch_icon").addClass('icon_vip')
         this.selectPro = 1
-        initpage()
+        // initpage()
         // this.ajaxUrl = '/publicapply/subscribe/historyPush?t=' + new Date().getTime()
       } else if(data == 'ent') {
         productType = 3
@@ -244,7 +270,7 @@ var vm = new Vue({
         this.time = ''
         this.tagText.timeText = '时间'
       this.bigSubShow = false
-      ajaxFun(this.time, this.area, this.city, this.subscopeclass, this.buyerclass, this.key, this.subtype)
+      ajaxFun(this.time, this.area, this.city, this.subscopeclass, this.buyerclass, this.key, this.subtype, this.selectFile, this.selectMoney)
     },
     RemoveClass: function(data) {
       if(data == 'vip') {
@@ -323,7 +349,6 @@ var vm = new Vue({
           }
           const res = $data
           // 时间
-          console.log(res)
           if(res.time != '') {
             this.selectDate.startDate = res.time.split('_')[0] * 1000
             this.selectDate.endDate= res.time.split('_')[1] * 1000
@@ -331,6 +356,10 @@ var vm = new Vue({
           }
           // 地区
           if(res.area || res.city) {
+            // this.$nextTick(() => {
+            //   this.$refs.areaCitySelector.setState(this.selectAreaList)
+            //   $('.areaText').html(res.tagText.areaText)
+            // })
             setTimeout(() => {
               this.$refs.areaCitySelector.setState(this.selectAreaList)
               $('.areaText').html(res.tagText.areaText)
@@ -358,6 +387,18 @@ var vm = new Vue({
             this.selectNoticeList = res.subtype.split(',')
             this.moreFiltersText.noticeItem = this.selectNoticeList.length
           }
+          // 金额
+          if(res.selectMoney) {
+            this.selectMoney = res.selectMoney
+            var moneyStr = JSON.parse(JSON.stringify(res.selectMoney))
+            var moneyArr = moneyStr.split('-')
+            this.$refs.moneyComponent.resetSelected(false)
+            this.$refs.moneyComponent.inputSelected = true
+            this.$refs.moneyComponent.inputMap.start = moneyArr[0]
+            this.$refs.moneyComponent.inputMap.end = moneyArr[1]
+          }
+          // 附件
+          this.selectFile = res.selectFile
           sessionStorage.removeItem(this.sessStorageKey)
       }
       return !!$data
@@ -371,6 +412,9 @@ var vm = new Vue({
       this.subscopeclass = ''
       this.key = ''
       this.buyerclass = ''
+      this.selectFile = ''
+      this.selectMoney = ''
+      this.selectIndustryList = []
     },
     revorceOtherData: function() {
       this.area = ''
@@ -379,6 +423,9 @@ var vm = new Vue({
       this.subscopeclass = ''
       this.key = ''
       this.buyerclass = ''
+      this.selectFile = ''
+      this.selectMoney = ''
+      this.selectIndustryList = []
     },
     open: function(name) {
       this.goUpText = name
@@ -399,7 +446,7 @@ var vm = new Vue({
     },
     // 订阅推送消息展示数据
     setPushTime: function(time) {
-      console.log(time)
+      // console.log(time)
       let pushtime = {
         start: parseInt(time.split('_')[0] * 1000),
         end: parseInt(time.split('_')[0] * 1000),
@@ -537,7 +584,7 @@ var vm = new Vue({
         type: 'post',
         url: '/entbase/ent/entinfo',
         success: function(res) {
-          console.log(res)
+          // console.log(res)
           if(res.error_code === 0) {
             _this.entinfo = res.data
             if(res.data.admin_department || res.data.admin_system) {
@@ -597,6 +644,7 @@ var vm = new Vue({
           dataType: "json",
           success: function (res) {
               if (res.data) {
+                window.isFree = res.data.isFree
                 window.userNewType = res.data.isUpgrade // 原页面里的用户版本 变量赋值
                 _this.rootInfo = res.data
                 let switchProduct = sessionStorage.getItem('switch-product')
@@ -686,6 +734,8 @@ var vm = new Vue({
         this.buyerclass = this.moreFiltersTextCache.cateItem
         this.key = this.moreFiltersTextCache.keywordItem
         this.subtype = this.moreFiltersTextCache.noticeItem
+        this.selectMoney = this.$refs.moneyComponent.getState()
+        console.log('金额:', this.selectMoney, '有无附件:', this.selectFile);
         this.doSearch()
       }
     },
@@ -694,11 +744,15 @@ var vm = new Vue({
       this.cancel({ name: 'keywordItem' })
       this.cancel({ name: 'noticeItem' })
       this.$refs.moreDropdownItems.toggle(false)
-
+      this.$refs.moneyComponent.resetAll()
+      this.selectFile = ''
+      this.selectMoney = ''
       if (this.screenShow) {
         this.buyerclass = ''
         this.key = ''
         this.subtype = ''
+        this.selectFile = ''
+        this.selectMoney = ''
         this.doSearch()
       }
     },
@@ -855,7 +909,7 @@ var vm = new Vue({
       setTimeout(this.getAjaXParams, delay)
     },
     getAjaXParams: function() {
-      ajaxFun(this.time, this.area, this.city, this.subscopeclass, this.buyerclass, this.key, this.subtype)
+      ajaxFun(this.time, this.area, this.city, this.subscopeclass, this.buyerclass, this.key, this.subtype,this.selectFile, this.selectMoney)
     },
     setToggle: function() {
       this.$refs.dateItem.toggle(false)
@@ -873,9 +927,14 @@ var vm = new Vue({
             position: '订阅推送列表页'
         },
         success: function(res) {
-            console.log(res)
+            // console.log(res)
         }
       })
+    },
+    // 选择附件
+    selectFileFn: function(item) {
+      if (!this.screenShow) return
+      this.selectFile = item.key
     }
   }
 })

+ 20 - 5
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -1897,10 +1897,19 @@ var SuperSearch = {
             if (typeof (list[i].bidamount) != "undefined" && list[i].bidamount != null && list[i].bidamount != "") {
                 moneyTag = '<span class="bidamount">' + MoneyUnit.test(list[i].bidamount) + '</span>';
             }
-            if (!isIosExam && !isIosExamPhone && i == 3 && pageNum == 1) {
-                ListHtml += '<div class="tslist" style="border-bottom-width:0px;">'
+            if(list[i].site == '剑鱼信息发布平台') {
+              if (!isIosExam && !isIosExamPhone && i == 3 && pageNum == 1) {
+                  ListHtml += '<div class="tslist" style="padding-top:0.4rem;border-bottom-width:0px;">'
+              } else {
+                  ListHtml += '<div class="tslist" style="padding-top:0.4rem;">'
+              }
+              ListHtml += '<div class="userPublish">用户发布</div>'
             } else {
-                ListHtml += '<div class="tslist">'
+              if (!isIosExam && !isIosExamPhone && i == 3 && pageNum == 1) {
+                  ListHtml += '<div class="tslist" style="border-bottom-width:0px;">'
+              } else {
+                  ListHtml += '<div class="tslist">'
+              }
             }
             ListHtml += '<div class="resnumb">'
                 + '<div class="one">'
@@ -2992,6 +3001,7 @@ var SuperSearch = {
             for (var i = 0; i < list.length; i++) {
                 var _list = list[i];
                 var title = _list["title"];
+                var site = _list["site"]
                 if (SuperSearch.hasSubscribe) {
                     if (_list["matchkeys"] != null && typeof (_list["matchkeys"]) != "undefined") {
                         for (var n = 0; n < _list["matchkeys"].length; n++) {
@@ -3004,8 +3014,13 @@ var SuperSearch = {
                 } else if (SuperSearch.myHistory != null && SuperSearch.myHistory.length > 0) {
                     title = keyWordHighlight(title, SuperSearch.myHistory, '<font class="keyword">$1</font>');
                 }
-                homeListHtml += '<div class="list_item" data-need-bind-phone data-onclick="' + _list["_id"] + '">'
-                    + '<div class="list_title">'
+                if (site == '剑鱼信息发布平台') {
+                  homeListHtml += '<div class="list_item" data-need-bind-phone style="padding-top: .4rem;" data-onclick="' + _list["_id"] + '">'
+                    + '<div class="userPublish">用户发布</div>'
+                } else {
+                  homeListHtml += '<div class="list_item" data-need-bind-phone data-onclick="' + _list["_id"] + '">'
+                }
+                homeListHtml += '<div class="list_title">'
                     + '<span class="serial_number">' + (i + 1) + '. &nbsp;</span>'
                     + '<div class="two-group">'
                     + '<p sid="' + _list["_id"] + '">' + title + '</p>'

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

@@ -56,7 +56,7 @@
                 </div>
                 <div class="key-empty" v-show="emptyShow">
                     <div class="empty-img-container">
-                        <img class="empty-img" src="/jyapp/images/wxkeyset/nopush.png">
+                        <img class="empty-img" src="/common-module/public/image/jy-back.png">
                     </div>
                     <div class="empty-text">暂无关键词组</div>
                     <button class="add-keyword-button" @click="addKeyWord" :disabled="keyWordsList.length >= keyConf.keyMaxLength">

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

@@ -56,7 +56,7 @@
                 </div>
                 <div class="key-empty" v-show="emptyShow">
                     <div class="empty-img-container">
-                        <img class="empty-img" src="/jyapp/images/wxkeyset/nopush.png">
+                        <img class="empty-img" src="/common-module/public/image/jy-back.png">
                     </div>
                     <div class="empty-text">暂无关键词组</div>
                     <button class="add-keyword-button" @click="addKeyWord" :disabled="keyWordsList.length >= keyConf.keyMaxLength">

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

@@ -2,7 +2,7 @@
 <div class="j-header jy-app-header border-line-b">
     <span class="header-left">
         <span class="icon-back j-icon base-icon"></span>
-        <!-- <span class="icon-back-white j-icon base-icon"></span> -->
+        <span class="icon-back-white j-icon base-icon"></span>
     </span>
     <span class="header-title"></span>
     <span class="header-right"></span>

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

@@ -316,7 +316,8 @@
                                 label="中标单位"
                                 width="230">
                           <template slot-scope="scope">
-                            <span @click="goEntInfo(scope.row.winner)">${scope.row.winner}</span>
+                            <!-- <span @click="goEntInfo(scope.row.winner)">${scope.row.winner}</span> -->
+                            <span @click="goToDetail(scope.row)">${scope.row.winner}</span>
                           </template>
                         </el-table-column>
                         <el-table-column

+ 12 - 2
src/jfw/modules/app/src/web/templates/big-member/page_client_list.html

@@ -355,14 +355,24 @@
                             if(res.data.iscoll) {
                                 let listcopy = _this.list
                                 const CollNames = []
+                                const CollTemp = []
                                 res.data.names.forEach((c) => {
                                   CollNames.push(c.split(',')[0])
+                                  CollTemp.push({
+                                    name: c.split(',')[0],
+                                    id: c.split(',')[1]
+                                  })
                                 })
                                 _this.noClaimList = listcopy.filter(v => {
                                     let isColl = CollNames.includes(v.name)
-                                    v.claim = isColl
                                     if (isColl) {
-                                        _this.havaClaimList.push(v)
+                                      CollTemp.forEach(s => {
+                                        if (s.name === v.name) {
+                                          v.claim = true
+                                          v.customerId = s.id
+                                          _this.havaClaimList.push(v)
+                                        }
+                                      })
                                     }
                                     return !isColl
                                 })

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

@@ -317,7 +317,8 @@
                                 label="中标单位"
                                 width="230">
                           <template slot-scope="scope">
-                            <span @click="goEntInfo(scope.row.winner)">${scope.row.winner}</span>
+                            <!-- <span @click="goEntInfo(scope.row.winner)">${scope.row.winner}</span> -->
+                            <span @click="goToDetail(scope.row)">${scope.row.winner}</span>
                           </template>
                         </el-table-column>
                         <el-table-column

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

@@ -187,7 +187,8 @@
                   label="招标单位"
                   width="230">
                   <template slot-scope="scope">
-                    <span @click="goEntInfo(scope.row.id)">${scope.row.buyer}</span>
+                    <!-- <span @click="goEntInfo(scope.row.id)">${scope.row.buyer}</span> -->
+                    <span @click="goToDetail(scope.row)">${scope.row.buyer}</span>
                   </template>
                 </el-table-column>
                 <el-table-column

+ 3 - 3
src/jfw/modules/app/src/web/templates/common/baiducc.html

@@ -37,15 +37,15 @@ function adv_statistics(e){
     if ($(e).find("a").attr("openurl")!=undefined){//app三级页调用打开方法
       $.post('/salesLeads/retainedCapital'+ '?source=article_original').done(function (r) {
         // 判断当前信息否在其他页面留资  如果全部留资 直接弹窗提交成功
-        var checkKeys = ['name', 'phone', 'company', 'branch', 'position']
+        var checkKeys = ['name', 'phone', 'company', 'branch', 'position', 'companyType']
         var result = checkRequiredKeys(checkKeys, r.info)
-        if (result) {
+        if (result || !window.isFree) {
           JyObj.openExternalLink($(e).find("a").attr("openurl"),"查看原文");
           return true
         }
 
         if (r && r.error_msg === '' && r.data) {
-          if (r.data.retainedCapital) {
+          if (r.data.retainedCapital || !result) {
             vKeepComponent.$dialog.confirm({
               message: '为给您匹配精准的推荐信息,请完善个人信息,免费查看原文',
               className: 'ent-search-dialog max-54 add-close-after',

+ 375 - 0
src/jfw/modules/app/src/web/templates/frontRouter/activity/sess/task-202207.html

@@ -0,0 +1,375 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+  <!-- <title>投标人专属免费计划</title> -->
+    <title>剑鱼超级会员节</title>
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/assets/iconfont/mobile/22.7.2/iconfont.css />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/task-common.css?v={{Msg "seo" "version"}}' />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/css/app-share-sheet.css?v={{Msg "seo" "version"}}' />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/task-202207.css?v={{Msg "seo" "version"}}' />
+    <!--E-当前页面的css资源-->
+    <style>
+        .j-container.app > .j-main {
+            margin-top: -21.34vw;
+        }
+        @font-face {
+            font-family:"YouSheBiaoTiHei";
+            font-display: swap;
+            src:url('/jyapp/fonts/YouSheBiaoTiHei-2.ttf');
+        }
+        .jy-app-header .header-right {
+            font-size: .46rem;
+        }
+        .fixed-top {
+            top: 1.72rem;
+        }
+    </style>
+    <script>
+        try {
+            window.JyObj.hiddenBottom('0')
+        } catch (e) {
+            console.log('error: app not function')
+        }
+    </script>
+</head>
+
+<body>
+    <div class="j-container app">
+        {{include "/big-member/header.html"}}
+        <div class="j-main" id="main-app" v-cloak>
+            <div class="activity-rules-button" id="activity-rules-button" v-show="false" @click="dialogShow('rule', true)">规则</div>
+            <div class="header-banner">
+                <img class="header-banner-img" src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/header-banner.png" alt="">
+            </div>
+            <div class="content-container">
+                <!-- 预热 -->
+                <section class="section no-select section-yure" v-show="yureSectionShow">
+                    <div class="section-header">
+                        <div class="section-header-button">
+                            <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/title-yure@2x.png" alt="">
+                        </div>
+                    </div>
+                    <div class="section-content">
+                        <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/content-yure@2x.png" alt="">
+                        <div class="content-info" :class="{ float: yureConf.tipFloat }">
+                            <div class="c-info-text" :class="{ 'mtb-48': !yureButtonShow }" v-html="yureInfo.tipText"></div>
+                            <button
+                                class="c-info-button section-button button-small"
+                                @click="receiveYuReCoupon"
+                                :disabled="yureInfo.buttonDisabled"
+                                v-show="yureButtonShow"
+                                v-text="yureInfo.buttonText"></button>
+                        </div>
+                    </div>
+                </section>
+                <!-- 更多活动即将开启 -->
+                <div class="section no-select section-more-activities" v-show="yureSectionShow">
+                    <div class="section-header">
+                        <div class="header-text">
+                            <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/more-fuli-text@2x.png" alt="">
+                        </div>
+                    </div>
+                </div>
+                <!-- 福利一 -->
+                <div class="section no-select section-fuli1">
+                    <div class="section-header">
+                        <div class="section-header-button">
+                            <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/title-fuli1@2x.png" alt="">
+                        </div>
+                    </div>
+                    <div class="section-content coupon-list">
+                        <div
+                            v-for="item in couponList"
+                            :key="item.id"
+                            class="coupon-item">
+                            <div class="coupon-title">满<span v-text="item.Full"></span>可用</div>
+                            <div class="coupon-value"><span class="num" v-text="item.Reduce">50</span>元</div>
+                            <button class="section-button button-small" @click="receiveActiveCoupon([item])" v-text="receiveActiveButtonText(item)"></button>
+                            <div class="coupon-text" v-html="item.tipText"></div>
+                        </div>
+                    </div>
+                    <div class="section-footer">
+                        <button class="section-button button-middle" v-show="onKeyReceiveShow" :disabled="couponList.length === 0" @click="receiveActiveCoupon(couponList)">一键领取</button>
+                    </div>
+                </div>
+                <!-- 福利二 -->
+                <div class="section no-select section-fuli2 progress-section">
+                    <div class="section-header">
+                        <div class="section-header-button">
+                            <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/title-fuli2@2x.png" alt="">
+                        </div>
+                    </div>
+                    <div class="section-content mission-list" ref="missions">
+                        <img src="/common-module/active/2022.7/gift-box.png" alt="" class="mission-list-img">
+                        <div
+                            class="mission-list-item floating"
+                            :class="{ complete: item.complete, hide: item.hide, [item.id]: true, [item.className]: true }"
+                            v-for="item in missionsList"
+                            :id="'bubble-' + item.id"
+                            :style="{ left: item.x + 'rem', top: item.y + 'rem' }"
+                            @click="onClickReceive('mission', item)"
+                            :key="item.id">
+                            <div class="m-list-item-bg">
+                                <span class="num"><span class="num-add">+</span>${ item.num }</span>
+                                <span class="text" v-text="item.unit"></span>
+                                <span class="button" :id="'bubble-button--' + item.id">${ item.complete ? '点击领取' : '去完成' }</span>
+                            </div>
+                            <div class="m-list-item-text text-gradient-whtie" v-text="item.name"></div>
+                        </div>
+                    </div>
+                    <div class="section-footer">
+                        <div class="progress-bar-container">
+                            <div class="progress-bar">
+                                <div
+                                    class="anchor"
+                                    v-for="(a, index) in progressAnchorList"
+                                    :key="a.rate"
+                                    :style="{ left: a.rate + '%' }"
+                                    v-show="!(index === 0 && progress.current)"
+                                    :class="a.className">
+                                    <div class="anchor-text"><span class="j-icon-bg icon-jy-coin"></span>${ a.anchorText }</div>
+                                    <div class="point-img" v-if="a.pointImg">
+                                        <img :src="progress.pointImgMap[a.pointImg]" alt="">
+                                    </div>
+                                    <div class="anchor-tip-text" v-show="a.tipText && false">
+                                        <p>免费领</p>
+                                        <p v-text="a.tipText"></p>
+                                    </div>
+                                </div>
+                                <div class="progress-bar-content" :style="{ width: rate + '%' }">
+                                    <div class="blink-point"></div>
+                                    <div class="blink-point-text anchor-text" v-show="blinkTextShow"><span class="j-icon-bg icon-jy-coin"></span>${progress.current}</div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="progress-action-list">
+                            <button
+                                class="progress-action-button"
+                                :class="{ pointer: receiveActiveButton.className === 'wait' }"
+                                :disabled="receiveActiveButton.disabled"
+                                :id="'progress-reward--' + receiveActiveButton.id"
+                                @click="onClickReceive('schedule', receiveActiveButton)"
+                            >${receiveActiveButton.buttonText}</button>
+                            <!-- <button
+                                class="progress-action-button"
+                                :class="{ pointer: a.className === 'wait' }"
+                                :disabled="a.className === 'received'"
+                                v-for="(a, index) in progressAnchorList"
+                                v-if="a.tipText"
+                                :id="'progress-reward--' + a.id"
+                                @click="onClickReceive('schedule', a)"
+                                :key="index">${a.className === 'received' ? '已' : '免费'}领${a.tipText}</button> -->
+                        </div>
+                    </div>
+                </div>
+                <!-- 福利三 -->
+                <div class="section section-fuli3">
+                    <div class="section-header">
+                        <div class="section-header-button">
+                            <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/title-fuli3@2x.png" alt="">
+                        </div>
+                    </div>
+                    <div class="section-content entniche-card-list">
+                        <div class="entniche-card-item shangji"></div>
+                        <div class="entniche-card-item zhuanjia"></div>
+                    </div>
+                    <div class="section-footer">
+                        <div class="button-group">
+                            <button class="section-button learn-more" @click="toMemberPage">了解更多</button>
+                            <button class="section-button button-middle" @click="receiveFuli3">立即体验</button>
+                        </div>
+                        <div class="text">
+                            <p>满足企业多人使用 多场景赋能业务增长</p>
+                            <p>详情请致电咨询:400-108-6670</p>
+                        </div>
+                    </div>
+                </div>
+                <!-- 右侧悬浮 -->
+                <div class="fixed-right">
+                    <div class="fixed-action-button" @click="clickRules"><div>活动</div><div>规则</div></div>
+                    <div class="fixed-action-button" @click="clickMyReward"><div>我的</div><div>奖励</div></div>
+                </div>
+            </div>
+            <!-- 顶部悬浮 -->
+            <div class="fixed-top top-timeline" v-show="false">
+                <div class="timeline-list">
+                    <div class="timeline-item yure" data-s-class="section-yure" v-show="activeState === 'waiting' || activeState === 'yureing'">
+                        <div class="t-left">预热福利</div>
+                        <div class="t-right">
+                            <div class="t-r-bottom">
+                                <div class="t-r-b-l2" v-text="timeDuration.yure"></div>
+                                <div class="t-r-b-r2" v-text="calcYuReTopText"></div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="timeline-item fuli1" data-s-class="section-fuli1">
+                        <div class="t-left">福利一</div>
+                        <div class="t-right">
+                            <div class="t-r-bottom" v-if="activeState === 'waiting' || activeState === 'yureing'">
+                                <div class="t-r-b-l">距开始</div>
+                                <div class="t-r-b-r" v-text="lastTimeText"></div>
+                            </div>
+                            <div class="t-r-bottom" v-else>
+                                <div class="t-r-b-l2" v-text="timeDuration.active"></div>
+                                <div class="t-r-b-r2" v-text="activeState === 'ended' ? '已结束' : '进行中'"></div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="timeline-item fuli2" data-s-class="section-fuli2">
+                        <div class="t-left">福利二</div>
+                        <div class="t-right">
+                            <div class="t-r-bottom" v-if="activeState === 'waiting' || activeState === 'yureing'">
+                                <div class="t-r-b-l">距开始</div>
+                                <div class="t-r-b-r" v-text="lastTimeText"></div>
+                            </div>
+                            <div class="t-r-bottom" v-else>
+                                <div class="t-r-b-l2" v-text="timeDuration.active"></div>
+                                <div class="t-r-b-r2" v-text="activeState === 'ended' ? '已结束' : '进行中'"></div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="timeline-item fuli3" data-s-class="section-fuli3">
+                        <div class="t-left">福利三</div>
+                        <div class="t-right">
+                            <div class="t-r-bottom" v-if="activeState === 'waiting' || activeState === 'yureing'">
+                                <div class="t-r-b-l">距开始</div>
+                                <div class="t-r-b-r" v-text="lastTimeText"></div>
+                            </div>
+                            <div class="t-r-bottom" v-else>
+                                <div class="t-r-b-l2" v-text="timeDuration.active"></div>
+                                <div class="t-r-b-r2" v-text="activeState === 'ended' ? '已结束' : '进行中'"></div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <!-- 我的奖励 -->
+            <van-popup
+                v-model="dialog.myReward"
+                closeable
+                position="bottom"
+                class="reward-section"
+                round
+                get-container="body"
+                :style="{ maxHeight: '60%' }">
+                <section class="reward-card-container j-container no-select">
+                    <div class="r-header text-gradient-red"><div class="text-gradient-red">我的奖励</div></div>
+                    <div class="reward-card j-main section-card">
+                        <div class="reward-list" :class="{ empty: rewardListState.list.length === 0 }">
+                            <van-list
+                                v-model="rewardListState.loading"
+                                :finished="rewardListState.finished"
+                                :offset="rewardListState.offset"
+                                :immediate-check="false"
+                                @load="getList"
+                                class="more-list calc-height-1px"
+                                ref="vanList">
+                                <div class="list-wrapper">
+                                    <div
+                                        class="reward-list-item"
+                                        v-for="(item, index) in rewardListState.list"
+                                        @click="onClickListItem(item)"
+                                        :key="item.id">
+                                        <span class="r-l-i-l j-icon-bg" :class="'icon-bg-' + item.icon"></span>
+                                        <div class="r-l-i-c">
+                                            <div class="r-l-i-c-t">
+                                                <span class="reward-text" v-text="item.rewardText"></span>
+                                                <div class="receive-from" v-text="item.receiveFrom"></div>
+                                            </div>
+                                            <div class="receive-time" v-text="item.receiveTime"></div>
+                                        </div>
+                                        <div class="r-l-i-action">
+                                            <van-icon name="arrow"></van-icon>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="reward-empty" v-if="rewardListState.list.length === 0">暂未获得奖励,快去完成任务吧</div>
+                            </van-list>
+                        </div>
+                    </div>
+                </section>
+            </van-popup>
+            <!--S-弹窗-->
+            <van-popup id="active-tip-modal" v-model="dialog.show" :data-modal-type="dialog.type" :close-on-click-overlay="dialog.type !== 'over'">
+              <div v-show="dialog.type === 'rule'" class="modal-dialog active-tip--rule" :class="{max: getScreenMax}">
+                <h5 class="text-gradient-red">活动规则</h5>
+                <div class="rule-content">
+                  <div
+                    class="rule-item"
+                    v-for="(item, index) in rulesList"
+                    :key="index">
+                    <div class="rule-index">${ index + 1 }.</div>
+                    <div class="rule-text">${ item.text }</div>
+                  </div>
+                </div>
+                <button @click="dialogShow('rule', false)" id="dialog-button--rule">我知道了</button>
+                <img class="bg-image" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/dialog-bg-big@2x.png?v={{Msg "seo" "version"}}' alt="扫一扫">
+              </div>
+              <div v-show="dialog.type === 'over'" class="modal-dialog active-tip--over">
+                <div class="close-dialog-icon" @click="dialog.show = false" id="dialog-icon--over" v-if="!forbidClose">
+                  <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.5.20/close.png?v={{Msg "seo" "version"}}' alt="x">
+                </div>
+                <h4>活动结束提醒</h4>
+                <img width="148" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.5.20/empty.png?v={{Msg "seo" "version"}}' alt="活动已结束">
+                <p>
+                  对不起,该活动已结束
+                  <br>
+                  可前往参加“邀请领好礼活动
+                </p>
+                <button @click="onClickReceive('', { id: 'invite' })" id="dialog-button--over">立即前往</button>
+              </div>
+              <div v-show="dialog.type === 'success'" class="modal-dialog active-tip--success">
+                <h5 class="text-gradient-red">领取成功</h5>
+                <p>
+                  恭喜成功领取<i style="font-weight: bold"> ${dialog.text} </i>超级订阅
+                  <br>
+                  <span>可在“我的奖励”中查看</span>
+                </p>
+                <button @click="dialogShow('success', false)" id="dialog-button--success">我知道了</button>
+                <img class="bg-image" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/dialog-bg@2x.png?v={{Msg "seo" "version"}}' alt="领取成功">
+              </div>
+            </van-popup>
+            <!--E-弹窗-->
+            <!-- share -->
+            <app-share-sheet
+                v-model="shareShow"
+                @share="doShareAjax"
+                popup-title="分享活动"
+                :share-title="shareConf.title"
+                :share-content="shareConf.content"
+                :share-link="shareConf.link"
+            ></app-share-sheet>
+            <!-- end share -->
+        </div>
+    </div>
+
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/moment/2.29.1/min/moment.min.js></script>
+    {{include "/big-member/commonjs.html"}}
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+    <script>
+        $(function () {
+            var header = $('.j-header.jy-app-header')
+            header.addClass('transparent-header')
+                .find('.header-right')
+                .addClass('iconfont')
+                .addClass('icon-mine_share')
+        })
+    </script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/wx-sdk-share.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/app-share-sheet.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/task-202207.js?v={{Msg "seo" "version"}}'></script>
+    {{include "/common/baiducc.html"}}
+</body>
+
+</html>

+ 0 - 2
src/jfw/modules/app/src/web/templates/frontRouter/activity/sess/task.html

@@ -190,8 +190,6 @@
             $('.j-header.jy-app-header')
                 .addClass('transparent-header')
                 .find('.header-left .j-icon')
-                .removeClass('icon-back')
-                .addClass('icon-back-white')
         })
     </script>
     <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.5.20/task.js?v={{Msg "seo" "version"}}'></script>

+ 64 - 0
src/jfw/modules/app/src/web/templates/frontRouter/bidedoc/free/index.html

@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+    <title></title>
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/css/public.css?v={{Msg "seo" "version"}}' />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/css/index.css?v={{Msg "seo" "version"}}' />
+  </head>
+<body>
+  <div class="j-container">
+    {{include "/big-member/header.html"}}
+    <div class="j-main bided" id="bided">
+      <div class="j-container">
+        <div class="j-main">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/A_02.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/A_03.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/A_04.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/A_05.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_01.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_02.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_03.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_04.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_05.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_06.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img @click="getPhone" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_07.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_08.jpg?v={{Msg "seo" "version"}}' alt="">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/image/B_09.jpg?v={{Msg "seo" "version"}}' alt="">
+          <div class="btns-tips">
+            <div class="btns">
+                <van-button type="primary" size="large" onclick="getMsgNew()">请留下您的手机号,专业老师将尽快和您联系</van-button>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+  <!--S-当前页面的资源-->
+  <script src='https://cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js'></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js></script>
+  <!--E-当前页面的资源-->
+  {{include "/big-member/commonjs.html"}}
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/bidedoc/js/index.js?v={{Msg "seo" "version"}}'></script>
+  {{include "/common/baiducc.html"}}
+  <script>
+    function getMsgNew(){
+      var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
+      if(loginFlag){
+        window.location.href="/jyapp/frontPage/bigmember/free/perfect_info?source=bid_document_Introduction_page"
+      }else{
+        window.location.href= "/jyapp/free/login?url=/jyapp/frontPage/bigmember/free/perfect_info?source=bid_document_Introduction_page"
+      }
+    }
+  </script>
+
+</body>
+
+</html>

+ 28 - 9
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html

@@ -69,7 +69,7 @@
               <van-field @input="entOnChange('input')" @blur="entOnChange('blur')" @focus="infoCheckMap.company = ''"
                 :error-message="infoCheckMap.company" required v-model.trim="infoMap.company" label="公司名称"
                 placeholder="请输入公司名称"></van-field>
-              <van-field v-if="moduleShow.companyType" v-model="infoMap.companyType" label="公司类型"
+              <van-field required v-model="infoMap.companyType" label="公司类型"
                 @click="openPop('公司类型')" readonly is-link placeholder="请选择公司类型"></van-field>
               <van-field v-if="moduleShow.position" :class="{'hide-border': infoMap.position === '其他'}" required
                 v-model="infoMap.position" label="职位" @click="openPop('职位')" readonly is-link placeholder="请选择职位">
@@ -987,6 +987,7 @@
             buyer_portrait_firstShow_freeuser: freeBuyerText,
 
             activity_free_plan: '请完善信息,免费获取200剑鱼币',
+            super_membership_day: '请留下联系方式,我们会尽快联系您体验大会员全部功能!',
 
             ent_portrait_: '请留下联系方式,我们会尽快联系您!体验企业画像分析,帮你透视企业!',
             buyer_portrait_: '请留下联系方式,我们会尽快联系您!体验采购单位画像分析,为你挖掘客户!',
@@ -1013,7 +1014,8 @@
             article_proposed_project: '请留下联系方式,我们会尽快联系您!开通大会员可抢先获知拟建商机动态,提高中标机率!', // 拟建项目
             'ent-manage-app': '请留下联系方式,我们会尽快联系您体验商机管理全部功能!',
             "jypush_see10_plus_app":"请完善个人信息,为您匹配更多精准项目信息",
-            "jyarticle_see3_plus_app":"请完善个人信息,获取更多免费查看公告权限"
+            "jyarticle_see3_plus_app":"请完善个人信息,获取更多免费查看公告权限",
+            peugeot_supplier_regist:"请完善您的个人信息,抢先对接采购单位"
           }
 
           // 提示语
@@ -1048,6 +1050,7 @@
           // 标题
           var titleMap = {
             activity_free_plan: '完善信息',
+            super_membership_day: '欢迎体验剑鱼大会员',
             ent_portrait_freeuser: '欢迎体验企业中标分析',
             ent_portrait_contacts: '欢迎体验剑鱼大会员',
             ent_portrait_changeList: '欢迎体验剑鱼大会员',
@@ -1055,7 +1058,8 @@
             "jypush_see10_plus_app":"完善信息",
             "jyarticle_see3_plus_app":"完善信息",
             "article_collection":"完善信息",
-            "article_original":"完善信息"
+            "article_original":"完善信息",
+            "peugeot_supplier_regist":"供应商报名"
           }
           for (var key in titleMap) {
             if (source.indexOf(key) !== -1) {
@@ -1121,6 +1125,12 @@
           }
           return true
         },
+        checkEntType() {
+          if (this.infoMap.companyType === '') {
+            return false
+          }
+          return true
+        },
         checkPosition() {
           if (!this.moduleShow.position) return true
           if (this.infoMap.position !== "" && this.infoMap.position !== '其他') {
@@ -1133,7 +1143,7 @@
           return namereg.test(this.infoMap.position_other)
         },
         isSubmitDisabled() {
-          return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition || (this.showBranch && !this.infoMap.branch)
+          return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkEntType || !this.checkPosition || (this.showBranch && !this.infoMap.branch)
         },
         isMoreSelect() {
           return this.popInfo.label === '公司类型'
@@ -1227,6 +1237,8 @@
         },
         ajaxGetEchoInfo() {
           this.isEchoInfoLoading = true
+          let sourceList = ['article_collection', 'article_original', 'jyarticle_see3_plus_app', 'jyarticle_see3_plus_pc', 'jyarticle_see3_plus_wx', 'jypush_see10_plus_app', 'jypush_see10_plus_wx']
+          let isCollect = sourceList.includes(this.ajaxParams.source)
           this.ajaxFn('/salesLeads/retainedCapital' + '?source=' + this.ajaxParams.source, {}, function (r) {
             this.isEchoInfoLoading = false
             if (r && r.info) {
@@ -1234,14 +1246,16 @@
             }
             if (r && r.error_msg === '' && r.data) {
               this.setEchoInfo(r.data)
-              var result = checkRequiredKeys(['name', 'phone', 'company', 'position', 'branch'], r.data)
+              var result = checkRequiredKeys(['name', 'phone', 'company','companyType', 'position', 'branch'], r.data)
               if (result) {
                 var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
                 var _this = this
                 var canAuto = !skipAuto.some(function (v) {
                   return _this.ajaxParams.source.indexOf(v) > -1
                 })
-                this.submitForm(canAuto)
+                if(!isCollect) {
+                  this.submitForm(canAuto)
+                }
               }
             }
           })
@@ -1536,7 +1550,11 @@
           this.ajaxParams.name = this.infoMap.name
           this.ajaxParams.phone = this.infoMap.phone
           this.ajaxParams.mail = this.infoMap.email
+          this.ajaxParams.companyType = this.infoMap.companyType
           this.ajaxParams.company = this.infoMap.company
+          if (getParam('source') === 'peugeot_supplier_regist'){
+            this.ajaxParams.publish_id = getParam('infoid')
+          }
           this.ajaxParams.position = this.infoMap.position
           if (this.infoMap.position === '其他') {
             this.ajaxParams.position = '其他/' + this.infoMap.position_other
@@ -1634,6 +1652,10 @@
                     if (source.indexOf('ent-manage-app') > -1) {
                       message = '您的申请已提交,我们会尽快联系您并预约演示时间,请耐心等待~您将获得免费体验商机管理全部功能!'
                     }
+                    //
+                    if (source.indexOf('peugeot_supplier_regist') > -1) {
+                      message = '我们会尽快联系您完成供应商报名,请耐心等待。'
+                    }
 
 
 
@@ -1659,9 +1681,6 @@
                       // }
                     }
 
-
-
-
                     if (message.length) {
                       _this.showMessage(message)
                     } else {

+ 61 - 2
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_solution.html

@@ -53,6 +53,8 @@
                         </div>
                         <van-field @input="entOnChange('input')" @blur="getCheckMap('company')" @focus="infoCheckMap.company = ''"
                                    :error-message="infoCheckMap.company" required v-model.trim="infoMap.company" label="公司名称" placeholder="请输入公司名称"></van-field>
+                        <van-field required v-model="infoMap.companyType" label="公司类型"
+                                   @click="openPop('公司类型')" readonly is-link placeholder="请选择公司类型"></van-field>
                         <van-field :class="{'hide-border': infoMap.position === '其他'}"  @blur="getCheckMap('company')" v-model="infoMap.position" required label="职位" @click="openPop('职位')" readonly is-link
                                    placeholder="请选择职位"></van-field>
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''"
@@ -138,6 +140,7 @@
         name: '',
         phone: '',
         company: '',
+        companyType: '',
         position: '',
         position_other: '',
         branch: ''
@@ -157,6 +160,35 @@
         title: ''
       },
       conditionMap: {
+        '公司类型': [{
+            title: '投标企业',
+            checked: false
+          },
+          {
+            title: '招标采购单位',
+            checked: false
+          },
+          {
+            title: '厂商',
+            checked: false
+          },
+          {
+            title: '招标代理机构',
+            checked: false
+          },
+          {
+            title: '经销商',
+            checked: false
+          },
+          {
+            title: '服务提供商',
+            checked: false
+          },
+          {
+            title: '其他',
+            checked: false
+          }
+        ],
         '职位': [
           {
             title: '总裁',
@@ -211,6 +243,7 @@
         "phone": "",
         "source": utils.getParam('source'), // 推送消息点进来的
         "company": "",
+        "companyType": "",
         "position": "",
         'platform': 'app',
         "branch": ''
@@ -240,6 +273,12 @@
         var namereg = /^[\u4E00-\u9FA5A-Za-z\s]+(·[\u4E00-\u9FA5A-Za-z]+)*$/;//中英文或加.的少数民族名字
         return namereg.test(this.infoMap.name)
       },
+      checkEntType() {
+        if (this.infoMap.companyType === '') {
+          return false
+        }
+        return true
+      },
       checkPhone () {
         return /^1[3-9]\d{9}$/.test(this.infoMap.phone)
       },
@@ -272,7 +311,7 @@
         }
       },
       isSubmitDisabled () {
-        return !this.checkName || !this.checkPhone || !this.checkPosition  || !this.checkEntName  || this.checkBranch
+        return !this.checkName || !this.checkPhone || !this.checkPosition  || !this.checkEntName || !this.checkEntType  || this.checkBranch
       },
       isNextDisabled () {
         var type = this.popInfo.label
@@ -286,6 +325,10 @@
             result = this.conditionMap[type].filter(v => v.checked).length
             break
           }
+          case '公司类型': {
+            result = this.conditionMap[type].filter(v => v.checked).length
+            break
+          }
         }
         return !result
       },
@@ -323,7 +366,7 @@
           }
           if (r && r.error_msg === '' && r.data) {
             this.setEchoInfo(r.data)
-            var result = checkRequiredKeys(['name', 'phone', 'company', 'position', 'branch'], r.data)
+            var result = checkRequiredKeys(['name', 'phone', 'company', 'companyType', 'position', 'branch'], r.data)
             if (result) {
               var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
               var _this = this
@@ -370,6 +413,9 @@
         }, true)
       },
       setEchoInfo (data) {
+        if (data.companyType) {
+          this.setCheckForData('companyType', 'companyType', data.companyType, '公司类型')
+        }
         if (data.position) {
           this.setCheckForData('position', 'position', data.position, '职位')
         }
@@ -397,6 +443,9 @@
         }
         if (label) {
           var checkDatas = [cKey]
+          if (label === '公司类型') {
+            checkDatas = cKey.split(',')
+          }
           this.conditionMap[label].forEach(v => {
             if (checkDatas.indexOf(v.title) !== -1) {
               v.checked = true
@@ -417,6 +466,11 @@
             this.setCheckForData('branch', 'branch', tempData[0].title)
             break
           }
+          case '公司类型': {
+            var tempData = this.conditionMap[type].filter(v => v.checked).map(v => v.title)
+            this.setCheckForData('companyType', 'companyType', tempData.join(','))
+            break
+          }
         }
         this.popInfo.show = false
       },
@@ -430,6 +484,10 @@
             this.popInfo.title = '部门'
             break
           }
+          case '公司类型': {
+            this.popInfo.title = '公司类型'
+            break
+          }
         }
         this.popInfo.label = type
         this.popInfo.show = true
@@ -499,6 +557,7 @@
         this.ajaxParams.phone = this.infoMap.phone
         this.ajaxParams.company = this.infoMap.company
         this.ajaxParams.position = this.infoMap.position
+        this.ajaxParams.companyType = this.infoMap.companyType
         if (this.infoMap.position === '其他') {
           this.ajaxParams.position = '其他/' + this.infoMap.position_other
         }

+ 61 - 2
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html

@@ -68,6 +68,8 @@
                         </div>
                         <van-field @input="entOnChange('input')" @blur="getCheckMap('company')" @focus="infoCheckMap.company = ''"
                                    :error-message="infoCheckMap.company" required v-model.trim="infoMap.company" label="公司名称" placeholder="请输入公司名称"></van-field>
+                        <van-field required v-model="infoMap.companyType" label="公司类型"
+                                   @click="openPop('公司类型')" readonly is-link placeholder="请选择公司类型"></van-field>
                         <van-field :class="{'hide-border': infoMap.position === '其他'}"  v-model="infoMap.position" required label="职位" @click="openPop('职位')" readonly is-link
                                    placeholder="请选择职位"></van-field>
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''"
@@ -163,6 +165,7 @@
         vercode: '',
         email: '',
         company: '',
+        companyType: '',
         position: '',
         position_other: '',
         branch: ''
@@ -184,6 +187,35 @@
         title: ''
       },
       conditionMap: {
+        '公司类型': [{
+            title: '投标企业',
+            checked: false
+          },
+          {
+            title: '招标采购单位',
+            checked: false
+          },
+          {
+            title: '厂商',
+            checked: false
+          },
+          {
+            title: '招标代理机构',
+            checked: false
+          },
+          {
+            title: '经销商',
+            checked: false
+          },
+          {
+            title: '服务提供商',
+            checked: false
+          },
+          {
+            title: '其他',
+            checked: false
+          }
+        ],
         '职位': [
           {
             title: '总裁',
@@ -239,6 +271,7 @@
         "source": utils.getParam('source'), // 推送消息点进来的
         "mail": "",
         "company": "",
+        "companyType": "",
         "position": "",
         "branch": ''
       },
@@ -282,6 +315,12 @@
         }
         return true
       },
+      checkEntType() {
+        if (this.infoMap.companyType === '') {
+          return false
+        }
+        return true
+      },
       isMoreSelect () {
         return this.popInfo.label === '公司类型'
       },
@@ -305,7 +344,7 @@
         }
       },
       isSubmitDisabled () {
-        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.vercodecor || !this.checkPosition || this.checkBranch
+        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkEntType || !this.vercodecor || !this.checkPosition || this.checkBranch
       },
       isNextDisabled () {
         var type = this.popInfo.label
@@ -319,6 +358,10 @@
             result = this.conditionMap[type].filter(v => v.checked).length
             break
           }
+          case '公司类型': {
+            result = this.conditionMap[type].filter(v => v.checked).length
+            break
+          }
         }
         return !result
       },
@@ -435,7 +478,7 @@
               this.setcodeShow = true
             }
             this.setEchoInfo(r.data)
-            var result = checkRequiredKeys(['name', 'phone', 'company', 'mail', 'position', 'branch'], r.data)
+            var result = checkRequiredKeys(['name', 'phone', 'company', 'companyType', 'mail', 'position', 'branch'], r.data)
             if (result) {
               var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
               var _this = this
@@ -482,6 +525,9 @@
         }, true)
       },
       setEchoInfo (data) {
+        if (data.companyType) {
+          this.setCheckForData('companyType', 'companyType', data.companyType, '公司类型')
+        }
         if (data.position) {
           this.setCheckForData('position', 'position', data.position, '职位')
         }
@@ -512,6 +558,9 @@
         }
         if (label) {
           var checkDatas = [cKey]
+          if (label === '公司类型') {
+            checkDatas = cKey.split(',')
+          }
           this.conditionMap[label].forEach(v => {
             if (checkDatas.indexOf(v.title) !== -1) {
               v.checked = true
@@ -532,6 +581,11 @@
             this.setCheckForData('branch', 'branch', tempData[0].title)
             break
           }
+          case '公司类型': {
+            var tempData = this.conditionMap[type].filter(v => v.checked).map(v => v.title)
+            this.setCheckForData('companyType', 'companyType', tempData.join(','))
+            break
+          }
         }
         this.popInfo.show = false
       },
@@ -545,6 +599,10 @@
             this.popInfo.title = '部门'
             break
           }
+          case '公司类型': {
+            this.popInfo.title = '公司类型'
+            break
+          }
         }
         this.popInfo.label = type
         this.popInfo.show = true
@@ -648,6 +706,7 @@
         this.ajaxParams.phone = this.infoMap.phone
         this.ajaxParams.mail = this.infoMap.email
         this.ajaxParams.company = this.infoMap.company
+        this.ajaxParams.companyType = this.infoMap.companyType
         this.ajaxParams.position = this.infoMap.position
         this.ajaxParams.branch = this.infoMap.branch.indexOf('总裁') > -1 || this.infoMap.branch.indexOf('总经理') > -1 ?  '' : this.infoMap.branch
         if(this.setcodeShow) {

+ 6 - 2
src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html

@@ -91,9 +91,13 @@
               finished-text="没有更多了"
               @load="getList"
             >
-              <div class="collec_li" :class="{ visited: item.visited }" v-for="(item, index) in listState.list" :key="index" @click="linkRouter(item)">
+              <div class="collec_li" :class="{ visited: item.visited ,userpub:item.site === '剑鱼信息发布平台' || item.spidercode === 'a_jyxxfbpt_gg'}" v-for="(item, index) in listState.list" :key="index" @click="linkRouter(item)">
+                <div v-if="item.site === '剑鱼信息发布平台' || item.spidercode === 'a_jyxxfbpt_gg'" class="yhfb">用户发布</div>
                 <div class="collec_head">
-                  <div class="collec_title ellipsis-2 visited-hd" v-html="item.title"></div>
+                  <div class="collec_title ellipsis-2 visited-hd">
+                    <span v-if="item.fileExists" style="color: #2ABED1;">[有附件] </span>
+                    <div v-html="item.title" style="display: inline;"></div>
+                  </div>
                   <div class="collec_star" @click="collecClick(event,item._id)">
                     <span class="shoucang" v-if="condition"></span>
                     <!-- <span class="weishoucang" v-if="!condition"></span> -->

+ 298 - 0
src/jfw/modules/app/src/web/templates/frontRouter/enptc/free/app_enptc.html

@@ -0,0 +1,298 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+    <title>商机管理</title>
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+    <!--S-当前页必定需要预加载的资源-->
+    <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="preload" as="style" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="preload" as="style" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/page_landingPage_new.css?v={{Msg "seo" "mod_version"}}'/>
+    <!--E-当前页必定需要预加载的资源-->
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/css/app_enptc.css?v={{Msg "seo" "mod_version"}}' />
+    <!--E-当前页面的css资源-->
+    <style>
+      #zc__sdk__sys__btn {
+        display: none;
+      }
+      .j-header {
+          transition: background 0.3s;
+      }
+      .btn_buy {
+          font-size: 0;
+      }
+    </style>
+    <script>
+      try {
+        window.JyObj.hiddenBottom('0')
+      } catch (e) {
+        console.log('error: app not function')
+      }
+    </script>
+</head>
+
+<body>
+  <div class="j-container" id="v-commit" v-cloak>
+    {{include "/big-member/header.html"}}
+    <div class="j-main">
+      <div  style="padding-top: 0">
+        <div class="action_out" style="font-size: 0;">
+            <div>
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_01.jpg?v={{Msg "seo" "version"}}'>
+            </div >
+            <div style="margin-top:-0.01rem">
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_02.jpg?v={{Msg "seo" "version"}}'>
+            </div>
+            <div style="margin-top:-0.01rem">
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_03.png?v={{Msg "seo" "version"}}'>
+            </div>
+            <div style="margin-top:-0.01rem">
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_04.jpg?v={{Msg "seo" "version"}}'>
+            </div>
+            <div style="margin-top:-0.01rem">
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_05.jpg?v={{Msg "seo" "version"}}'>
+            </div>
+            <div style="margin-top:-0.01rem">
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_06.jpg?v={{Msg "seo" "version"}}'>
+            </div>
+            <div style="margin-top:-0.01rem">
+                <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/APP_07.jpg?v={{Msg "seo" "version"}}'>
+            </div>
+        </div>
+      </div>
+    </div>
+    <div class="j-footer " v-show="isCantrial"style="width: 100%;position: absolute; bottom: 33px; ">
+        <div class="j-button-group btbt" style="width: 100%;">
+          <div class="buy_btn" v-if="onlyBuy">
+            <div class="sevendays j-btn" @click="exper_fun()">
+                <div data-need-bind-phone  style="color: #FAE7CA">
+                    <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/btnLeft.png?v={{Msg "seo" "version"}}'>
+                </div>
+            </div>
+            <!-- <div class="kefu" @click="consult()">
+                <div class="kefu_main">
+                  <span class="kefu_text">咨询客服</span>
+                  <span class="noread_red" style="display: none;"></span>
+                </div>
+            </div> -->
+            <div class="j-button-now  j-btn"  @click="consult()" >
+                <div data-need-bind-phone style="color: #1A1A2A">
+                    <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/btnRight.png?v={{Msg "seo" "version"}}'>
+                </div>
+            </div>
+          </div>
+          <div class="buy_btn" v-else>
+            <div class="j-button-nowly j-btn" @click="linkBuy('sj',6)">
+              <div data-need-bind-phone>立即使用</div>
+            </div>
+          </div>
+        </div>
+      </div>
+    <div style="margin-top:-0.01rem">
+        <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/enptc/img/bottomHeight.png?v={{Msg "seo" "version"}}'>
+    </div>
+  </div>
+  <script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+  <script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js> </script>
+  <script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js> </script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js> </script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js> </script>
+  {{include "/big-member/commonjs.html"}}
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/selector/js/powerMap.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+  <script src='https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js'></script>
+
+  <script>
+    var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
+
+    window.afterClickBack = function () {
+        console.log(location.href, 'afterClick')
+        if (window.navigator.userAgent.indexOf('HUAWEI') !== -1 && location.href.indexOf('/page/full') !== -1) {
+            console.log('去首页')
+            location.replace('/jyapp/jylab/mainSearch')
+        }
+    }
+    function mySysIsIos() {
+        //ios终端
+        var flag1 = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+        var flag2 = !!navigator.userAgent.match(/\(M[^;]+; Intel Mac OS X/);
+        return flag1 || flag2
+
+    }
+    var config = {
+        cdnHost: {{Cdns .Host "seo" "cdn"|SafeUrl}}
+    }
+    var vNode = {
+        delimiters: ['${', '}'],
+        el: '#v-commit',
+        data: {
+            onlyBuy: true,
+            isCantrial:true,
+            cantodo:[
+            ],
+        },
+        created () {
+            this.getAnchor()
+            // this.getVipMeal()
+        },
+        computed: {
+            version () {
+              return '?v=' + {{Msg "seo" "version"}}
+            }
+        },
+        mounted () {
+            try {
+                $('.j-header').addClass('transparent-header')
+                document.querySelector('.j-header .header-left').addEventListener('click', goBack)
+                // 头部滚动事件
+                $('.j-main').css('margin-top', 0 - ($('.j-header').outerHeight() || 75) + 'px')
+                $('.j-main').on('scroll', function () {
+                    var headerDOM = $('.j-header.jy-app-header')
+                    var scrollTop = this.scrollTop
+
+                    // 是否有header-transparent这个类名
+                    var hasClassT = headerDOM.hasClass('transparent-header')
+
+                    if(scrollTop >= 75) {
+                        if (!hasClassT) return
+                        headerDOM.removeClass('transparent-header')
+                    }else {
+                        if (hasClassT) return
+                        headerDOM.addClass('transparent-header')
+                    }
+                })
+            } catch (error) {}
+        },
+        methods: {
+            exper_fun(){
+              if (loginFlag){
+                location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=ent-manage-app'
+              }else{
+                window.location.href= "/jyapp/free/login?back=index"
+              }
+            },
+            // 快照页引流锚点
+            getAnchor: function () {
+                let dsid = utils.getParam('dsid')
+                if(dsid) {
+                    for(item in powerMap) {
+                        if(dsid == item) {
+                            console.log(powerMap[item])
+                            location.href = '#' + powerMap[item].anchor
+                        }
+                    }
+                }
+            },
+            getLog: function (res) {
+                if(!res){
+                    res = ''
+                }
+                if (utils.getParam('mid')) {
+                    try {
+                        $.ajax({
+                            type: "POST",
+                            url: "/publicapply/drainage/bmt/" + utils.getParam('mid'),
+                            success: function(r) {
+                                console.log(r,'rrrr')
+                                if (r.data) {
+                                    location.href = './buy_commit?meal='+ res + '&mid=' + utils.getParam('mid')
+                                }
+                            }
+                        })
+                    } catch (error) {
+                        location.href = './buy_commit?meal='+ res + '&mid=' + utils.getParam('mid')
+                    }
+                    } else {
+                        location.href = './buy_commit?meal='+ res + '&mid=' + utils.getParam('mid')
+                }
+            },
+            // 咨询客服
+            consult:function(){
+              if(loginFlag){
+                this.setStatistics('咨询客服')
+                location.href = "/jyapp/free/customer"
+              }else{
+                window.location.href= "/jyapp/free/login?back=index"
+              }
+            },
+            setStatistics: function (title) {
+              $.get('/jyapp/front/app/sobot?t=' + new Date().getTime() + '&q='+title)
+                try {
+                    _hmt.push(['_trackEvent','大会员-app', 'click', title]);
+                } catch (e) {
+                    console.log('未初始化百度统计')
+                }
+            }
+        }
+    }
+    new Vue(vNode)
+    </script>
+    <script>
+        function getOfflineMessageCount () {
+            try {
+                var nowPlatform = 'app';
+                (function (w, d, e, x) {
+                    w[e] = function () { w.cbk = w.cbk || []; w.cbk.push(arguments); }
+                    x = d.createElement('script');
+                    x.async = true;
+                    x.id = 'zhichiScript';
+                    x.className="zhiCustomBtn";
+                    // wxh5、app、pc
+                    x.src = 'https://' + nowPlatform + '-jianyu.sobot.com/chat/frame/v2/entrance.js?sysnum=9d1e3980f91e4b75b8f04e2d206a4c76&t=' + new Date().getTime();
+                    window.xxx = x
+                    d.body.appendChild(x);
+                })(window, document, 'zc');
+                $.post("/jypay/user/getSimpleData?t="+new Date().getTime(),{},function(r){
+                    console.log(r, 'r')
+                    var ajaxUserInfo = {
+                        headImage: '',
+                        nickName: '默认昵称',
+                        userId: '',
+                    }
+
+                    if (r) {
+                        Object.keys(ajaxUserInfo).forEach(function (v) {
+                            if (r[v] && r[v] !== '') {
+                                ajaxUserInfo[v] = r[v]
+                            }
+                        })
+                    }
+
+                    zc('config', {
+                        custom:true,
+                        top_bar_flag: 0,
+                        auto_expand: false,
+                        show_face: 1,
+                        async: 0,
+                        photo_flag: false,
+                        partnerid: ajaxUserInfo.userId,
+                        face: ajaxUserInfo.headImage
+                    })
+                    console.log('获取未读消息')
+                    zc("offline_message_count",function(res){
+                        console.log(res, 'offline_message_count')
+                        if (res && res.size && res.size > 0) {
+                            var omc = res.size > 99 ? '99+' : res.size
+                            $(".noread_red").text(omc).show()
+                        } else {
+                            $(".noread_red").hide()
+                        }
+                    })
+                })
+            } catch (e) {
+                console.log('error: ',e)
+            }
+        }
+        getOfflineMessageCount()
+    </script>
+
+</body>
+
+</html>

+ 557 - 0
src/jfw/modules/app/src/web/templates/frontRouter/enptc/free/write_infor.html

@@ -0,0 +1,557 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+    <head>
+        <meta charset="UTF-8">
+        <meta name="viewport"
+            content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <meta name="apple-mobile-web-app-status-bar-style" content="black">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        <title>结构化招标数据</title>
+        <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
+        <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+        <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/rem.js?v={{Msg "seo" "version"}}"></script>
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/weui.min.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/write_infor.css?v={{Msg "seo" "version"}}5">
+        <style>
+          .jy-app-header .subreport_title{
+            font-size:17px;
+          }
+        </style>
+    </head>
+<body>
+<div class="app-layout-header jy-app-header">
+	<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+  <span class="subreport_title">深入了解</span>
+</div>
+<div class="app-layout-content-b">
+    <div id="writeInfo">
+<!--        <div class="j-header jy-app-header">
+            <i class="header-left iconfont icon-fanhui" style="font-size:19.5px;" onclick="fanhui()"></i>
+            <span class="header-title">结构化招标数据</span>
+            <span class="header-right"></span>
+        </div>-->
+        <div class="weui-tab" id="tab">
+            <div class="weui-navbar">
+                <div class="weui-navbar__item">免费样例
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+                <div class="weui-navbar__item">联系客服
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+                <div class="weui-navbar__item">自选购买
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+            </div>
+            <div class="weui-tab__panel">
+                <div class="weui-tab__content infoMain mf">
+                    <div class="info_tip">
+                        <p class="tip_text">
+                            请正确填写以下信息,我们将以邮件的形式免费发送一份结构化招标数据至您填写的邮箱内,请注意查收。
+                        </p>
+                    </div>
+                    <div class="write_input">
+                        <div class="write_con">
+                            <div class="write_name">
+                                <div class="write_name_ipt">
+                                    <span class="label_name">联系人</span>
+                                    <input class="ipt_name" type="text" placeholder="输入联系人姓名">
+                                </div>
+                                <div class="name_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        请输入正确联系人
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="write_phone">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">手机号</span>
+                                    <input class="ipt_phone" type="text" maxlength="11" placeholder="输入手机号" value="{{.T.phone_num}}">
+                                </div>
+                                <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        手机号格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="write_email">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">邮箱地址</span>
+                                    <input class="ipt_email" type="text" placeholder="输入邮箱地址" value="{{.T.s_myemail}}">
+                                    <span class="correct-icon"></span>
+                                </div>
+                                <div class="email_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        邮箱格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="email_code">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">邮箱验证码</span>
+                                    <input class="ipt_code" type="text" placeholder="输入邮箱验证码">
+                                    <span class="sendEmail" id="sendEmail">发送验证码</span>
+                                    <span class="timedown"></span>
+                                </div>
+                                <!-- <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        验证码错误
+                                    </p>
+                                </div> -->
+                            </div>
+                        </div>
+                    </div>
+                    <div class="free_button" id="free_button">
+                        <button class="write_free" id="write_free" disabled>确定</button>
+                    </div>
+                </div>
+                <div class="weui-tab__content infoMain kf">
+                    <div class="info_tip">
+                        <p class="tip_text">
+                            请正确填写手机号,客服人员将会在3个工作日内与您联系,针对结构化招标数据进行详细讲解。
+                        </p>
+                    </div>
+                    <div class="write_input">
+                        <div class="write_con">
+                            <div class="write_name">
+                                <div class="write_name_ipt">
+                                    <span class="label_name">联系人</span>
+                                    <input class="ipt_name" type="text" placeholder="输入联系人姓名">
+                                </div>
+                                <div class="kf_name_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        请输入正确联系人
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="write_phone">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">手机号</span>
+                                    <input class="ipt_phone" type="text" maxlength="11" placeholder="输入手机号" value="{{.T.phone_num}}">
+                                </div>
+                                <div class="kf_phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        手机号格式错误
+                                    </p>
+                                </div>
+                            </div>
+
+                        </div>
+                    </div>
+                    <div class="run_button" id="run_button">
+                        <button class="write_run" id="write_run" disabled>确定</button>
+                    </div>
+                </div>
+                <div class="weui-tab__content purchase">
+                    <div class="option_purchase">
+                        您可通过剑鱼标讯所提供的全国招投标数据的自助导出功能,根据自身企业,自定义设定关键词、发布时间、地区或行业等筛选条件,以“高级字段包”为选择,少量购买,用于核对数据的精准性。
+                    </div>
+                    <div class="run_now_button" id="run_now_button">
+                        <button class="write_run_now" id="write_run_now">立即前往</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+<script src="/jyapp/structuredata/js/jquery.min.js"></script>
+<script src="/jyapp/structuredata/js/weui.min.js"></script>
+{{include "/common/js.html"}}
+<script>
+var issubmit = ["false","false"]
+var isfreesubmit = ["false","false","false","false"]
+
+$(function(){
+  if ({{.T.s_myemail}}!=""&&{{.T.s_myemail}}!=null){
+      $('.email_code').slideUp();
+      isfreesubmit[2] = 'true';
+      isfreesubmit[3] = 'true';
+      $('.mf .ipt_email').val({{.T.s_myemail}})
+      $('.correct-icon').show()
+      freesubmit();
+  }else{
+    $('.mf .ipt_email').val('')
+  }
+
+  //   每次进页面都要清空之前的信息
+  $('.mf .ipt_name').val('')
+  $('.mf .ipt_phone').val('')
+  $('.mf .ipt_code').val('')
+  $('.kf .ipt_name').val('')
+  $('.kf .ipt_phone').val('')
+
+
+  $(".write_run_now").on("click",function(){
+    window.location.href="/jyapp/front/dataExport/toSieve?from=structed"
+  })
+  // tabbar
+  weui.tab('#tab',{
+      defaultIndex: 0,
+      onChange: function(index){
+          //console.log(index);
+      }
+  });
+  // 姓名输入事件
+  $('.mf .ipt_name').on('blur', function() {
+      var namerule =  isname(this.value)
+      var myreg=/^\s*$/g;
+      if(namerule){
+        $('.name_tips').hide()
+          isfreesubmit[0] = 'true'
+      }else{
+        if(myreg.test(this.value)){
+            $('.name_tips').hide()
+            isfreesubmit[0] = 'false'
+        }else{
+            $('.name_tips').css('display','flex')
+            isfreesubmit[0] = 'false'
+        }
+      }
+      freesubmit()
+  })
+
+  // 手机号输入事件
+  $('.mf .ipt_phone').on('blur', function() {
+      var phonerule = isPoneAvailable(this.value)
+      var myreg=/^\s*$/g;
+      if(phonerule){
+          $('.phone_tips').hide()
+          isfreesubmit[1] = 'true'
+      }else{
+        if(myreg.test(this.value)){
+            $('.phone_tips').hide()
+            isfreesubmit[1] = 'false'
+        } else {
+            $('.phone_tips').css('display','flex')
+            isfreesubmit[1] = 'false'
+        }
+      }
+      freesubmit()
+  })
+
+  // 邮箱输入事件
+  $('.mf .ipt_email').on('input', function() {
+      var emailrule = isAvailableEmail(this.value)
+      if(emailrule){
+          if (this.value=={{.T.s_myemail}}){
+            $('.correct-icon').show()
+            $('.email_code').slideUp()
+            isfreesubmit[3] = 'true'
+          }else{
+            $.ajax({
+              url:'/jyapp/structed/verifyEmail',
+              type:'POST',
+              data:{
+                  email:this.value,
+              },
+              success:function(res) {
+                  if(res.status == true) {
+                      isfreesubmit[3] = 'true'
+                      $('.email_code').slideUp();
+                      $('.correct-icon').show()
+                  }else{
+                      $('.email_code').slideDown()
+                      isfreesubmit[3] = 'false'
+                      $('.correct-icon').hide()
+                  }
+                  freesubmit()
+              },
+              error:function(err) {
+                  console.log(err)
+
+              }
+            })
+          }
+          $('.email_tips').hide()
+          isfreesubmit[2] = 'true'
+      }else{
+        $('.correct-icon').hide()
+        var myreg=/^\s*$/g;
+        if(myreg.test(this.value)){
+          $('.email_tips').hide()
+        } else {
+          $('.email_tips').css('display','flex')
+          isfreesubmit[2] = 'false'
+          $('.email_code').slideUp()
+        }
+      }
+      freesubmit()
+  })
+
+  // 邮箱验证码输入事件
+  $('.mf .ipt_code').on('input',function() {
+      // console.log($(this).val().length)
+      var codeLen = $(this).val()
+      var iptEmail = $('.ipt_email').val()
+      if(codeLen.length == 6){
+          $.ajax({
+              url:'/jyapp/structed/verifyCode',
+              type:'POST',
+              data:{
+                  s_email:iptEmail,
+                  verifyCode:codeLen
+              },
+              success:function(res) {
+                  if(res.status == true) {
+                      isfreesubmit[3] = 'true'
+                      $('.ipt_email').attr('disabled','disabled')
+                      $('.email_code').slideUp()
+                      $('.correct-icon').show()
+                  }else{
+                      $('.correct-icon').hide()
+                      $('.weui-icon_toast').hide()
+                      isfreesubmit[3] = 'false'
+                      weui.toast('验证码错误', 1500);
+                  }
+                  freesubmit()
+              },
+              error:function(err) {
+                  console.log(err)
+
+              }
+          })
+      }
+  })
+
+  // 免费样例--确定
+  $('.free_button').on('click', function() {
+      var iptname = $('.mf .ipt_name').val()
+      var iptphone = $('.mf .ipt_phone').val()
+      var iptemail = $('.mf .ipt_email').val()
+      $.ajax({
+          url:'/jyapp/structed/freeSamples',
+          type:'POST',
+          data:{
+              name:iptname,
+              phone_num:iptphone,
+              s_email:iptemail
+          },
+          success:function(res){
+              if(res.status == true) {
+                window.location.replace("/jyapp/structed/success")
+              }else{
+                //   weui.toast('保存失败', 1500);
+              }
+          },
+          error:function(err){
+            //   weui.toast('保存失败', 1500);
+          }
+      })
+  })
+
+  // 姓名输入事件
+  $('.kf .ipt_name').on('blur', function() {
+      var namerule =  isname(this.value)
+      var myreg=/^\s*$/g;
+      if(namerule){
+        $('.kf_name_tips').hide()
+          issubmit[0] = "true"
+      }else{
+        if(myreg.test(this.value)){
+            $('.kf_name_tips').hide()
+            issubmit[0] = "false"
+        }else{
+            $('.kf_name_tips').css('display','flex')
+            issubmit[0] = "false"
+        }
+      }
+      submit()
+  })
+
+  // 手机号输入事件
+  $('.kf .ipt_phone').on('blur', function() {
+      var phonerule = isPoneAvailable(this.value)
+      var myreg=/^\s*$/g;
+      if(phonerule){
+          $('.kf_phone_tips').hide()
+          issubmit[1] = "true"
+      }else{
+        if(myreg.test(this.value)){
+            $('.kf_phone_tips').hide()
+            issubmit[1] = "false"
+        } else {
+            $('.kf_phone_tips').css('display','flex')
+            issubmit[1] = "false"
+        }
+      }
+      submit()
+  })
+  // 立即提交
+  $('.run_button').on('click', function() {
+      var sub_name = $('.kf .ipt_name').val()
+      var sub_phone = $('.kf .ipt_phone').val()
+      $.ajax({
+          url:'/jyapp/structed/savedata',
+          type:'POST',
+          data:{
+              name:sub_name,
+              phone_num:sub_phone
+          },
+          success:function(res) {
+              if(res.error_code == 0){
+                window.location.replace("/jyapp/structed/success")
+              }else{
+                // weui.toast(res.data["msg"], {
+                //     duration: 1500
+                // });
+              }
+          }
+      })
+  })
+  // 点击发送验证码
+  $('.sendEmail').on('click', function() {
+      // 先判断邮箱格式
+      var iptemail = $('.ipt_email').val()
+      var emailrule = isAvailableEmail(iptemail)
+      if(emailrule){
+          $('.email_tips').hide()
+        //   $('.timedown').show()
+          $.ajax({
+              url:'/jyapp/structed/sendMailVerify',
+              type:'POST',
+              data:{
+                  email:iptemail
+              },
+              success:function(res){
+                  isfreesubmit[3] = 'false';
+                //   res.errCode = 5
+                  if(res.errCode == 1){
+                    //   weui.toast('邮箱格式不正确', {
+                    //       duration: 1500,
+                    //       className: 'toast-lang',
+                    //   });
+                    $('.correct-icon').hide()
+                  }else if(res.errCode == 2) {
+                    //   weui.toast('已发送,5分钟后再尝试', {
+                    //       duration: 1500,
+                    //       className: 'toast-lang'
+                    //   });
+                    countdown()
+                    $('.correct-icon').hide()
+                  }else if(res.errCode == 3) {
+                    //   weui.toast('验证码发送次数已达今日上限', {
+                    //       duration: 1500,
+                    //       className: 'toast-lang',
+                    //   });
+                    countdown()
+                    $('.correct-icon').hide()
+                  }else if(res.errCode == 4) {
+                    $('.email_code').slideUp();
+                    isfreesubmit[3] = 'true';
+                    freesubmit();
+                    $('.correct-icon').show()
+                  }else if(res.errCode == 5) {
+                    countdown()
+                  }else{
+                      $('.sendEmail').hide()
+                  }
+
+              }
+          })
+      }else{
+          $('.email_tips').show()
+      }
+
+  })
+
+    //获取用户手机号
+    var bindPhone = sessionStorage.getItem('bind-phone') || ''
+    if (bindPhone.length === 11) {
+        $("input.ipt_phone").val(bindPhone).trigger('blur');
+    }
+})
+
+// 倒计时
+function countdown() {
+    $('.sendEmail').hide()
+    setTimeout(() => {
+        $('.timedown').show()
+    }, 100);
+    var time=300;
+    setTime=setInterval(function(){
+        if(time<=0){
+            $('.timedown').hide()
+            $('.sendEmail').show()
+            time=299
+            clearInterval(setTime);
+            return;
+        }
+        time--;
+        $(".timedown").text(time+'s');
+    },1000);
+}
+
+
+// 验证手机号格式
+function isPoneAvailable($poneInput) {
+    var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
+    if (!myreg.test($poneInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+// 联系人必须是两个汉字以上
+function isname($nameInput) {
+    // var myreg=/^\s*$/g;
+    var tworeg = /^[\u4E00-\u9FA5]{2,}$/;
+    if (!tworeg.test($nameInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+
+// 验证邮箱格式
+function isAvailableEmail($emailInput) {
+    var myreg = /^([A-Za-z0-9_\-\.\u4e00-\u9fa5])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,8})$/;
+    if(!myreg.test($emailInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// 判断提交按钮是否可以点击
+function submit() {
+    if(issubmit.includes('false')) {
+        $('.write_run').attr('disabled',true)
+    } else {
+        $('.write_run').attr('disabled',false)
+    }
+}
+
+// 判断免费样例的按钮是否可以点击
+function freesubmit() {
+    if(isfreesubmit.includes('false')) {
+        $('.write_free').attr('disabled',true)
+    } else {
+        $('.write_free').attr('disabled',false)
+    }
+}
+
+    // 返回
+    function fanhui() {
+        history.go(-1)
+    }
+</script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+</html>

+ 50 - 0
src/jfw/modules/app/src/web/templates/frontRouter/enptc/free/write_result.html

@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+    <head>
+        <meta charset="UTF-8">
+        <meta name="viewport"
+            content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <meta name="apple-mobile-web-app-status-bar-style" content="black">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        <title>深入了解</title>
+        <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/rem.js?v={{Msg "seo" "version"}}"></script>
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/write_result.css?v={{Msg "seo" "version"}}">
+    </head>
+<body>
+    <div id="writeresult">
+        <div class="j-header jy-app-header">
+            <i class="header-left iconfont icon-fanhui" style="font-size:0.36rem" onclick="fanhui()"></i>
+            <span class="header-title">深入了解</span>
+            <span class="header-right"></span>
+        </div>
+        <div class="result_view">
+            <div class="result_main">
+                <div class="tip_img">
+                    <img src="/jyapp/structuredata/image/choose.png" alt="">
+                </div>
+                <p class="submit_success">
+                    提交成功
+                </p>
+                <p class="submint_mob">工作人员会尽快和您联系。</p>
+            </div>
+        </div>
+        <div class="j-footer" id="j-footer">
+            <button class="j-button" onclick="back_to_index()">确 定</button>
+        </div>
+    </div>
+</body>
+<script>
+   function back_to_index(){
+    //    window.location.href = "/jyapp/jylab/mainSearch"
+       history.go(-1)
+   }
+
+   function fanhui() {
+       history.back(-1)
+   }
+</script>
+</html>

+ 166 - 0
src/jfw/modules/app/src/web/templates/frontRouter/partner/free/index.html

@@ -0,0 +1,166 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport"
+		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+	<meta name="apple-mobile-web-app-capable" content="yes">
+	<meta name="format-detection" content="telephone=yes"/>
+	<meta name="apple-mobile-web-app-status-bar-style" content="black">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<title>产品销售合作</title>
+	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
+  <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+  <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+  <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/weui.min.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/css/partner.css?v={{Msg "seo" "version"}}">
+  <style>
+    .app-layout-header{
+      border-bottom: 0px!important;
+    }
+    .header-transparent>.app-back{
+      color:#fff !important;
+    }
+    .jy-app-header .subreport_title{
+      font-size: .36rem;
+    }
+  </style>
+</head>
+
+<body>
+<div class="app-layout-header jy-app-header header-transparent">
+	<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+  <span class="subreport_title">产品销售合作</span>
+</div>
+<div class="app-layout-content-b">
+	<div id="app">
+		<div class="j-main partner-main">
+			<div class="structured_top">
+				<div class="str_title">
+					<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/A_02.jpg' alt="">
+				</div>
+			</div>
+			<div class="str_what question" style="width:100%">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/A_03.jpg' alt="">
+			</div>
+
+			<div class="advantage" style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/A_04.jpg' alt="">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/A_05.jpg' onclick="location.href = '/jyapp/frontPage/bigmember/free/perfect_info_partner?source=partner_recruit_page'" alt="">
+			</div>
+			<div class="dowhat">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/B_01.jpg' alt="">
+			</div>
+			<div class="module buy-discount">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/B_02.jpg' alt="">
+			</div>
+			<div>
+        <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/B_03.jpg' alt="">
+        <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/B_04.jpg' alt="">
+        <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/B_05.jpg' alt="">
+			</div>
+		</div>
+		<div class="j-button-group">
+			<button dataHref="/jyapp/frontPage/bigmember/free/perfect_info_partner?source=partner_recruit_page"  class="j-button-confirm" id="j_confirm">申请加入</button>
+		</div>
+	</div>
+</div>
+</body>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/jquery.min.js'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/weui.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/imageViewer.min.js'></script>
+{{include "/common/js.html"}}
+<script>
+  var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
+  //申请加入
+  $("#j_confirm").on('click',function(){
+    if(loginFlag){
+      window.location.href=$(this).attr('dataHref')
+    }else{
+      window.location.href= "/jyapp/free/login?url="+$(this).attr('dataHref')
+    }
+  })
+	// 监听页面滚动
+	var addEvent = (function(){
+		if(window.addEventListener){
+			return function(elm, type, handle){
+			elm.addEventListener(type, handle, false);
+		}
+		}
+		if(window.attachEvent){
+			return function(elm, type, handle){
+				elm.attachEvent('on' + type, handle);
+			}
+		}
+	})();
+
+	var div = document.querySelector('.j-main');
+	addEvent(div,'scroll', function(){
+		var scrollHeight = div.scrollHeight;
+		var scrollTop    = div.scrollTop;
+		var height       = div.offsetHeight;
+		if(scrollTop>=80) {
+			$('.jy-app-header').removeClass('header-transparent')
+		}else {
+			$('.jy-app-header').addClass('header-transparent')
+		}
+	});
+
+	// 图片预览,支持缩放
+	var imageViewer = '';
+	function initImageViewer(images) {
+		function getElement(index) {
+			return document.getElementById('img' + (index + 1));
+		}
+		imageViewer = new ImageViewer(images, {
+			container: 'body',
+			enableScale: true,
+			enableTapClose: true,
+			duration: 0,
+			startIndex: 0,
+			fadeInFn: getElement,
+			fadeOutFn: getElement,
+		});
+	}
+	var images = [
+		{
+			url: '/jyapp/structuredata/image/jiegouhuahou.png',
+		},
+	];
+	initImageViewer(images)
+	// 点击图片预览
+	$('.sketch_map').on('click', function() {
+		imageViewer.open(0)
+		var ball = '<div class="ball-clip-rotate"><div class="ball"></div></div>';
+		$('.image-viewer .image-body').append(ball);
+			// 在页面上创建dom后对图片是否加载完成进行监听
+			$(imageViewer.itemList[1]).find('img').on('load', function () {
+			$('.image-viewer .image-body > .ball-clip-rotate').remove();
+			console.log('image loaded');
+		})
+	})
+
+	$('.fanhui').on('click', function() {
+		history.go(-1)
+	})
+	function click_view(){
+		var loading = weui.loading('loading', {
+			className: 'custom-classname'
+		});
+		setTimeout(function () {
+			loading.hide(function() {
+				window.location.href="/jyapp/structed/getpreview"
+			});
+		});
+	}
+  //拨打电话
+  function tel(phone){
+    JyObj.callPhone(phone);
+  }
+</script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+</html>

+ 174 - 0
src/jfw/modules/app/src/web/templates/frontRouter/partner/free/partner.html

@@ -0,0 +1,174 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport"
+		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+	<meta name="apple-mobile-web-app-capable" content="yes">
+	<meta name="format-detection" content="telephone=yes"/>
+	<meta name="apple-mobile-web-app-status-bar-style" content="black">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<title>渠道合伙人招募计划限时启动</title>
+	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
+  <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+  <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+  <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/weui.min.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/css/partner.css?v={{Msg "seo" "version"}}">
+  <style>
+    .app-layout-header{
+      border-bottom: 0px!important;
+    }
+    .header-transparent>.app-back{
+      color:#fff !important;
+    }
+    .jy-app-header .subreport_title{
+		display: block;
+  		font-size: .36rem;
+		width: max-content;
+		margin-bottom: 0.15rem;
+  		/* width: 100%; */
+    }
+
+	#app .j-button-group{
+		padding: 0;
+		background: rgba(0, 0, 0, 0);
+		height: 3rem;
+		position: fixed;
+		bottom: 0;
+	}
+	.j-button-group > img{
+		width: 8rem;
+		height: 3rem;
+	}
+  </style>
+</head>
+<body>
+<div class="app-layout-header jy-app-header header-transparent app-header-partner">
+	<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+  <span class="subreport_title">渠道合伙人招募计划限时启动</span>
+</div>
+<div class="app-layout-content-b">
+	<div id="app">
+		<div class="j-main partner-main">
+			
+			<div class="structured_top">
+				<div class="str_title">
+					<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_02.jpg' alt="">
+				</div>
+			</div>
+			<div class="str_what question" style="width:100%">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_03.jpg' alt="">
+			</div>
+
+			<div class="advantage" style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_04.jpg' alt="">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_05.jpg' alt="">
+			</div>
+			<div class="dowhat">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_06.jpg' alt="">
+			</div>
+			<div class="module buy-discount">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_07.jpg' alt="">
+			</div>
+		</div>
+		<div class="j-button-group">
+			<img id="app-partner" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/partner/image/C_button.png' alt="">
+		</div>
+	</div>
+</div>
+</body>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/jquery.min.js'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/weui.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/imageViewer.min.js'></script>
+{{include "/common/js.html"}}
+<script>
+	$('#app-partner').on('click', function() {
+		location.href = "/jyapp/frontPage/bigmember/free/perfect_info_partner?source=channelPartner&header="+encodeURIComponent('渠道合伙人招募计划限时启动');
+	})
+	// 监听页面滚动
+	var addEvent = (function(){
+		if(window.addEventListener){
+			return function(elm, type, handle){
+			elm.addEventListener(type, handle, false);
+		}
+		}
+		if(window.attachEvent){
+			return function(elm, type, handle){
+				elm.attachEvent('on' + type, handle);
+			}
+		}
+	})();
+
+	var div = document.querySelector('.j-main');
+	addEvent(div,'scroll', function(){
+		var scrollHeight = div.scrollHeight;
+		var scrollTop    = div.scrollTop;
+		var height       = div.offsetHeight;
+		if(scrollTop>=80) {
+			$('.jy-app-header').removeClass('header-transparent')
+			$('.jy-app-header').removeClass('app-header-partner')
+		}else {
+			$('.jy-app-header').addClass('app-header-partner')
+			$('.jy-app-header').addClass('header-transparent')
+			
+		}
+	});
+
+	// 图片预览,支持缩放
+	var imageViewer = '';
+	function initImageViewer(images) {
+		function getElement(index) {
+			return document.getElementById('img' + (index + 1));
+		}
+		imageViewer = new ImageViewer(images, {
+			container: 'body',
+			enableScale: true,
+			enableTapClose: true,
+			duration: 0,
+			startIndex: 0,
+			fadeInFn: getElement,
+			fadeOutFn: getElement,
+		});
+	}
+	var images = [
+		{
+			url: '/jyapp/structuredata/image/jiegouhuahou.png',
+		},
+	];
+	initImageViewer(images)
+	// 点击图片预览
+	$('.sketch_map').on('click', function() {
+		imageViewer.open(0)
+		var ball = '<div class="ball-clip-rotate"><div class="ball"></div></div>';
+		$('.image-viewer .image-body').append(ball);
+			// 在页面上创建dom后对图片是否加载完成进行监听
+			$(imageViewer.itemList[1]).find('img').on('load', function () {
+			$('.image-viewer .image-body > .ball-clip-rotate').remove();
+			console.log('image loaded');
+		})
+	})
+
+	$('.fanhui').on('click', function() {
+		history.go(-1)
+	})
+	function click_view(){
+		var loading = weui.loading('loading', {
+			className: 'custom-classname'
+		});
+		setTimeout(function () {
+			loading.hide(function() {
+				window.location.href="/jyapp/structed/getpreview"
+			});
+		});
+	}
+  //拨打电话
+  function tel(phone){
+    JyObj.callPhone(phone);
+  }
+</script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+</html>

+ 179 - 0
src/jfw/modules/app/src/web/templates/frontRouter/solution/free/index.html

@@ -0,0 +1,179 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+	<meta charset="UTF-8">
+	<meta name="viewport"
+		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+	<meta name="apple-mobile-web-app-capable" content="yes">
+	<meta name="format-detection" content="telephone=yes"/>
+	<meta name="apple-mobile-web-app-status-bar-style" content="black">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<title>电信行业解决方案</title>
+	<link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/layout.css" />
+  <link href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/css/solution.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+  <style>
+    .app-layout-header{
+      border-bottom: 0px!important;
+    }
+    .header-transparent>.app-back{
+      color:#fff !important;
+    }
+    .jy-app-header .subreport_title{
+      font-size: .36rem;
+    }
+    .jy-app-header.header-transparent {
+      position: absolute;
+      width: 100%;
+      background: url('{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/A_01.jpg') no-repeat;
+      background-size: 100% 100%;
+      z-index: 999;
+    }
+  </style>
+</head>
+
+<body>
+<div class="app-layout-header jy-app-header header-transparent">
+	<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+  <span class="subreport_title">电信行业解决方案</span>
+</div>
+<div class="app-layout-content-b">
+	<div id="app">
+		<!-- 头部 -->
+<!--		<header class="jy-app-header header-transparent">
+			<div class="iconfont icon-fanhui fanhui"></div>
+			<div class="subreport_title">结构化招标数据</div>
+		</header>-->
+		<div class="j-main">
+			<div class="structured_top">
+				<div class="str_title">
+					<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/A_02.jpg' alt="">
+				</div>
+			</div>
+			<div class="str_what question" style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/A_03.jpg' alt="">
+			</div>
+
+			<!-- 结构化数据有什么特点 -->
+			<div class="advantage" id="advantage" style="margin-top: -1px;">
+				<van-image-preview v-model="show" :images="images">
+        </van-image-preview>
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/A_04.jpg' @click="imageView"  alt="">
+			</div>
+
+			<!-- 结构化招标数据能干什么 -->
+			<div class="dowhat" style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/A_05.jpg' alt="">
+			</div>
+			<!-- 优惠信息 -->
+			<div class="module buy-discount" style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/B_01.jpg' alt="">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/B_02.jpg' alt="" style="margin-top: -1px;">
+			</div>
+			<!-- 核心优势 -->
+			<div style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/B_03.jpg' alt="">
+			</div>
+			<!-- 已使用结构化招标数据的部分企业 -->
+			<div class="company">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/B_04.jpg' alt="">
+				
+			</div>
+			<!-- 更多定制化数据服务 -->
+			<div style="margin-top: -1px;">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/B_05.jpg' alt="">
+				<img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/solution/image/B_06.jpg' style="height: 50px;width: 100%;margin-top: -1px;" alt="">
+			</div>
+		</div>
+		<div class="j-button-group">
+			<a dataHref="/jyapp/frontPage/bigmember/free/perfect_info_solution?source=telecom_solution" class="j-button-cancel" id="j_cancel">
+				<!-- <span class="phone_icon"></span> -->
+				<span>了解详情</span>
+			</a>
+			<button dataHref="/jyapp/free/customer"  class="j-button-confirm" id="j_confirm">
+				<span class="icon_phone"></span>
+				<span>立即咨询</span>
+			</button>
+		</div>
+	</div>
+</div>
+</body>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/jquery.min.js'></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+{{include "/common/js.html"}}
+<script>
+	var vmSol = new Vue({
+    el: '#advantage',
+    data: {
+      show: false,
+      index: 0,
+      images: [
+        '/common-module/solution/image/viewImg.png'
+      ],
+    },
+    methods: {
+      imageView: function(index) {
+        this.show = true
+      }
+    }
+  })
+	// 监听页面滚动
+	var addEvent = (function(){
+		if(window.addEventListener){
+			return function(elm, type, handle){
+			elm.addEventListener(type, handle, false);
+		}
+		}
+		if(window.attachEvent){
+			return function(elm, type, handle){
+				elm.attachEvent('on' + type, handle);
+			}
+		}
+	})();
+
+	var div = document.querySelector('.j-main');
+	addEvent(div,'scroll', function(){
+		var scrollHeight = div.scrollHeight;
+		var scrollTop    = div.scrollTop;
+		var height       = div.offsetHeight;
+		if(scrollTop>=80) {
+			$('.jy-app-header').removeClass('header-transparent')
+		}else {
+			$('.jy-app-header').addClass('header-transparent')
+		}
+	});
+
+  var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
+  //咨询客服
+  $("#j_cancel").on('click',function(){
+    if(loginFlag){
+      window.location.href=$(this).attr('dataHref')
+    }else{
+      window.location.href= "/jyapp/free/login?url="+$(this).attr('dataHref')
+    }
+  })
+  //获取样例
+  $("#j_confirm").on('click',function(){
+     if(loginFlag){
+      window.location.href=$(this).attr('dataHref')
+    }else{
+      window.location.href= "/jyapp/free/login?url="+$(this).attr('dataHref')
+    }
+  })
+
+	$('.fanhui').on('click', function() {
+		history.go(-1)
+	})
+  //拨打电话
+  function tel(phone){
+    JyObj.callPhone(phone);
+  }
+</script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+</html>

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

@@ -145,8 +145,22 @@
 		var left_1 = (bodyWidth/2-24) / 2;
 		var left_2 = (bodyWidth/2-24) / 2 + bodyWidth / 2;
 		var isIos = mySysIsIos();
-    	var disWord = getParam("disWord");
+    var disWord = getParam("disWord");
+    function checkHideBottomTab () {
+      try {
+        console.warn('尝试隐藏底部导航栏')
+        var nowActiveIndex = JyObj.getCurrentTab()
+        console.warn('当前底部导航栏', nowActiveIndex)
+        var canHidden = nowActiveIndex > 1 && location.href.indexOf('/jyapp/free/login') !== -1
+        console.warn('是否需要隐藏', canHidden)
+        if (canHidden) {
+          JyObj.hiddenBottom(0)
+        }
+      } catch (e) {}
+    }
+    setInterval(checkHideBottomTab, 300)
 		$(function(){
+      sessionStorage.removeItem('$data-historypush') //订阅设置页面缓存
 			try {
 				JyObj.sendMsgCount(0)
 			} catch (err) {}
@@ -466,6 +480,7 @@
 			try{
 				//清空通知栏消息
 				JyObj.clearPushMessage("");
+				JyObj.hiddenBottom(0);
 			}catch(e){}
 			try{
 				//是否安装了微信

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

@@ -96,13 +96,13 @@
     </div>
 
     <script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js"></script>
+    <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/jquery.cookie.js"></script>
     <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/weui.min.js"></script>
     <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/fastclick.min.js"></script>
     <!-- 预加载 -->
     <link rel="preload" as="script" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/local/rem.js'></link>
     <link rel="preload" as="script" href=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js />
     <link rel="preload" as="script" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js />
-    <link rel="preload" as="script" href=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js />
     {{include "/common/js.html"}}
     <script>
         var settings = {

+ 21 - 21
src/jfw/modules/app/src/web/templates/staticpage/permission_rules.html

@@ -73,41 +73,41 @@
                 <div class="col-md-12">
                     <h3 class="title">剑鱼标讯用户使用许可协议</h3>
                     <p style="text-indent: 20px;">
-                        欢迎使用北京拓普丰联信息工程有限公司(以下简称“北京拓普”)为您提供的剑鱼标讯服务。请您(下列简称“用户”)仔细阅读以下全部内容。未成年人则应在法定监护人陪同下阅读。如用户使用剑鱼标讯服务,即表示用户与北京拓普已达成协议,自愿接受本服务条款所有内容。此后,用户不得以未阅读本服务条款内容作任何形式的抗辩。
+                        欢迎使用北京剑鱼信息技术有限公司(以下简称“北京剑鱼”)为您提供的剑鱼标讯服务。请您(下列简称“用户”)仔细阅读以下全部内容。未成年人则应在法定监护人陪同下阅读。如用户使用剑鱼标讯服务,即表示用户与北京剑鱼已达成协议,自愿接受本服务条款所有内容。此后,用户不得以未阅读本服务条款内容作任何形式的抗辩。
                     </p>
                     <br>
                     <p style="font-size: 18px;">1. 服务条款的确认和接纳</p>
                     <p style="text-indent: 20px;">
-                        本条款是用户与北京拓普之间关于用户使用剑鱼标讯或服务的条款,内容包括条款正文、北京拓普已经发布的或将来可能发布的各类规则。所有规则为本条款不可分割的组成部分,与条款正文具有同等法律效力。除另行明确声明外,用户使用剑鱼标讯或服务的行为将受本条款约束。
+                        本条款是用户与北京剑鱼之间关于用户使用剑鱼标讯或服务的条款,内容包括条款正文、北京剑鱼已经发布的或将来可能发布的各类规则。所有规则为本条款不可分割的组成部分,与条款正文具有同等法律效力。除另行明确声明外,用户使用剑鱼标讯或服务的行为将受本条款约束。
                     </p>
                     <br>
                     <p style="font-size: 18px;">2. 剑鱼标讯简介</p>
-                    <p style="text-indent: 20px;">本服务条款所称的“剑鱼标讯”是指北京拓普所有和经营的招投标信息服务平台。</p>
+                    <p style="text-indent: 20px;">本服务条款所称的“剑鱼标讯”是指北京剑鱼所有和经营的招投标信息服务平台。</p>
                     <p style="text-indent: 20px;">
-                        用户登录账号可以是用户本人的手机号、微信账号或剑鱼标讯增加的其他可登录账号。用户应维持密码及账号的机密安全,如果用户未保管好自己的账号和密码而对用户、北京拓普或第三方造成损害,用户将负全部责任。用户同意若发现任何非法使用用户账号或安全漏洞的情况,有义务立即通告北京拓普
+                        用户登录账号可以是用户本人的手机号、微信账号或剑鱼标讯增加的其他可登录账号。用户应维持密码及账号的机密安全,如果用户未保管好自己的账号和密码而对用户、北京剑鱼或第三方造成损害,用户将负全部责任。用户同意若发现任何非法使用用户账号或安全漏洞的情况,有义务立即通告北京剑鱼
                     </p>
                     <br>
                     <p style="font-size: 18px;">3. 服务条款的修改</p>
                     <p style="text-indent: 20px;">
-                        北京拓普有权在必要时通过在剑鱼标讯客户端软件内或网页上发出公告等合理方式修改本条款。用户在使用剑鱼标讯服务时,应当及时查阅了解修改的内容,并自觉遵守本服务条款的相关内容。用户如继续使用剑鱼标讯服务,则视为对修改内容的同意,当发生有关争议时,以最新的服务条款为准;用户在不同意修改内容的情况下,有权停止使用本服务条款涉及的服务。
+                        北京剑鱼有权在必要时通过在剑鱼标讯客户端软件内或网页上发出公告等合理方式修改本条款。用户在使用剑鱼标讯服务时,应当及时查阅了解修改的内容,并自觉遵守本服务条款的相关内容。用户如继续使用剑鱼标讯服务,则视为对修改内容的同意,当发生有关争议时,以最新的服务条款为准;用户在不同意修改内容的情况下,有权停止使用本服务条款涉及的服务。
                     </p>
                     <br>
                     <p style="font-size: 18px;">4. 服务的变更或中止</p>
                     <p style="text-indent: 20px;">
-                        北京拓普始终在不断变更和改进服务。北京拓普可能会增加或删除剑鱼标讯的部分服务,也可能暂停或彻底停止本项服务。用户同意北京拓普有权行使上述权利且不需对用户或第三方承担任何责任。</p>
+                        北京剑鱼始终在不断变更和改进服务。北京剑鱼可能会增加或删除剑鱼标讯的部分服务,也可能暂停或彻底停止本项服务。用户同意北京剑鱼有权行使上述权利且不需对用户或第三方承担任何责任。</p>
                     <br>
                     <p style="font-size: 18px;">5. 不担保及不可抗力条款</p>
                     <p style="text-indent: 20px;">
-                        北京拓普会尽最大努力完善和提升剑鱼标讯服务,并按“现有”的状态向用户提供本服务,北京拓普不提供任何类型的担保,不论是明确的或隐含的。例如:北京拓普不担保本服务一定能满足用户的要求,服务不会中断,服务的及时性、安全性、真实性,服务不会发生出错等,但北京拓普将尽力减少因此给用户造成的损失和影响。
+                        北京剑鱼会尽最大努力完善和提升剑鱼标讯服务,并按“现有”的状态向用户提供本服务,北京剑鱼不提供任何类型的担保,不论是明确的或隐含的。例如:北京剑鱼不担保本服务一定能满足用户的要求,服务不会中断,服务的及时性、安全性、真实性,服务不会发生出错等,但北京剑鱼将尽力减少因此给用户造成的损失和影响。
                     </p>
                     <p style="text-indent: 20px;">
-                        北京拓普对用户经由北京拓普提供的服务所获得的信息亦不做任何担保,或承担任何由此等信息引发的损害。尤其是用户通过北京拓普提供的服务获得的商业广告信息等。如果用户通过获得的上述“信息”而进行任何行为,请用户务必自行甄别信息的真实性和谨慎预防可能存在的风险,北京拓普将不会对用户的个人行为承担任何直接、间接、附带或衍生的损失和责任。
+                        北京剑鱼对用户经由北京剑鱼提供的服务所获得的信息亦不做任何担保,或承担任何由此等信息引发的损害。尤其是用户通过北京剑鱼提供的服务获得的商业广告信息等。如果用户通过获得的上述“信息”而进行任何行为,请用户务必自行甄别信息的真实性和谨慎预防可能存在的风险,北京剑鱼将不会对用户的个人行为承担任何直接、间接、附带或衍生的损失和责任。
                     </p>
                     <p style="text-indent: 20px;">
-                        北京拓普对本项服务下涉及的境内外基础电信运营商的移动通信网络的故障、技术缺陷、覆盖范围限制、不可抗力、计算机病毒、黑客攻击等不可抗力因素导致的损失不承担责任。</p>
+                        北京剑鱼对本项服务下涉及的境内外基础电信运营商的移动通信网络的故障、技术缺陷、覆盖范围限制、不可抗力、计算机病毒、黑客攻击等不可抗力因素导致的损失不承担责任。</p>
                     <br>
                     <p style="font-size: 18px;">6. 禁止服务的商业化</p>
-                    <p style="text-indent: 20px;">用户承诺,非经北京拓普同意,用户不能利用剑鱼标讯服务进行销售或其他商业用途。</p>
+                    <p style="text-indent: 20px;">用户承诺,非经北京剑鱼同意,用户不能利用剑鱼标讯服务进行销售或其他商业用途。</p>
                     <br>
                     <p style="font-size: 18px;">7. 用户管理</p>
                     <p style="text-indent: 20px;">用户对剑鱼标讯服务的使用必须遵守所有适用于服务的地方法律、国家法律和国际法律。</p>
@@ -115,12 +115,12 @@
                     <p style="text-indent: 20px;">(1)用户使用剑鱼标讯的服务时必须符合中国有关法规,不得利用剑鱼标讯服务制作、复制、发布、传播法律、行政法规禁止的信息。</p>
                     <p style="text-indent: 20px;">(2)用户使用剑鱼标讯的服务时还必须符合其他有关国家和地区的法律规定以及国际法的有关规定。</p>
                     <p style="text-indent: 20px;">(3)用户不得利用剑鱼标讯服务实施以下行为:</p>
-                    <p style="text-indent: 40px;">(a) 通过非北京拓普开发、授权或认可的第三方兼容软件、系统登录或使用剑鱼标讯服务,或针对剑鱼标讯服务使用非北京拓普开发、授权或认证的插件;
+                    <p style="text-indent: 40px;">(a) 通过非北京剑鱼开发、授权或认可的第三方兼容软件、系统登录或使用剑鱼标讯服务,或针对剑鱼标讯服务使用非北京剑鱼开发、授权或认证的插件;
                     </p>
                     <p style="text-indent: 40px;">(b) 删除剑鱼标讯软件及其他副本上所有关于版权的信息、内容;</p>
                     <p style="text-indent: 40px;">(c) 对剑鱼标讯软件进行反向工程、反向汇编、反向编译或以其他方式自剑鱼标讯软件获取源代码等;</p>
                     <p style="text-indent: 40px;">(d)
-                        对于剑鱼标讯软件相关信息等,未经北京拓普同意,擅自实施包括但不限于下列行为:使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版,建立镜像站点、擅自借助剑鱼标讯软件发展与之有关的衍生产品、作品、服务、插件、外挂、兼容、互联等;
+                        对于剑鱼标讯软件相关信息等,未经北京剑鱼同意,擅自实施包括但不限于下列行为:使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版,建立镜像站点、擅自借助剑鱼标讯软件发展与之有关的衍生产品、作品、服务、插件、外挂、兼容、互联等;
                     </p>
                     <p style="text-indent: 40px;">(e)
                         对使用剑鱼标讯服务过程中释放到任何计算机或移动终端内存中的数据及剑鱼标讯客户端软件运行过程中与服务器端的交互数据进行复制、更改、修改;</p>
@@ -128,35 +128,35 @@
                     <p style="text-indent: 40px;">(g) 其他以任何不合法的方式、为任何不合法的目的、或以任何与本条款不一致的方式使用剑鱼标讯服务。</p>
                     <p style="text-indent: 20px;">(4)用户不得滥用剑鱼标讯服务,包括但不限于利用剑鱼标讯服务进行侵害他人知识产权或者合法利益的其他行为。</p>
                     <p style="text-indent: 20px;">
-                        (5)用户应遵守北京拓普的所有其他规定和程序。用户须对自己在使用剑鱼标讯服务过程中的行为承担法律责任。用户承担法律责任的形式包括但不限于:对受到侵害者进行赔偿,以及在北京拓普首先承担了因用户的行为导致的行政处罚或侵权损害赔偿责任后,用户应给予北京拓普等额的赔偿。若用户违反以上规定,北京拓普有权作出独立判断立即暂停或终止对用户提供部分或全部服务,包括冻结、取消用户的账号的使用权限等措施。
+                        (5)用户应遵守北京剑鱼的所有其他规定和程序。用户须对自己在使用剑鱼标讯服务过程中的行为承担法律责任。用户承担法律责任的形式包括但不限于:对受到侵害者进行赔偿,以及在北京剑鱼首先承担了因用户的行为导致的行政处罚或侵权损害赔偿责任后,用户应给予北京剑鱼等额的赔偿。若用户违反以上规定,北京剑鱼有权作出独立判断立即暂停或终止对用户提供部分或全部服务,包括冻结、取消用户的账号的使用权限等措施。
                     </p>
                     <br>
                     <p style="font-size: 18px;">8. 通知</p>
                     <p style="text-indent: 20px;">
-                        所有发给用户的通知都可通过电子邮件、常规的信件或在剑鱼标讯客户端软件内或剑鱼标讯网站内显著位置公告的方式进行传送。北京拓普将通过上述方法之一将消息传递给用户,告知他们服务条款的修改、服务变更、或其它重要事情。
+                        所有发给用户的通知都可通过电子邮件、常规的信件或在剑鱼标讯客户端软件内或剑鱼标讯网站内显著位置公告的方式进行传送。北京剑鱼将通过上述方法之一将消息传递给用户,告知他们服务条款的修改、服务变更、或其它重要事情。
                     </p>
                     <p style="font-size: 18px;">9. 内容、商标所有权</p>
                     <p style="text-indent: 20px;">
-                        剑鱼标讯服务提供的内容包括但不限于:招标信息、界面设计、版面框架、图标、“剑鱼标讯”商标等。除涉及第三方授权的软件或技术外,所有这些内容均属于北京拓普,并受中华人民共和国著作权法、商标法、专利法、反不正当竞争法和相应的国际条约以及其他知识产权法律法规的保护。所以,用户只能在北京拓普授权下才能使用这些内容,未经北京拓普书面同意,用户不能为任何营利或非营利性的目的擅自复制、再造这些内容、或创造与内容有关的派生产品、或以转让、许可的方式授权第三方实施、利用和转让上述知识产权。
+                        剑鱼标讯服务提供的内容包括但不限于:招标信息、界面设计、版面框架、图标、“剑鱼标讯”商标等。除涉及第三方授权的软件或技术外,所有这些内容均属于北京剑鱼,并受中华人民共和国著作权法、商标法、专利法、反不正当竞争法和相应的国际条约以及其他知识产权法律法规的保护。所以,用户只能在北京剑鱼授权下才能使用这些内容,未经北京剑鱼书面同意,用户不能为任何营利或非营利性的目的擅自复制、再造这些内容、或创造与内容有关的派生产品、或以转让、许可的方式授权第三方实施、利用和转让上述知识产权。
                     </p>
                     <p style="text-indent: 20px;">
-                        北京拓普有权在服务中投放各种广告和宣传信息。同时剑鱼标讯信息服务本文中提及的软件和服务名称有可能为北京拓普或其关联公司的商标,未经北京拓普事先书面同意,用户不得以任何方式展示或使用或作其他处理,也不得向他人表明用户有权展示、使用、或其他有权处理的行为。
+                        北京剑鱼有权在服务中投放各种广告和宣传信息。同时剑鱼标讯信息服务本文中提及的软件和服务名称有可能为北京剑鱼或其关联公司的商标,未经北京剑鱼事先书面同意,用户不得以任何方式展示或使用或作其他处理,也不得向他人表明用户有权展示、使用、或其他有权处理的行为。
                     </p>
                     <br>
                     <p style="font-size: 18px;">10. 信息储存及相关知识产权</p>
                     <p style="text-indent: 20px;">
-                        北京拓普对剑鱼标讯提供的服务将尽力维护其安全性及方便性,但对服务中出现的信息删除或储存失败不承担任何责任。另外北京拓普有权判定用户的行为是否符合本服务条款的要求,如果用户违背了本服务条款的规定,北京拓普有权中止或者终止对其提供剑鱼标讯服务。
+                        北京剑鱼对剑鱼标讯提供的服务将尽力维护其安全性及方便性,但对服务中出现的信息删除或储存失败不承担任何责任。另外北京剑鱼有权判定用户的行为是否符合本服务条款的要求,如果用户违背了本服务条款的规定,北京剑鱼有权中止或者终止对其提供剑鱼标讯服务。
                     </p>
-                    <p style="text-indent: 20px;">北京拓普尊重知识产权并注重保护用户享有的各项权利。</p>
+                    <p style="text-indent: 20px;">北京剑鱼尊重知识产权并注重保护用户享有的各项权利。</p>
                     <br>
                     <p style="font-size: 18px;">11. 法律</p>
                     <p style="text-indent: 20px;">本条款适用中华人民共和国的法律,并且排除一切冲突法规定的适用。</p>
-                    <p style="text-indent: 20px;">如出现纠纷,用户和北京拓普一致同意将纠纷交由北京拓普所在地人民法院管辖。</p>
+                    <p style="text-indent: 20px;">如出现纠纷,用户和北京剑鱼一致同意将纠纷交由北京剑鱼所在地人民法院管辖。</p>
                     <br>
                     <p style="font-size: 18px;">12. 其他</p>
-                    <p style="text-indent: 20px;">除非另有证明,北京拓普储存在其服务器上的数据是您使用剑鱼标讯服务的唯一有效证据。</p>
+                    <p style="text-indent: 20px;">除非另有证明,北京剑鱼储存在其服务器上的数据是您使用剑鱼标讯服务的唯一有效证据。</p>
                     <p style="text-indent: 20px;">
-                        本条款自发布之日起实施,并构成用户和北京拓普之间的共识。北京拓普不行使、未能及时行使或者未充分行使本条款或者按照法律规定所享有的权利,不应被视为放弃该权利,也不影响北京拓普在将来行使该权利。
+                        本条款自发布之日起实施,并构成用户和北京剑鱼之间的共识。北京剑鱼不行使、未能及时行使或者未充分行使本条款或者按照法律规定所享有的权利,不应被视为放弃该权利,也不影响北京剑鱼在将来行使该权利。
                     </p>
                     <p style="text-indent: 20px;">如果用户对本条款内容有任何疑问,请发送邮件至我们的客服邮箱:(jy@topnet.net.cn)。</p>
                 </div>

+ 21 - 21
src/jfw/modules/app/src/web/templates/staticpage/permission_rules_client.html

@@ -67,41 +67,41 @@
                 <div class="col-md-12">
                     <h3 class="title">剑鱼标讯用户使用许可协议</h3>
                     <p style="text-indent: 20px;">
-                        欢迎使用北京拓普丰联信息工程有限公司(以下简称“北京拓普”)为您提供的剑鱼标讯服务。请您(下列简称“用户”)仔细阅读以下全部内容。未成年人则应在法定监护人陪同下阅读。如用户使用剑鱼标讯服务,即表示用户与北京拓普已达成协议,自愿接受本服务条款所有内容。此后,用户不得以未阅读本服务条款内容作任何形式的抗辩。
+                        欢迎使用北京剑鱼信息技术有限公司(以下简称“北京剑鱼”)为您提供的剑鱼标讯服务。请您(下列简称“用户”)仔细阅读以下全部内容。未成年人则应在法定监护人陪同下阅读。如用户使用剑鱼标讯服务,即表示用户与北京剑鱼已达成协议,自愿接受本服务条款所有内容。此后,用户不得以未阅读本服务条款内容作任何形式的抗辩。
                     </p>
                     <br>
                     <p style="font-size: 18px;">1. 服务条款的确认和接纳</p>
                     <p style="text-indent: 20px;">
-                        本条款是用户与北京拓普之间关于用户使用剑鱼标讯或服务的条款,内容包括条款正文、北京拓普已经发布的或将来可能发布的各类规则。所有规则为本条款不可分割的组成部分,与条款正文具有同等法律效力。除另行明确声明外,用户使用剑鱼标讯或服务的行为将受本条款约束。
+                        本条款是用户与北京剑鱼之间关于用户使用剑鱼标讯或服务的条款,内容包括条款正文、北京剑鱼已经发布的或将来可能发布的各类规则。所有规则为本条款不可分割的组成部分,与条款正文具有同等法律效力。除另行明确声明外,用户使用剑鱼标讯或服务的行为将受本条款约束。
                     </p>
                     <br>
                     <p style="font-size: 18px;">2. 剑鱼标讯简介</p>
-                    <p style="text-indent: 20px;">本服务条款所称的“剑鱼标讯”是指北京拓普所有和经营的招投标信息服务平台。</p>
+                    <p style="text-indent: 20px;">本服务条款所称的“剑鱼标讯”是指北京剑鱼所有和经营的招投标信息服务平台。</p>
                     <p style="text-indent: 20px;">
-                        用户登录账号可以是用户本人的手机号、微信账号或剑鱼标讯增加的其他可登录账号。用户应维持密码及账号的机密安全,如果用户未保管好自己的账号和密码而对用户、北京拓普或第三方造成损害,用户将负全部责任。用户同意若发现任何非法使用用户账号或安全漏洞的情况,有义务立即通告北京拓普
+                        用户登录账号可以是用户本人的手机号、微信账号或剑鱼标讯增加的其他可登录账号。用户应维持密码及账号的机密安全,如果用户未保管好自己的账号和密码而对用户、北京剑鱼或第三方造成损害,用户将负全部责任。用户同意若发现任何非法使用用户账号或安全漏洞的情况,有义务立即通告北京剑鱼
                     </p>
                     <br>
                     <p style="font-size: 18px;">3. 服务条款的修改</p>
                     <p style="text-indent: 20px;">
-                        北京拓普有权在必要时通过在剑鱼标讯客户端软件内或网页上发出公告等合理方式修改本条款。用户在使用剑鱼标讯服务时,应当及时查阅了解修改的内容,并自觉遵守本服务条款的相关内容。用户如继续使用剑鱼标讯服务,则视为对修改内容的同意,当发生有关争议时,以最新的服务条款为准;用户在不同意修改内容的情况下,有权停止使用本服务条款涉及的服务。
+                        北京剑鱼有权在必要时通过在剑鱼标讯客户端软件内或网页上发出公告等合理方式修改本条款。用户在使用剑鱼标讯服务时,应当及时查阅了解修改的内容,并自觉遵守本服务条款的相关内容。用户如继续使用剑鱼标讯服务,则视为对修改内容的同意,当发生有关争议时,以最新的服务条款为准;用户在不同意修改内容的情况下,有权停止使用本服务条款涉及的服务。
                     </p>
                     <br>
                     <p style="font-size: 18px;">4. 服务的变更或中止</p>
                     <p style="text-indent: 20px;">
-                        北京拓普始终在不断变更和改进服务。北京拓普可能会增加或删除剑鱼标讯的部分服务,也可能暂停或彻底停止本项服务。用户同意北京拓普有权行使上述权利且不需对用户或第三方承担任何责任。</p>
+                        北京剑鱼始终在不断变更和改进服务。北京剑鱼可能会增加或删除剑鱼标讯的部分服务,也可能暂停或彻底停止本项服务。用户同意北京剑鱼有权行使上述权利且不需对用户或第三方承担任何责任。</p>
                     <br>
                     <p style="font-size: 18px;">5. 不担保及不可抗力条款</p>
                     <p style="text-indent: 20px;">
-                        北京拓普会尽最大努力完善和提升剑鱼标讯服务,并按“现有”的状态向用户提供本服务,北京拓普不提供任何类型的担保,不论是明确的或隐含的。例如:北京拓普不担保本服务一定能满足用户的要求,服务不会中断,服务的及时性、安全性、真实性,服务不会发生出错等,但北京拓普将尽力减少因此给用户造成的损失和影响。
+                        北京剑鱼会尽最大努力完善和提升剑鱼标讯服务,并按“现有”的状态向用户提供本服务,北京剑鱼不提供任何类型的担保,不论是明确的或隐含的。例如:北京剑鱼不担保本服务一定能满足用户的要求,服务不会中断,服务的及时性、安全性、真实性,服务不会发生出错等,但北京剑鱼将尽力减少因此给用户造成的损失和影响。
                     </p>
                     <p style="text-indent: 20px;">
-                        北京拓普对用户经由北京拓普提供的服务所获得的信息亦不做任何担保,或承担任何由此等信息引发的损害。尤其是用户通过北京拓普提供的服务获得的商业广告信息等。如果用户通过获得的上述“信息”而进行任何行为,请用户务必自行甄别信息的真实性和谨慎预防可能存在的风险,北京拓普将不会对用户的个人行为承担任何直接、间接、附带或衍生的损失和责任。
+                        北京剑鱼对用户经由北京剑鱼提供的服务所获得的信息亦不做任何担保,或承担任何由此等信息引发的损害。尤其是用户通过北京剑鱼提供的服务获得的商业广告信息等。如果用户通过获得的上述“信息”而进行任何行为,请用户务必自行甄别信息的真实性和谨慎预防可能存在的风险,北京剑鱼将不会对用户的个人行为承担任何直接、间接、附带或衍生的损失和责任。
                     </p>
                     <p style="text-indent: 20px;">
-                        北京拓普对本项服务下涉及的境内外基础电信运营商的移动通信网络的故障、技术缺陷、覆盖范围限制、不可抗力、计算机病毒、黑客攻击等不可抗力因素导致的损失不承担责任。</p>
+                        北京剑鱼对本项服务下涉及的境内外基础电信运营商的移动通信网络的故障、技术缺陷、覆盖范围限制、不可抗力、计算机病毒、黑客攻击等不可抗力因素导致的损失不承担责任。</p>
                     <br>
                     <p style="font-size: 18px;">6. 禁止服务的商业化</p>
-                    <p style="text-indent: 20px;">用户承诺,非经北京拓普同意,用户不能利用剑鱼标讯服务进行销售或其他商业用途。</p>
+                    <p style="text-indent: 20px;">用户承诺,非经北京剑鱼同意,用户不能利用剑鱼标讯服务进行销售或其他商业用途。</p>
                     <br>
                     <p style="font-size: 18px;">7. 用户管理</p>
                     <p style="text-indent: 20px;">用户对剑鱼标讯服务的使用必须遵守所有适用于服务的地方法律、国家法律和国际法律。</p>
@@ -109,12 +109,12 @@
                     <p style="text-indent: 20px;">(1)用户使用剑鱼标讯的服务时必须符合中国有关法规,不得利用剑鱼标讯服务制作、复制、发布、传播法律、行政法规禁止的信息。</p>
                     <p style="text-indent: 20px;">(2)用户使用剑鱼标讯的服务时还必须符合其他有关国家和地区的法律规定以及国际法的有关规定。</p>
                     <p style="text-indent: 20px;">(3)用户不得利用剑鱼标讯服务实施以下行为:</p>
-                    <p style="text-indent: 40px;">(a) 通过非北京拓普开发、授权或认可的第三方兼容软件、系统登录或使用剑鱼标讯服务,或针对剑鱼标讯服务使用非北京拓普开发、授权或认证的插件;
+                    <p style="text-indent: 40px;">(a) 通过非北京剑鱼开发、授权或认可的第三方兼容软件、系统登录或使用剑鱼标讯服务,或针对剑鱼标讯服务使用非北京剑鱼开发、授权或认证的插件;
                     </p>
                     <p style="text-indent: 40px;">(b) 删除剑鱼标讯软件及其他副本上所有关于版权的信息、内容;</p>
                     <p style="text-indent: 40px;">(c) 对剑鱼标讯软件进行反向工程、反向汇编、反向编译或以其他方式自剑鱼标讯软件获取源代码等;</p>
                     <p style="text-indent: 40px;">(d)
-                        对于剑鱼标讯软件相关信息等,未经北京拓普同意,擅自实施包括但不限于下列行为:使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版,建立镜像站点、擅自借助剑鱼标讯软件发展与之有关的衍生产品、作品、服务、插件、外挂、兼容、互联等;
+                        对于剑鱼标讯软件相关信息等,未经北京剑鱼同意,擅自实施包括但不限于下列行为:使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版,建立镜像站点、擅自借助剑鱼标讯软件发展与之有关的衍生产品、作品、服务、插件、外挂、兼容、互联等;
                     </p>
                     <p style="text-indent: 40px;">(e)
                         对使用剑鱼标讯服务过程中释放到任何计算机或移动终端内存中的数据及剑鱼标讯客户端软件运行过程中与服务器端的交互数据进行复制、更改、修改;</p>
@@ -122,36 +122,36 @@
                     <p style="text-indent: 40px;">(g) 其他以任何不合法的方式、为任何不合法的目的、或以任何与本条款不一致的方式使用剑鱼标讯服务。</p>
                     <p style="text-indent: 20px;">(4)用户不得滥用剑鱼标讯服务,包括但不限于利用剑鱼标讯服务进行侵害他人知识产权或者合法利益的其他行为。</p>
                     <p style="text-indent: 20px;">
-                        (5)用户应遵守北京拓普的所有其他规定和程序。用户须对自己在使用剑鱼标讯服务过程中的行为承担法律责任。用户承担法律责任的形式包括但不限于:对受到侵害者进行赔偿,以及在北京拓普首先承担了因用户的行为导致的行政处罚或侵权损害赔偿责任后,用户应给予北京拓普等额的赔偿。若用户违反以上规定,北京拓普有权作出独立判断立即暂停或终止对用户提供部分或全部服务,包括冻结、取消用户的账号的使用权限等措施。
+                        (5)用户应遵守北京剑鱼的所有其他规定和程序。用户须对自己在使用剑鱼标讯服务过程中的行为承担法律责任。用户承担法律责任的形式包括但不限于:对受到侵害者进行赔偿,以及在北京剑鱼首先承担了因用户的行为导致的行政处罚或侵权损害赔偿责任后,用户应给予北京剑鱼等额的赔偿。若用户违反以上规定,北京剑鱼有权作出独立判断立即暂停或终止对用户提供部分或全部服务,包括冻结、取消用户的账号的使用权限等措施。
                     </p>
                     <br>
                     <p style="font-size: 18px;">8. 通知</p>
                     <p style="text-indent: 20px;">
-                        所有发给用户的通知都可通过电子邮件、常规的信件或在剑鱼标讯客户端软件内或剑鱼标讯网站内显著位置公告的方式进行传送。北京拓普将通过上述方法之一将消息传递给用户,告知他们服务条款的修改、服务变更、或其它重要事情。
+                        所有发给用户的通知都可通过电子邮件、常规的信件或在剑鱼标讯客户端软件内或剑鱼标讯网站内显著位置公告的方式进行传送。北京剑鱼将通过上述方法之一将消息传递给用户,告知他们服务条款的修改、服务变更、或其它重要事情。
                     </p>
                     <br>
                     <p style="font-size: 18px;">9. 内容、商标所有权</p>
                     <p style="text-indent: 20px;">
-                        剑鱼标讯服务提供的内容包括但不限于:招标信息、界面设计、版面框架、图标、“剑鱼标讯”商标等。除涉及第三方授权的软件或技术外,所有这些内容均属于北京拓普,并受中华人民共和国著作权法、商标法、专利法、反不正当竞争法和相应的国际条约以及其他知识产权法律法规的保护。所以,用户只能在北京拓普授权下才能使用这些内容,未经北京拓普书面同意,用户不能为任何营利或非营利性的目的擅自复制、再造这些内容、或创造与内容有关的派生产品、或以转让、许可的方式授权第三方实施、利用和转让上述知识产权。
+                        剑鱼标讯服务提供的内容包括但不限于:招标信息、界面设计、版面框架、图标、“剑鱼标讯”商标等。除涉及第三方授权的软件或技术外,所有这些内容均属于北京剑鱼,并受中华人民共和国著作权法、商标法、专利法、反不正当竞争法和相应的国际条约以及其他知识产权法律法规的保护。所以,用户只能在北京剑鱼授权下才能使用这些内容,未经北京剑鱼书面同意,用户不能为任何营利或非营利性的目的擅自复制、再造这些内容、或创造与内容有关的派生产品、或以转让、许可的方式授权第三方实施、利用和转让上述知识产权。
                     </p>
                     <p style="text-indent: 20px;">
-                        北京拓普有权在服务中投放各种广告和宣传信息。同时剑鱼标讯信息服务本文中提及的软件和服务名称有可能为北京拓普或其关联公司的商标,未经北京拓普事先书面同意,用户不得以任何方式展示或使用或作其他处理,也不得向他人表明用户有权展示、使用、或其他有权处理的行为。
+                        北京剑鱼有权在服务中投放各种广告和宣传信息。同时剑鱼标讯信息服务本文中提及的软件和服务名称有可能为北京剑鱼或其关联公司的商标,未经北京剑鱼事先书面同意,用户不得以任何方式展示或使用或作其他处理,也不得向他人表明用户有权展示、使用、或其他有权处理的行为。
                     </p>
                     <br>
                     <p style="font-size: 18px;">10. 信息储存及相关知识产权</p>
                     <p style="text-indent: 20px;">
-                        北京拓普对剑鱼标讯提供的服务将尽力维护其安全性及方便性,但对服务中出现的信息删除或储存失败不承担任何责任。另外北京拓普有权判定用户的行为是否符合本服务条款的要求,如果用户违背了本服务条款的规定,北京拓普有权中止或者终止对其提供剑鱼标讯服务。
+                        北京剑鱼对剑鱼标讯提供的服务将尽力维护其安全性及方便性,但对服务中出现的信息删除或储存失败不承担任何责任。另外北京剑鱼有权判定用户的行为是否符合本服务条款的要求,如果用户违背了本服务条款的规定,北京剑鱼有权中止或者终止对其提供剑鱼标讯服务。
                     </p>
-                    <p style="text-indent: 20px;">北京拓普尊重知识产权并注重保护用户享有的各项权利。</p>
+                    <p style="text-indent: 20px;">北京剑鱼尊重知识产权并注重保护用户享有的各项权利。</p>
                     <br>
                     <p style="font-size: 18px;">11. 法律</p>
                     <p style="text-indent: 20px;">本条款适用中华人民共和国的法律,并且排除一切冲突法规定的适用。</p>
-                    <p style="text-indent: 20px;">如出现纠纷,用户和北京拓普一致同意将纠纷交由北京拓普所在地人民法院管辖。</p>
+                    <p style="text-indent: 20px;">如出现纠纷,用户和北京剑鱼一致同意将纠纷交由北京剑鱼所在地人民法院管辖。</p>
                     <br>
                     <p style="font-size: 18px;">12. 其他</p>
-                    <p style="text-indent: 20px;">除非另有证明,北京拓普储存在其服务器上的数据是您使用剑鱼标讯服务的唯一有效证据。</p>
+                    <p style="text-indent: 20px;">除非另有证明,北京剑鱼储存在其服务器上的数据是您使用剑鱼标讯服务的唯一有效证据。</p>
                     <p style="text-indent: 20px;">
-                        本条款自发布之日起实施,并构成用户和北京拓普之间的共识。北京拓普不行使、未能及时行使或者未充分行使本条款或者按照法律规定所享有的权利,不应被视为放弃该权利,也不影响北京拓普在将来行使该权利。
+                        本条款自发布之日起实施,并构成用户和北京剑鱼之间的共识。北京剑鱼不行使、未能及时行使或者未充分行使本条款或者按照法律规定所享有的权利,不应被视为放弃该权利,也不影响北京剑鱼在将来行使该权利。
                     </p>
                     <p style="text-indent: 20px;">如果用户对本条款内容有任何疑问,请发送邮件至我们的客服邮箱:(jy@topnet.net.cn)。</p>
                 </div>

+ 19 - 2
src/jfw/modules/app/src/web/templates/structeddata/marketing.html

@@ -85,11 +85,11 @@
 			</div>
 		</div>
 		<div class="j-button-group">
-			<a onclick="location.href = '/jyapp/free/customer'" class="j-button-cancel" id="j_cancel">
+			<a dataHref="/jyapp/free/customer" class="j-button-cancel" id="j_cancel">
 				<!-- <span class="phone_icon"></span> -->
 				<span>咨询客服</span>
 			</a>
-			<button onclick="location.href = '/jyapp/frontPage/bigmember/free/perfect_info_strud?source=structedData'"  class="j-button-confirm" id="j_confirm">获取数据样例</button>
+			<button dataHref="/jyapp/frontPage/bigmember/free/perfect_info_strud?source=structedData"  class="j-button-confirm" id="j_confirm">获取数据样例</button>
 		</div>
 	</div>
 </div>
@@ -162,6 +162,23 @@
 	$('.fanhui').on('click', function() {
 		history.go(-1)
 	})
+  var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
+  //咨询客服
+  $("#j_cancel").on('click',function(){
+    if(loginFlag){
+      window.location.href=$(this).attr('dataHref')
+    }else{
+      window.location.href= "/jyapp/free/login?url="+$(this).attr('dataHref')
+    }
+  })
+  //获取样例
+  $("#j_confirm").on('click',function(){
+     if(loginFlag){
+      window.location.href=$(this).attr('dataHref')
+    }else{
+      window.location.href= "/jyapp/free/login?url="+$(this).attr('dataHref')
+    }
+  })
 	function click_view(){
 		var loading = weui.loading('loading', {
 			className: 'custom-classname'

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/manageWord.html

@@ -114,7 +114,7 @@
                 </div>
                 <div class="key-empty" v-show="emptyShow">
                     <div class="empty-img-container">
-                        <img class="empty-img" src="/jyapp/images/wxkeyset/nopush.png">
+                        <img class="empty-img" src="/common-module/public/image/jy-back.png">
                     </div>
                     <div class="empty-text">暂无关键词分类</div>
               </div>

+ 7 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_introduce.html

@@ -165,8 +165,15 @@
             }
         }
     })
+    
+    var loginFlag = {{if .T.loginFlag}}{{.T.loginFlag}}{{else}}false{{end}}
     $("*[data-need-bind-phone]").on('click', function () {
+      if (loginFlag){
         window.location.replace($(this).attr('data-url'))
+      }else{
+        window.location.replace("/jyapp/free/login?url="+$(this).attr('data-url'))
+      }
+        
     })
     $(function () {
         try{

+ 113 - 66
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -18,6 +18,9 @@
     <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/css/index.css?v={{Msg "seo" "version"}}'/>
     <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/public.css?v={{Msg "seo" "version"}}'/>
     <style>
+        .j-popup.van-popup--bottom .j-main {
+          height: 100%;
+        }
         .merge-dialog,
         .weui-dialog,
         .weui-mask{
@@ -185,6 +188,27 @@
         .typeswitch{
           height: 1.08rem;
         }
+        .push-money-component {
+          height: auto;
+        }
+        .push-money-component .money-component-group {
+          min-height: auto;
+          flex: unset;
+          padding: 0;
+        }
+        .push-money-component .j-footer {
+          display: none;
+        }
+        .push-money-component .select-tag-group{
+          padding: 6px 0 0!important;
+        }
+        .push-money-component .select-tag-item.active::after{
+          background: none!important;
+        }
+        .selected{
+          background: #E8FAFD!important;
+          color: #2ABED1!important;
+        }
     </style>
 </head>
 <body class="p13" id="viperSuper" style="background: #fff;overflow: hidden;">
@@ -304,7 +328,7 @@
                         <van-dropdown-item get-container="#dropDownItemGroup" :lazy-render="false" :title="tagText.timeText"  ref="dateItem" @open="open('时间')" @close="close">
                             <date-component type="only-picker" :key="setTimer.datetimer" @cancel="cancel" @confirm="confirm" :selectdate="selectDate"/>
                         </van-dropdown-item>
-                        <van-dropdown-item :disabled="!screenShow" get-container="#dropDownItemGroup" :lazy-render="false" ref="areaCityItem" @open="open('地区')" @close="close">
+                        <van-dropdown-item  :disabled="!screenShow" get-container="#dropDownItemGroup" :lazy-render="false" ref="areaCityItem" @open="open('地区')" @close="close">
                             <template #title>
                                 <span v-if="screenShow" class="areaText">地区</span>
                                 <span v-if="!screenShow" class="rootstyletitle" @click="showSuperVipDialog">
@@ -312,8 +336,9 @@
                                     <span class="root_open">开通</span>
                                 </span>
                             </template>
-                            <area-city-mobile :key="setTimer.areatimer" v-if="screenShow" @cancel="cancel" @confirm="confirm" ref="areaCitySelector"></area-city-mobile>
-                            <root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component>
+                            <area-city-mobile :stop-city="!screenShow" :key="setTimer.areatimer" @cancel="cancel" @confirm="confirm" @stop="showSuperVipDialog" ref="areaCitySelector"></area-city-mobile>
+                            <!-- <area-city-mobile :key="setTimer.areatimer" v-if="screenShow" @cancel="cancel" @confirm="confirm" ref="areaCitySelector"></area-city-mobile> -->
+                            <!-- <root-component v-if="!screenShow" @cancel="cancel" @confirm="confirm"></root-component> -->
                         </van-dropdown-item>
                         <van-dropdown-item :disabled="!screenShow" get-container="#dropDownItemGroup" :lazy-render="false" ref="industryItem" @open="open('行业')" @close="close">
                             <template #title>
@@ -331,6 +356,22 @@
                             <div class="filter-list-container j-container">
                                 <div class="j-main">
                                     <van-cell-group>
+                                        <van-cell center @click="moreFiltersItemShow('moneyItem', '金额')" style="height: auto;">
+                                          <template #title>
+                                              <span v-if="screenShow" class="cateText">金额</span>
+                                              <span v-else class="rootstyletitle">
+                                                  <span>金额</span>
+                                                  <span class="root_open">开通</span>
+                                              </span>
+                                          </template>
+                                          <template #label>
+                                            <div class="select-more-tag-group">
+                                              <div class="select-tag-content">
+                                                  <money-component :stop="!screenShow" class="push-money-component" :diy="true" extra="万元" :tags="moneyTags" ref="moneyComponent"></money-component>
+                                              </div>
+                                            </div>
+                                          </template>
+                                        </van-cell>
                                         <van-cell :value="'已选:' + calcSelected('cateItem')" center is-link @click="moreFiltersItemShow('cateItem', '采购单位')">
                                             <template #title>
                                                 <span v-if="screenShow" class="cateText">采购单位类型</span>
@@ -358,6 +399,22 @@
                                                 </span>
                                             </template>
                                         </van-cell>
+                                        <van-cell center style="height: auto;"  @click="moreFiltersItemShow('fileItem', '附件')">
+                                          <template #title>
+                                              <span v-if="screenShow" class="noticeText">附件</span>
+                                              <span v-else class="rootstyletitle">
+                                                  <span>附件</span>
+                                                  <span class="root_open">开通</span>
+                                              </span>
+                                          </template>
+                                          <template #label>
+                                            <div class="money-component-group" style="padding: 0;">
+                                              <div class="select-tag-group">
+                                                <div class="select-tag-item" :class="{selected:item.key == selectFile}" v-for="(item, index) in fileTags" :key="index" @click="selectFileFn(item)">${item.label}</div>
+                                              </div>
+                                            </div>
+                                          </template>
+                                      </van-cell>
                                     </van-cell-group>
                                 </div>
                                 <div class="j-footer j-button-group">
@@ -608,6 +665,7 @@
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/cate-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/keyword-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/notice-mobile.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/js/money-mobile.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/keep-tags/keep-tags-template.js?v={{Msg "seo" "version"}}'></script>
 <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/historypush.js?v={{Msg "seo" "version"}}'></script>
 <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
@@ -654,8 +712,6 @@
                 url: '/publicapply/free/areapack/tip',
                 type: 'POST',
                 success: function (res) {
-                    console.info(res)
-                    console.info($('#UserTips'))
                     if (res.data.tip) {
                         $('#UserTips').show()
                         $('#freeArea').text(res.data.area)
@@ -753,12 +809,12 @@
       })
   }
       function checkFreeList (data) {
-      if(!goTemplateData.params.isVip){
+      if(window.isFree){
         if (data.data.length > 10) {
           // sessionStorage.setItem('isNeedSalesStatus', isNeedSalesStatus)
           isNeedSales(function (res) {
             // 推送列表 免费是否需要留资判断
-            var result = checkRequiredKeys(['name', 'phone', 'position', 'branch','company'], res.info)
+            var result = checkRequiredKeys(['name', 'phone', 'position', 'branch','company', 'companyType'], res.info)
             if (!result && res.data && res.data.retainedCapital) {
               data.data = data.data.slice(0, 10)
               data.hasNextPage = false
@@ -833,6 +889,8 @@
   var selectCate = vm.buyerclass // 采购单位
   var selectKeyword = vm.key // 关键词
   var selectNotice = vm.subtype // 公告类型
+  var selectMoney = vm.selectMoney
+  var selectFile = vm.selectFile
   //获取当前时间
   var date = (function () {
       var date = new Date();
@@ -862,6 +920,7 @@
         }
     })
   function initpage() {
+     console.log(selectMoney, selectFile, 'sessionstorage');
       afterJyObjInit();
       var thisClass=this;
       $("#openmailpush").click(function () {
@@ -918,7 +977,7 @@
       this.InitVip=function(r){
         $("#sub_manager").click(function() {
             setSessionStorage();
-            console.log(vm.rootInfo, 'vmrootInfo')
+            // console.log(vm.rootInfo, 'vmrootInfo')
             sessionStorage.setItem(vm.sessStorageKey, JSON.stringify(vm.$data))
             if(historyVt == 's') {
               if(vm.entinfo.admin_department || vm.entinfo.admin_system) {
@@ -960,7 +1019,7 @@
             }
               if (r.isPassCount && (localStorage.isPassCount == null || localStorage.isPassCount != date.split("-")[2])) {
                 localStorage.isPassCount = date.split("-")[2]
-                weuiDialog();
+                // weuiDialog(); // liumiao让去掉
               }
           }
           if (r.vipStatus != 1) {
@@ -1009,6 +1068,8 @@
             selectCate = sessionStorage.getItem(userId + "_selectCate");
             selectKeyword = sessionStorage.getItem(userId + "_selectKeyword");
             selectNotice = sessionStorage.getItem(userId + "_selectNotice");
+            selectMoney = sessionStorage.getItem(userId + "_selectMoney");
+            selectFile = sessionStorage.getItem(userId + "_selectFile");
 
             // 判断是否需要修改某个收藏的状态
             var listCollSessionId = sessionStorage.getItem('listCollSessionId')
@@ -1055,7 +1116,7 @@
             userId = sessionStorage.userId;
             // var isNeedSalesStatus = false
             // var isNeedSalesStatus = true
-
+            console.log('load-ajax', selectFile, selectMoney, vm.selectFile, vm.selectMoney);
             $.ajax({
                 type: 'post',
                 url: '/publicapply/subscribe/historyPush?t=' + new Date().getTime(),
@@ -1068,12 +1129,13 @@
                   buyerclass: selectCate,
                   key: selectKeyword,
                   subtype: selectNotice,
-                  vt:historyVt
+                  vt:historyVt,
+                  fileExists: vm.selectFile,
+                  price: vm.selectMoney
                 },
                 async: false,
                 dataType: 'json',
                 success: function (data) {
-
                   if(!data.data) {
                     data.data = []
                   }
@@ -1321,6 +1383,9 @@ function extend(i){
       selectCate = vm.buyerclass // 采购单位
       selectKeyword = vm.key // 关键词
       selectNotice = vm.subtype // 公告类型
+      selectFile = vm.selectFile
+      selectMoney = vm.selectMoney
+      console.log('刷新-ajax', selectFile, selectMoney);
       $.ajax({
           type: 'post',
           url: '/publicapply/subscribe/historyPush?t=' + new Date().getTime(),
@@ -1332,7 +1397,9 @@ function extend(i){
             subscopeclass: selectIndustry,
             buyerclass: selectCate,
             key: selectKeyword,
-            subtype: selectNotice
+            subtype: selectNotice,
+            fileExists: selectFile,
+            price: selectMoney
           },
           async: false,
           dataType: 'json',
@@ -1379,6 +1446,8 @@ function extend(i){
       selectCate = vm.buyerclass // 采购单位
       selectKeyword = vm.key // 关键词
       selectNotice = vm.subtype // 公告类型
+      selectFile = vm.selectFile
+      selectMoney = vm.selectMoney
       if(vm.hasNextPage) {
         $.ajax({
           type: 'post',
@@ -1392,7 +1461,9 @@ function extend(i){
             buyerclass: selectCate,
             key: selectKeyword,
             subtype: selectNotice,
-            vt:historyVt
+            vt:historyVt,
+            fileExists: selectFile,
+            price: selectMoney
           },
           dataType: 'json',
           success: function (data) {
@@ -1558,16 +1629,24 @@ function hasNoData() {
           if (obj.ca_isvisit == 1) {
               visited = "visited"
           }
+          // 是否有附件
+          var fileText = ''
+          if (obj.ca_fileExists) {
+            fileText = '<font class="keyword" style="margin-right:4px;">[有附件]</font>'
+          }
           if (showAd && index == 3 && !closeAdvert) {//广告位
               var ad = $("#advertscript").html()
               if (ad != ""&&ad.length>20) {
                   listhtml += '<div class="tslist ' + visited + '" style="border-bottom: none;" words="' + mWords + '">'
-                      + '<div class="resnumb">'
+                  if (obj.site == '剑鱼信息发布平台') {
+                    listhtml += '<div class="userPublish">用户发布</div>'
+                  }
+                  listhtml += '<div class="resnumb">'
                       + '<div class="one">'
                       + '<span class="xh ' + visited + '">' + count + '.</span>'
                       + '</div>'
                       + '<div class="two bt-parent" style="display: flex;justify-content: space-between;padding-left:' + paddingLeft + 'px;">'
-                      + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + title + '</a>'
+                      + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + fileText + title + '</a>'
                       + '<div class="collec_star" collecnum="'+obj["collection"]+'" data-id="' + obj["_id"] + '">'
                       + '<span class="shoucang"></span>'
                       + '<span class="weishoucang"></span>'
@@ -1583,57 +1662,16 @@ function hasNoData() {
                   continue
               }
           }
-        //   if (index == 8) {//广告位
-        //     listhtml += '<div class="tslist ' + visited + '" style="border-bottom: none;" words="' + mWords + '">'
-        //         + '<div class="resnumb">'
-        //         + '<div class="one">'
-        //         + '<span class="xh ' + visited + '">' + count + '.</span>'
-        //         + '</div>'
-        //         + '<div class="two bt-parent" style="display: flex;justify-content: space-between;padding-left:' + paddingLeft + 'px;">'
-        //         + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + title + '</a>'
-        //         + '<div class="collec_star" collecnum="'+obj["collection"]+'" data-id="' + obj["_id"] + '">'
-        //         + '<span class="shoucang"></span>'
-        //         + '<span class="weishoucang"></span>'
-        //         + '</div>'
-        //         + '</div>'
-        //         + '</div>'
-        //         + '<div style="clear:both;">'
-        //         + '</div>'
-        //         + '<div class="restime time-diff">' + projectMList + showdateList + '</div>'
-        //         + '<div style="clear:both;"></div>'
-        //         + '</div>'
-        //         + '<div class="_36y1d8lbx9n">'+'</div>'
-        //     continue
-        //   }
-        //   if (index == 23) {//广告位
-        //     listhtml += '<div class="tslist ' + visited + '" style="border-bottom: none;" words="' + mWords + '">'
-        //         + '<div class="resnumb">'
-        //         + '<div class="one">'
-        //         + '<span class="xh ' + visited + '">' + count + '.</span>'
-        //         + '</div>'
-        //         + '<div class="two bt-parent" style="display: flex;justify-content: space-between;padding-left:' + paddingLeft + 'px;">'
-        //         + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + title + '</a>'
-        //         + '<div class="collec_star" collecnum="'+obj["collection"]+'" data-id="' + obj["_id"] + '">'
-        //         + '<span class="shoucang"></span>'
-        //         + '<span class="weishoucang"></span>'
-        //         + '</div>'
-        //         + '</div>'
-        //         + '</div>'
-        //         + '<div style="clear:both;">'
-        //         + '</div>'
-        //         + '<div class="restime time-diff">' + projectMList + showdateList + '</div>'
-        //         + '<div style="clear:both;"></div>'
-        //         + '</div>'
-        //         + '<div class="_061vbh43quq3">'+'</div>'
-        //     continue
-        //   }
           listhtml += '<div class="tslist ' + visited + '" words="' + mWords + '">'
-              + '<div class="resnumb">'
+          if (obj.site == '剑鱼信息发布平台') {
+            listhtml += '<div class="userPublish">用户发布</div>'
+          }
+          listhtml += '<div class="resnumb">'
               + '<div class="one">'
               + '<span class="xh ' + visited + '">' + count + '.</span>'
               + '</div>'
               + '<div class="two bt-parent" style="display: flex;justify-content: space-between;padding-left:' + paddingLeft + 'px;">'
-              + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + title + '</a>'
+              + '<a class="bt ' + visited + '" eid="' + obj["_id"] + '"  push_date="' + obj["ca_date"] + '" list_index="' + obj["ca_index"] + '" projectM="' + obj["ca_type"] + '">' + fileText + title + '</a>'
               + '<div class="collec_star" collecnum="'+obj["collection"]+'" data-id="' + obj["_id"] + '">'
               + '<span class="shoucang"></span>'
               + '<span class="weishoucang"></span>'
@@ -1851,7 +1889,7 @@ function hasNoData() {
   //
   var ajaxFlag = true;
 
-  function ajaxFun(time, area, city, subscopeclass, buyerclass, key, subtype) {
+  function ajaxFun(time, area, city, subscopeclass, buyerclass, key, subtype, file, price) {
     if(historyVt == 's') {
       $(".set_keyword").hide();
     }
@@ -1867,6 +1905,8 @@ function hasNoData() {
         localStorage.removeItem('hideBottom')
         JyObj.hiddenBottom("0");
       }
+      // console.log(historyVt, 'historyVt');
+      console.log('ajaxFun-ajax', file, price);
       $.ajax({
           type: 'post',
           url: '/publicapply/subscribe/historyPush?t=' + new Date().getTime(),
@@ -1876,11 +1916,12 @@ function hasNoData() {
             city: city,
             subscopeclass: subscopeclass,
             pageNum: 1,
-            pagenum: 1,
             buyerclass: buyerclass,
             key: key.replace(/\s/g, ','),
             subtype: subtype,
-            vt:historyVt
+            vt:historyVt,
+            fileExists: file,
+            price: price
           },
           async: false,
           dataType: 'json',
@@ -1918,6 +1959,12 @@ function hasNoData() {
               if (!city) {
                   sessionStorage.removeItem(userId + "_selectCity");
               }
+              if (!selectFile) {
+                sessionStorage.removeItem(userId + "_selectFile");
+              }
+              if (!selectMoney) {
+                sessionStorage.removeItem(userId + "selectMoney");
+              }
           },
           error: function (xhr, type) {
               ajaxFlag = true;
@@ -2087,7 +2134,7 @@ function hasNoData() {
                     label: '去设置',
                     type: 'primary',
                     onClick: function () {
-                        console.log('确定')
+                        // console.log('确定')
                         tosetkeyspage();
                     }
                 },

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

@@ -888,6 +888,7 @@
         url:'/bigmember/use/isAdd?t' + new Date().getTime(),
         success: function (r) {
             if (r && r.data) {
+              window.isFree = r.data.isFree
                 window.jyAddInfo = r.data
                 if((r.data.memberStatus > 0 && r.data.isSubCount) || SuperSearch.isEntNicheNew) {
                     $('#resbm').hide()

+ 70 - 4
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -45,6 +45,7 @@
       }
       .menu_list,.downfiles{
         color: #2ABED1;
+        word-break: break-all;
       }
       .van-overlay{
         z-index: 100000!important;
@@ -155,6 +156,42 @@
         border: 1px solid #EBEBEB;
         text-align: center;
       }
+      .app-layout-content-b .bm-bottom{
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        height: 44px;
+        background-color: #FFEDEC;
+        color: #FB483D;
+        font-size: 13px;
+        line-height: 24px;
+        position: fixed;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+      .bm-bottom .btnn{
+        width: 84px;
+        height: 28px;
+        background: linear-gradient(180deg, #FF8787 0%, #FF5E5E 35%, #FF2E2E 68%, #FD4444 100%);
+        color: #FFFFFF;
+        line-height: 28px;
+        font-size: 13px;
+        border-radius: 88px 53px 53px 0px;
+        padding: 2px 16px;
+        cursor: pointer;
+      }
+      .info .yhfb{
+        background-color: rgba(255, 58, 32, 0.1);
+        padding:0 8px;
+        border-bottom-right-radius: 12px;
+        width: 74px;
+        line-height: 22px;
+        font-size: 12px;
+        color: #FF3A20;
+        margin-bottom: -19px;
+      }
     </style>
 </head>
 <body>
@@ -297,6 +334,12 @@
                     }
                 });
             </script>
+<!--            <div v-if="item.site === '剑鱼信息发布平台' || item.spidercode === 'a_jyxxfbpt_gg'" class="yhfb">用户发布</div>-->
+            {{if .T.obj.site}}
+            {{if eq .T.obj.site "剑鱼信息发布平台"}}
+            <div class="yhfb">用户发布</div>
+            {{end}}
+            {{end}}
             <div class="title myfollow" id="title">{{.T.obj.title}}</div>
             <script>
                 var MoneyUnit = {
@@ -846,6 +889,29 @@
             <img class="upshare" src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/images/wx/upshare.png?v={{Msg "seo" "version"}}"/>
             <img class="upclose" src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/images/wx/upclose.png?v={{Msg "seo" "version"}}"/>
         </div>
+        {{if .T.obj.site}}
+        {{if eq .T.obj.site "剑鱼信息发布平台"}}
+        {{if .T.obj.recommended_service}}
+        {{if eq .T.obj.recommended_service 1}}
+          <div class="bm-bottom">
+            <div>
+              <span>该信息由用户发布,急寻供应商</span>
+              <span class="btnn">点击报名</span>
+              <script>
+                $(".btnn").click(function(){
+                  //点击报名事件处理
+                  var infoid = window.location.pathname.split("/")[4].split(".html")[0]
+                  location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + 'peugeot_supplier_regist' + '&infoid=' + infoid
+                  // vm.dialogTitleTop='供应商报名'
+                  // vm.dialogTitle = '请完善您的个人信息,抢先对接采购单位'
+                })
+              </script>
+            </div>
+          </div>
+        {{end}}
+        {{end}}
+        {{end}}
+        {{end}}
     </div>
 </div>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
@@ -1117,13 +1183,13 @@
                 //是大会员
                 var bigWinnerTel = {{.T.obj.winnertel}};
                 var winner_enttel={{.T.obj.winner_enttel}};
-                var tel_source="来源:国家企业公示网站";
+                var tel_source="来源:国家企业公示网站、招标信息等";
                 if(bigWinnerTel==null){
                     if(winner_enttel==null){
                         bigWinnerTel=""
                     }else{
                         bigWinnerTel=winner_enttel
-                        tel_source="来源:招标公告网站"
+                        // tel_source="来源:招标公告网站"
                     }
                 }
                 var bigInfohtml =''
@@ -2060,13 +2126,13 @@
           }
           var winnertel = {{.T.obj.winnertel}};
           var winner_enttel={{.T.obj.winner_enttel}};
-          var tel_source="来源:国家企业公示网站";
+          var tel_source="来源:国家企业公示网站、招标信息等";
           if(winnertel==null){
               if(winner_enttel==null){
                   winnertel=""
               }else{
                   winnertel=winner_enttel
-                  tel_source="来源:招标公告网站"
+                  // tel_source="来源:招标公告网站"
               }
           }
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 7 - 28
src/jfw/modules/bigmember/src/config.json


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

@@ -45,7 +45,14 @@ type config struct {
 		TimeOut         int `json:"timeOut"`         //并发池等待超时时长,单位秒
 		ProjectNumLimit int `json:"projectNumLimit"` //自定义报告限制项目个数
 	} `json:"marketAnalysisPool"` //市场分析
-	ForecastTime int //中标预测结果redis 缓存时间
+	ForecastTime   int //中标预测结果redis 缓存时间
+	IsAddCacheTime int //isadd 接口数据存储时间 + 120 内随机数
+	IsAddUrls      struct {
+		Free      []string `json:"free"`
+		Vip       []string `json:"vip"`
+		BigMember []string `json:"bigMember"`
+		EntNiche  []string `json:"entNiche"`
+	}
 }
 
 type customerInfo struct {

+ 3 - 3
src/jfw/modules/bigmember/src/service/analysis/potential.go

@@ -41,8 +41,8 @@ func (this *Analysis) PotIndex() {
 		if ptst.PCOR != "" && ptst.IsIndex {
 			list := []*PTComs{}
 			ok, _ := redis.Exists("other", "CRIndex_"+ptst.PCOR+"_"+ptst.UserId)
-			baseKeys := ptst.Base64Keys()
-			_res := redis.Get("other", baseKeys)
+			redis_baseKeys := "CRIndex_new_" + ptst.UserId + "_" + ptst.Base64Keys()
+			_res := redis.Get("other", redis_baseKeys)
 			if ok && _res != nil {
 				b, e := json.Marshal(_res)
 				if e != nil {
@@ -64,7 +64,7 @@ func (this *Analysis) PotIndex() {
 				list = list[:20]
 			}
 			if len(list) > 0 {
-				redis.Put("other", baseKeys, list, 8*60*60)
+				redis.Put("other", redis_baseKeys, list, 8*60*60)
 				redis.Put("other", "CRIndex_"+ptst.PCOR+"_"+ptst.UserId, "CR", 8*60*60)
 			}
 			return Result{Data: map[string]interface{}{

+ 128 - 70
src/jfw/modules/bigmember/src/service/use/use.go

@@ -8,11 +8,13 @@ import (
 	"entity"
 	"fmt"
 	"log"
+	"math/rand"
 	"mongodb"
 	qu "qfw/util"
 	"qfw/util/elastic"
 	"qfw/util/jy"
 	"qfw/util/redis"
+	"strconv"
 	"strings"
 	"time"
 	"util"
@@ -585,94 +587,150 @@ func (u *Use) Update() {
 	u.ServeJson(r)
 }
 
+var level_map = map[int]string{
+	1: "专家版",
+	2: "智慧版",
+	3: "商机版",
+	4: "试用版",
+	5: "自定义",
+	6: "商机版2.0",
+	7: "专家版2.0",
+}
+
+type UserInfo struct {
+	Combo           string `json:"combo"`           //大会员购买版本名称
+	BigMemberStatus int    `json:"memberStatus"`    //大会员状态
+	IsSubCount      bool   `json:"isSubCount"`      //是否是子账号
+	IsMemberTrial   bool   `json:"is_member_trial"` //是否是大会员试用用户
+	IsUsed          bool   `json:"isUsed"`          //是否首次使用大会员
+	Powers          []int  `json:"power"`           //大会员用户权限集合
+	EntName         string `json:"entname"`         //用户相关企业信息
+	EntNiche        bool   `json:"entniche"`        //是否是商机管理用户
+	VipStatus       int    `json:"vipStatus"`       //超级订阅用户状态
+	Viper           bool   `json:"viper"`           //超级订阅升级用户
+	FileNum         int    `json:"fileNum"`         //超级订阅用户附件下载包的剩余次数
+	IsFree          bool   `json:"isFree"`          //是否是免费用户
+	FreeHasKey      bool   `json:"freeHasKey"`      //免费用户是否有关键词
+	FreeEntPort     int    `json:"freeEntPort"`     //免费用户可查看企业画像次数
+	FreeBuyerPort   int    `json:"freeBuyerPort"`   //免费用户可查看采购单位画像次数
+	FreeFile        int    `json:"freeFile"`        //免费用户可以进行附件下载次数
+	IsFreeUpgrade   bool   `json:"isUpgrade"`       //新免费用户
+}
+
 //是否使用过首次使用
 func (u *Use) IsAdd() {
 	r := func() Result {
-		d := map[string]interface{}{
-			"isUsed":          false,
-			"memberStatus":    0,
-			"vipStatus":       0,
-			"entname":         "",
-			"isSubCount":      false,
-			"is_member_trial": false,
-			"power":           []string{},
-		}
+		uRefer := u.Refer()
 		userid := qu.ObjToString(u.GetSession("userId"))
 		if userid == "" {
 			return Result{Data: nil, Error_msg: "未登录"}
 		}
-		var hasKey bool
-		user, ok := db.Mgo.FindById("user", userid, `{"o_jy":1,"i_vip_status":1,"l_vip_endtime":1,"o_vipjy":1,"o_member_jy":1}`)
-		if ok && user != nil {
-			o_jy, _ := (*user)["o_jy"].(map[string]interface{})
-			a_key, _ := o_jy["a_key"].([]interface{})
-			hasKey = len(a_key) > 0
-		}
-		d["freeHasKey"] = hasKey
-		//获取用户权限详情
-		power := []int{} //GetNewPower(userid)
-		bigPower := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
-		for k, _ := range bigPower.PowerMap {
-			power = append(power, k)
-		}
-		//是否是免费用户
-		d["isFree"] = bigPower.VipStatus <= 0 && bigPower.Status <= 0
+		var (
+			userInfo      = &UserInfo{}
+			userCacheBool = false
+		)
 
-		d["vipStatus"] = bigPower.VipStatus
-		d["power"] = power
-		d["isUsed"] = bigPower.Used
-		d["memberStatus"] = bigPower.Status
-		d["viper"] = bigPower.Vip_BuySet.Upgrade == 1
-		d["isSubCount"] = bigPower.Pid != ""
-		d["is_member_trial"] = bigPower.HasTrial
-		d["entniche"] = false //是否是商机管理用户
-		//免费用户可查看企业画像次数//免费用户可查看采购单位画像次数//免费用户可以进行附件下载次数
-		d["freeEntPort"], d["freeBuyerPort"], d["freeFile"] = jy.FreeExperience(userid)
-		d["isUpgrade"] = bigPower.IsUpgrade //是否是升级后的免费用户  默认false
-		//没有大会员附件下载权限
-		var notBigFileBool = bigPower.Status <= 0 || !bigPower.PowerMap[3]
-		//超级订阅非大会员用户附件下载本月可用次数
-		uk := qu.If(notBigFileBool && bigPower.VipStatus > 0 && bigPower.Vip_BuySet.Upgrade == 1, "v", "f").(string)
-		//附件下载包的剩余次数
-		filePackKey := fmt.Sprintf(jy.FilePackNumKey, userid, fmt.Sprint(time.Now().Month()))
-		filePackNum := redis.GetInt(jy.PowerCacheDb, filePackKey)
-		d["fileNum"] = config.Config.FileUploadNum[uk] - redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))) + filePackNum
-		//新用户->新订阅设置页面
-		//dev4.6.4 NewFreeUser:作为常量判断 见:bigVipPower.go-ws
-		if config.Config.NewFreeUser < bigPower.Registedate {
-			d["isUpgrade"] = true
+		baseInfoCacheKey := fmt.Sprintf(jy.IsGetUserBaseInfoRedisKey, userid)
+		if bytes, err := redis.GetBytes(jy.BaseInfoCacheDb, baseInfoCacheKey); err == nil && len(*bytes) > 0 {
+			err = json.Unmarshal(*bytes, &userInfo)
+			if err == nil {
+				userCacheBool = true
+			} else {
+				log.Println("缓存异常")
+			}
 		}
-		uid := userid
-		if bigPower.Pid != "" {
-			uid = bigPower.Pid
+		if !userCacheBool {
+			bigPower := jy.GetBigVipUserBaseMsg(userid, db.Mysql, db.Mgo)
+			userInfo = &UserInfo{
+				BigMemberStatus: bigPower.Status,
+				Combo:           level_map[bigPower.Status],
+				IsSubCount:      bigPower.Pid != "",
+				IsMemberTrial:   bigPower.HasTrial,
+				IsUsed:          bigPower.Used,
+				EntName:         bigPower.EntName,
+				EntNiche:        bigPower.EntnicheStatus > 0,
+				VipStatus:       bigPower.VipStatus,
+				Viper:           bigPower.Vip_BuySet.Upgrade > 0,
+				IsFree:          bigPower.VipStatus <= 0 && bigPower.Status <= 0 && bigPower.EntnicheStatus <= 0,
+				IsFreeUpgrade:   bigPower.IsUpgrade,
+			}
+			power := []int{}
+			for k, _ := range bigPower.PowerMap {
+				power = append(power, k)
+			}
+			userInfo.Powers = power
+			//存储缓存
+			go func() {
+				if bytes, err := json.Marshal(userInfo); err == nil && bytes != nil {
+					if redis.PutBytes(jy.BaseInfoCacheDb, baseInfoCacheKey, &bytes, config.Config.IsAddCacheTime+rand.Intn(120)) != nil {
+						log.Println("信息缓存异常")
+					}
+				}
+			}()
 		}
-		d["combo"] = Combo(uid, bigPower.Status)
-		phone, _ := Phone(userid)
-		if phone == "" {
-			return Result{Data: d}
+		//不存缓存
+		//vip
+		if userInfo.VipStatus > 0 {
+			vipBool := true
+			if len(config.Config.IsAddUrls.Vip) > 0 && uRefer != "" {
+				vipBool = false
+				for _, v := range config.Config.IsAddUrls.Vip {
+					if strings.Contains(uRefer, v) {
+						vipBool = true
+						break
+					}
+				}
+
+			}
+			if vipBool {
+				//没有大会员附件下载权限
+				var notBigFileBool = userInfo.BigMemberStatus <= 0 || !strings.Contains(intStringsJoin(userInfo.Powers), "3")
+				//超级订阅非大会员用户附件下载本月可用次数
+				uk := qu.If(notBigFileBool && userInfo.VipStatus > 0 && userInfo.Viper, "v", "f").(string)
+				//附件下载包的剩余次数
+				filePackKey := fmt.Sprintf(jy.FilePackNumKey, userid, fmt.Sprint(time.Now().Month()))
+				filePackNum := redis.GetInt(jy.PowerCacheDb, filePackKey)
+				userInfo.FileNum = config.Config.FileUploadNum[uk] - redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.VipFileUploadNumKey, userid, fmt.Sprint(time.Now().Month()))) + filePackNum
+			}
 		}
-		//获取用户所在企业 : 如有多个企业,仅显示一个企业,显示顺序为:购买商机管理的企业>企业认证的企业>普通 企业,同一类型存在多个时,任意展示一个企业
-		res := db.Mysql.SelectBySql(`SELECT i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
-			ON u.ent_id=i.id
-			WHERE u.phone=?
-			ORDER BY  i.status DESC,i.auth_status DESC, CASE WHEN i.phone=? THEN 0  ELSE 1 END  ASC`, phone, phone)
-		if res != nil && len(*res) > 0 {
-			entname := qu.ObjToString((*res)[0]["name"])
-			d["entname"] = entname
-			//已购买企业未过期-商机管理用户
-			for _, v := range *res {
-				if qu.IntAll(v["status"]) == 1 && qu.IntAll(v["power"]) == 1 {
-					d["isFree"] = false
-					d["entniche"] = true
-					break
+		//免费用户  // 商机管理用户 可以用免费用户的企业画像权限 留资有一次权限 所以也要验证商机管理用户
+		if userInfo.IsFree || userInfo.EntNiche {
+			freeBool := true
+			if len(config.Config.IsAddUrls.Free) > 0 && uRefer != "" {
+				freeBool = false
+				for _, v := range config.Config.IsAddUrls.Free {
+					if strings.Contains(uRefer, v) {
+						freeBool = true
+						break
+					}
+				}
+
+			}
+			if freeBool {
+				//免费用户是否有关键词
+				user, ok := db.Mgo.FindById("user", userid, `{"o_jy":1}`)
+				if ok && user != nil {
+					o_jy, _ := (*user)["o_jy"].(map[string]interface{})
+					a_key, _ := o_jy["a_key"].([]interface{})
+					userInfo.FreeHasKey = len(a_key) > 0
 				}
+				//免费用户可查看企业画像次数//免费用户可查看采购单位画像次数//免费用户可以进行附件下载次数
+				userInfo.FreeEntPort, userInfo.FreeBuyerPort, userInfo.FreeFile = jy.FreeExperience(userid)
 			}
 		}
-		return Result{Data: d}
+		return Result{Data: userInfo}
 	}()
 	u.ServeJson(r)
 }
 
+func intStringsJoin(is []int) string {
+	var str = []string{}
+	for _, v := range is {
+		str = append(str, strconv.Itoa(v))
+	}
+	return strings.Join(str, ",")
+}
+
 //AI中标预测历史记录
 func (u *Use) Aiused_history() {
 	r := func() Result {

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

@@ -30,12 +30,12 @@ const (
 	SearchMaxPageNum_PC    = 10  //免费用户500条记录
 	SearchMaxPageNum_PAYED = 100 //付费用户5000条记录
 
-	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass"`
+	bidSearch_field_1 = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","bidamount","budget","buyerclass","filetext","spidercode","site"`
 	bidSearch_field   = bidSearch_field_1 + `,"bidopentime","winner","buyer","projectname","projectcode","projectinfo"`
 )
 
 //GetWxsearchlistData 移动端招标信息搜索
-func GetWxsearchlistData(keywords, scope, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel string, pageNum, pageSize int, selectTypeArr []string, field, notkey string) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
+func GetWxsearchlistData(keywords, scope, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, pageNum, pageSize int, selectTypeArr []string, field, notkey string, searchTypeSwitch bool) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
 	var hightlightContent bool = false //是否高亮正文
 	for _, v := range selectTypeArr {
 		if v == "detail" {
@@ -53,7 +53,7 @@ func GetWxsearchlistData(keywords, scope, publishtime, subtype, industry, minpri
 	} else {
 		findfields = fmt.Sprintf(`"%s"`, strings.Join(selectTypeArr, "\",\""))
 	}
-	qstr := GetSearchQuery(s_word, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, findfields, GetBidSearchQuery(scope, publishtime, subtype, winner, buyerclass), notkey)
+	qstr := GetSearchQuery(s_word, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, findfields, GetBidSearchQuery(scope, city, publishtime, subtype, winner, buyerclass), notkey, searchTypeSwitch)
 	if hightlightContent { //全文搜索
 		list = elastic.GetAllByNgram(INDEX, TYPE, qstr, `"detail"`, bidSearch_sort, field, (pageNum-1)*pageSize, pageSize, 100, true)
 	} else { //标题搜索
@@ -69,7 +69,7 @@ func GetWxsearchlistData(keywords, scope, publishtime, subtype, industry, minpri
 }
 
 //GetPcBidSearchData pc端招标信息搜索
-func GetPcBidSearchData(searchvalue, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel string, start, pageSize int, isGetCount bool, selectTypeArr []string, field, notkey string, ispayed bool) (count, totalPage int64, list *[]map[string]interface{}) {
+func GetPcBidSearchData(searchvalue, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, start, pageSize int, isGetCount bool, selectTypeArr []string, field, notkey string, ispayed, searchTypeSwitch bool) (count, totalPage int64, list *[]map[string]interface{}) {
 	var findfields string
 	var hightlightContent bool = false //是否高亮正文
 	for _, v := range selectTypeArr {
@@ -83,7 +83,7 @@ func GetPcBidSearchData(searchvalue, area, publishtime, subtype, industry, minpr
 	} else {
 		findfields = fmt.Sprintf(`"%s"`, strings.Join(selectTypeArr, "\",\""))
 	}
-	qstr := GetSearchQuery(searchvalue, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, findfields, GetBidSearchQuery(area, publishtime, subtype, winner, buyerclass), notkey)
+	qstr := GetSearchQuery(searchvalue, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, findfields, GetBidSearchQuery(area, city, publishtime, subtype, winner, buyerclass), notkey, searchTypeSwitch)
 	if isGetCount && qstr != "" && start == 0 {
 		count = elastic.Count(INDEX, TYPE, qstr)
 	}
@@ -107,7 +107,15 @@ func GetPcBidSearchData(searchvalue, area, publishtime, subtype, industry, minpr
 	return
 }
 
-func GetBidSearchQuery(area, publishtime, subtype, winner, buyerclass string) string {
+var topType = map[string]string{
+	"招标预告":   "预告",
+	"招标公告":   "招标",
+	"招标结果":   "结果",
+	"招标信用信息": "其它",
+}
+
+func GetBidSearchQuery(area, city, publishtime, subtype, winner, buyerclass string) string {
+	query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
 	query := ``
 	if area != "" {
 		query += `{"terms":{"area":[`
@@ -119,6 +127,23 @@ func GetBidSearchQuery(area, publishtime, subtype, winner, buyerclass string) st
 		}
 		query += `]}}`
 	}
+	//
+	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(query_bool_should, query)
+	}
 	if publishtime != "" {
 		if len(query) > 0 {
 			query += ","
@@ -164,14 +189,24 @@ func GetBidSearchQuery(area, publishtime, subtype, winner, buyerclass string) st
 		if len(query) > 0 {
 			query += ","
 		}
-		query += `{"terms":{"subtype":[`
-		for k, v := range strings.Split(subtype, ",") {
-			if k > 0 {
-				query += `,`
+		var topTypes []string
+		var subTypes []string
+
+		for _, v := range strings.Split(subtype, ",") {
+			if v1, ok := topType[v]; ok {
+				topTypes = append(topTypes, fmt.Sprintf(`"%s"`, v1))
+			} else {
+				subTypes = append(subTypes, fmt.Sprintf(`"%s"`, v))
 			}
-			query += `"` + v + `"`
 		}
-		query += `]}}`
+		log.Println("信息类型搜索:", topTypes, subTypes)
+		if len(subTypes) > 0 && len(topTypes) > 0 {
+			query += fmt.Sprintf(`{"bool": {"should": [{"terms": {"subtype": [%s]}},{"terms": {"toptype": [%s]}}]}}`, strings.Join(subTypes, ","), strings.Join(topTypes, ","))
+		} else if len(subTypes) > 0 {
+			query += fmt.Sprintf(`{"terms":{"subtype":[%s]}}`, strings.Join(subTypes, ","))
+		} else if len(topTypes) > 0 {
+			query += fmt.Sprintf(`{"terms":{"toptype":[%s]}}`, strings.Join(topTypes, ","))
+		}
 	}
 	if winner != "" {
 		if len(query) > 0 {
@@ -202,23 +237,55 @@ func GetBidSearchQuery(area, publishtime, subtype, winner, buyerclass string) st
 	return query
 }
 
-func GetSearchQuery(keyword, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, findfields, mustquery, notkey string) (qstr string) {
+//包含正文或 附件 不包含标题
+func DetailFileORTitle(findfields string) bool {
+	return (strings.Contains(findfields, `"detail"`) || strings.Contains(findfields, `"filetext"`)) && !strings.Contains(findfields, `"title"`)
+}
+
+//包含标题和正文
+func DetailTitle(findfields string) bool {
+	return strings.Contains(findfields, `"detail"`) && strings.Contains(findfields, `"title"`)
+}
+func GetSearchQuery(keyword, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, findfields, mustquery, notkey string, searchTypeSwitch bool) (qstr string) {
 	multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
 	query := `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
 	query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
 	query_bools_must := `{"bool":{"must":[{"range":{"bidamount":{%s}}}]}},{"bool":{"must":[{"range":{"budget":{%s}}}],"must_not":[{"range":{"bidamount":{"gte":-1}}}]}}`
 	query_bool_must := `{"bool":{"must":[{"terms":{"s_subscopeclass":[%s]}}]}}`
 	query_missing := `{"constant_score":{"filter":{"missing":{"field":"%s"}}}}`
+	query_bool_must_term := `{"bool": {"must": [{ "term": {"isValidFile": %d }}]}}`
 	gte := `"gte": %s`
 	lte := `"lte": %s`
 	musts, must_not := []string{}, []string{}
 	if mustquery != "" {
 		musts = append(musts, mustquery)
 	}
+	//搜索范围是否只有附件
+	//搜索范围只选择附件,是否有附件条件无效;
+	var isFileSearch bool = findfields == `"filetext"`
 	if keyword != "" {
 		keyword_multi_match := fmt.Sprintf(multi_match, "%s", findfields)
 		shoulds := []string{}
 		for _, v := range strings.Split(keyword, "+") {
+			if elastic.ReplaceYH(v) == "" {
+				continue
+			}
+			if len([]rune(elastic.ReplaceYH(v))) == 1 {
+				//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+				if DetailFileORTitle(findfields) {
+					keyword_multi_match = fmt.Sprintf(multi_match, "%s", findfields+`,"title"`)
+				}
+			} else {
+				//标题+全文搜索 搜索类型开关打开 默认搜索全文;(全文包含标题)(单字排除)
+				if searchTypeSwitch && DetailTitle(findfields) {
+					if strings.Contains(findfields, `"title",`) {
+						findfields = strings.Replace(findfields, `"title",`, ``, -1)
+					} else if strings.Contains(findfields, `,"title"`) {
+						findfields = strings.Replace(findfields, `,"title"`, ``, -1)
+					}
+					keyword_multi_match = fmt.Sprintf(multi_match, "%s", findfields)
+				}
+			}
 			shoulds = append(shoulds, fmt.Sprintf(keyword_multi_match, elastic.ReplaceYH(v)))
 		}
 		musts = append(musts, fmt.Sprintf(elastic.NgramMust, strings.Join(shoulds, ",")))
@@ -279,10 +346,24 @@ func GetSearchQuery(keyword, industry, minprice, maxprice, hasBuyerTel, hasWinne
 			if v == "" {
 				continue
 			}
+			if len([]rune(elastic.ReplaceYH(v))) == 1 {
+				//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+				if DetailFileORTitle(findfields) {
+					notkey_multi_match = fmt.Sprintf(multi_match, "%s", findfields+`,"title"`)
+				}
+			}
 			notkey_must_not = append(notkey_must_not, fmt.Sprintf(notkey_multi_match, elastic.ReplaceYH(v)))
 		}
 		must_not = append(must_not, fmt.Sprintf(query_bool_should, strings.Join(notkey_must_not, ",")))
 	}
+	if !isFileSearch && fileExists != "" {
+		if fileExists == "1" { //有附件
+			must_not = append(must_not, fmt.Sprintf(query_missing, "isValidFile"))
+			musts = append(musts, fmt.Sprintf(query_bool_must_term, 1))
+		} else if fileExists == "-1" { //无附件
+			musts = append(musts, fmt.Sprintf(query_missing, "isValidFile"))
+		}
+	}
 	qstr = fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(must_not, ","))
 	log.Println(qstr)
 	return
@@ -321,37 +402,28 @@ func PublicSearch(userId, selectType, publishtime string, bidSearchOldUserLimit
 }
 
 //所有的再次分词查询 只查标题
-func IntegratedData(platform string, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, secondFlag, area, publishtime, subtype, buyerclass, notkey string, queryItems []string, list *[]map[string]interface{}) (string, string, string, string, *[]map[string]interface{}) {
+func IntegratedData(platform string, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, secondFlag, area, city, publishtime, subtype, buyerclass, notkey string, queryItems []string, list *[]map[string]interface{}, field string, searchTypeSwitch bool) (string, string, string, string, *[]map[string]interface{}) {
 	var pcAjaxFlag string
-	secondSearch := false
 	var secRel *[]map[string]interface{} = list
-	for _, item := range queryItems {
-		if item == "title" {
-			secondSearch = true
-			break
-		}
-	}
-	if secondSearch {
-		if secondKWS = jy.HttpEs(s_word, "ik_smart", public.DbConf.Elasticsearch.Main.Address); secondKWS != "" {
-			findfields := `"title"`
-			qstr := GetSearchQuery(secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, findfields, GetBidSearchQuery(area, publishtime, subtype, "", buyerclass), notkey)
-			secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, 0, 2*SearchPageSize_PC, 0, false)
-			if secRel != nil && len(*secRel) > 0 {
-				public.BidListConvert(industry, secRel)
-				if platform == "app" || platform == "wx" {
-					for _, v := range *secRel {
-						v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
-					}
+	if secondKWS = jy.HttpEs(s_word, "ik_smart", public.DbConf.Elasticsearch.Main.Address); secondKWS != "" {
+		findfields := `"title"`
+		qstr := GetSearchQuery(secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, findfields, GetBidSearchQuery(area, city, publishtime, subtype, "", buyerclass), notkey, searchTypeSwitch)
+		secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, field, 0, 2*SearchPageSize_PC, 0, false)
+		if secRel != nil && len(*secRel) > 0 {
+			public.BidListConvert(industry, secRel)
+			if platform == "app" || platform == "wx" {
+				for _, v := range *secRel {
+					v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
 				}
 			}
-			if list != nil {
-				secRel = public.MapArrSortMerge(*list, *secRel, "_id", "publishtime")
-			}
-			secondFlag = "T"
-			pcAjaxFlag = "T"
-			if secondKWS != "" {
-				s_word += "+" + secondKWS
-			}
+		}
+		if list != nil {
+			secRel = public.MapArrSortMerge(*list, *secRel, "_id", "publishtime")
+		}
+		secondFlag = "T"
+		pcAjaxFlag = "T"
+		if secondKWS != "" {
+			s_word += "+" + secondKWS
 		}
 	}
 	return s_word, pcAjaxFlag, secondFlag, secondKWS, secRel
@@ -419,6 +491,10 @@ func LisetData(stype, pageNum int, list *[]map[string]interface{}, secondFlag st
 				}
 				v["detail"] = detail
 				v["href"] = util.EncodeArticleId2ByCheck(util.GetRandom(20))
+				if isValidFile, _ := v["isValidFile"].(bool); isValidFile {
+					delete(v, "filetext")
+					v["fileExists"] = true
+				}
 			}
 		}
 		if secondFlag != "" {
@@ -446,21 +522,23 @@ func LisetData(stype, pageNum int, list *[]map[string]interface{}, secondFlag st
 	return secondList, totalPage, hasNextPage
 }
 
-func SearchData(platform string, request *http.Request, currentPage int, userId, secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel string, start, pageSize int, isGetCount bool, queryItems []string, field, notkey string, isPayedUser bool) (second, b_word, a_word, pcAjaxFlag, secondFlag string, count, totalPage int64, list *[]map[string]interface{}) {
+func SearchData(platform string, request *http.Request, currentPage int, userId, secondKWS, s_word, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists string, start, pageSize int, isGetCount bool, queryItems []string, field, notkey string, isPayedUser, searchTypeSwitch bool) (second, b_word, a_word, pcAjaxFlag, secondFlag string, count, totalPage int64, list *[]map[string]interface{}) {
+	//包含标题才能进行二次搜索
+	var secondSearch = strings.Contains(strings.Join(queryItems, ","), "title")
 	var searchvalue = s_word
 	number := util.If(platform == "app" || platform == "wx", 1, 0)
 	if platform == "app" || platform == "wx" {
-		list, b_word, a_word, s_word = GetWxsearchlistData(s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, start, SearchPageSize_APP, queryItems, field, notkey)
+		list, b_word, a_word, s_word = GetWxsearchlistData(s_word, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, start, SearchPageSize_APP, queryItems, field, notkey, searchTypeSwitch)
 		if list != nil && len(*list) != 0 {
 			count = int64(len(*list))
 		}
 	} else {
-		count, totalPage, list = GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, start, pageSize, isGetCount, queryItems, field, notkey, isPayedUser)
+		count, totalPage, list = GetPcBidSearchData(s_word, area, city, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, start, pageSize, isGetCount, queryItems, field, notkey, isPayedUser, searchTypeSwitch)
 	}
 
-	if len([]rune(s_word)) > 3 && int(count) < SearchPageSize_PC && start == number {
+	if len([]rune(s_word)) > 3 && int(count) < SearchPageSize_PC && start == number && secondSearch {
 		var paramList = list
-		s_word, pcAjaxFlag, secondFlag, second, list = IntegratedData(platform, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, secondFlag, area, publishtime, subtype, buyerclass, notkey, queryItems, paramList)
+		s_word, pcAjaxFlag, secondFlag, second, list = IntegratedData(platform, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, fileExists, secondFlag, area, city, publishtime, subtype, buyerclass, notkey, queryItems, paramList, field, searchTypeSwitch)
 	}
 
 	listSize := 0
@@ -470,12 +548,14 @@ func SearchData(platform string, request *http.Request, currentPage int, userId,
 	public.SaveUserSearchLog(request, userId, -1, platform, "超级搜索", map[string]interface{}{
 		"search_word":        util.If(platform == "app" || platform == "wx", searchvalue, s_word),
 		"search_area":        area,
+		"search_city":        city,
 		"search_price":       []string{minprice, maxprice},
 		"search_publishtime": publishtime,
 		"search_type":        subtype,
 		"search_industry":    industry,
 		"pagenum":            currentPage,
 		"pagesize":           listSize,
+		"fileExists":         fileExists,
 	})
 	return
 }

+ 181 - 83
src/jfw/modules/common/src/qfw/util/dataexport/dataexport.go

@@ -28,26 +28,28 @@ type KeyWord struct {
 
 /*筛选条件*/
 type SieveCondition struct {
-	Id           string    `json:"id"`
-	PublishTime  string    `json:"publishtime"`  //发布时间
-	Area         []string  `json:"area"`         //地区-省份
-	City         []string  `json:"city"`         //地区-城市
-	Region       []string  `json:"region"`       //地区-省份+城市
-	Industry     []string  `json:"industry"`     //行业
-	Keyword      []KeyWord `json:"keywords"`     //关键词
-	Buyer        []string  `json:"buyer"`        //招标单位(采购单位)
-	Buyerclass   []string  `json:"buyerclass"`   //采购单位类型
-	HasBuyerTel  string    `json:"hasBuyertel"`  //是否有采购单位电话
-	Winner       []string  `json:"winner"`       //中标单位
-	HasWinnerTel string    `json:"hasWinnertel"` //是否有中标单位电话
-	ComeInTime   int64     `json:"comeintime"`   //入库时间(秒)
-	OpenId       string    `json:"openid"`       //用户openid
-	MinPrice     string    `json:"minprice"`     //金额——最少
-	MaxPrice     string    `json:"maxprice"`     //金额——最多
-	SelectType   string    `json:"selectType"`   //筛选(正文 or 标题)
-	Subtype      string    `json:"subtype"`      //信息类型
-	SelectIds    []string  `json:"selectId"`     //选择信息导出
-	Comeinfrom   string    `json:"comeinfrom"`   //查询来源
+	Id               string    `json:"id"`
+	PublishTime      string    `json:"publishtime"`      //发布时间
+	Area             []string  `json:"area"`             //地区-省份
+	City             []string  `json:"city"`             //地区-城市
+	Region           []string  `json:"region"`           //地区-省份+城市
+	Industry         []string  `json:"industry"`         //行业
+	Keyword          []KeyWord `json:"keywords"`         //关键词
+	Buyer            []string  `json:"buyer"`            //招标单位(采购单位)
+	Buyerclass       []string  `json:"buyerclass"`       //采购单位类型
+	HasBuyerTel      string    `json:"hasBuyertel"`      //是否有采购单位电话
+	Winner           []string  `json:"winner"`           //中标单位
+	HasWinnerTel     string    `json:"hasWinnertel"`     //是否有中标单位电话
+	ComeInTime       int64     `json:"comeintime"`       //入库时间(秒)
+	OpenId           string    `json:"openid"`           //用户openid
+	MinPrice         string    `json:"minprice"`         //金额——最少
+	MaxPrice         string    `json:"maxprice"`         //金额——最多
+	SelectType       string    `json:"selectType"`       //筛选(正文 or 标题)
+	Subtype          string    `json:"subtype"`          //信息类型
+	SelectIds        []string  `json:"selectId"`         //选择信息导出
+	Comeinfrom       string    `json:"comeinfrom"`       //查询来源
+	FileExists       string    `json:"fileExists"`       //是否有附件
+	SearchTypeSwitch bool      `json:"searchTypeSwitch"` //是否开启 正文 标题同时搜索只搜正文的开关
 }
 
 const (
@@ -62,6 +64,25 @@ var onceSearchCount = 500
 var ExportTable string = "export_search"
 var searchPool = make(chan bool, 8)
 
+var topType = map[string]string{
+	"招标预告":   "预告",
+	"招标公告":   "招标",
+	"招标结果":   "结果",
+	"招标信用信息": "其它",
+	"拟建项目":   "拟建",
+	"采购意向":   "采购意向",
+}
+
+//包含正文或 附件 不包含标题
+func DetailFileORTitle(findfields string) bool {
+	return (strings.Contains(findfields, "detail") || strings.Contains(findfields, "filetext")) && !strings.Contains(findfields, "title")
+}
+
+//包含正文包含标题
+func DetailANDTitle(findfields string) bool {
+	return strings.Contains(findfields, "detail") && strings.Contains(findfields, "title")
+}
+
 //获取数据导出查询语句
 func getDataExportSql(scd *SieveCondition) string {
 	if len(scd.SelectIds) > 0 {
@@ -76,6 +97,7 @@ func getDataExportSql(scd *SieveCondition) string {
 	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 }}]}}`
 	gte := `"gte": %s`
 	lte := `"lte": %s`
 
@@ -149,14 +171,25 @@ func getDataExportSql(scd *SieveCondition) string {
 	musts = append(musts, timequery)
 
 	if scd.Subtype != "" {
-		subquery := `{"terms":{"subtype":[`
-		for k, v := range strings.Split(scd.Subtype, ",") {
-			if k > 0 {
-				subquery += `,`
+		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))
+			} else {
+				subTypes = append(subTypes, fmt.Sprintf(`"%s"`, v))
 			}
-			subquery += `"` + v + `"`
 		}
-		subquery += `]}}`
+		log.Println("信息类型搜索:", topTypes, subTypes)
+		if len(subTypes) > 0 && len(topTypes) > 0 {
+			subquery = fmt.Sprintf(`{"bool": {"should": [{"terms": {"subtype": [%s]}},{"terms": {"toptype": [%s]}}]}}`, strings.Join(subTypes, ","), strings.Join(topTypes, ","))
+		} else if len(subTypes) > 0 {
+			subquery = fmt.Sprintf(`{"terms":{"subtype":[%s]}}`, strings.Join(subTypes, ","))
+		} else if len(topTypes) > 0 {
+			subquery = fmt.Sprintf(`{"terms":{"toptype":[%s]}}`, strings.Join(topTypes, ","))
+		}
 		musts = append(musts, subquery)
 	}
 	if len(scd.Industry) > 0 {
@@ -204,25 +237,34 @@ func getDataExportSql(scd *SieveCondition) string {
 		}
 	}
 	boolsNum := 0
+	selectType := scd.SelectType
 	//should
 	if len(scd.Keyword) > 0 {
 		boolsNum = 1
 		queryItem := ""
-		if scd.SelectType == "" {
+		if selectType == "" {
 			queryItem = "title"
-		} else if scd.SelectType == "all" {
+		} else if selectType == "all" {
 			queryItem = "detail\", \"title"
 		} else {
-			queryItem = strings.ReplaceAll(scd.SelectType, ",", "\",\"")
+			if scd.SearchTypeSwitch && DetailANDTitle(selectType) {
+				if strings.Contains(selectType, "title,") {
+					selectType = strings.Replace(selectType, "title,", "", -1)
+				} else if strings.Contains(selectType, ",title") {
+					selectType = strings.Replace(selectType, ",title", "", -1)
+				}
+
+			}
+			queryItem = strings.ReplaceAll(selectType, ",", "\",\"")
 		}
-		multi_match = fmt.Sprintf(multi_match, "%s", "\""+queryItem+"\"")
+		multi_match_new := fmt.Sprintf(multi_match, "%s", "\""+queryItem+"\"")
 
 		if scd.Comeinfrom == "supersearchPage" {
 			var keywordArr []string
 			if strings.Contains(scd.Keyword[0].Keyword, "+") {
-				keywordArr = strings.Split(scd.Keyword[0].Keyword, "+")
+				//keywordArr = strings.Split(scd.Keyword[0].Keyword, "+")
 			} else if strings.Contains(scd.Keyword[0].Keyword, " ") {
-				keywordArr = strings.Split(scd.Keyword[0].Keyword, " ")
+				//keywordArr = strings.Split(scd.Keyword[0].Keyword, " ")
 			}
 			if len(keywordArr) > 1 {
 				KeyWordSearch := KeyWord{}
@@ -232,22 +274,60 @@ func getDataExportSql(scd *SieveCondition) string {
 				scd.Keyword = []KeyWord{KeyWordSearch}
 			}
 		}
-
 		for _, v := range scd.Keyword {
 			shoulds := []string{}
 			must_not := []string{}
-			//附加词
+
 			if v.Keyword != "" {
-				shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+v.Keyword+"\""))
+				if strings.Contains(v.Keyword, "+") {
+					for _, vk := range strings.Split(v.Keyword, "+") {
+						//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 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)
+						} else {
+							shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
+						}
+					}
+				} else if strings.Contains(v.Keyword, " ") {
+					for _, vk := range strings.Split(v.Keyword, " ") {
+						//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 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)
+						} else {
+							shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+vk+"\""))
+						}
+					}
+				} else {
+					//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 detail  搜索的时候加上标题
+					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)
+					} else {
+						shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+v.Keyword+"\""))
+					}
+				}
 			}
 
+			//附加词
 			for _, vv := range v.Appended {
-				shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vv+"\""))
+				shoulds = append(shoulds, fmt.Sprintf(multi_match_new, "\""+vv+"\""))
 			}
 
 			//排除词
 			for _, vv := range v.Exclude {
-				must_not = append(must_not, fmt.Sprintf(multi_match, "\""+vv+"\""))
+				//单个字 搜索范围 有全文或者附件 无标题 例如:学 虚拟机 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+"\""))
+				}
 			}
 
 			//添加
@@ -274,6 +354,18 @@ func getDataExportSql(scd *SieveCondition) string {
 			musts = append(musts, fmt.Sprintf(query_missing, "winnertel"))
 		}
 	}
+
+	//搜索范围是否只有附件
+	//搜索范围只选择附件,是否有附件条件无效;
+	var isFileSearch = strings.ReplaceAll(selectType, ",", "\",\"") == "filetext"
+	if !isFileSearch && scd.FileExists != "" {
+		if scd.FileExists == "1" { //有附件
+			must_not = append(must_not, fmt.Sprintf(query_missing, "isValidFile"))
+			musts = append(musts, fmt.Sprintf(query_bool_must_term, 1))
+		} else if scd.FileExists == "-1" { //无附件
+			musts = append(musts, fmt.Sprintf(query_missing, "isValidFile"))
+		}
+	}
 	qstr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(must_not, ","), strings.Join(bools, ","), boolsNum)
 	return qstr
 }
@@ -287,25 +379,28 @@ func GetSqlObjFromId(mongo mg.MongodbSim, _id string) *SieveCondition {
 	if query, ok = mongo.FindById(ExportTable, _id, nil); !ok {
 		return nil
 	}
+	searchTypeSwitch, _ := (*query)["searchTypeSwitch"].(bool)
 	return &SieveCondition{
-		Id:           _id,
-		Keyword:      getKeyWordArrFromDbResult((*query)["keywords"]),
-		Industry:     getStringArrFromDbResult((*query)["industry"]),
-		MinPrice:     qutil.ObjToString((*query)["minprice"]),
-		MaxPrice:     qutil.ObjToString((*query)["maxprice"]),
-		Subtype:      qutil.ObjToString((*query)["subtype"]),
-		Area:         getStringArrFromDbResult((*query)["area"]),
-		City:         getStringArrFromDbResult((*query)["city"]),
-		SelectType:   qutil.ObjToString((*query)["selectType"]),
-		PublishTime:  qutil.ObjToString((*query)["publishtime"]),
-		Buyer:        getStringArrFromDbResult((*query)["buyer"]),
-		Buyerclass:   getStringArrFromDbResult((*query)["buyerclass"]),
-		HasBuyerTel:  qutil.ObjToString((*query)["hasBuyertel"]),
-		Winner:       getStringArrFromDbResult((*query)["winner"]),
-		HasWinnerTel: qutil.ObjToString((*query)["hasWinnertel"]),
-		ComeInTime:   qutil.Int64All((*query)["comeintime"]),
-		Comeinfrom:   qutil.ObjToString((*query)["comeinfrom"]),
-		SelectIds:    getStringArrFromDbResult((*query)["selectIds"]),
+		Id:               _id,
+		Keyword:          getKeyWordArrFromDbResult((*query)["keywords"]),
+		Industry:         getStringArrFromDbResult((*query)["industry"]),
+		MinPrice:         qutil.ObjToString((*query)["minprice"]),
+		MaxPrice:         qutil.ObjToString((*query)["maxprice"]),
+		Subtype:          qutil.ObjToString((*query)["subtype"]),
+		Area:             getStringArrFromDbResult((*query)["area"]),
+		City:             getStringArrFromDbResult((*query)["city"]),
+		SelectType:       qutil.ObjToString((*query)["selectType"]),
+		PublishTime:      qutil.ObjToString((*query)["publishtime"]),
+		Buyer:            getStringArrFromDbResult((*query)["buyer"]),
+		Buyerclass:       getStringArrFromDbResult((*query)["buyerclass"]),
+		HasBuyerTel:      qutil.ObjToString((*query)["hasBuyertel"]),
+		Winner:           getStringArrFromDbResult((*query)["winner"]),
+		HasWinnerTel:     qutil.ObjToString((*query)["hasWinnertel"]),
+		ComeInTime:       qutil.Int64All((*query)["comeintime"]),
+		Comeinfrom:       qutil.ObjToString((*query)["comeinfrom"]),
+		SelectIds:        getStringArrFromDbResult((*query)["selectIds"]),
+		FileExists:       qutil.ObjToString((*query)["fileExists"]),
+		SearchTypeSwitch: searchTypeSwitch,
 	}
 }
 
@@ -340,17 +435,18 @@ func GetDataExportSearchCountBySieveCondition(scd *SieveCondition, elasticAddres
 					if count > 0 {
 						res = doSearch(qstr, 0, count, "")
 					}
-					secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress)
-					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
+					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
 					}
-					log.Printf("GetDataExportSearchCountUseId-%s-count:%d-分词-sql:%s\n", scd.Id, result, qstr)
-					return result
 				}
 			}
 			return
@@ -516,15 +612,16 @@ func GetDataExportIds(elasticAddress string, scd *SieveCondition, checkCount int
 			}
 			if searchTextSize > 3 && num < 50 {
 				if strings.Index(scd.SelectType, "title") > -1 {
-					secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress)
-					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 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]
+						}
 					}
 				}
 			}
@@ -570,15 +667,16 @@ func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress s
 			}
 			if searchTextSize > 3 && num < 50 {
 				if strings.Index(scd.SelectType, "title") > -1 {
-					secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", elasticAddress)
-					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 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]
+						}
 					}
 				}
 			}

+ 51 - 28
src/jfw/modules/common/src/qfw/util/jy/bigVipPower.go

@@ -4,6 +4,7 @@ import (
 	"encoding/json"
 	"fmt"
 	"log"
+	"math/rand"
 	. "mongodb"
 	qutil "qfw/util"
 	"qfw/util/mysql"
@@ -26,10 +27,12 @@ type BigVipBaseMsg struct {
 
 	VipStatus      int    `json:"vip_status"`      //超级订阅状态
 	Vip_BuySet     BuySet `json:"vip_buyset"`      //超级订阅套餐内容
-	EntnicheStatus int    `json:"entniche_status"` //超级订阅状态
+	EntnicheStatus int    `json:"entniche_status"` //商机管理状态
 
 	IsUpgrade   bool  `json:"isUpgrade"`   //是否是免费用户订阅升级用户 默认true
 	Registedate int64 `json:"registedate"` //用户注册时间
+
+	EntName string `json:"entname"`
 }
 
 //超级订阅购买内容
@@ -46,13 +49,15 @@ const (
 	BigmemberServiceTable   = "bigmember_service"
 	BigmemberUserPowerTable = "bigmember_service_user"
 
-	PowerCacheDb        = "other"
-	PowerCacheKey       = "bigmember_power_3_%s"
-	OneDay              = 60 * 60 * 24
-	UserUpdateAreaKey   = "free_area_num_%s_%s"
-	BaseAreaNum         = 1
-	VipFileUploadNumKey = "vip_file_num_%s_%s"  //超级订阅附件本月一下载次数 %s:userid ; %s:当前月份-fmt.Sprint(time.Now().Month())
-	FilePackNumKey      = "file_pack_num_%s_%s" //附件下载包本月  剩余次数  %s:userid   %s 当前月份-fmt.Sprint(time.Now().Month())
+	PowerCacheDb              = "other"
+	PowerCacheKey             = "bigmember_power_3_%s"
+	OneDay                    = 60 * 60 * 24
+	UserUpdateAreaKey         = "free_area_num_%s_%s"
+	BaseAreaNum               = 1
+	VipFileUploadNumKey       = "vip_file_num_%s_%s"  //超级订阅附件本月一下载次数 %s:userid ; %s:当前月份-fmt.Sprint(time.Now().Month())
+	FilePackNumKey            = "file_pack_num_%s_%s" //附件下载包本月  剩余次数  %s:userid   %s 当前月份-fmt.Sprint(time.Now().Month())
+	BaseInfoCacheDb           = "newother"
+	IsGetUserBaseInfoRedisKey = "baseinfo_%s"
 )
 
 //初始化大会员权益
@@ -86,24 +91,26 @@ func InitBigVipService(mysql *mysql.Mysql) {
 //当大会员状态改变时清除此状态
 func ClearBigVipUserPower(userId string) bool {
 	cacheKey := fmt.Sprintf(PowerCacheKey, userId)
-	return redis.Del(PowerCacheDb, cacheKey)
+	baseInfoCacheKey := fmt.Sprintf(IsGetUserBaseInfoRedisKey, userId)
+	return redis.Del(BaseInfoCacheDb, cacheKey) && redis.Del(BaseInfoCacheDb, baseInfoCacheKey)
 }
+
 //获取商机管理个人基本信息
 func GetEntnicheState(userId string, mysql *mysql.Mysql, mg MongodbSim) *BigVipBaseMsg {
-    userPower := BigVipBaseMsg{}
-    userPower.EntnicheStatus = 0
-    //手机号
-    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}`)
-    if ok && *data != nil && len(*data) > 0 {
-        //查询是否是商机管理付费用户
-        phone, _ := qutil.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
-        if phone != "" {
-            if count := mysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
-                userPower.EntnicheStatus = 1
-            }
-        }
-    }
-    return &userPower
+	userPower := BigVipBaseMsg{}
+	userPower.EntnicheStatus = 0
+	//手机号
+	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}`)
+	if ok && *data != nil && len(*data) > 0 {
+		//查询是否是商机管理付费用户
+		phone, _ := qutil.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
+		if phone != "" {
+			if count := mysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
+				userPower.EntnicheStatus = 1
+			}
+		}
+	}
+	return &userPower
 }
 
 //获取大会员个人基本信息
@@ -117,7 +124,7 @@ func GetBigVipUserBaseMsg(userId string, mysql *mysql.Mysql, mg MongodbSim) *Big
 	userPower.Uid = userId
 	cacheKey := fmt.Sprintf(PowerCacheKey, userId)
 
-	if bytes, err := redis.GetBytes(PowerCacheDb, cacheKey); err == nil && bytes != nil {
+	if bytes, err := redis.GetBytes(BaseInfoCacheDb, cacheKey); err == nil && bytes != nil {
 		if err := json.Unmarshal(*bytes, &userPower); err == nil {
 			return &userPower
 		}
@@ -160,12 +167,27 @@ func GetBigVipUserBaseMsg(userId string, mysql *mysql.Mysql, mg MongodbSim) *Big
 		}
 		//}
 		//查询是否是商机管理付费用户
-		userPower.EntnicheStatus = 0
+		//userPower.EntnicheStatus = 0
 		phone, _ := qutil.If((*data)["s_phone"] != nil, (*data)["s_phone"], (*data)["s_m_phone"]).(string)
 		if phone != "" {
-			if count := mysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
-				userPower.EntnicheStatus = 1
+			res := mysql.SelectBySql(`SELECT i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
+			ON u.ent_id=i.id
+			WHERE u.phone=?
+			ORDER BY  i.status DESC,i.auth_status DESC, CASE WHEN i.phone=? THEN 0  ELSE 1 END  ASC`, phone, phone)
+			if res != nil && len(*res) > 0 {
+				//商机管理
+				userPower.EntName = qutil.ObjToString((*res)[0]["name"])
+				//已购买企业未过期-商机管理用户
+				for _, v := range *res {
+					if qutil.IntAll(v["status"]) == 1 && qutil.IntAll(v["power"]) == 1 {
+						userPower.EntnicheStatus = 1
+						break
+					}
+				}
 			}
+			//if count := mysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
+			//	userPower.EntnicheStatus = 1
+			//}
 		}
 	}
 
@@ -200,7 +222,8 @@ func GetBigVipUserBaseMsg(userId string, mysql *mysql.Mysql, mg MongodbSim) *Big
 	//存储缓存
 	go func() {
 		if bytes, err := json.Marshal(userPower); err == nil && bytes != nil {
-			_ = redis.PutBytes(PowerCacheDb, cacheKey, &bytes, OneDay)
+			oneDayMore := OneDay + rand.Intn(60*60)
+			_ = redis.PutBytes(BaseInfoCacheDb, cacheKey, &bytes, oneDayMore)
 		}
 	}()
 	return &userPower

+ 4 - 2
src/jfw/modules/common/src/qfw/util/jy/payUser.go

@@ -68,12 +68,12 @@ func (vs *VipState) GetQueryItems(selectType string, limitOldTime int64) (items
 				items = append(items, "mwinner")
 			} else if t == "agency" {
 				items = append(items, "magency")
-			} else if t == "file" {
-				items = append(items, "filetext")
 			} else if t == "title" {
 				items = append(items, "title")
 			} else if t == "ppa" {
 				items = append(items, []string{"purchasing", "projectname.pname"}...)
+			} else if t == "file" { //dev4.7.8 标讯优化:搜索范围附件-》全部用户可用
+				items = append(items, "filetext")
 			}
 		}
 		return
@@ -88,6 +88,8 @@ func (vs *VipState) GetQueryItems(selectType string, limitOldTime int64) (items
 			items = append(items, "title")
 		} else if t == "content" {
 			items = append(items, "detail")
+		} else if t == "file" { //dev4.7.8 标讯优化:搜索范围附件-》全部用户可用
+			items = append(items, "filetext")
 		}
 	}
 	return

+ 232 - 49
src/jfw/modules/common/src/qfw/util/jy/subscribepush.go

@@ -11,6 +11,7 @@ import (
 	"qfw/util/redis"
 	"strconv"
 	"strings"
+	"sync"
 	"time"
 
 	"go.mongodb.org/mongo-driver/bson/primitive"
@@ -18,6 +19,7 @@ import (
 
 const (
 	threeDay  = 172800
+	oneDay    = 86400
 	halfOfDay = 43200
 )
 
@@ -34,6 +36,7 @@ type SubPushList struct {
 	Ca_isvisit      int         `json:"ca_isvisit"`
 	Ca_isvip        int         `json:"ca_isvip"`
 	Ca_type         int         `json:"ca_type"`
+	Ca_fileExists   bool        `json:"ca_fileExists"`
 	Matchkeys       []string    `json:"matchkeys"`
 	Budget          interface{} `json:"budget"`
 	Bidamount       interface{} `json:"bidamount"`
@@ -42,15 +45,17 @@ type SubPushList struct {
 	ProjectName     string      `json:"projectName"`
 	S_winner        string      `json:"s_winner"`
 	Bidopentime     int64       `json:"bidopentime"`
+	Spidercode      string      `json:"spidercode"`
+	Site            string      `json:"site"`
 }
 
 const (
 	pageSize            = 50
 	pageSizes           = 10
 	AllSubPushCacheSize = 250
-	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner"],"from":0,"size":%d}`
-	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1}`
-	querys              = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","title","detail","area","city","publishtime","projectname","buyer","buyerclass","s_winner","bidamount","subtype","toptype","href","projectcode","buyerperson","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel"]}`
+	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","spidercode","site"],"from":0,"size":%d}`
+	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1,"spidercode":1,"site":1}`
+	querys              = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","title","detail","area","city","publishtime","projectname","buyer","buyerclass","s_winner","bidamount","subtype","toptype","href","projectcode","buyerperson","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel","spidercode","site"]}`
 
 	MemberFlag   = "m"
 	SubVipFlag   = "v"
@@ -62,7 +67,7 @@ var aboutDbMsg map[string]*AboutDbMsg = map[string]*AboutDbMsg{
 	SubFreeFlag:  &AboutDbMsg{"pushsubscribe", "subpush"},
 	SubVipFlag:   &AboutDbMsg{"pushsubscribe", "subpush"},
 	MemberFlag:   &AboutDbMsg{"pushmember", "memberpush"},
-	EntnicheFlag: &AboutDbMsg{"pushentniche", "pushentniche"},
+	EntnicheFlag: &AboutDbMsg{"pushentniche", "entnichepush"},
 }
 
 type AboutDbMsg struct {
@@ -77,13 +82,14 @@ type SubPush struct {
 }
 
 type PushCa struct {
-	Date   int64
-	InfoId string
-	Visit  int
-	Index  int64
-	Keys   []string
-	Type   int
-	Isvip  int
+	Date       int64
+	InfoId     string
+	Visit      int
+	Index      int64
+	Keys       []string
+	Type       int
+	Isvip      int
+	FileExists bool
 }
 
 //查询参数
@@ -103,11 +109,13 @@ type SubPushQueryParam struct {
 	Subscopeclass string        //信息行业
 	Key           string        //订阅词
 	Export        bool          //导出
-	EntId         int
+	EntId         int           //企业id
+	Price         string        //价格
+	FileExists    string        //是否有附件;默认全部;1:有附件;-1:无附件
 }
 
 func (spqp *SubPushQueryParam) IsEmpty() bool {
-	return spqp.SelectTime == "" && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == ""
+	return spqp.SelectTime == "" && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == "" && spqp.Price == "" && spqp.FileExists == ""
 }
 
 type subscribePush struct {
@@ -140,7 +148,7 @@ func (h *subscribePush) GetTodayCache(userId string) (*SubPush, error) {
 
 //往pushcache_2_a中放
 func (h *subscribePush) PutTodayCache(userId string, pc_a *SubPush) {
-	redis.Put("pushcache_2_b", h.todayKey(userId), pc_a, threeDay)
+	redis.Put("pushcache_2_b", h.todayKey(userId), pc_a, oneDay)
 }
 
 //获取redis key
@@ -148,7 +156,6 @@ func (s *subscribePush) todayKey(userId string) string {
 	return fmt.Sprintf("%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
 }
 func (s *subscribePush) allKey(userId string) string {
-	log.Println(fmt.Sprintf("all_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId))
 	return fmt.Sprintf("all_%s_%s", aboutDbMsg[s.ModuleFlag].RedisKeyFlag, userId)
 }
 
@@ -198,6 +205,7 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}) *Sub
 		Ca_isvisit:      p.Visit,
 		Ca_isvip:        p.Isvip,
 		Ca_type:         p.Type,
+		Ca_fileExists:   p.FileExists,
 		Matchkeys:       p.Keys,
 		Budget:          (*info)["budget"],
 		Bidamount:       (*info)["bidamount"],
@@ -205,11 +213,13 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}) *Sub
 		ProjectName:     ObjToString((*info)["projectname"]),
 		S_winner:        ObjToString((*info)["s_winner"]),
 		Bidopentime:     Int64All((*info)["bidopentime"]),
+		Site:            ObjToString((*info)["site"]),
+		Spidercode:      ObjToString((*info)["spidercode"]),
 	}
 }
 
 func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total int64, result []*SubPushList) {
-	log.Println(spqp.UserId, s.ModuleFlag, "subscribePush query param:", "SelectTime", spqp.SelectTime, "Area", spqp.Area, "City", spqp.City, "Subtype", spqp.Subtype, "Subscopeclass", spqp.Subscopeclass, "Buyerclass", spqp.Buyerclass, "Key", spqp.Key, "PageNum", spqp.PageNum)
+	log.Println(spqp.UserId, s.ModuleFlag, "subscribePush query param:", "SelectTime:", spqp.SelectTime, "Area:", spqp.Area, "City:", spqp.City, "Subtype:", spqp.Subtype, "Subscopeclass:", spqp.Subscopeclass, "Buyerclass:", spqp.Buyerclass, "Key:", spqp.Key, "PageNum:", spqp.PageNum, "Price:", spqp.Price, "FileExists:", spqp.FileExists)
 	if spqp.UserId == "" {
 		return
 	}
@@ -228,7 +238,6 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 	starttime, endtime := int64(0), int64(0)
 	st, et := "", ""
 	now := time.Now()
-	log.Println(4444)
 	if spqp.SelectTime == "today" { //今天
 		starttime = time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.Local).Unix()
 	} else if spqp.SelectTime == "yesterday" { //昨天
@@ -251,14 +260,11 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 			endtime = time.Date(etTime.Year(), etTime.Month(), etTime.Day(), 23, 59, 59, 0, time.Local).Unix()
 		}
 	}
-	log.Println(2222)
 	nowFormat := NowFormat(Date_Short_Layout)
 	start := (spqp.PageNum - 1) * spqp.PageSize
 	end := start + spqp.PageSize
 	//时间是今天,没有别的过滤条件
-	if nowFormat == FormatDateByInt64(&starttime, Date_Short_Layout) && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == "" {
-
-		log.Println("a1")
+	if nowFormat == FormatDateByInt64(&starttime, Date_Short_Layout) && spqp.Area == "" && spqp.City == "" && spqp.Buyerclass == "" && spqp.Subscopeclass == "" && spqp.Subtype == "" && spqp.Key == "" && spqp.Price == "" && spqp.FileExists == "" {
 		subPush, err := s.GetTodayCache(spqp.UserId)
 		if err != nil {
 			log.Println(spqp.UserId, "GetTodayCache Error", err)
@@ -281,15 +287,12 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 		}
 		total = int64(length)
 	} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize <= 250 { //全部,没有过滤条件 之前缓存5页*50条=250
-		log.Println("a2")
 		allCache, err := s.GetAllCache(spqp.UserId)
 		if err != nil {
 			log.Println(spqp.UserId, "GetAllCache Error", err)
 		}
 		if err != nil || allCache == nil || allCache.Date != nowFormat || len(allCache.Datas) == 0 {
-			log.Println("a3")
 			spqp.PageNum = 1
-			log.Println(1111)
 			list, countSearch := s.getDatasFromMysql(spqp, starttime, endtime, AllSubPushCacheSize, true)
 			allCache = &SubPush{
 				Date:  nowFormat,
@@ -307,7 +310,6 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 		}
 		total = allCache.Count
 	} else {
-		log.Println("a4")
 		result, total = s.getDatasFromMysql(spqp, starttime, endtime, spqp.PageSize, true)
 	}
 	if result == nil {
@@ -418,26 +420,43 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 			querys = append(querys, fmt.Sprintf("(%s)", strings.Join(find_in_set, " or ")))
 		}
 	}
+	//价格- 预算和中标金额
+	if spqp.Price != "" && strings.Contains(spqp.Price, "-") {
+		minPriceStr, maxPriceStr := strings.Split(spqp.Price, "-")[0], strings.Split(spqp.Price, "-")[1]
+		minPrice := Int64All(Float64All(minPriceStr) * 10000) //换成元
+		maxPrice := Int64All(Float64All(maxPriceStr) * 10000) //换成元
+		if minPriceStr != "" && maxPriceStr != "" {
+			querys = append(querys, fmt.Sprintf("((bidamount>=%d and bidamount<=%d) or (budget>=%d and budget<=%d and bidamount is null))", minPrice, maxPrice, minPrice, maxPrice))
+		} else if minPriceStr != "" {
+			querys = append(querys, fmt.Sprintf("(bidamount>=%d  or (budget>=%d and bidamount is null))", minPrice, minPrice))
+		} else if maxPriceStr != "" {
+			querys = append(querys, fmt.Sprintf("( bidamount<=%d or (budget<=%d and bidamount is null))", maxPrice, maxPrice))
+		}
+	}
+	//附件
+	if spqp.FileExists != "" {
+		if spqp.FileExists == "1" {
+			querys = append(querys, fmt.Sprintf("attachment_count is not null"))
+		} else if spqp.FileExists == "-1" {
+			querys = append(querys, fmt.Sprintf("attachment_count is null"))
+		}
+	}
 	searchSql := fmt.Sprintf(" from %s where %s order by id desc", aboutDbMsg[s.ModuleFlag].MysqlTable, strings.Join(querys, " and "))
 	fmt.Println("searchSql", searchSql)
 	//查询总数
 	count = spqp.PushMysql.CountBySql(fmt.Sprintf("select count(id)" + searchSql))
-
-	findSql := "select id,date,infoid,isvisit,matchkeys,type"
+	findSql := "select id,date,infoid,isvisit,matchkeys,type,attachment_count"
 	if s.ModuleFlag != MemberFlag {
 		if s.ModuleFlag == EntnicheFlag {
 
 		} else {
 			findSql += ",isvip"
 		}
-
 	}
-
 	findSql += searchSql
 	if isLimit {
 		findSql += fmt.Sprintf(" limit %d,%d", (spqp.PageNum-1)*size, size)
 	}
-
 	log.Println(spqp.UserId, "subscribePush query sql:", findSql)
 	list := spqp.PushMysql.SelectBySql(findSql)
 	if list != nil && len(*list) > 0 {
@@ -457,7 +476,7 @@ func (s *subscribePush) getDatasFromMysql(spqp *SubPushQueryParam, starttime, en
 func (s *subscribePush) GetOnlyInfoId(pushCas []*PushCa) []*SubPushList {
 	array := make([]*SubPushList, len(pushCas))
 	for k, v := range pushCas {
-		array[k] = &SubPushList{Id: v.InfoId}
+		array[k] = &SubPushList{Id: EncodeArticleId2ByCheck(v.InfoId)}
 	}
 	return array
 }
@@ -471,13 +490,14 @@ func (s *subscribePush) GetJyPushs(datas []map[string]interface{}) (pushCas []*P
 			keys = strings.Split(matchkeys, " ")
 		}
 		pushCas = append(pushCas, &PushCa{
-			Date:   Int64All(v["date"]),
-			InfoId: ObjToString(v["infoid"]),
-			Visit:  IntAll(v["isvisit"]),
-			Index:  Int64All(v["id"]),
-			Keys:   keys,
-			Type:   IntAll(v["type"]),
-			Isvip:  IntAll(v["isvip"]),
+			Date:       Int64All(v["date"]),
+			InfoId:     ObjToString(v["infoid"]),
+			Visit:      IntAll(v["isvisit"]),
+			Index:      Int64All(v["id"]),
+			Keys:       keys,
+			Type:       IntAll(v["type"]),
+			Isvip:      IntAll(v["isvip"]),
+			FileExists: IntAll(v["attachment_count"]) > 0,
 		})
 	}
 	return
@@ -500,8 +520,7 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
 	}
 	infos := map[string]map[string]interface{}{}
 	//redis
-
-	es_ids := []string{}
+	es_ids := ids
 	for _, v := range ids {
 		info_i := redis.Get("pushcache_1", fmt.Sprintf("info_%s", v))
 		if info_i != nil {
@@ -512,7 +531,6 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
 			es_ids = append(es_ids, v)
 		}
 	}
-	//	log.Println(es_ids)
 	//elasticsearch
 	if len(es_ids) > 0 {
 		list := elastic.Get("bidding", "bidding", fmt.Sprintf(query, strings.Join(es_ids, `","`), len(es_ids)))
@@ -525,7 +543,7 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
 	}
 	//mongodb bidding
 	mgo_ids := []primitive.ObjectID{}
-	for _, v := range es_ids {
+	for _, v := range ids {
 		if infos[v] == nil {
 			_id, _ := primitive.ObjectIDFromHex(v)
 			mgo_ids = append(mgo_ids, _id)
@@ -572,7 +590,7 @@ func (s *subscribePush) GetInfoByIds(Mgo_bidding mg.MongodbSim, bidding, bidding
 //保存最近7天的数据到历史记录
 func (s *subscribePush) MakeHistoryDatas(MQFW mg.MongodbSim, PushMysql *mysql.Mysql, userId string, PushView func(userid, allquery, field string, pageNum, pageSize int) (keys []interface{}, list *[]map[string]interface{})) (bool, []*SubPushList) {
 	log.Println("匹配最近7天数据", userId)
-	field := `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount"`
+	field := `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","filetext","spidercode","site"`
 	allquery := `{"range":{"publishtime":{"gt":%s}}}`
 	allquery = fmt.Sprintf(allquery, fmt.Sprint(time.Now().AddDate(0, 0, -7).Unix()))
 	//allquery = ``
@@ -636,6 +654,19 @@ func (s *subscribePush) MakeHistoryDatas(MQFW mg.MongodbSim, PushMysql *mysql.My
 				myInsert["buyerclass"] = buyerclass_mapping
 			}
 		}
+		//附件 :检索库 只有附件字段,无法识别附件数量 暂定为1;为识别有附件
+		//v["filetext"]filetext := ObjToString(v["filetext"]); filetext != ""
+		if v["filetext"] != nil {
+			myInsert["attachment_count"] = 1
+		}
+		//中标金额
+		if v["bidamount"] != nil {
+			myInsert["bidamount"] = Int64All(v["bidamount"])
+		}
+		//预算
+		if v["budget"] != nil {
+			myInsert["budget"] = Int64All(v["budget"])
+		}
 		if s_subscopeclass := ObjToString(v["s_subscopeclass"]); s_subscopeclass != "" {
 			subscopeclass := []string{}
 			for _, v := range strings.Split(s_subscopeclass, ",") {
@@ -654,10 +685,11 @@ func (s *subscribePush) MakeHistoryDatas(MQFW mg.MongodbSim, PushMysql *mysql.My
 			continue
 		}
 		array = append(array, s.InfoFormat(&PushCa{
-			InfoId: _id,
-			Date:   now,
-			Index:  id,
-			Keys:   matchkeys,
+			InfoId:     _id,
+			Date:       now,
+			Index:      id,
+			Keys:       matchkeys,
+			FileExists: v["filetext"] != nil,
 		}, &v))
 	}
 	var resultList []*SubPushList
@@ -705,7 +737,7 @@ func (s *subscribePush) Visit(PushMysql *mysql.Mysql, userId string, id int) {
 
 //查看全部列表缓存
 func (s *subscribePush) PutAllCache(userId string, datas *SubPush) {
-	redis.Put("pushcache_2_a", s.allKey(userId), datas, threeDay)
+	redis.Put("pushcache_2_a", s.allKey(userId), datas, oneDay)
 }
 
 func (s *subscribePush) GetAllCache(userId string) (*SubPush, error) {
@@ -728,7 +760,7 @@ func (s *subscribePush) GetCache(code, key string) (*SubPush, error) {
 }
 
 //是否收藏
-func (s *subscribePush) MakeCollection(userId string, m *mysql.Mysql, list []*SubPushList) {
+func (s *subscribePush) MakeCollection(userId string, m *mysql.Mysql, list []*SubPushList, fileSignBool bool) {
 	if list == nil || len(list) == 0 {
 		return
 	}
@@ -750,6 +782,9 @@ func (s *subscribePush) MakeCollection(userId string, m *mysql.Mysql, list []*Su
 			}
 		}
 		for _, v := range list {
+			if !fileSignBool {
+				v.Ca_fileExists = false
+			}
 			if bid_map[v.Id] {
 				v.Collection = 1
 			}
@@ -807,3 +842,151 @@ func InfoFormats(info map[string]interface{}, tmp map[string]interface{}) map[st
 	info["type"] = infotype
 	return info
 }
+
+//保存最近7天的数据到历史记录--新
+/*已选条件--关键词*/
+type ViewKeyWord struct {
+	Keyword  []string `json:"key"`       //关键词
+	Appended []string `json:"appendkey"` //附加词
+	Exclude  []string `json:"notkey"`    //排除词
+	MatchWay int      `json:"matchway"`  //匹配模式
+}
+
+func (s *subscribePush) MakeHistoryDatasNew(PushMysql *mysql.Mysql, userId string, entId int, DefaultPushList func(userId, moduleFlag string, entId int) (keyword []byte, list *[]map[string]interface{}, deptId int)) (bool, []*SubPushList) {
+	log.Println(s.ModuleFlag, "匹配最近7天数据", userId, entId)
+	//
+	t1 := time.Now()
+	kw, list, deptId := DefaultPushList(userId, s.ModuleFlag, entId)
+	if list == nil || len(*list) == 0 {
+		return false, nil
+	}
+	var isNext = false
+	log.Println("es查询耗时:", time.Since(t1))
+	var resultList []*SubPushList
+	if list != nil && len(*list) > 0 {
+		keyword := []ViewKeyWord{}
+		if err := json.Unmarshal(kw, &keyword); err != nil {
+			return false, nil
+		}
+		//超过50条先处理50条 返回前50条
+		listOne := *list
+		if len(*list) > pageSize {
+			listOne = (*list)[:pageSize]
+		}
+		resultList = s.listManager(PushMysql, listOne, keyword, (len(listOne)+pageSize)/pageSize, entId, deptId, userId)
+		if len(*list) > pageSize {
+			isNext = true
+			listOther := (*list)[pageSize:]
+			go s.listManager(PushMysql, listOther, keyword, (len(listOther)+pageSize)/pageSize, entId, deptId, userId)
+		}
+	}
+	log.Println("第一批推送信息处理耗时:", time.Since(t1).Seconds(), len(resultList))
+	return isNext, resultList
+}
+
+//
+func (s *subscribePush) listManager(PushMysql *mysql.Mysql, list []map[string]interface{}, keyword []ViewKeyWord, ccount, entId, deptId int, userId string) (resultList []*SubPushList) {
+	t2 := time.Now()
+	now := time.Now()
+	var (
+		wg = &sync.WaitGroup{}
+		wc = make(chan bool, ccount)
+	)
+	for _, v := range list {
+		wg.Add(1)
+		wc <- true
+		go func(v map[string]interface{}) {
+			defer func() {
+				wg.Done()
+				<-wc
+			}()
+			redisKey := fmt.Sprintf("pushinfo_%s_%s", userId, ObjToString(v["_id"]))
+			title := strings.Replace(ObjToString(v["title"]), "\n", "", -1)
+			var myInsert = make(map[string]interface{})
+			myInsert["userid"] = userId
+			myInsert["infoid"] = ObjToString(v["_id"])
+			myInsert["date"] = now.Unix()
+			matchkeys := getKeys(title, keyword)
+			myInsert["matchkeys"] = strings.Join(matchkeys, " ")
+			if v["area"] != nil {
+				myInsert["area"] = If(ObjToString(v["area"]) == "A", 0, If(PushMapping.Area[ObjToString(v["area"])] > 0, PushMapping.Area[ObjToString(v["area"])], 0).(int)).(int)
+			}
+			if v["city"] != nil {
+				myInsert["city"] = If(PushMapping.City[ObjToString(v["city"])] > 0, PushMapping.City[ObjToString(v["city"])], 0).(int)
+			}
+			if v["subtype"] != nil {
+				myInsert["subtype"] = If(PushMapping.Subtype[ObjToString(v["subtype"])] > 0, PushMapping.Subtype[ObjToString(v["subtype"])], 0).(int)
+			}
+			if v["toptype"] != nil {
+				myInsert["toptype"] = If(PushMapping.Toptype[ObjToString(v["toptype"])] > 0, PushMapping.Toptype[ObjToString(v["toptype"])], 0).(int)
+			}
+			if v["buyerclass"] != nil {
+				myInsert["buyerclass"] = If(PushMapping.Buyerclass[ObjToString(v["buyerclass"])] > 0, PushMapping.Buyerclass[ObjToString(v["buyerclass"])], 0).(int)
+			}
+			if v["isValidFile"] != nil {
+				isValidFile, _ := v["isValidFile"].(bool)
+				myInsert["attachment_count"] = If(isValidFile, 1, 0).(int) //附件 :检索库 只有附件字段,无法识别附件数量 暂定为1;为识别有附件
+			}
+			if v["bidamount"] != nil {
+				myInsert["bidamount"] = Int64All(v["bidamount"])
+			}
+			if v["budget"] != nil {
+				myInsert["budget"] = Int64All(v["budget"])
+			}
+			if s_subscopeclass := ObjToString(v["s_subscopeclass"]); s_subscopeclass != "" {
+				subscopeclass := []string{}
+				for _, v := range strings.Split(s_subscopeclass, ",") {
+					if subscopeclass_mapping, ok := PushMapping.Subscopeclass[v]; ok {
+						subscopeclass = append(subscopeclass, fmt.Sprint(subscopeclass_mapping))
+					}
+				}
+				if len(subscopeclass) > 0 {
+					myInsert["subscopeclass"] = strings.Join(subscopeclass, ",")
+				}
+			}
+			//商机管理用户
+			if s.ModuleFlag == "s" {
+				myInsert["userid"] = userId
+				myInsert["entid"] = entId
+				myInsert["deptid"] = deptId
+			}
+			//保存推送表
+			id := PushMysql.Insert(aboutDbMsg[s.ModuleFlag].MysqlTable, myInsert)
+			if id > 0 {
+				redis.Put("pushcache_2_a", redisKey, 1, 86400)
+				resultList = append(resultList, s.InfoFormat(&PushCa{
+					InfoId:     ObjToString(v["_id"]),
+					Date:       now.Unix(),
+					Index:      id,
+					Keys:       matchkeys,
+					FileExists: v["filetext"] != nil,
+				}, &v))
+			}
+		}(v)
+	}
+	wg.Wait()
+	log.Println("数据处理耗时:", time.Since(t2))
+	return
+}
+
+//获取匹配得关键词
+func getKeys(title string, keywords []ViewKeyWord) (str []string) {
+	if len(keywords) > 0 {
+	L:
+		for _, v := range keywords {
+			for _, vk := range v.Keyword {
+				if strings.Contains(title, vk) {
+					str = append(str, v.Keyword...)
+					break L
+				}
+			}
+			for _, va := range v.Appended {
+				if strings.Contains(title, va) {
+					str = append(str, v.Appended...)
+					break L
+				}
+			}
+		}
+	}
+	return
+}

+ 4 - 2
src/jfw/modules/common/src/qfw/util/jy/userMerge.go

@@ -91,7 +91,7 @@ func (this *UserMerge) MergeQuery() (wId, pId, bPhone string, err error) {
 //更新session
 func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId string) {
 	if userData == nil {
-		userData, _ = this.mg.FindById("user", userId, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_appversion":1}`)
+		userData, _ = this.mg.FindById("user", userId, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_appversion":1,"base_user_id":1}`)
 	}
 	sessionVal := make(map[string]interface{})
 	sessionVal["user"] = *userData
@@ -131,6 +131,8 @@ func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId str
 	sessionVal["s_appponetype"], _ = (*userData)["s_appponetype"].(string)
 	sessionVal["s_appversion"], _ = (*userData)["s_appversion"].(string)
 	sessionVal["app_name"] = nickName
-
+	if base_userid := qutil.IntAllDef((*userData)["base_user_id"], 0); base_userid != 0 {
+		sessionVal["base_user_id"] = base_userid
+	}
 	this.sess.SetMultiple(sessionVal)
 }

+ 6 - 1
src/jfw/modules/entsesearch/src/search/entsesearch.go

@@ -20,6 +20,11 @@ type EntSeSearch struct {
 
 }
 
+const (
+	wx_maxPageNum = 20 //查询最大页数
+	wx_pageSize   = 50 //每页条数
+)
+
 func init() {
 	xweb.AddAction(&EntSeSearch{})
 }
@@ -75,7 +80,7 @@ func (e *EntSeSearch) ProList() {
 	var pageNum, _ = strconv.Atoi(e.GetString("pageNum"))
 	//fmt.Println(searchname, scope, money_from_p, money_to_p)
 	if pageNum <= wx_maxPageNum {
-		_, proList = jylabutil.GetProjectByEntName(searchname, scope, money_from_p, money_to_p, `"projectname","jgtime","zbtime","bidamount","sourceinfoid"`, pageNum, bidsearch.SearchPageSize_WX, false)
+		_, proList = jylabutil.GetProjectByEntName(searchname, scope, money_from_p, money_to_p, `"projectname","projectcode","jgtime","zbtime","bidamount","sourceinfoid"`, pageNum, bidsearch.SearchPageSize_WX, false)
 		listSize := 0
 		if proList != nil {
 			listSize = len(proList)

+ 54 - 37
src/jfw/modules/entsesearch/src/web/staticres/jylab/entsesearch/js/common.js

@@ -210,43 +210,60 @@ function newredirect(zbadd,link,sid,sds){
 function pcredirect(link,sid){
 	window.open("/pcdetail/"+sid+".html");
 }
-function keyWordHighlight(value,oldChars,newChar){
-	if(typeof(oldChars) == "undefined" || oldChars == null || typeof(newChar) == "undefined" || newChar == null || newChar == ""){
-		return value;
-	}
-	var array = [];
-	if(oldChars instanceof Array){
-		array = oldChars.concat();
-	}else{
-		array.push(oldChars);
-	}
-	try{
-		var map = {};
-		for(var i=0;i<array.length;i++){
-			var oldChar = array[i];
-			if(oldChar.replace(/\s+/g,"") == "" || map[oldChar]){
-				continue;
-			}
-			map[oldChar] = true;
-			oldChar = oldChar.replace(/\$/g,"\\$");
-			oldChar = oldChar.replace(/\(/g,"\\(");
-			oldChar = oldChar.replace(/\)/g,"\\)");
-			oldChar = oldChar.replace(/\*/g,"\\*");
-			oldChar = oldChar.replace(/\+/g,"\\+");
-			oldChar = oldChar.replace(/\./g,"\\.");
-			oldChar = oldChar.replace(/\[/g,"\\[");
-			oldChar = oldChar.replace(/\]/g,"\\]");
-			oldChar = oldChar.replace(/\?/g,"\\?");
-			oldChar = oldChar.replace(/\\/g,"\\");
-			oldChar = oldChar.replace(/\//g,"\\/");
-			oldChar = oldChar.replace(/\^/g,"\\^");
-			oldChar = oldChar.replace(/\{/g,"\\{");
-			oldChar = oldChar.replace(/\}/g,"\\}");
-			oldChar = oldChar.replace(/\|/g,"\\|");
-			value = value.replace(new RegExp("("+oldChar+")",'gmi'),newChar);
-		}
-	}catch(e){}
-	return value;
+function keyWordHighlight (value, oldChars, newChar) {
+  if(typeof(oldChars) == "undefined" || oldChars == null || typeof(newChar) == "undefined" || newChar == null || newChar == ""){
+    return value;
+  }
+  var array = [];
+  if(oldChars instanceof Array){
+    array = oldChars.concat();
+  }else{
+    array.push(oldChars);
+  }
+
+  for (var i = 0; i < array.length; i++) {
+    if (!array[i]) {
+      continue
+    } else {
+      // if (isNumber.test(array[i])) {
+      //   array[i] = ''
+      //   continue
+      // }
+      array[i] = array[i].replace(/([\$\(\)\*\+\.\[\]\?\/\\\^\{\}\|])/g, '\\$1').replace(/\s+/g, '')
+      
+      // array[i] = array[i].replace(/\$/g,"\\$");
+      // array[i] = array[i].replace(/\(/g,"\\(");
+      // array[i] = array[i].replace(/\)/g,"\\)");
+      // array[i] = array[i].replace(/\*/g,"\\*");
+      // array[i] = array[i].replace(/\+/g,"\\+");
+      // array[i] = array[i].replace(/\./g,"\\.");
+      // array[i] = array[i].replace(/\[/g,"\\[");
+      // array[i] = array[i].replace(/\]/g,"\\]");
+      // array[i] = array[i].replace(/\?/g,"\\?");
+      // array[i] = array[i].replace(/\\/g,"\\");
+      // array[i] = array[i].replace(/\//g,"\\/");
+      // array[i] = array[i].replace(/\^/g,"\\^");
+      // array[i] = array[i].replace(/\{/g,"\\{");
+      // array[i] = array[i].replace(/\}/g,"\\}");
+      // array[i] = array[i].replace(/\|/g,"\\|");
+    }
+  }
+
+  // 数组去空
+  var lastArr = []
+  array.forEach(function (item) {
+    if (item) {
+      lastArr.push(item)
+    }
+  })
+  if (lastArr.length === 0) {
+    return value
+  }
+  lastArr = lastArr.sort(function (a, b) {
+    return b.length - a.length
+  })
+  
+  return value.replace(new RegExp('(' + lastArr.join('|') + ')', 'gmi'), newChar)
 }
 function getWxVersion(){
 	var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i);

+ 54 - 37
src/jfw/modules/followent/src/web/staticres/jylab/followent/js/common.js

@@ -210,43 +210,60 @@ function newredirect(zbadd,link,sid,sds){
 function pcredirect(link,sid){
 	window.open("/pcdetail/"+sid+".html");
 }
-function keyWordHighlight(value,oldChars,newChar){
-	if(typeof(oldChars) == "undefined" || oldChars == null || typeof(newChar) == "undefined" || newChar == null || newChar == ""){
-		return value;
-	}
-	var array = [];
-	if(oldChars instanceof Array){
-		array = oldChars.concat();
-	}else{
-		array.push(oldChars);
-	}
-	try{
-		var map = {};
-		for(var i=0;i<array.length;i++){
-			var oldChar = array[i];
-			if(oldChar.replace(/\s+/g,"") == "" || map[oldChar]){
-				continue;
-			}
-			map[oldChar] = true;
-			oldChar = oldChar.replace(/\$/g,"\\$");
-			oldChar = oldChar.replace(/\(/g,"\\(");
-			oldChar = oldChar.replace(/\)/g,"\\)");
-			oldChar = oldChar.replace(/\*/g,"\\*");
-			oldChar = oldChar.replace(/\+/g,"\\+");
-			oldChar = oldChar.replace(/\./g,"\\.");
-			oldChar = oldChar.replace(/\[/g,"\\[");
-			oldChar = oldChar.replace(/\]/g,"\\]");
-			oldChar = oldChar.replace(/\?/g,"\\?");
-			oldChar = oldChar.replace(/\\/g,"\\");
-			oldChar = oldChar.replace(/\//g,"\\/");
-			oldChar = oldChar.replace(/\^/g,"\\^");
-			oldChar = oldChar.replace(/\{/g,"\\{");
-			oldChar = oldChar.replace(/\}/g,"\\}");
-			oldChar = oldChar.replace(/\|/g,"\\|");
-			value = value.replace(new RegExp("("+oldChar+")",'gmi'),newChar);
-		}
-	}catch(e){}
-	return value;
+function keyWordHighlight (value, oldChars, newChar) {
+  if(typeof(oldChars) == "undefined" || oldChars == null || typeof(newChar) == "undefined" || newChar == null || newChar == ""){
+    return value;
+  }
+  var array = [];
+  if(oldChars instanceof Array){
+    array = oldChars.concat();
+  }else{
+    array.push(oldChars);
+  }
+
+  for (var i = 0; i < array.length; i++) {
+    if (!array[i]) {
+      continue
+    } else {
+      // if (isNumber.test(array[i])) {
+      //   array[i] = ''
+      //   continue
+      // }
+      array[i] = array[i].replace(/([\$\(\)\*\+\.\[\]\?\/\\\^\{\}\|])/g, '\\$1').replace(/\s+/g, '')
+      
+      // array[i] = array[i].replace(/\$/g,"\\$");
+      // array[i] = array[i].replace(/\(/g,"\\(");
+      // array[i] = array[i].replace(/\)/g,"\\)");
+      // array[i] = array[i].replace(/\*/g,"\\*");
+      // array[i] = array[i].replace(/\+/g,"\\+");
+      // array[i] = array[i].replace(/\./g,"\\.");
+      // array[i] = array[i].replace(/\[/g,"\\[");
+      // array[i] = array[i].replace(/\]/g,"\\]");
+      // array[i] = array[i].replace(/\?/g,"\\?");
+      // array[i] = array[i].replace(/\\/g,"\\");
+      // array[i] = array[i].replace(/\//g,"\\/");
+      // array[i] = array[i].replace(/\^/g,"\\^");
+      // array[i] = array[i].replace(/\{/g,"\\{");
+      // array[i] = array[i].replace(/\}/g,"\\}");
+      // array[i] = array[i].replace(/\|/g,"\\|");
+    }
+  }
+
+  // 数组去空
+  var lastArr = []
+  array.forEach(function (item) {
+    if (item) {
+      lastArr.push(item)
+    }
+  })
+  if (lastArr.length === 0) {
+    return value
+  }
+  lastArr = lastArr.sort(function (a, b) {
+    return b.length - a.length
+  })
+  
+  return value.replace(new RegExp('(' + lastArr.join('|') + ')', 'gmi'), newChar)
 }
 function getWxVersion(){
 	var wechatInfo = navigator.userAgent.match(/MicroMessenger\/([\d\.]+)/i);

+ 1 - 0
src/jfw/modules/publicapply/src/ad/entity/struct.go

@@ -18,6 +18,7 @@ type AdInfo struct {
 		StartTime string `json:"startTime"` //开始时间
 		EndTime   string `json:"endTime"`   //结束时间
 	} `json:"o_extend"` //拓展属性
+	S_script string `json:"s_script"` //脚本
 }
 
 //Handle 广告位信息处理

+ 26 - 29
src/jfw/modules/publicapply/src/bidcollection/entity/entity.go

@@ -21,9 +21,9 @@ import (
 )
 
 const (
-	query          = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","subtype","s_winner","buyertel","winnertel","buyerclass"],"from":0,"size":%d}`
-	mongodb_fields = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"winnertel":1,"s_winner":1,"buyertel":1}`
-	querys         = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","title","detail","area","city","publishtime","projectname","buyer","buyerclass","s_winner","bidamount","subtype","toptype","projectcode","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel"],"from":0,"size":%d}}`
+	query          = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","subtype","s_winner","buyertel","winnertel","buyerclass","filetext"],"from":0,"size":%d}`
+	mongodb_fields = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"winnertel":1,"s_winner":1,"buyertel":1,"attach_text":1}`
+	querys         = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","title","detail","area","city","publishtime","projectname","buyer","buyerclass","s_winner","bidamount","subtype","toptype","projectcode","buyertel","budget","bidopentime","agency","projectscope","winnerperson","winnertel","filetext","spidercode","site"],"from":0,"size":%d}}`
 )
 
 var (
@@ -77,7 +77,7 @@ func IsCollByBids(bids, userid string) []string {
 	isCollkey := fmt.Sprintf("isColl_%s", userid)
 	collStatus := redis.GetInt(config.BidCollConfig.CollRedisDb, isCollkey)
 	if collStatus == 0 {
-		if count := int(db.Mysql.CountBySql(fmt.Sprintf(`select count(1) 
+		if count := int(db.Mysql.CountBySql(fmt.Sprintf(`select count(1)
 		from %s where userid = ?`, db.DbConf.Bdcollection), userid)); count > config.BidCollConfig.CollListRedisMaxCount {
 			collStatus = 2
 		} else if count == 0 {
@@ -130,10 +130,10 @@ type LabelByUser struct {
 func GetLabelByUser(userid string) (data []LabelByUser) {
 	//获取标签数量
 	labcount := map[string]int{}
-	selectsql := fmt.Sprintf(`SELECT a.labelname,COUNT(1) count,a.id 
-				FROM %s a INNER JOIN %s b ON 
-				FIND_IN_SET(a.id,b.labelid) 
-				WHERE b.userid =? 
+	selectsql := fmt.Sprintf(`SELECT a.labelname,COUNT(1) count,a.id
+				FROM %s a INNER JOIN %s b ON
+				FIND_IN_SET(a.id,b.labelid)
+				WHERE b.userid =?
 				GROUP BY a.labelname,a.id`, db.DbConf.Bdlabel, db.DbConf.Bdcollection)
 	if data := *db.Mysql.SelectBySql(selectsql, userid); len(data) > 0 {
 		for _, v := range data {
@@ -261,7 +261,7 @@ func LabelAction(labInfo *LabelInfo, userid string) map[string]interface{} {
 		}
 		labBid := map[string]interface{}{}
 		//查询出该标签下的三级页
-		rdata := db.Mysql.SelectBySql(fmt.Sprintf(`select labelid,bid from %s where 
+		rdata := db.Mysql.SelectBySql(fmt.Sprintf(`select labelid,bid from %s where
 		FIND_IN_SET(?,labelid) and userid = ?`, db.DbConf.Bdcollection), labid, userid)
 		if rdata != nil && len(*rdata) > 0 {
 			for _, v := range *rdata {
@@ -273,8 +273,8 @@ func LabelAction(labInfo *LabelInfo, userid string) map[string]interface{} {
 		//解绑标签
 		index := 0
 		for k, v := range labBid {
-			if db.Mysql.UpdateOrDeleteBySql(`update bdcollection set labelid = 
-				(select new.lab from 
+			if db.Mysql.UpdateOrDeleteBySql(`update bdcollection set labelid =
+				(select new.lab from
 					(SELECT TRIM(BOTH ',' FROM REPLACE(CONCAT(',',labelid,','),CONCAT(',',?,','),',')) lab
 					 FROM bdcollection WHERE bid = ? and userid =? ) new
 				)
@@ -500,6 +500,9 @@ type InfoList struct {
 	Buyer           string      `json:"buyer"`
 	S_winner        string      `json:"s_winner"`
 	Bidopentime     int64       `json:"bidopentime"`
+	FileExists      bool        `json:"fileExists"`
+	Site            string      `json:"site"`
+	Spidercode      string      `json:"spidercode"`
 }
 
 //根据id取内容
@@ -509,40 +512,29 @@ func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist
 		return array
 	}
 	m := map[string]bool{}
-	ids := []string{}
+	es_ids := []string{}
 	for _, v := range idlist {
 		if m[qu.ObjToString(v["bid"])] {
 			continue
 		}
 		m[qu.ObjToString(v["bid"])] = true
-		ids = append(ids, qu.ObjToString(v["bid"]))
+		es_ids = append(es_ids, qu.ObjToString(v["bid"]))
 	}
 	infos := map[string]map[string]interface{}{}
-	//redis
-	es_ids := []string{}
-	for _, v := range ids {
-		info_i := redis.Get("pushcache_1", fmt.Sprintf("info_%s", v))
-		if info_i != nil {
-			info_m, _ := info_i.(map[string]interface{})
-			info_m["_id"] = v
-			infos[v] = info_m
-		} else {
-			es_ids = append(es_ids, v)
-		}
-	}
-	//	log.Println(es_ids)
-	//elasticsearch
+	// log.Println("es_ids:", len(es_ids))
 	if len(es_ids) > 0 {
 		list := elastic.Get("bidding", "bidding", fmt.Sprintf(querys, strings.Join(es_ids, `","`), len(es_ids)))
 		if list != nil {
 			for _, v := range *list {
 				_id := qu.ObjToString(v["_id"])
+				v["isValidFile"], _ = v["isValidFile"].(bool)
 				infos[_id] = v
 			}
 		}
 	}
+
 	//mongodb bidding
-	fmt.Println(1)
+	//fmt.Println(1)
 	mgo_ids := []primitive.ObjectID{}
 	for _, v := range es_ids {
 		if infos[v] == nil {
@@ -556,12 +548,13 @@ func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist
 			for _, v := range *list {
 				_id := mg.BsonIdToSId(v["_id"])
 				v["_id"] = _id
+				v["isValidFile"], _ = v["isValidFile"].(bool)
 				infos[_id] = v
 			}
 		}
 	}
 	//mongodb bidding_back
-	fmt.Println(2)
+	//fmt.Println(2)
 	mgo_back_ids := []primitive.ObjectID{}
 	for _, v := range mgo_ids {
 		if infos[mg.BsonIdToSId(v)] == nil {
@@ -574,6 +567,7 @@ func GetInfoById(Mgo_bidding mg.MongodbSim, bidding, bidding_back string, idlist
 			for _, v := range *list {
 				_id := mg.BsonIdToSId(v["_id"])
 				v["_id"] = _id
+				v["isValidFile"], _ = v["isValidFile"].(bool)
 				infos[_id] = v
 			}
 		}
@@ -635,6 +629,9 @@ func InfoFormat(p string, info *map[string]interface{}) *InfoList {
 		Buyer:           qu.ObjToString((*info)["buyer"]),
 		S_winner:        qu.ObjToString((*info)["s_winner"]),
 		Bidopentime:     qu.Int64All((*info)["bidopentime"]),
+		FileExists:      qu.If(config.Config.FileSignBool && (*info)["isValidFile"] != nil, (*info)["isValidFile"], false).(bool),
+		Site:            qu.ObjToString((*info)["site"]),
+		Spidercode:      qu.ObjToString((*info)["spidercode"]),
 	}
 }
 

+ 1 - 1
src/jfw/modules/publicapply/src/bidcollection/service/action.go

@@ -10,7 +10,7 @@ type ServiceStruct struct {
 	labelAction    xweb.Mapper `xweb:"/bidcoll/label"`    //标签新增或删除
 	getLabelAction xweb.Mapper `xweb:"/bidcoll/getLabel"` //获取标签
 	isCollAction   xweb.Mapper `xweb:"/bidcoll/isColl"`   //招标信息是否被收藏
-	list           xweb.Mapper `xweb:"/bidcoll/list"`     //获取收藏列表
+	collList       xweb.Mapper `xweb:"/bidcoll/list"`     //获取收藏列表
 	addLabel       xweb.Mapper `xweb:"/bidcoll/addLabel"` //添加标签
 	power          xweb.Mapper `xweb:"/bidcoll/power"`    // 是否有权限(超级订阅、商机管理、大会员)
 }

+ 1 - 1
src/jfw/modules/publicapply/src/bidcollection/service/service.go

@@ -88,7 +88,7 @@ func (this *ServiceStruct) LabelAction() {
 }
 
 //收藏列表
-func (this *ServiceStruct) List() {
+func (this *ServiceStruct) CollList() {
 	userId, _ := this.GetSession("userId").(string)
 	defer qu.Catch()
 	r := func() Result {

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

@@ -45,5 +45,6 @@
     "attachmentRPC":"192.168.3.206:10082",
     "followPushRpc": "127.0.0.1:8759",
     "file_number": 10,
-    "smsServiceRpc":"127.0.0.1:932"
+    "smsServiceRpc":"127.0.0.1:932",
+    "fileSignBool":true
 }

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

@@ -22,6 +22,7 @@ type config struct {
 	AttachmentRPC         string
 	FollowPushRpc         string
 	SmsServiceRpc         string
+	FileSignBool          bool
 }
 type BidColl struct {
 	PayUserCollLimit      int    //付费用户收藏数量最大限制

+ 4 - 0
src/jfw/modules/publicapply/src/customer/entity/entiy.go

@@ -67,6 +67,8 @@ func (this *CustomerOperation) Exclude() (B bool) {
 	if B {
 		redis.Del(redisName, fmt.Sprintf(redisCRIndex, this.UserId))
 		redis.Del(redisName, fmt.Sprintf(redisExcludeKey, this.UserId))
+		//删除首页客户缓存
+		redis.DelByCodePattern(redisName, fmt.Sprintf("CRIndex_new_%s_*", this.UserId))
 	}
 	return B
 }
@@ -178,6 +180,8 @@ func (this *CustomerOperation) Coperation() (B bool) {
 	redis.Del(redisName, fmt.Sprintf(redisCountKey, this.UserId))
 	if B {
 		go func(userId string) {
+			//删除首页客户缓存
+			redis.DelByCodePattern(redisName, fmt.Sprintf("CRIndex_new_%s_*", userId))
 			//首页潜在客户缓存
 			redis.Del(redisName, fmt.Sprintf(redisCRIndex, this.UserId))
 			//更新redis 客户数据

+ 8 - 1
src/jfw/modules/publicapply/src/dataexport/service/action.go

@@ -212,6 +212,8 @@ func (des *DataExportStruct) ByPushHistory() {
 			Subtype:       des.GetString("subtype"),
 			Subscopeclass: des.GetString("subscopeclass"),
 			Key:           des.GetString("key"),
+			Price:         des.GetString("price"),
+			FileExists:    des.GetString("fileExists"),
 		}
 		if vipType == jy.SwitchService.Member {
 			spqp.PushMysql = db.MysqlMemberPush
@@ -227,7 +229,12 @@ func (des *DataExportStruct) ByPushHistory() {
 		ids := []string{}
 		for _, pushData := range list {
 			if pushData.Id != "" {
-				ids = append(ids, pushData.Id)
+				if tmp := util.CommonDecodeArticle("content", pushData.Id); len(tmp) > 0 {
+					if id := tmp[0]; id != "" {
+						ids = append(ids, id)
+					}
+				}
+				//ids = append(ids, util.CommonDecodeArticle("content", pushData.Id))
 			}
 		}
 		saveData := map[string]interface{}{

+ 251 - 2
src/jfw/modules/publicapply/src/subscribePush/entity/historyPush.go

@@ -3,9 +3,15 @@ package entity
 import (
 	"db"
 	"encoding/json"
+	"fmt"
+	"log"
 	"qfw/util"
 	"qfw/util/elastic"
 	"qfw/util/jy"
+	"strconv"
+	"strings"
+	es "subscribePush/entity/service"
+	"time"
 )
 
 type historyPush struct {
@@ -17,9 +23,9 @@ var HistoryPush = &historyPush{}
 func (hp *historyPush) UpdateUserPushUnread(userid string, vt string) {
 	if vt == jy.MemberFlag {
 		db.Mgo.UpdateById("user", userid, map[string]interface{}{"$set": map[string]interface{}{"i_member_apppushunread": 0}})
-	} else  if vt ==jy.EntnicheFlag{
+	} else if vt == jy.EntnicheFlag {
 		db.Mgo.UpdateById("user", userid, map[string]interface{}{"$set": map[string]interface{}{"i_entniche_apppushunread": 0}})
-	}else{
+	} else {
 		db.Mgo.UpdateById("user", userid, map[string]interface{}{"$set": map[string]interface{}{"i_apppushunread": 0}})
 
 	}
@@ -71,3 +77,246 @@ func PushView(userid, allquery, field string, pageNum, pageSize int) (keys []int
 	list = elastic.GetResForJY(INDEX, TYPE, allkeys, allquery, `"title"`, `{"publishtime":"desc"}`, field, (pageNum-1)*pageSize, pageSize)
 	return
 }
+
+const (
+	bidField   = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","isValidFile","spidercode","site"`
+	bidTime    = `{"range":{"publishtime":{"gt":%d}}}`
+	bidSort    = `{"publishtime":"desc"}`
+	findfields = `"title"`
+)
+
+type defaultPush struct {
+	UserId     string
+	EntId      int
+	Size       int
+	ModuleFlag string
+}
+
+func DefaultPushList(userId, moduleFlag string, entId int) (keyword []byte, list *[]map[string]interface{}, deptId int) {
+	if userId == "" {
+		return
+	}
+	dp := defaultPush{
+		UserId:     userId,
+		EntId:      entId,
+		Size:       50,
+		ModuleFlag: moduleFlag,
+	}
+	scd, deptid := dp.getUserInfo()
+	if len(scd.Keyword) > 0 {
+		deptId = deptid
+		keyword, _ = json.Marshal(scd.Keyword)
+		//获取查询语句
+		qstr := dp.getDefaultDatasSQL(scd)
+		list = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSort, bidField, 0, dp.Size, 0, false)
+	}
+	return
+}
+
+//获取用户信息
+func (d *defaultPush) getUserInfo() (vc *ViewCondition, deptId int) {
+	t1 := time.Now()
+	var isPayBool = false
+	var tmpInfo = struct {
+		Items      []interface{}
+		BuyerClass []interface{}
+		SubType    []interface{}
+		Area       map[string]interface{}
+		SelectType string
+	}{}
+	switch d.ModuleFlag {
+	case "m":
+		//大会员
+		userMap, ok := db.Mgo.FindById("user", d.UserId, `{"o_member_jy":1,"i_member_status":1}`)
+		if !ok || userMap == nil || len(*userMap) == 0 {
+			return &ViewCondition{}, 0
+		}
+		if util.IntAll((*userMap)["i_member_status"]) > 0 {
+			isPayBool = true
+			o_member_jy, _ := (*userMap)["o_member_jy"].(map[string]interface{})
+			tmpInfo.Items, _ = o_member_jy["a_items"].([]interface{})
+			tmpInfo.BuyerClass, _ = o_member_jy["a_buyerclass"].([]interface{})
+			tmpInfo.SubType, _ = o_member_jy["a_infotype"].([]interface{})
+			tmpInfo.Area, _ = o_member_jy["o_area"].(map[string]interface{})
+		}
+	case "v":
+		//超级订阅
+		userMap, ok := db.Mgo.FindById("user", d.UserId, `{"o_vipjy":1,"i_vip_status":1}`)
+		if !ok || userMap == nil || len(*userMap) == 0 {
+			return &ViewCondition{}, 0
+		}
+		if util.IntAll((*userMap)["i_vip_status"]) > 0 {
+			isPayBool = true
+			o_vipjy, _ := (*userMap)["o_vipjy"].(map[string]interface{})
+			tmpInfo.Items, _ = o_vipjy["a_items"].([]interface{})
+			tmpInfo.BuyerClass, _ = o_vipjy["a_buyerclass"].([]interface{})
+			tmpInfo.SubType, _ = o_vipjy["a_infotype"].([]interface{})
+			tmpInfo.Area, _ = o_vipjy["o_area"].(map[string]interface{})
+		}
+	case "s":
+		//商机管理
+		entUserId, _ := strconv.Atoi(d.UserId)
+		if d.UserId == "" || d.EntId == 0 {
+			return &ViewCondition{}, 0
+		}
+		var entInfo map[string]interface{}
+		entInfo, deptId = (&es.MatchJob{}).Start(d.EntId, entUserId)
+		if entInfo != nil && len(entInfo) > 0 {
+			isPayBool = true
+			tmpInfo.Items, _ = entInfo["a_items"].([]interface{})
+			tmpInfo.BuyerClass, _ = entInfo["a_buyerclass"].([]interface{})
+			tmpInfo.SubType, _ = entInfo["a_infotype"].([]interface{})
+			tmpInfo.Area, _ = entInfo["o_area"].(map[string]interface{})
+		}
+	default:
+		//免费用户
+		userMap, ok := db.Mgo.FindById("user", d.UserId, `{"o_jy":1}`)
+		if !ok || userMap == nil || len(*userMap) == 0 {
+			return &ViewCondition{}, 0
+		}
+		o_jy, _ := (*userMap)["o_jy"].(map[string]interface{})
+		if o_jy["a_key"] != nil {
+			tmpInfo.Items, _ = o_jy["a_key"].([]interface{})
+			//信息类型
+			tmpInfo.SubType, _ = o_jy["a_infotype"].([]interface{})
+			//省份
+			tmpInfo.Area, _ = o_jy["o_area"].(map[string]interface{})
+			if util.IntAllDef(o_jy["i_ppstatus"], 0) == 1 && o_jy["o_area_p"] != nil {
+				tmpInfo.Area, _ = o_jy["o_area_p"].(map[string]interface{})
+			}
+		}
+	}
+	vc = &ViewCondition{
+		Buyerclass: util.ObjArrToStringArr(tmpInfo.BuyerClass),
+		Subtype:    util.ObjArrToStringArr(tmpInfo.SubType),
+		Area:       getStringArrFromDbResult(tmpInfo.Area, 1),
+		City:       getStringArrFromDbResult(tmpInfo.Area, 2),
+		SelectType: "1",
+	}
+	//付费用户
+	if isPayBool {
+		d.Size = 1000
+		vc.Keyword = getKeyWordArrFromDbResult(tmpInfo.Items, "", -1)
+	} else {
+		vc.Keyword = getKeyWordArrFromDbResultByFree(tmpInfo.Items, "", -1)
+	}
+	log.Println("获取用户信息耗时:", time.Since(t1).Seconds())
+	return
+}
+
+//获取查询语句
+func (d *defaultPush) getDefaultDatasSQL(scd *ViewCondition) (str string) {
+	query := `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": %d}}}`
+	query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
+	multi_match := `{"multi_match": {"query": %s,"type": "phrase", "fields": [%s]}}`
+	query_bool_must_and := `{"bool":{"must":[%s]%s}}`
+
+	bools := []string{}
+	musts := []string{}
+	//发布时间最新7天
+	musts = append(musts, fmt.Sprintf(bidTime, time.Now().AddDate(0, 0, -7).Unix()))
+	//省份
+	areaCity := []string{}
+	if len(scd.Area) > 0 {
+		areaquery := `{"terms":{"area":[`
+		for k, v := range scd.Area {
+			if k > 0 {
+				areaquery += `,`
+			}
+			areaquery += `"` + v + `"`
+		}
+		areaquery += `]}}`
+		areaCity = append(areaCity, areaquery)
+	}
+
+	//城市
+	if len(scd.City) > 0 {
+		areaquery := `{"terms":{"city":[`
+		for k, v := range scd.City {
+			if k > 0 {
+				areaquery += `,`
+			}
+			areaquery += `"` + v + `"`
+		}
+		areaquery += `]}}`
+		areaCity = append(areaCity, areaquery)
+	}
+	if len(areaCity) > 0 {
+		musts = append(musts, fmt.Sprintf(query_bool_should, strings.Join(areaCity, ",")))
+	}
+	if len(scd.Subtype) > 0 {
+		subquery := `{"terms":{"subtype":[`
+		for k, v := range scd.Subtype {
+			if k > 0 {
+				subquery += `,`
+			}
+			subquery += `"` + v + `"`
+		}
+		subquery += `]}}`
+		musts = append(musts, subquery)
+	}
+	if len(scd.Buyerclass) > 0 {
+		Buyerclass := `{"terms":{"buyerclass":[`
+		for k, v := range scd.Buyerclass {
+			if k > 0 {
+				Buyerclass += `,`
+			}
+			Buyerclass += `"` + v + `"`
+		}
+		Buyerclass += `]}}`
+		musts = append(musts, Buyerclass)
+	}
+	boolsNum := 0 //should
+	if len(scd.Keyword) > 0 {
+		boolsNum = 1
+		if scd.SelectType == "" || scd.SelectType == "2" {
+			scd.SelectType = "detail\", \"title"
+		} else {
+			scd.SelectType = "title"
+		}
+		multi_match = fmt.Sprintf(multi_match, "%s", "\""+scd.SelectType+"\"")
+
+		for _, v := range scd.Keyword {
+			shoulds := []string{}
+			must_not := []string{}
+			//附加词
+			for _, vv := range v.Keyword {
+				vv = strings.TrimSpace(vv)
+				if vv == "" {
+					continue
+				}
+				shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vv+"\""))
+			}
+
+			for _, vv := range v.Appended {
+				vv = strings.TrimSpace(vv)
+				if vv == "" {
+					continue
+				}
+				shoulds = append(shoulds, fmt.Sprintf(multi_match, "\""+vv+"\""))
+			}
+
+			//排除词
+			for _, vv := range v.Exclude {
+				vv = strings.TrimSpace(vv)
+				if vv == "" {
+					continue
+				}
+				must_not = append(must_not, fmt.Sprintf(multi_match, "\""+vv+"\""))
+			}
+
+			//添加
+			if len(shoulds) > 0 {
+				notStr := ""
+				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))
+			}
+		}
+	}
+
+	qstr := fmt.Sprintf(query, strings.Join(musts, ","), strings.Join(bools, ","), boolsNum)
+	log.Println("----", qstr)
+	return qstr
+}

+ 241 - 0
src/jfw/modules/publicapply/src/subscribePush/entity/service/entity.go

@@ -0,0 +1,241 @@
+package service
+
+import (
+	"log"
+	. "mongodb"
+	util "qfw/util"
+	"qfw/util/mysql"
+)
+
+func ClearEnt() {
+	Ents = map[int]*Ent{}
+	EntUsers = map[int]*EntUser{}
+	EntUserDept = map[int]*EntDeptUser{}
+	EntDeptUsers = map[int][]*EntDeptUser{}
+	EntRuleUsers = map[string][]*EntRuleUser{}
+	EntUserRules = map[int][]*EntRuleUser{}
+	EntDepts = map[int]*EntDept{}
+	EntParentDept = map[int][]*EntDeptParent{}
+	EntChildDept = map[int][]*EntDeptParent{}
+	EntDeptDis = map[int][]*EntDistribute{}
+}
+
+//
+func InitEnt(mysql *mysql.Mysql, mgo *MongodbSim, dbName string, entId, entUserId int) {
+	InitEnts(mysql, entId)
+	InitEntUsers(mysql, entUserId)
+	InitEntDeptUsers(mysql, entUserId)
+	InitEntRuleUsers(mysql, entUserId)
+	InitEntDepts(mysql, entId)
+	InitEntDeptParents(mysql, entId)
+	InitEntDistribute(mgo, dbName, entId)
+}
+
+///////////////////////
+var Ents = map[int]*Ent{}
+
+type Ent struct {
+	Id         int
+	Model      int
+	Name       string
+	DeptParent map[int][]int
+	IsNew      int
+}
+
+func InitEnts(Mysql *mysql.Mysql, entId int) {
+	list := Mysql.SelectBySql("select id,model,name from entniche_info where id=? and isNew=1 and status=1 and model in (1,2)", entId)
+	if list == nil {
+		return
+	}
+	for _, v := range *list {
+		id := util.IntAll(v["id"])
+		Ents[id] = &Ent{
+			Id:    id,
+			Model: util.IntAll(v["model"]),
+			Name:  util.ObjToString(v["name"]),
+		}
+	}
+	log.Println("entniche_info加载完成!")
+}
+
+var EntDepts = map[int]*EntDept{}
+
+type EntDept struct {
+	Id     int
+	Pid    int
+	Name   string
+	Nodiff int
+	Subdis int
+}
+
+func InitEntDepts(Mysql *mysql.Mysql, entId int) {
+	list := Mysql.SelectBySql(`select id,name,pid,subdis,nodiff from entniche_department where ent_id=?`, entId)
+	if list == nil {
+		return
+	}
+	for _, v := range *list {
+		id := util.IntAll(v["id"])
+		EntDepts[id] = &EntDept{
+			Id:     id,
+			Pid:    util.IntAll(v["pid"]),
+			Nodiff: util.IntAll(v["nodiff"]),
+			Subdis: util.IntAll(v["subdis"]),
+			Name:   util.ObjToString(v["name"]),
+		}
+	}
+	log.Println("entniche_department加载完成!")
+}
+
+var EntUsers = map[int]*EntUser{}
+
+type EntUser struct {
+	Id    int
+	Name  string
+	Mail  string
+	Phone string
+	Power int
+}
+
+func InitEntUsers(Mysql *mysql.Mysql, entUserId int) {
+	list := Mysql.SelectBySql(`select id,name,mail,phone,power from entniche_user where id=?`, entUserId)
+	if list == nil {
+		return
+	}
+	for _, v := range *list {
+		id := util.IntAll(v["id"])
+		EntUsers[id] = &EntUser{
+			Id:    id,
+			Name:  util.ObjToString(v["name"]),
+			Mail:  util.ObjToString(v["mail"]),
+			Phone: util.ObjToString(v["phone"]),
+			Power: util.IntAll(v["power"]),
+		}
+	}
+	log.Println("entniche_user加载完成!")
+}
+
+//我所有的父部门
+var EntParentDept = map[int][]*EntDeptParent{}
+
+//我所有的子部门
+var EntChildDept = map[int][]*EntDeptParent{}
+
+type EntDeptParent struct {
+	Id  int
+	Pid int
+}
+
+func InitEntDeptParents(Mysql *mysql.Mysql, entId int) {
+	list := Mysql.SelectBySql(`select a.id,a.pid from entniche_department_parent a inner join entniche_department b on (a.id=b.id and b.ent_id=?)`, entId)
+	if list == nil {
+		return
+	}
+	for _, v := range *list {
+		id := util.IntAll(v["id"])
+		pid := util.IntAll(v["pid"])
+		EntParentDept[id] = append(EntParentDept[id], &EntDeptParent{
+			Id:  id,
+			Pid: pid,
+		})
+		EntChildDept[pid] = append(EntChildDept[pid], &EntDeptParent{
+			Id:  id,
+			Pid: pid,
+		})
+	}
+	log.Println("entniche_department_parent加载完成!")
+}
+
+var EntUserDept = map[int]*EntDeptUser{}
+var EntDeptUsers = map[int][]*EntDeptUser{}
+
+type EntDeptUser struct {
+	UserId int
+	DeptId int
+}
+
+func InitEntDeptUsers(Mysql *mysql.Mysql, entUserId int) {
+	list := Mysql.SelectBySql(`select dept_id,user_id from entniche_department_user where user_id=?`, entUserId)
+	if list == nil {
+		return
+	}
+	for _, v := range *list {
+		user_id := util.IntAll(v["user_id"])
+		dept_id := util.IntAll(v["dept_id"])
+		entDeptUser := &EntDeptUser{
+			UserId: user_id,
+			DeptId: dept_id,
+		}
+		EntUserDept[user_id] = entDeptUser
+		EntDeptUsers[dept_id] = append(EntDeptUsers[dept_id], entDeptUser)
+	}
+	log.Println("entniche_department_user加载完成!")
+}
+
+var EntRuleUsers = map[string][]*EntRuleUser{}
+var EntUserRules = map[int][]*EntRuleUser{}
+
+type EntRuleUser struct {
+	UserId int
+	RuleId string
+}
+
+func InitEntRuleUsers(Mysql *mysql.Mysql, entUserId int) {
+	list := Mysql.SelectBySql(`select user_id,rule_id from entniche_user_rule where user_id=?`, entUserId)
+	if list == nil {
+		return
+	}
+	for _, v := range *list {
+		ruleId := util.ObjToString(v["rule_id"])
+		userId := util.IntAll(v["user_id"])
+		entRuleUser := &EntRuleUser{
+			UserId: userId,
+			RuleId: ruleId,
+		}
+		EntRuleUsers[ruleId] = append(EntRuleUsers[ruleId], entRuleUser)
+		EntUserRules[userId] = append(EntUserRules[userId], entRuleUser)
+	}
+	log.Println("entniche_user_rule加载完成!")
+}
+
+var EntDeptDis = map[int][]*EntDistribute{}
+
+type EntDistribute struct {
+	Id         string
+	DeptId     int
+	Area       map[string]interface{}
+	Buyerclass []interface{}
+	Items      []string
+}
+
+func InitEntDistribute(mgo *MongodbSim, dbName string, entId int) {
+	sess := mgo.GetMgoConn()
+	defer mgo.DestoryMongoConn(sess)
+	it := sess.DB(dbName).C("entniche_distribute").Find(map[string]interface{}{
+		"i_status": map[string]interface{}{"$ne": 1},
+		"i_entid":  entId,
+	}).Select(map[string]interface{}{
+		"_id":          1,
+		"i_entid":      1,
+		"i_deptid":     1,
+		"a_items":      1,
+		"o_area":       1,
+		"a_buyerclass": 1,
+	}).Iter()
+	for temp := make(map[string]interface{}); it.Next(&temp); {
+		if temp["i_deptid"] == nil {
+			continue
+		}
+		deptId := util.IntAll(temp["i_deptid"])
+		a_items, _ := temp["a_items"].([]interface{})
+		o_area, _ := temp["o_area"].(map[string]interface{})
+		a_buyerclass, _ := temp["a_buyerclass"].([]interface{})
+		EntDeptDis[deptId] = append(EntDeptDis[deptId], &EntDistribute{
+			Id:         BsonIdToSId(temp["_id"]),
+			DeptId:     deptId,
+			Area:       o_area,
+			Buyerclass: a_buyerclass,
+			Items:      util.ObjArrToStringArr(a_items),
+		})
+		temp = make(map[string]interface{})
+	}
+}

+ 260 - 0
src/jfw/modules/publicapply/src/subscribePush/entity/service/matchjob.go

@@ -0,0 +1,260 @@
+package service
+
+import (
+	"db"
+	"log"
+	util "qfw/util"
+)
+
+//用户基本信息
+type UserInfo struct {
+	Entniche *Entniche
+	SubSet   map[string]interface{}
+}
+
+//
+type Entniche struct {
+	EntId    int    //企业id
+	EntName  string //企业名称
+	DeptId   int    //部门id
+	DeptName string //部门名称
+	DisId    string //分发id
+	UserId   int
+}
+type MatchJob struct {
+}
+
+func (m *MatchJob) Start(entId, entUserId int) (map[string]interface{}, int) {
+	defer util.Catch()
+	defer ClearEnt()
+	InitEnt(db.Mysql, &db.Mgo, "qfw", entId, entUserId)
+	users := m.LoadSubSet(entId)
+	return FinalSub(entUserId, users), EntUserDept[entUserId].DeptId
+}
+
+func (m *MatchJob) LoadSubSet(entId int) map[*UserInfo]bool {
+	defer util.Catch()
+	Users := map[*UserInfo]bool{}
+	sess := db.Mgo.GetMgoConn()
+	defer db.Mgo.DestoryMongoConn(sess)
+	it := sess.DB("qfw").C("entniche_rule").Find(map[string]interface{}{
+		"i_entid": entId,
+	}).Select(map[string]interface{}{
+		"i_entid":    1,
+		"i_deptid":   1,
+		"i_userid":   1,
+		"o_entniche": 1,
+	}).Iter()
+	for _temp := make(map[string]interface{}); it.Next(&_temp); {
+		func(temp map[string]interface{}) {
+			entId := util.IntAll(temp["i_entid"])
+			deptId := util.IntAll(temp["i_deptid"])
+			userId := util.IntAll(temp["i_userid"])
+			if entId == 0 || (deptId == 0 && userId == 0) {
+				return
+			} else if Ents[entId] == nil {
+				log.Println("没有找到该企业", entId)
+				return
+			}
+			entName := Ents[entId].Name
+			if deptId > 0 && EntDepts[deptId] == nil {
+				log.Println("没有找到该部门", entName, entId, deptId)
+				return
+			}
+			deptName := ""
+			if EntDepts[deptId] != nil {
+				deptName = EntDepts[deptId].Name
+			}
+			subSet, _ := temp["o_entniche"].(map[string]interface{})
+			if subSet == nil || len(subSet) == 0 {
+				log.Println("订阅设置为空,过滤掉", entName, entId, deptName, deptId, userId)
+				return
+			}
+			//
+			if deptId > 0 { //部门订阅
+				if Ents[entId].Model != 1 {
+					log.Println("不是统一订阅模式,过滤掉", entName, entId, deptName, deptId)
+					return
+				} else if EntDepts[deptId] == nil {
+					log.Println("没有找到该部门,过滤掉", entName, entId, deptName, deptId)
+					return
+				} else if EntDepts[deptId].Subdis == 0 {
+					log.Println("该部门的订阅分发没有开启,过滤掉", entName, entId, deptName, deptId)
+					return
+				} else if EntDepts[deptId].Nodiff == 0 && EntDeptDis[deptId] == nil {
+					log.Println("该部门开启了订阅分发,没有开启全员无差别接收,但是没有分发规则,过滤掉", entName, entId, deptName, deptId)
+					return
+				}
+				//如果我的上级部门打开了订阅分发,并且开启了全员无差别接收,本部门规则无效
+				for _, dept := range EntParentDept[deptId] {
+					if EntDepts[dept.Pid].Subdis == 1 && EntDepts[dept.Pid].Nodiff == 1 {
+						log.Println("我的上级部门", dept.Pid, "开启了订阅分发和全员无差别,过滤掉", entName, entId, deptName, deptId)
+						return
+					}
+				}
+			} else if userId > 0 { //个人订阅
+				if Ents[entId].Model != 2 {
+					log.Println("不是个人订阅模式,过滤掉", entName, entId, userId)
+					return
+				} else if EntUsers[userId] == nil {
+					log.Println("没有找到该用户,过滤掉", entName, entId, userId)
+					return
+				} else if EntUsers[userId].Power == 0 {
+					log.Println("该用户没有权限,过滤掉", entName, entId, userId)
+					return
+				}
+			}
+			user := &UserInfo{
+				Entniche: &Entniche{
+					EntId:    entId,
+					EntName:  entName,
+					DeptId:   deptId,
+					DeptName: deptName,
+					UserId:   userId,
+				},
+				SubSet: subSet,
+			}
+			log.Println("加载订阅设置", "entId", entId, "entName", entName, "deptId", deptId, "deptName", deptName, "userId", userId)
+			Users[user] = true
+			if deptId <= 0 {
+				return
+			}
+			//分发规则
+			if EntDepts[deptId].Nodiff == 1 {
+				log.Println("该部门开启了全员无差别,分发规则无效", entName, entId, deptName, deptId)
+				return
+			} else if EntDeptDis[deptId] == nil {
+				log.Println("该部门没有分发规则", entName, entId, deptName, deptId)
+				return
+			}
+			itemMap := map[string]interface{}{}
+			items, _ := subSet["a_items"].([]interface{})
+			for _, v := range items {
+				item, _ := v.(map[string]interface{})
+				if item == nil {
+					continue
+				}
+				item_name, _ := item["s_item"].(string)
+				if item_name == "" {
+					continue
+				}
+				itemMap[item_name] = item
+			}
+			for _, dis := range EntDeptDis[deptId] {
+				child_items := []interface{}{}
+				for _, item_name := range dis.Items {
+					if itemMap[item_name] == nil {
+						continue
+					}
+					child_items = append(child_items, itemMap[item_name])
+				}
+				child_subSet := map[string]interface{}{}
+				if len(dis.Buyerclass) > 0 {
+					child_subSet["a_buyerclass"] = dis.Buyerclass
+				}
+				if len(dis.Area) > 0 {
+					child_subSet["o_area"] = dis.Area
+				}
+				if len(child_items) > 0 {
+					child_subSet["a_items"] = child_items
+				}
+				if len(child_subSet) == 0 {
+					continue
+				}
+				child_user := &UserInfo{
+					Entniche: &Entniche{
+						EntId:    user.Entniche.EntId,
+						EntName:  user.Entniche.EntName,
+						DeptId:   user.Entniche.DeptId,
+						DeptName: user.Entniche.DeptName,
+						DisId:    dis.Id,
+					},
+					SubSet: child_subSet,
+				}
+				Users[child_user] = true
+			}
+		}(_temp)
+		_temp = make(map[string]interface{})
+	}
+	return Users
+}
+func FinalSub(entUserId int, users map[*UserInfo]bool) map[string]interface{} {
+	for k, _ := range users {
+		if k.Entniche.DeptId > 0 {
+			k.Entniche.DeptName = EntDepts[k.Entniche.DeptId].Name
+			staffIds := GetDeptUserIds(&UserInfo{
+				Entniche: &Entniche{
+					EntId:    k.Entniche.EntId,
+					EntName:  k.Entniche.EntName,
+					DeptId:   k.Entniche.DeptId,
+					DeptName: k.Entniche.DeptName,
+					DisId:    k.Entniche.DisId,
+				},
+			})
+			if staffIds == nil {
+				continue
+			}
+			if staffIds[entUserId] {
+				return k.SubSet
+			}
+		} else if k.Entniche.UserId > 0 {
+			return k.SubSet
+		} else {
+			continue
+		}
+	}
+	return nil
+}
+func GetDeptUserIds(ui *UserInfo) map[int]bool {
+	if EntDepts[ui.Entniche.DeptId].Subdis == 0 {
+		log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, "没有开启订阅分发,过滤掉")
+		return nil
+	} else if EntDepts[ui.Entniche.DeptId].Nodiff == 0 && ui.Entniche.DisId == "" {
+		log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, "没有开启全员无差别接收,并且没有分发规则,过滤掉")
+		return nil
+	}
+	//对我的对着生效的用户
+	myIds := map[int]bool{}
+	//打开了全员无差别,下面所有员工都生效
+	if EntDepts[ui.Entniche.DeptId].Nodiff == 1 {
+		for _, v := range EntDeptUsers[ui.Entniche.DeptId] {
+			myIds[v.UserId] = true
+		}
+		for _, v := range EntChildDept[ui.Entniche.DeptId] {
+			for _, vv := range EntDeptUsers[v.Id] {
+				myIds[vv.UserId] = true
+			}
+		}
+		log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, "该部门打开了全员无差别", len(myIds), "人接收")
+	} else if ui.Entniche.DisId != "" {
+		for _, v := range EntRuleUsers[ui.Entniche.DisId] {
+			myIds[v.UserId] = true
+		}
+		log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, "该规则开启了订阅分发", ui.Entniche.DisId, "规则分发了", len(myIds), "人")
+	}
+	//我的上级部门,过滤掉本部门的人
+	for _, v := range EntParentDept[ui.Entniche.DeptId] {
+		//看我的上级部门,有没有开启订阅分发
+		if EntDepts[v.Pid].Subdis == 0 {
+			continue
+		}
+		//看我的上级部门,有没有全员无差别接收
+		if EntDepts[v.Pid].Nodiff == 1 {
+			log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, ui.Entniche.DisId, "上级部门", v.Pid, "打开了全员无差别开关,过滤掉")
+			return nil
+		}
+		//看我的上级部门,有没有对我设置规则
+		for _, vv := range EntDeptDis[v.Pid] {
+			for _, vvv := range EntRuleUsers[vv.Id] {
+				_, ok := myIds[vvv.UserId]
+				if !ok {
+					continue
+				}
+				delete(myIds, vvv.UserId)
+				log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, "上级部门", v.Pid, "对我设置的有", vvv.RuleId, "分发规则,此规则作废", vvv.UserId)
+			}
+		}
+	}
+	log.Println(ui.Entniche.EntName, ui.Entniche.EntId, ui.Entniche.DeptName, ui.Entniche.DeptId, ui.Entniche.DisId, "该规则匹配到", len(myIds), "人")
+	return myIds
+}

+ 4 - 1
src/jfw/modules/publicapply/src/subscribePush/entity/vrew.go

@@ -370,11 +370,14 @@ func getstype(stype string) string {
 
 // //关键词 附加词 排除词  省份订阅包
 func getKeyWordArrFromDbResultByFree(a_items []interface{}, item string, index int) (arr []ViewKeyWord) {
-	if a_items == nil {
+	if a_items == nil || len(a_items) == 0 {
 		return
 	}
 	for _, v := range a_items {
 		vmr, _ := v.([]interface{})
+		if len(vmr) == 0 {
+			continue
+		}
 		vm, _ := vmr[0].(map[string]interface{})
 		if item != "" && index >= 0 && item != qutil.ObjToString(vm["s_item"]) {
 			continue

+ 26 - 19
src/jfw/modules/publicapply/src/subscribePush/service/pushList.go

@@ -2,6 +2,7 @@ package service
 
 import (
 	. "api"
+	"config"
 	"db"
 	"encoding/json"
 	"fmt"
@@ -83,6 +84,7 @@ func (sp *SubscribePush) HasPushHistory() {
 	if userId == "" {
 		return
 	}
+	_userId := userId
 	vipType := sp.GetString("vt")
 	if vipType == "" { //默认取已切换的企业
 		vipType = jy.SwitchService.GetEntniche(sp.Session(), db.Mgo, db.Mysql)
@@ -134,7 +136,6 @@ func (sp *SubscribePush) HasPushHistory() {
 			isPassCount = redis.GetInt("pushcache_2_a", "oncecount_"+todayNum+"_"+userId) >= 150
 		}
 	}
-
 	//推送记录查询
 	pageNum, _ := sp.GetInteger("pageNum")
 	spqp := &jy.SubPushQueryParam{
@@ -151,6 +152,8 @@ func (sp *SubscribePush) HasPushHistory() {
 		Subtype:       sp.GetString("subtype"),
 		Subscopeclass: sp.GetString("subscopeclass"),
 		Key:           sp.GetString("key"),
+		Price:         sp.GetString("price"),      //价格
+		FileExists:    sp.GetString("fileExists"), //附件
 	}
 	if vipType == jy.SwitchService.Member {
 		spqp.PushMysql = db.MysqlMemberPush
@@ -160,10 +163,12 @@ func (sp *SubscribePush) HasPushHistory() {
 		spqp.PushMysql = db.MysqlPush
 	}
 	hasNextPage, _, list := jy.NewSubscribePush(vipType).Datas(spqp)
-	//免费用户无推送记录生成推送记录
-	if vipType == "" && hasKeyFlag && len(list) == 0 && spqp.IsEmpty() && !isVipFlag && util.Int64All((*user)["i_member_status"]) <= 0 {
-		flag, data := jy.NewSubscribePush().MakeHistoryDatas(db.Mgo, db.MysqlPush, userId, entity.PushView)
-		if flag && data != nil {
+	//免费用户无推送记录生成推送记录=>默认推送调整-付费用户默认1000条 免费不变
+	if spqp.PageNum <= 1 && len(list) == 0 && spqp.IsEmpty() {
+		//flag, data := jy.NewSubscribePush().MakeHistoryDatas(db.Mgo, db.MysqlPush, userId, entity.PushView)
+		flag, data := jy.NewSubscribePush(vipType).MakeHistoryDatasNew(spqp.PushMysql, userId, entId, entity.DefaultPushList)
+		if data != nil {
+			hasNextPage = flag
 			jsonBytes, err := json.Marshal(data)
 			err = json.Unmarshal(jsonBytes, &list)
 			if err != nil {
@@ -172,7 +177,7 @@ func (sp *SubscribePush) HasPushHistory() {
 		}
 	}
 	//查询是否收藏
-	jy.NewSubscribePush().MakeCollection(userId, db.Mysql, list)
+	jy.NewSubscribePush().MakeCollection(_userId, db.Mysql, list, config.Config.FileSignBool)
 	//仅表格第一页展示全部字段
 	if !(sp.GetString("format") == "table" && pageNum == 1) && len(list) > 0 {
 		for i := 0; i < len(list); i++ {
@@ -183,18 +188,18 @@ func (sp *SubscribePush) HasPushHistory() {
 		}
 	}
 	sp.ServeJson(map[string]interface{}{
-		"userId":      util.EncodeArticleId(userId),           //用户id
-		"haskey":      hasKeyFlag,                             //免费用户和超级订阅是否有订阅词
-		"isInTSguide": entity.HistoryPush.IsInTsGuide(userId), //是否进入向导
-		"isVipSub":    isVipFlag,                              //是否是超级订阅
-		"isExpire":    isExpire,                               //超级订阅到期提醒
-		"isOnTail":    isOnTail,                               //超级订阅状态
-		"isPassCount": isPassCount,                            //推送数量校验
-		"otherFlag":   otherFlag,                              //首次用户推送查询“其他”
-		"isread":      isread,                                 //某个通知??是否已读
-		"data":        list,                                   //推送记录字段 *适配大会员
-		"hasNextPage": hasNextPage,                            //是否有下一页 *适配大会员
-		"industry":    industry_,                              //会员订阅的行业
+		"userId":      util.EncodeArticleId(_userId),           //用户id
+		"haskey":      hasKeyFlag,                              //免费用户和超级订阅是否有订阅词
+		"isInTSguide": entity.HistoryPush.IsInTsGuide(_userId), //是否进入向导
+		"isVipSub":    isVipFlag,                               //是否是超级订阅
+		"isExpire":    isExpire,                                //超级订阅到期提醒
+		"isOnTail":    isOnTail,                                //超级订阅状态
+		"isPassCount": isPassCount,                             //推送数量校验
+		"otherFlag":   otherFlag,                               //首次用户推送查询“其他”
+		"isread":      isread,                                  //某个通知??是否已读
+		"data":        list,                                    //推送记录字段 *适配大会员
+		"hasNextPage": hasNextPage,                             //是否有下一页 *适配大会员
+		"industry":    industry_,                               //会员订阅的行业
 	})
 }
 
@@ -230,6 +235,8 @@ func (sp *SubscribePush) HistoryPaging() {
 		Subtype:       sp.GetString("subtype"),
 		Subscopeclass: sp.GetString("subscopeclass"),
 		Key:           sp.GetString("key"),
+		Price:         sp.GetString("price"),
+		FileExists:    sp.GetString("fileExists"),
 	}
 	if vipType == jy.SwitchService.Member {
 		spqp.PushMysql = db.MysqlMemberPush
@@ -240,7 +247,7 @@ func (sp *SubscribePush) HistoryPaging() {
 	}
 	hasNextPage, total, list := jy.NewSubscribePush(vipType).Datas(spqp)
 	//查询是否收藏
-	jy.NewSubscribePush().MakeCollection(userId, db.Mysql, list)
+	jy.NewSubscribePush().MakeCollection(userId, db.Mysql, list, config.Config.FileSignBool)
 	//是否有关键词
 	user, _ := jy.NewSubscribePush(vipType).UserInfo(db.Mgo, userId)
 	hasKeyFlag, _ := me.GetKeySet(vipType, user, []string{})

+ 3 - 1
src/jfw/modules/subscribepay/src/config.json

@@ -67,6 +67,7 @@
   	"appPushServiceRpc": "127.0.0.1:5566",
   	"webdomain": "http://web-zxl.jydev.jianyu360.com",
   	"appdomain": "http://web-zxl.jydev.jianyu360.com",
+    "wxdomain": "http://web-zxl.jydev.jianyu360.com",
   	"mail": [
 	    {
 	      "addr": "smtp.exmail.qq.com",
@@ -109,5 +110,6 @@
 	},
 	"smsServiceRpc":"127.0.0.1:932",
 	"nsq":"192.168.3.240:4260",
-  "nsq_topic": "jy_event"
+  "nsq_topic": "jy_event",
+  "userCenterApi":"https://web-zxl.jydev.jianyu360.com"
 }

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