wangshan 5 年之前
父节点
当前提交
941267ecaa
共有 100 个文件被更改,包括 3165 次插入1356 次删除
  1. 2 3
      src/config.json
  2. 2 1
      src/jfw/front/dataExport.go
  3. 4 3
      src/jfw/front/supsearch.go
  4. 38 30
      src/jfw/front/swordfish.go
  5. 9 0
      src/jfw/modules/app/src/active.json
  6. 70 0
      src/jfw/modules/app/src/app/active/active.go
  7. 234 0
      src/jfw/modules/app/src/app/active/pullnew/pullnew.go
  8. 23 0
      src/jfw/modules/app/src/app/config/active.go
  9. 6 5
      src/jfw/modules/app/src/app/front/login.go
  10. 6 0
      src/jfw/modules/app/src/app/front/me.go
  11. 7 0
      src/jfw/modules/app/src/app/front/search.go
  12. 30 22
      src/jfw/modules/app/src/app/front/swordfish.go
  13. 19 19
      src/jfw/modules/app/src/config.json
  14. 5 1
      src/jfw/modules/app/src/main.go
  15. 3 5
      src/jfw/modules/app/src/seo.json
  16. 二进制
      src/jfw/modules/app/src/src
  17. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/common/images/close.png
  18. 102 0
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/base.css
  19. 68 0
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/datapacket.css
  20. 18 0
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/explain.css
  21. 123 0
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/helpfriends.css
  22. 344 0
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/index.css
  23. 115 0
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/invite.css
  24. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/add.png
  25. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/bg.png
  26. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/bg2.png
  27. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/circle_left.png
  28. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/circle_right.png
  29. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/invite.png
  30. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/logo.png
  31. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/people.png
  32. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/pullnew.png
  33. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/square.png
  34. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/text1.png
  35. 二进制
      src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/toast.png
  36. 3 5
      src/jfw/modules/app/src/web/staticres/jyapp/css/wxsearch.css
  37. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/css/choose_area.css
  38. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/css/dataExport.css
  39. 6 6
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/css/keyWord.css
  40. 18 6
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/additionWord.js
  41. 17 5
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/keyWord.js
  42. 11 5
      src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/mapJSON.js
  43. 6 0
      src/jfw/modules/app/src/web/staticres/jyapp/js/clipboard.min.js
  44. 16 28
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  45. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/js/jypraise.js
  46. 352 66
      src/jfw/modules/app/src/web/staticres/jyapp/js/popup/tap.js
  47. 19 18
      src/jfw/modules/app/src/web/staticres/jyapp/js/rem.js
  48. 12 11
      src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js
  49. 14 1
      src/jfw/modules/app/src/web/staticres/jyapp/me/css/index.css
  50. 1 1
      src/jfw/modules/app/src/web/staticres/jyapp/wxtsguide/main.js
  51. 35 0
      src/jfw/modules/app/src/web/templates/active/explain.html
  52. 48 0
      src/jfw/modules/app/src/web/templates/active/pullnew/datapacket.html
  53. 256 0
      src/jfw/modules/app/src/web/templates/active/pullnew/helpfriends.html
  54. 173 0
      src/jfw/modules/app/src/web/templates/active/pullnew/index.html
  55. 76 0
      src/jfw/modules/app/src/web/templates/active/pullnew/invite.html
  56. 129 8
      src/jfw/modules/app/src/web/templates/dataExport/dataExport.html
  57. 20 11
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_appended.html
  58. 13 6
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_appendedInput.html
  59. 25 17
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_area.html
  60. 1 4
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_buyerEdit.html
  61. 13 6
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_buyerInput.html
  62. 20 11
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_exclude.html
  63. 13 6
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_excludeInput.html
  64. 3 2
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_industry.html
  65. 4 14
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_keyWord.html
  66. 13 6
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_keyWordInput.html
  67. 21 12
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerEdit.html
  68. 13 6
      src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerInput.html
  69. 3 23
      src/jfw/modules/app/src/web/templates/followent/set.html
  70. 1 1
      src/jfw/modules/app/src/web/templates/me/download.html
  71. 17 3
      src/jfw/modules/app/src/web/templates/me/index.html
  72. 1 1
      src/jfw/modules/app/src/web/templates/me/login.html
  73. 1 1
      src/jfw/modules/app/src/web/templates/me/set.html
  74. 1 1
      src/jfw/modules/app/src/web/templates/weixin/about.html
  75. 2 2
      src/jfw/modules/app/src/web/templates/weixin/follow/notice.html
  76. 3 22
      src/jfw/modules/app/src/web/templates/weixin/follow/set.html
  77. 0 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-cjss.html
  78. 0 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-gzqy.html
  79. 0 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-sjdc.html
  80. 0 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zbqy.html
  81. 0 1
      src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zndy.html
  82. 2 2
      src/jfw/modules/app/src/web/templates/weixin/messagedetail.html
  83. 2 2
      src/jfw/modules/app/src/web/templates/weixin/privacy.html
  84. 2 3
      src/jfw/modules/app/src/web/templates/weixin/resultpreview.html
  85. 39 53
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  86. 2 8
      src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html
  87. 3 14
      src/jfw/modules/app/src/web/templates/weixin/wxpush.html
  88. 0 1
      src/jfw/modules/app/src/web/templates/weixin/wxtsguide.html
  89. 8 7
      src/jfw/modules/pushent/src/config.json
  90. 0 18
      src/jfw/modules/pushent/src/followpush/followpush_test.go
  91. 213 279
      src/jfw/modules/pushent/src/followpush/push.go
  92. 4 13
      src/jfw/modules/pushent/src/main.go
  93. 0 27
      src/jfw/modules/pushent/src/main_test.go
  94. 24 52
      src/jfw/modules/pushent/src/rpccall/weixinrpc.go
  95. 9 7
      src/jfw/modules/pushproject/src/config.json
  96. 0 18
      src/jfw/modules/pushproject/src/followpush/followpush_test.go
  97. 242 288
      src/jfw/modules/pushproject/src/followpush/push.go
  98. 0 116
      src/jfw/modules/pushproject/src/listdb/listdb.go
  99. 4 9
      src/jfw/modules/pushproject/src/main.go
  100. 0 27
      src/jfw/modules/pushproject/src/main_test.go

+ 2 - 3
src/config.json

@@ -250,6 +250,7 @@
             "wx01": "jywx",
             "topnet": "topnet",
             "duanxin": "duanxin",
+			"active_pullnew": "active_pullnew",
             "default": "topnet"
         }
     },
@@ -327,8 +328,6 @@
     "getpicurl": "https://res.jianyu360.com/",
     "sealSendTime": 14400,
     "appPushServiceRpc": "127.0.0.1:5566",
-    "pushTimeout": 300,
-    "ninePushTimeout": 172800,
     "openPlatformUrl": "https://open-jytest.jianyu360.cn/",
-    "sessionEnctryFlushCorn": "0 0/10 * * * ?"
+    "sessionEnctryFlushCorn": "0 0 0 1 * ?"
 }

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

@@ -9,6 +9,7 @@ import (
 	"jfw/public"
 	"log"
 	"qfw/util"
+	"qfw/util/jy"
 	"qfw/util/redis"
 	"regexp"
 	"strconv"
@@ -452,7 +453,7 @@ func (d *DataExport) SuperSearchExport() error {
 		if selectType == "all" {
 			isIntercept = true
 		}
-		_, _, keywords = public.InterceptSearchKW(keywords, isIntercept, len(industrySave) == 0)
+		_, _, keywords = jy.InterceptSearchKW(keywords, isIntercept, len(industrySave) == 0)
 		KeyWordSave = append(KeyWordSave, public.KeyWord{Keyword: keywords})
 	}
 	//时间

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

@@ -10,6 +10,7 @@ import (
 	"net/http"
 	"qfw/util"
 	"qfw/util/elastic"
+	"qfw/util/jy"
 	"qfw/util/redis"
 	"strconv"
 	"strings"
@@ -61,7 +62,7 @@ func (p *Pcsearch) ProposedProject() error {
 		shareid = "10"
 	}
 	p.T["logid"] = config.Seoconfig["jynjxmy"].(string)
-	b_word, _, s_word := public.InterceptSearchKW(p.GetString("keywords"), false, true)
+	b_word, _, s_word := jy.InterceptSearchKW(p.GetString("keywords"), false, true)
 	area := p.GetString("area")               //地区
 	publishtime := p.GetString("publishtime") //发布时间
 	subtype := p.GetString("subtype")         //信息类型
@@ -222,7 +223,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 		timeslot = util.ObjToString(p.GetSession("Echo_timeslot"))
 	}
 
-	b_word, _, s_word := public.InterceptSearchKW(keywords, false, len(industry) == 0)
+	b_word, _, s_word := jy.InterceptSearchKW(keywords, false, len(industry) == 0)
 	var list *[]map[string]interface{}
 	var status = 1
 	var count, totalPage int64
@@ -236,7 +237,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 			listSize = len(*list)
 		}
 		if len([]rune(s_word)) > 3 && int(count) < pc_pageSize {
-			secondKWS = public.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
+			secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 			findfields := `"title"`
 			qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(area, publishtime, subtype))
 			//			var secondCount int64 = 0

+ 38 - 30
src/jfw/front/swordfish.go

@@ -289,7 +289,7 @@ func (m *Front) Searchinfolist(p string) error {
 	m.T["shareid"] = se.EncodeString(shareid)
 	keywords := m.GetString("keywords")
 
-	searchvalue := public.FilteKey(m.GetString("searchvalue"))
+	searchvalue := jy.FilteKey(m.GetString("searchvalue"))
 	area := m.GetString("area")
 	publishtime := m.GetString("publishtime")
 	toptype := m.GetString("toptype")
@@ -501,7 +501,7 @@ func (m *Front) PcAjaxReq() {
 	if selectType == "" {
 		selectType = "all"
 	}
-	_, a_word, s_word := public.InterceptSearchKW(m.GetString("searchvalue"), selectType == "all", len(industry) == 0)
+	b_word, a_word, s_word := jy.InterceptSearchKW(m.GetString("searchvalue"), selectType == "all", len(industry) == 0)
 	var list *[]map[string]interface{}
 	var secondList []map[string]interface{}
 	var count, totalPage int64
@@ -547,7 +547,7 @@ func (m *Front) PcAjaxReq() {
 					listSize = len(*list)
 				}
 				if len([]rune(s_word)) > 3 && int(count) < pc_pageSize && start == 0 {
-					secondKWS = public.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
+					secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(area, publishtime, subtype))
 					secondLimit := 2*pc_pageSize - int(count)
@@ -630,6 +630,7 @@ func (m *Front) PcAjaxReq() {
 		"count":         count,
 		"totalPage":     totalPage,
 		"interceptWord": a_word,
+		"keywords":      b_word,
 		"searchvalue":   s_word,
 		"secondFlag":    secondFlag,
 		"secondList":    secondList,
@@ -909,27 +910,28 @@ func (m *Front) WxsearchlistPaging() {
 				}
 			}
 			if isLimit == 1 {
+				s_word := ""
 				if limitFlag {
 					if pageNum == 1 {
 						if open_supersearch {
-							list, b_word, a_word, _ = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, public.Lst.TotalPage*wx_pageSize, selectType, filed)
+							list, b_word, a_word, s_word = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, public.Lst.TotalPage*wx_pageSize, selectType, filed)
 						} else {
-							list, b_word, a_word, _ = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, public.Lst.TotalPage*wx_pageSize, selectType, filed)
+							list, b_word, a_word, s_word = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, public.Lst.TotalPage*wx_pageSize, selectType, filed)
 						}
 					}
 				} else {
 					if open_supersearch {
-						list, b_word, a_word, _ = getWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, selectType, filed)
+						list, b_word, a_word, s_word = getWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, selectType, filed)
 					} else {
-						list, b_word, a_word, _ = getWxsearchlistData(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, selectType, filed)
+						list, b_word, a_word, s_word = getWxsearchlistData(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, selectType, filed)
 					}
 				}
 				listSize := 0
 				if list != nil {
 					listSize = len(*list)
 				}
-				if len([]rune(searchvalue)) > 3 && listSize < pc_pageSize && pageNum == 1 {
-					secondKWS = public.HttpEs(searchvalue, "ik_smart", config.Sysconfig["elasticsearch"].(string))
+				if len([]rune(s_word)) > 3 && listSize < pc_pageSize && pageNum == 1 {
+					secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
 					//					var secondCount int64 = 0
@@ -938,34 +940,31 @@ func (m *Front) WxsearchlistPaging() {
 					//					}
 					secondLimit := 2*pc_pageSize - listSize
 					secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, filed, 0, secondLimit, 0, false)
-					if secRel != nil {
+					if secRel != nil && len(*secRel) > 0 {
 						public.BidListConvert(industry, secRel)
 						for _, v := range *secRel {
 							v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
 						}
-					}
-					if list != nil {
-						for _, v := range *list {
-							for n, m := range *secRel {
-								if util.ObjToString(v["_id"]) == util.ObjToString(m["_id"]) {
-									*secRel = append((*secRel)[0:n], (*secRel)[n+1:]...)
-									break
+						if list != nil {
+							for _, v := range *list {
+								for n, m := range *secRel {
+									if util.ObjToString(v["_id"]) == util.ObjToString(m["_id"]) {
+										*secRel = append((*secRel)[0:n], (*secRel)[n+1:]...)
+										break
+									}
 								}
 							}
-						}
-						*list = append(*list, *secRel...)
-					} else {
-						list = secRel
-					}
-					if len(*secRel) > 0 {
-						if secondKWS != "" {
-							b_word += " " + secondKWS
+							*list = append(*list, *secRel...)
+						} else {
+							list = secRel
 						}
 						secondFlag = "T"
 						if len(*list) > pc_pageSize && selectType == "title" {
 							secondList = (*list)[pc_pageSize:]
 							*list = (*list)[:pc_pageSize]
 						}
+					} else {
+						secondKWS = ""
 					}
 				}
 				SaveUserSearchLog(m.Request, util.ObjToString(m.GetSession("userId")), -1, "wx", "超级搜索", map[string]interface{}{
@@ -1024,6 +1023,7 @@ func (m *Front) WxsearchlistPaging() {
 			"keyWord":       b_word,
 			"secondFlag":    secondFlag,
 			"secondList":    secondList,
+			"secondKWS":     secondKWS,
 		})
 	}
 }
@@ -1048,7 +1048,7 @@ func getWxsearchlistData(keywords, scope, publishtime, subtype, industry, minpri
 	return getWxsearchlistData_new(keywords, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, wx_pageSize, selectType, field)
 }
 func getWxsearchlistData_new(keywords, scope, publishtime, subtype, industry, minprice, maxprice string, pageNum, pageSize int, selectType, field string) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
-	b_word, a_word, s_word = public.InterceptSearchKW(keywords, selectType == "all", len(industry) == 0)
+	b_word, a_word, s_word = jy.InterceptSearchKW(keywords, selectType == "all", len(industry) == 0)
 	if len(b_word) == 0 {
 		return list, b_word, a_word, s_word
 	}
@@ -1150,9 +1150,13 @@ func wxvisitD(sid, userId, openId string) (objdata map[string]interface{}) {
 			if userId != "" {
 				pcode, _ := obj["projectcode"].(string)
 				pname, _ := obj["projectname"].(string)
-				titleTmp, _ := obj["title"].(string)
-				titleTmp = public.ClearHtml.ReplaceAllString(titleTmp, "")
+				titleTmp := util.ObjToString(obj["title"])
 				obj["followFlag"], obj["followId"] = MFollow(userId, pname, pcode, titleTmp, openId)
+				if len([]rune(titleTmp)) > 100 {
+					titleTmp = string([]rune(titleTmp)[:100]) + "..."
+				}
+				titleTmp = public.ClearHtml.ReplaceAllString(titleTmp, "")
+				obj["title"] = titleTmp
 				obj["hasSession"] = true
 			}
 			if strings.Trim(util.ObjToString(obj["detail"]), " ") == "" {
@@ -1305,8 +1309,12 @@ func pcVRT(sid, industry string) (po, bo, wo []map[string]interface{}, objdata m
 			if strings.Trim(util.ObjToString(obj["detail"]), " ") == "" {
 				obj["detail"] = ""
 			}
-			titleTmp := util.ObjToString(obj["title"])
-			obj["title"] = public.ClearHtml.ReplaceAllString(titleTmp, "")
+			titleStr := util.ObjToString(obj["title"])
+			if len([]rune(titleStr)) > 100 {
+				titleStr = string([]rune(titleStr)[:100]) + "..."
+			}
+			//titleTmp := util.If(len([]rune(titleStr)) > 100, string([]rune(titleStr)[:100])+"...", string(titleStr)).(string)
+			obj["title"] = public.ClearHtml.ReplaceAllString(titleStr, "")
 			area := obj["area"].(string)
 			finalType, _ := obj["subtype"].(string)
 			if finalType == "" {

+ 9 - 0
src/jfw/modules/app/src/active.json

@@ -0,0 +1,9 @@
+{
+	"pullnew":{
+		"startTime": 1567390259,
+		"endTime": 1569982259,
+		"url":"https://pan.baidu.com/s/1alKNc4hzuEK3q4XOFfz5Ow",
+		"password":"j2ks",
+		"desc":"拉新活动"
+	}
+}

+ 70 - 0
src/jfw/modules/app/src/app/active/active.go

@@ -0,0 +1,70 @@
+package active
+
+import (
+	"app/active/pullnew"
+	"app/config"
+	"jfw/public"
+	"qfw/util"
+	"time"
+
+	"github.com/go-xweb/xweb"
+)
+
+type active struct {
+	*xweb.Action
+
+	explain xweb.Mapper `xweb:"/jyapp/free/active/explain"` //活动说明
+	info    xweb.Mapper `xweb:"/jyapp/free/active/info"`    //超级搜索页面只弹一次输入邀请码
+}
+
+func Init() {
+	//拉新活动初始化
+	go pullnew.Init()
+}
+
+func init() {
+	xweb.AddAction(&active{})
+}
+func (a *active) Explain() error {
+	return a.Render("/active/explain.html")
+}
+
+//app所有活动信息都可使用该方法获取活动的基本信息
+func (a *active) Info() {
+	userId, _ := a.GetSession("userId").(string)
+	now_unix := time.Now().Unix()
+	/***拉新活动 start ***/
+	pullnew := func() map[string]interface{} {
+		isCodeTip := false
+		isActiveTime := now_unix >= config.Active.Pullnew.StartTime && now_unix <= config.Active.Pullnew.EndTime
+		if isActiveTime && userId != "" {
+			user, ok := public.MQFW.FindById("user", userId, `{"l_registedate":1}`)
+			if ok && user != nil && len(*user) > 0 {
+				registeDate := util.Int64All((*user)["l_registedate"])
+				if registeDate >= config.Active.Pullnew.StartTime {
+					data, ok := public.MQFW.FindOneByField("jyapp_active_pullnew", map[string]interface{}{
+						"uid": userId,
+					}, `{"tip":1}`)
+					if ok {
+						if data != nil && len(*data) > 0 {
+							if util.IntAll((*data)["tip"]) != 1 {
+								isCodeTip = true
+							}
+						} else {
+							isCodeTip = true
+						}
+					}
+				}
+			}
+		}
+		return map[string]interface{}{
+			"isCodeTip":    isCodeTip,
+			"isActiveTime": isActiveTime,
+		}
+	}()
+	/***拉新活动 end ***/
+	a.ServeJson(map[string]interface{}{
+		"pullnew": pullnew,
+		"isLogin": userId != "",
+	})
+}

+ 234 - 0
src/jfw/modules/app/src/app/active/pullnew/pullnew.go

@@ -0,0 +1,234 @@
+package pullnew
+
+import (
+	"app/config"
+	jconfig "jfw/config"
+	"jfw/public"
+	"log"
+	"qfw/util"
+	"regexp"
+	"strings"
+	"sync"
+	"time"
+
+	"github.com/go-xweb/xweb"
+)
+
+type pullnew struct {
+	*xweb.Action
+
+	index        xweb.Mapper `xweb:"/jyapp/active/pullnew/index"`                  //首页
+	helpFriends  xweb.Mapper `xweb:"/jyapp/active/pullnew/helpfriends"`            //助力好友
+	inviteCode   xweb.Mapper `xweb:"/jyapp/active/pullnew/helpfriends/invitecode"` //好友的邀请码
+	dataPacket   xweb.Mapper `xweb:"/jyapp/active/pullnew/datapacket"`             //领取资料包
+	share        xweb.Mapper `xweb:"/jyapp/active/pullnew/share"`                  //分享统计
+	invite       xweb.Mapper `xweb:"/jyapp/free/active/pullnew/invite"`            //邀请
+	once         xweb.Mapper `xweb:"/jyapp/active/pullnew/once"`                   //超级搜索页面只弹一次输入邀请码
+	mydatapacket xweb.Mapper `xweb:"/jyapp/free/pullnew/mydatapacket"`             //领取资料包
+}
+
+var (
+	hasInviteCode  = make(map[string]bool)
+	size           = 50
+	inviteCodePool = make(chan string, size)
+	lock           = &sync.Mutex{}
+	collection     = "jyapp_active_pullnew"
+	reg            = regexp.MustCompile("^[A-Z]{5}$")
+)
+
+func Init() {
+	//从数据库加载全部邀请码
+	log.Println("开始加载拉新活动全部邀请码。。。")
+	sess := public.MQFW.GetMgoConn()
+	defer public.MQFW.DestoryMongoConn(sess)
+	it := sess.DB("qfw").C(collection).Find(nil).Select(map[string]interface{}{"invitecode": 1}).Iter()
+	for m := make(map[string]interface{}); it.Next(&m); {
+		hasInviteCode[util.ObjToString(m["invitecode"])] = true
+	}
+	log.Println("拉新活动邀请码加载结束。。。", len(hasInviteCode))
+	//预先生成邀请码
+	for i := 0; i < size; i++ {
+		createInviteCode()
+	}
+	log.Println("预生成邀请码结束。。。")
+}
+
+//生成一个邀请码
+func createInviteCode() {
+	lock.Lock()
+	defer lock.Unlock()
+	for {
+		code := util.GetLetterRandom(5, true)
+		if !hasInviteCode[code] {
+			hasInviteCode[code] = true
+			inviteCodePool <- code
+			break
+		}
+	}
+}
+
+func init() {
+	xweb.AddAction(&pullnew{})
+}
+func (a *pullnew) Index() error {
+	userId, _ := a.GetSession("userId").(string)
+	nickName := util.ObjToString(a.GetSession("s_nickname"))
+	hasHelp := true
+	data, ok := public.MQFW.FindOneByField(collection, map[string]interface{}{
+		"uid": userId,
+	}, `{"invitecode":1,"helpcode":1}`)
+	if ok {
+		inviteCode := ""
+		if data != nil && len(*data) > 0 {
+			inviteCode = util.ObjToString((*data)["invitecode"])
+			if util.ObjToString((*data)["helpcode"]) == "" {
+				hasHelp = false
+			} else {
+				hasHelp = true
+			}
+		} else {
+			hasHelp = false
+		}
+		if inviteCode == "" {
+			inviteCode = <-inviteCodePool
+			if public.MQFW.Update(collection, map[string]interface{}{
+				"uid": userId,
+			}, map[string]interface{}{
+				"$set": map[string]interface{}{
+					"uid":          userId,
+					"invitecode":   inviteCode,
+					"invitetime":   time.Now().Unix(),
+					"nickname":     nickName,
+					"headimageurl": util.ObjToString(a.GetSession("s_headimageurl")),
+				},
+			}, true, false) {
+				a.T["inviteCode"] = inviteCode
+				go createInviteCode()
+			} else {
+				go func() {
+					inviteCodePool <- inviteCode
+				}()
+			}
+		} else {
+			a.T["inviteCode"] = inviteCode
+			//
+			a.T["myInvites"], _ = public.MQFW.Find(collection, map[string]interface{}{
+				"helpcode": inviteCode,
+			}, `{"helptime":1}`, `{"_id":0,"nickname":1,"headimageurl":1}`, false, 0, 3)
+		}
+	} else {
+		hasHelp = true
+	}
+	if !hasHelp {
+		hasHelp = true
+		user, ok := public.MQFW.FindById("user", userId, `{"l_registedate":1}`)
+		if ok && user != nil && len(*user) > 0 {
+			if util.Int64All((*user)["l_registedate"]) >= config.Active.Pullnew.StartTime {
+				hasHelp = false
+			}
+		}
+	}
+	a.T["hasHelp"] = hasHelp
+	a.T["shareNickName"] = util.SE.Encode2Hex(nickName)
+	a.T["shareInviteCode"] = util.SE.Encode2Hex(util.ObjToString(a.T["inviteCode"]))
+	return a.Render("/active/pullnew/index.html")
+}
+func (a *pullnew) HelpFriends() error {
+	return a.Render("/active/pullnew/helpfriends.html")
+}
+func (a *pullnew) InviteCode() {
+	status := "n"
+	userId, _ := a.GetSession("userId").(string)
+	code := strings.ToUpper(strings.TrimSpace(a.GetString("code")))
+	if reg.MatchString(code) {
+		data, ok := public.MQFW.FindOneByField(collection, map[string]interface{}{
+			"uid": userId,
+		}, `{"helpcode":1,"invitecode":1}`)
+		if ok {
+			if data != nil && len(*data) > 0 {
+				helpcode, _ := (*data)["helpcode"].(string)
+				if helpcode != "" {
+					status = "o"
+				} else if code == util.ObjToString((*data)["invitecode"]) {
+					status = "m"
+				}
+			}
+			if public.MQFW.Count(collection, map[string]interface{}{"invitecode": code}) == 0 {
+				status = "b"
+			}
+			if status == "n" {
+				if public.MQFW.Update(collection, map[string]interface{}{
+					"uid": userId,
+				}, map[string]interface{}{
+					"$set": map[string]interface{}{
+						"uid":          userId,
+						"helpcode":     code,
+						"helptime":     time.Now().Unix(),
+						"nickname":     util.ObjToString(a.GetSession("s_nickname")),
+						"headimageurl": util.ObjToString(a.GetSession("s_headimageurl")),
+					},
+				}, true, false) {
+					status = "y"
+				}
+			}
+		}
+	}
+	a.ServeJson(map[string]interface{}{
+		"status": status,
+	})
+}
+func (a *pullnew) DataPacket() error {
+	userId, _ := a.GetSession("userId").(string)
+	count := 0
+	data, ok := public.MQFW.FindOneByField(collection, map[string]interface{}{"uid": userId}, `{"invitecode":1}`)
+	if ok && data != nil && len(*data) > 0 {
+		inviteCode := util.ObjToString((*data)["invitecode"])
+		count = public.MQFW.Count(collection, map[string]interface{}{"helpcode": inviteCode})
+	}
+	if count >= 3 {
+		a.T["domain"] = jconfig.Sysconfig["webdomain"]
+		a.T["url"] = config.Active.Pullnew.Url
+		a.T["password"] = config.Active.Pullnew.Password
+		return a.Render("/active/pullnew/datapacket.html")
+	} else {
+		return a.Redirect("/jyapp/active/pullnew/index")
+	}
+}
+
+func (a *pullnew) Share() {
+	flag := public.MQFW.Save("jyapp_active_pullnew_share", map[string]interface{}{
+		"type":       a.GetString("type"),
+		"createtime": time.Now().Unix(),
+		"uid":        a.GetSession("userId"),
+		"title":      a.GetString("title"),
+	}) != ""
+	a.ServeJson(map[string]interface{}{
+		"flag": flag,
+	})
+}
+
+func (a *pullnew) Invite() error {
+	a.T["nickName"] = util.SE.Decode4Hex(a.GetString("n"))
+	a.T["inviteCode"] = util.SE.Decode4Hex(a.GetString("i"))
+	a.T["source"] = a.GetString("t")
+	return a.Render("/active/pullnew/invite.html")
+}
+
+func (a *pullnew) Once() {
+	userId, _ := a.GetSession("userId").(string)
+	flag := public.MQFW.Update(collection, map[string]interface{}{
+		"uid": userId,
+	}, map[string]interface{}{
+		"$set": map[string]interface{}{
+			"tip":     1,
+			"tiptime": time.Now().Unix(),
+			"uid":     userId,
+		},
+	}, true, false)
+	a.ServeJson(map[string]interface{}{
+		"flag": flag,
+	})
+}
+func (a *pullnew) Mydatapacket() error {
+	return a.Redirect(config.Active.Pullnew.Url)
+}

+ 23 - 0
src/jfw/modules/app/src/app/config/active.go

@@ -0,0 +1,23 @@
+package config
+
+import (
+	"qfw/util"
+)
+
+var Active *active
+
+type active struct {
+	Pullnew *pullnew
+}
+
+//拉新活动
+type pullnew struct {
+	StartTime int64
+	EndTime   int64
+	Url       string
+	Password  string
+}
+
+func init() {
+	util.ReadConfig("./active.json", &Active)
+}

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

@@ -191,7 +191,6 @@ func (l *Login) Login() error {
 							"i_ratemode":   2,
 							"l_modifydate": time.Now().Unix(),
 						},
-						"o_log": reqPhoneInfo(l.Request),
 					}
 					_id := mongodb.Save("user", data)
 					if _id != "" {
@@ -354,7 +353,6 @@ func (l *Login) Register() error {
 					"i_ratemode":   2,
 					"l_modifydate": time.Now().Unix(),
 				},
-				"o_log": reqPhoneInfo(l.Request),
 			}
 			_id := mongodb.Save("user", data)
 			if _id != "" {
@@ -477,6 +475,7 @@ func (l *Login) WxLogin() {
 				} else {
 					wxpush = 1
 				}
+				now_unix := time.Now().Unix()
 				set := map[string]interface{}{
 					"s_name":          u.Nickname,
 					"s_nickname":      u.Nickname,
@@ -487,10 +486,13 @@ func (l *Login) WxLogin() {
 					"s_headimageurl":  u.HeadImageUrl,
 					"a_m_openid":      u.OpenId,
 					"o_jy.i_apppush":  1,
-					"l_a_registedate": time.Now().Unix(),
+					"l_a_registedate": now_unix,
 					"o_jy.i_wxpush":   wxpush,
 					"o_jy.i_mailpush": mailpush,
 				}
+				if (*user)["l_registedate"] == nil {
+					set["l_registedate"] = now_unix
+				}
 				if (*user)["a_mergeorder"] == nil {
 					set["a_mergeorder"] = []string{"s_m_openid", "a_m_openid"}
 				} else {
@@ -528,7 +530,6 @@ func (l *Login) WxLogin() {
 						"i_ratemode":   2,
 						"l_modifydate": time.Now().Unix(),
 					},
-					"o_log": reqPhoneInfo(l.Request),
 				}
 				if mongodb.Save("user", newUser) != "" {
 					returnSign = afterLogin(newUser, l.Session(), rid, oid, phoneType, channel, deviceId, 2, true)
@@ -843,7 +844,7 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 	s.Set("s_opushid", person["s_opushid"])
 	s.Set("s_appponetype", person["s_appponetype"])
 	s.Set("s_appversion", person["s_appversion"])
-	s.Set("s_headimageurl", person["s_headimageurl"])
+	s.Set("s_headimageurl", strings.Replace(qutil.ObjToString(person["s_headimageurl"]), "http://", "https://", 1))
 	if qutil.ObjToString(person["s_phone"]) != "" {
 		phone := person["s_phone"].(string)
 		s.Set("s_phone", phone)

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

@@ -1,6 +1,7 @@
 package front
 
 import (
+	app_config "app/config"
 	"fmt"
 	"jfw/config"
 	"log"
@@ -33,6 +34,11 @@ func init() {
 }
 
 func (m *Me) MeIndex() error {
+	if now_unix := time.Now().Unix(); now_unix >= app_config.Active.Pullnew.StartTime && now_unix <= app_config.Active.Pullnew.EndTime {
+		m.T["pullnew"] = true
+	} else {
+		m.T["pullnew"] = false
+	}
 	return m.Render("/me/index.html")
 }
 func (m *Me) MeSet() error {

+ 7 - 0
src/jfw/modules/app/src/app/front/search.go

@@ -1,10 +1,12 @@
 package front
 
 import (
+	app_config "app/config"
 	"app/jylabutil"
 	"qfw/util"
 	"qfw/util/redis"
 	"strings"
+	"time"
 
 	"github.com/go-xweb/xweb"
 	"gopkg.in/mgo.v2/bson"
@@ -34,6 +36,11 @@ func (s *Search) MainSearch() error {
 	s.T["pageSize"] = wx_pageSize
 	//搜索列表增加分享
 	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
+	}
 	return s.Render("/weixin/search/mainSearch.html", &s.T)
 }
 func (p *Search) Getstatus() error {

+ 30 - 22
src/jfw/modules/app/src/app/front/swordfish.go

@@ -505,56 +505,57 @@ func (m *Front) WxsearchlistPaging() {
 				feld = bidSearch_field
 			}
 			if isLimit == 1 {
+				s_word := ""
 				if limitFlag {
 					if pageNum == 1 {
 						if open_supersearch {
-							list, b_word, a_word, _ = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, public.Lst.TotalPage*wx_pageSize, selectType, feld)
+							list, b_word, a_word, s_word = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, public.Lst.TotalPage*wx_pageSize, selectType, feld)
 						} else {
-							list, b_word, a_word, _ = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, public.Lst.TotalPage*wx_pageSize, selectType, feld)
+							list, b_word, a_word, s_word = getWxsearchlistData_new(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, public.Lst.TotalPage*wx_pageSize, selectType, feld)
 						}
 					}
 				} else {
 					if open_supersearch {
-						list, b_word, a_word, _ = getWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, selectType, feld)
+						list, b_word, a_word, s_word = getWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, selectType, feld)
 					} else {
-						list, b_word, a_word, _ = getWxsearchlistData(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, selectType, feld)
+						list, b_word, a_word, s_word = getWxsearchlistData(searchvalue, scope, publishtime, subtype, "", "", "", pageNum, selectType, feld)
 					}
 				}
 				listSize := 0
 				if list != nil {
 					listSize = len(*list)
 				}
-				if len([]rune(searchvalue)) > 3 && listSize < wx_pageSize && pageNum == 1 {
-					secondKWS = public.HttpEs(searchvalue, "ik_smart", config.Sysconfig["elasticsearch"].(string))
+				if len([]rune(s_word)) > 3 && listSize < wx_pageSize && pageNum == 1 {
+					secondKWS = jy.HttpEs(searchvalue, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
-					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
+					qstr := getSearchQuery(s_word, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))
 					secondLimit := 2*wx_pageSize - listSize
 					secRel = elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, feld, 0, secondLimit, 0, false)
-					if secRel != nil {
+					if secRel != nil && len(*secRel) > 0 {
 						public.BidListConvert(industry, secRel)
 						for _, v := range *secRel {
 							v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
 						}
-					}
-					if list != nil {
-						for _, v := range *list {
-							for n, m := range *secRel {
-								if util.ObjToString(v["_id"]) == util.ObjToString(m["_id"]) {
-									*secRel = append((*secRel)[0:n], (*secRel)[n+1:]...)
-									break
+						if list != nil {
+							for _, v := range *list {
+								for n, m := range *secRel {
+									if util.ObjToString(v["_id"]) == util.ObjToString(m["_id"]) {
+										*secRel = append((*secRel)[0:n], (*secRel)[n+1:]...)
+										break
+									}
 								}
 							}
+							*list = append(*list, *secRel...)
+						} else {
+							list = secRel
 						}
-						*list = append(*list, *secRel...)
-					} else {
-						list = secRel
-					}
-					if len(*secRel) > 0 {
 						secondFlag = "T"
 						if len(*list) > wx_pageSize && selectType == "title" {
 							secondList = (*list)[wx_pageSize:]
 							*list = (*list)[:wx_pageSize]
 						}
+					} else {
+						secondKWS = ""
 					}
 				}
 				SaveUserSearchLog(m.Request, util.ObjToString(m.GetSession("userId")), -1, "app", "超级搜索", map[string]interface{}{
@@ -626,7 +627,7 @@ func getWxsearchlistData(keywords, scope, publishtime, subtype, industry, minpri
 	return getWxsearchlistData_new(keywords, scope, publishtime, subtype, industry, minprice, maxprice, pageNum, wx_pageSize, selectType, field)
 }
 func getWxsearchlistData_new(keywords, scope, publishtime, subtype, industry, minprice, maxprice string, pageNum, pageSize int, selectType, field string) (list *[]map[string]interface{}, b_word, a_word, s_word string) {
-	b_word, a_word, s_word = public.InterceptSearchKW(keywords, selectType == "all", len(industry) == 0)
+	b_word, a_word, s_word = jy.InterceptSearchKW(keywords, selectType == "all", len(industry) == 0)
 	if len(b_word) == 0 {
 		return list, b_word, a_word, s_word
 	}
@@ -811,9 +812,16 @@ func wxvisitD(sid, userId string) (objdata map[string]interface{}) {
 			if userId != "" {
 				pcode, _ := obj["projectcode"].(string)
 				pname, _ := obj["projectname"].(string)
-				titleTmp, _ := obj["title"].(string)
+				titleTmp := util.ObjToString(obj["title"])
 				obj["followFlag"], obj["followId"] = MFollow(userId, pname, pcode, titleTmp)
+				if len([]rune(titleTmp)) > 100 {
+					titleTmp = string([]rune(titleTmp)[:100]) + "..."
+				}
+				titleTmp = public.ClearHtml.ReplaceAllString(titleTmp, "")
+				obj["title"] = titleTmp
 				obj["hasSession"] = true
+
+				//obj["title"] = util.If(len([]rune(titleTmp)) > 100, string([]rune(titleTmp)[:100])+"...", string(titleTmp)).(string)
 			}
 			if strings.Trim(util.ObjToString(obj["detail"]), " ") == "" {
 				obj["detail"] = ""

+ 19 - 19
src/jfw/modules/app/src/config.json

@@ -1,13 +1,13 @@
 {
-    "mongodbServers": "192.168.3.11:27080",
+    "mongodbServers": "192.168.3.128:27080",
     "mongodbPoolSize": "5",
     "mongodbName": "qfw",
     "influxaddr": "http://192.168.3.207:8086",
     "influxdb": "jy_logs",
-    "elasticsearch": "http://192.168.3.11:9800",
+    "elasticsearch": "http://192.168.3.128:9800",
     "elasticPoolSize": 30,
     "cookiedomain": ".jianyu360.cn",
-    "redisaddrs": "other=192.168.3.128:1712,push=192.168.3.128:1712,pushcache_1=192.168.3.128:1712,pushcache_2_a=192.168.3.128:1712,pushcache_2_b=192.168.3.128:1712,sso=192.168.3.128:1712,session=192.168.3.128:1712",
+    "redisaddrs": "other=192.168.3.128:3379,push=192.168.3.128:3379,pushcache_1=192.168.3.128:3379,pushcache_2_a=192.168.3.128:3379,pushcache_2_b=192.168.3.128:3379,sso=192.168.3.128:3379,session=192.168.3.128:3379",
     "webport": "89",
     "weixinrpc": "127.0.0.1:8083",
     "cassandra": {
@@ -33,7 +33,7 @@
         "passWord": "Topnet123"
     },
     "agreement": "http",
-    "webdomain": "http://web-jydev-ws.jianyu360.cn",
+    "webdomain": "http://web-jydev-xzh.jianyu360.cn",
     "redirect": {
         "wxpushlist": "/jyapp/wxpush/bidinfo/%s",
         "newInfoFollow": "/jyapp/followent/newInfo/%s",
@@ -88,19 +88,19 @@
         "ios_mustupdate": false,
         "ios_openUpdate": false,
         "apkurl": "http://web-jydev-wky.jianyu360.cn/jyapp/res/%s/jianyu360.apk",
-        "channelDir": {
-            "baidu": "baiduSem",
-            "shenma": "shenmaSem",
-            "huawei": "huawei",
-            "xiaomi": "xiaomi",
-            "yingyongbao": "yingyongbao",
-            "douyin": "douyin",
-            "weixin": "jywx",
-            "topnet": "topnet",
-            "duanxin": "duanxin",
-            "default": "topnet"
-        },
-        "weixin": "jywx"
+        "channelDir":{
+			"baidu":"baiduSem",
+			"shenma":"shenmaSem",
+			"huawei":"huawei",
+			"xiaomi":"xiaomi",
+			"yingyongbao":"yingyongbao",
+			"douyin":"douyin",
+			"weixin":"jywx",
+			"topnet":"topnet",
+			"duanxin":"duanxin",
+			"active_pullnew": "active_pullnew",
+			"default":"topnet"
+		}
     },
     "limitSearchText": {
         "flag": false,
@@ -137,8 +137,8 @@
         "callbackPublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqFZfev75+sa7O0f29qwuWeqWRQ+p59c8hz2s4aeh5Ohc08P1ls5e8UmPhaN9ZTkGwabOKN658pOhmVoa16ldKFZQ5j1hLTDS6yfKcvVs/hf1mQvsbUjtZgCfMQx5NNf1R4MsTvAqbl2l6DXMu7gHjAhKNR0QQBELv7HmYuWPE35ELQqBH0eVcvWSNV3/3zOansftY5NIT749B+Bv1uirE8PNMp20sWWqx8fMNi2EZksnWNUmnVldBqUwMJIxcXolBH/RGX5ZjBlBenoIB3PVQ8/+SPz9Hip7+QNH8utSnUlrh2AsJVtdNKIQk74Eevkn+Q+WyUVGoY0ca9DzGwh4hQIDAQAB"
     },
     "wxJianyu": {
-        "appid": "wx0e6a5b18f4cfd10d",
-        "appsecret": "bf12200554cb6edeb2be69d49dc11a3e",
+        "appid": "wx41a95e706276804d",
+        "appsecret": "1b385c7dd14274c5e0898b9b208580b7",
         "pay": {
             "mchid": "1418321102",
             "key": "topnet2016topnet2016topnet2016ab",

+ 5 - 1
src/jfw/modules/app/src/main.go

@@ -1,6 +1,9 @@
 package main
 
 import (
+	"app/active"
+	_ "app/active/pullnew"
+	_ "app/config"
 	_ "app/filter"
 	_ "app/followent"
 	_ "app/front"
@@ -26,7 +29,8 @@ func init() {
 func main() {
 	//开启web
 	//限制全文检索查询
-	public.InitLimitSearchText(false)
+	go public.InitLimitSearchText(true)
+	active.Init()
 	//
 	mux1 := http.NewServeMux()
 	mux1.HandleFunc("/jyapp/res/", func(w http.ResponseWriter, r *http.Request) {

+ 3 - 5
src/jfw/modules/app/src/seo.json

@@ -12,7 +12,7 @@
             "title": "招标搜索结果_剑鱼标讯,全行业招标信息智能推送领导者!"
         }
     },
-	"version":"1427",
+	"version":"1429",
 	"industry":{
 		"JZGC":{"NAME":"建筑工程_勘察设计,建筑工程_工程施工,建筑工程_监理咨询,建筑工程_材料设备,建筑工程_机电安装",
 				"TITLE":"建筑工程_剑鱼标讯,全行业招标信息智能推送领导者!",
@@ -75,8 +75,6 @@
 				"DESCRIPTION":""
 			}
 	},
-	"jyadd":"http://127.0.0.1",
-	"limitcount":20,
-	"ZBADDRESS":"http://webwcj.qmx.top",
-	"appVersion":"当前版本:2.5.1"
+	"jyDomain":"https://www.jianyu360.com",
+	"ZBADDRESS":"https://res.jianyu360.com"
 }

二进制
src/jfw/modules/app/src/src


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/common/images/close.png


+ 102 - 0
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/base.css

@@ -0,0 +1,102 @@
+* {
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    -webkit-overflow-scrolling: touch;
+}
+body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, sumary {
+    margin: 0;
+    padding: 0;
+	-webkit-tap-highlight-color: transparent;
+}
+html,body {
+    /* max-width: 750px; */
+    -webkit-text-size-adjust: 100%;
+    margin: 0 auto;
+    height: 100%;
+    overflow-x: hidden;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box;
+    font-size: .24rem;
+    background:rgba(245,244,249,1);;
+    color: #3d3d3d;
+    font-family:  "Microsoft YaHei","Helvetica Neue", "Roboto", "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
+}
+
+ul,ol {
+    list-style: none;
+}
+/*清除输入框内阴影*/
+input,textarea,select,button{
+    outline: none;
+    border: 0;
+    -webkit-appearance: none;
+    appearance:none;
+}
+
+img {
+    border: 0;
+    vertical-align: middle;
+    max-width: 100%;
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+a {
+    text-decoration: none;
+    color: #3d3d3d;
+	-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+	-webkit-user-select: none;
+	-moz-user-focus: none;
+	-moz-user-select: none;
+}
+/*禁用长按页面时的弹出菜单(iOS下有效) ,img和a标签都要加*/
+img,a{
+    -webkit-touch-callout:none;
+}
+em,i{
+	font-style: normal;
+}
+/*兼容ios调取h5页面的头部*/
+.ios-head {
+    display: none;
+    position: fixed;
+    top: 0;
+    padding-top: 15px;
+    background: #18974b;
+    width: 100%;
+    z-index: 100;
+}
+/*base*/
+.clearfix{
+    zoom: 1;
+}
+.clearfix:after{
+    clear: both;
+    height: 0;
+    overflow: hidden;
+    display: block;
+    visibility: hidden;
+    content: "";
+}
+
+.left {
+    float: left;
+}
+
+.right {
+    float: right;
+}
+.ellipsis {
+    overflow:hidden;
+    text-overflow:ellipsis;
+    white-space:nowrap;
+}
+.show{
+	display: block;
+}
+.hide{
+	display: none;
+}
+.easyalert{
+	z-index: 9999;
+	padding: 12px 20px !important;	
+}

+ 68 - 0
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/datapacket.css

@@ -0,0 +1,68 @@
+body{
+  background: url(../images/bg2.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+.link {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+  -webkit-box-pack: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+}
+.link .link_box {
+  width: 6.2rem;
+  height: 7.4rem;
+  padding: 1.1rem .5rem 0;
+  background: white;
+  border: 1px solid #ffc388;
+  border-radius: .12rem;
+}
+.link .link_box .address {
+  width: 5.18rem;
+  font-size: .3rem;
+  word-break: break-all;
+  word-wrap: break-word;
+}
+.link .link_box .address a {
+  color: #0987FF;
+  word-wrap: break-word;
+}
+.link .link_box .code {
+  padding-top: .2rem;
+  color: #666;
+  font-size: .3rem;
+}
+.link .link_box .tip {
+  margin-top: 1.86rem;
+  font-size: .26rem;
+  color: #666;
+}
+.link .link_box .copy_link {
+  width: 5.2rem;
+  height: .9rem;
+  margin: .4rem auto 0;
+  background: -webkit-gradient(linear, left top, left bottom, from(#ffeacf), to(#ffd2a6));
+  background: linear-gradient(#ffeacf, #ffd2a6);
+  border-radius: .12rem;
+  color: #7F2D03;
+  font-size: .32rem;
+  text-align: center;
+  font-weight: bold;
+  font-family: "PingFang-SC-Medium";
+}
+.app-layout-header{
+	background-color: inherit;
+	border-bottom: none;
+	font-size: .37rem;
+	color: #fff;
+}
+.app-layout-header>.app-back{
+	color: #fff;
+}

+ 18 - 0
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/explain.css

@@ -0,0 +1,18 @@
+.explain {
+  background: #f4f4f9;
+}
+.explain .title {
+  font-size: .34rem;
+  text-align: center;
+  padding: .55rem 0 .46rem;
+  color: #000;
+}
+.explain .main {
+  padding: 0 .3rem .88rem;
+}
+.explain .main p {
+  line-height: 1.6;
+  font-size: .3rem;
+  text-align: justify;
+  color: #666666;
+}

+ 123 - 0
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/helpfriends.css

@@ -0,0 +1,123 @@
+.invite {
+  width: 100%;
+  height: 100%;
+  background: url(../images/bg2.png) no-repeat center center;
+  background-size: 100% 100%;
+  overflow: hidden;
+}
+.invite_toast {
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  position: fixed;
+  width: 5.6rem;
+  height: 7.2rem;
+  left: 50%;
+  top: 50%;
+  z-index: 5000;
+  padding: 0 .5rem;
+  -webkit-transform: translate(-50%, -50%);
+          transform: translate(-50%, -50%);
+  border-radius: .12rem;
+  text-align: center;
+}
+.invite_toast .close {
+  position: absolute;
+  right: 0;
+  top: 0;
+  width: .6rem;
+  height: 1.35rem;
+  -webkit-transform: translateY(-100%);
+          transform: translateY(-100%);
+  background: transparent url(../images/close.png) no-repeat;
+  background-size: contain;
+}
+.invite_toast .go_btn {
+  position: absolute;
+  width: 4.6rem;
+  height: .9rem;
+  left: 50%;
+  bottom: .53rem;
+  color: #7f2d03;
+  font-size: .34rem;
+  font-weight: 700;
+  line-height: .9rem;
+  -webkit-transform: translateX(-50%);
+          transform: translateX(-50%);
+  border-radius: .08rem;
+  background: -webkit-gradient(linear, left top, left bottom, from(#ffeacf), to(#ffd2a6));
+  background: linear-gradient(to bottom, #ffeacf, #ffd2a6);
+  opacity: .5;
+}
+
+.goto_invite_box {
+  background: transparent url(../images/toast.png) no-repeat;
+  background-size: contain;
+}
+
+.invite_code_box {
+  padding-top: .9rem;
+  background-color: #fff;
+}
+.invite_code_box .top_title p:nth-of-type(1) {
+  color: #e26214;
+  font-size: .36rem;
+}
+.invite_code_box .top_title p:nth-of-type(1)::before, .invite_code_box .top_title p:nth-of-type(1)::after {
+  display: inline-block;
+  content: '';
+  width: 0.75rem;
+  height: 0.3rem;
+}
+.invite_code_box .top_title p:nth-of-type(1)::before {
+  margin-right: 0.08rem;
+  background: transparent url(../images/circle_left.png);
+  background-size: contain;
+}
+.invite_code_box .top_title p:nth-of-type(1)::after {
+  margin-left: 0.08rem;
+  background: transparent url(../images/circle_left.png);
+  background-size: contain;
+  -webkit-transform: rotate(180deg);
+          transform: rotate(180deg);
+}
+.invite_code_box .top_title p:nth-of-type(2) {
+  margin-top: .1rem;
+  color: #666;
+  font-size: .3rem;
+  font-weight: 500;
+}
+.invite_code_box .val_box {
+  margin-top: 1.1rem;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -ms-flex-pack: distribute;
+      justify-content: space-around;
+}
+.invite_code_box .val_box input[type=text] {
+  width: .86rem;
+  height: .86rem;
+  background-color: #f4f4f9;
+  text-align: center;
+  font-size: .36rem;
+  color: #e26214;
+  caret-color: #e26214;
+}
+.val_box_p{
+	position: relative;
+}
+.imitate{
+	border: none;
+	position: absolute;
+	left: 0px;
+	top: 0px;
+	height: 100%;
+	width: 100%;
+	font-size: .28rem;
+	background-color: transparent;
+	padding-left: .4rem;
+	color: #e26214;
+	z-index: 1;
+	-webkit-text-fill-color: #e26214;
+	caret-color: #e26214;
+}

+ 344 - 0
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/index.css

@@ -0,0 +1,344 @@
+.activity_detail {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+      -ms-flex-direction: column;
+          flex-direction: column;
+  -ms-flex-wrap: nowrap;
+      flex-wrap: nowrap;
+  width: 100%;
+  height: 100%;
+  padding-top: constant(safe-area-inset-top);
+  padding-top: env(safe-area-inset-top);
+  padding-bottom: constant(safe-area-inset-bottom);
+  padding-bottom: env(safe-area-inset-bottom);
+  -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+  background: url(../images/bg.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+.activity_detail .header {
+  position: relative;
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+  text-align: center;
+  padding: 0 .24rem;
+  height: .88rem;
+  line-height: .88rem;
+  color: #fff;
+}
+.activity_detail .header .header_left {
+  position: absolute;
+  left: .24rem;
+  top: 50%;
+  margin-top: -.18rem;
+  width: .2rem;
+  height: .36rem;
+}
+.activity_detail .header .header_title {
+  -webkit-box-flex: 1;
+      -ms-flex: 1;
+          flex: 1;
+  text-align: center;
+  font-size: .36rem;
+}
+.activity_detail .header .header_right {
+  position: absolute;
+  right: .24rem;
+  font-size: .32rem;
+}
+.activity_detail .content {
+  width: 100%;
+  padding: 0 .3rem;
+  overflow-y: scroll;
+}
+.activity_detail .people {
+  width: 6.58rem;
+  height: 9.53rem;
+  margin: .22rem auto 0;
+  background: url(../images/text1.png) no-repeat center center;
+  background-size: cover;
+}
+.activity_detail .dashed_line {
+  width: 6.58rem;
+  height: 1px;
+  margin: .55rem auto .46rem;
+  border-top: 1px dashed #ffe8cc;
+  opacity: 0.42;
+}
+.activity_detail .handle_area {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+      -ms-flex-direction: column;
+          flex-direction: column;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+}
+.activity_detail .handle_area .invite_title {
+  color: #fff;
+  font-size: .28rem;
+}
+.activity_detail .handle_area .invite_btn {
+  width: 5.4rem;
+  height: .9rem;
+  margin-top: .24rem;
+  line-height: .9rem;
+  background: -webkit-gradient(linear, left top, left bottom, from(#ffeacf), to(#ffd2a6));
+  background: linear-gradient(#ffeacf, #ffd2a6);
+  border-radius: .12rem;
+  text-align: center;
+  font-size: .36rem;
+  font-weight: bold;
+  color: #7F2D03;
+}
+.activity_detail .handle_area .invite_code {
+  width: 5.4rem;
+  height: .9rem;
+  margin-top: .28rem;
+  line-height: .9rem;
+  text-align: center;
+  font-size: .28rem;
+  color: #fff;
+  border-radius: .2rem;
+  border: 0.02rem solid #ffe8cc;
+}
+.activity_detail .handle_area .invite_code .copy {
+  margin-left: .99rem;
+  color: #FFDF76;
+}
+.activity_detail .hasinvite_friends {
+  margin-top: .98rem;
+  padding-bottom: .6rem;
+  width: 100%;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff1e8), to(#fed9c9));
+  background: linear-gradient(#fff1e8, #fed9c9);
+  border-radius: .12rem;
+}
+.activity_detail .hasinvite_friends .hasinvite_title {
+  width: 3.31rem;
+  height: .64rem;
+  margin: 0 auto;
+  line-height: .64rem;
+  text-align: center;
+  color: #4C2200;
+  font-size: .32rem;
+  font-weight: bold;
+  background: url(../images/square.png) no-repeat center center;
+  background-size: cover;
+}
+.activity_detail .hasinvite_friends .friend_name {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+  -webkit-box-pack: justify;
+      -ms-flex-pack: justify;
+          justify-content: center;
+  padding-top: .92rem;
+}
+.activity_detail .hasinvite_friends .friend_name .friend_name_item {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+      -ms-flex-direction: column;
+          flex-direction: column;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+}
+.activity_detail .hasinvite_friends .friend_name .friend_name_item img {
+  width: 1.2rem;
+  height: 1.2rem;
+  border-radius: 100%;
+}
+.activity_detail .hasinvite_friends .friend_name .friend_name_item span {
+  margin-top: .2rem;
+  color: #888;
+  display: inline-block;
+  width: 2.1rem;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  text-align: center;
+}
+.activity_detail .hasinvite_friends .get_btn {
+  display: block;
+  width: 5.2rem;
+  height: .9rem;
+  line-height: .9rem;
+  text-align: center;
+  margin: .78rem auto 0;
+  color: #fff;
+  font-weight: bold;
+  font-size: .36rem;
+  border-radius: .45rem;
+  cursor: pointer;
+  border: 0;
+  outline: 0;
+  background: #F27904;
+}
+.activity_detail .hasinvite_friends .get_btn[disabled] {
+  opacity: 0.42;
+}
+.activity_detail .activity_play {
+  margin-top: .4rem;
+  width: 100%;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff1e8), to(#fed9c9));
+  background: linear-gradient(#fff1e8, #fed9c9);
+  border-radius: .12rem;
+}
+.activity_detail .activity_play .play_title {
+  width: 3.31rem;
+  height: .64rem;
+  margin: 0 auto;
+  line-height: .64rem;
+  text-align: center;
+  color: #4C2200;
+  font-size: .32rem;
+  font-weight: bold;
+  background: url(../images/square.png) no-repeat center center;
+  background-size: cover;
+}
+.activity_detail .activity_play .play_info {
+  padding: .52rem .46rem .63rem;
+}
+.activity_detail .activity_play .play_info p {
+  font-size: .28rem;
+  color: #67401E;
+  line-height: 1.6;
+}
+.activity_detail .activity_rule {
+  margin-top: .4rem;
+  width: 100%;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff1e8), to(#fed9c9));
+  background: linear-gradient(#fff1e8, #fed9c9);
+  border-radius: .12rem;
+}
+.activity_detail .activity_rule .rule_title {
+  width: 3.31rem;
+  height: .64rem;
+  margin: 0 auto;
+  line-height: .64rem;
+  text-align: center;
+  color: #4C2200;
+  font-size: .32rem;
+  font-weight: bold;
+  background: url(../images/square.png) no-repeat center center;
+  background-size: cover;
+}
+.activity_detail .activity_rule .rule_info {
+  padding: .52rem .46rem .63rem;
+}
+.activity_detail .activity_rule .rule_info p {
+  font-size: .28rem;
+  color: #67401E;
+  line-height: 1.6;
+}
+.activity_detail .activity_explain {
+  display: inline-block;
+  width: 100%;
+  padding: .42rem 0 .56rem;
+  color: #fff;
+  text-align: center;
+  font-size: .28rem;
+}
+
+.invite_way {
+  position: fixed;
+  display: none;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  height: 2.54rem;
+  background: #fff;
+  z-index: 99;
+}
+.invite_way .way_title {
+  margin-top: .3rem;
+  margin-bottom: .45rem;
+  font-size: .28rem;
+  color: #666;
+  text-align: center;
+}
+.invite_way .way_list {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+  -ms-flex-pack: distribute;
+      justify-content: space-around;
+  padding: 0 1rem;
+}
+.invite_way .way_list .way_list_item {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+      -ms-flex-align: center;
+          align-items: center;
+  -webkit-box-orient: vertical;
+  -webkit-box-direction: normal;
+      -ms-flex-direction: column;
+          flex-direction: column;
+  text-align: center;
+}
+.invite_way .way_list .way_list_item .jyapp-icon {
+  font-size: .89rem;
+}
+.invite_way .way_list .way_list_item .jyapp-icon-weixin {
+    color: #0ab70e;
+}
+.invite_way .way_list .way_list_item .jyapp-icon-qq {
+    color: #4cafe9;
+}
+.invite_way .way_list .way_list_item .jyapp-icon-pengyouquan {
+    color: #a5e537;
+}
+.invite_way .way_list .way_list_item span {
+  font-size: .26rem;
+  color: #888;
+}
+
+@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
+  .activity_detail {
+    padding-top: .44rem;
+  }
+}
+.app-layout-header{
+	background-color: inherit;
+	border-bottom: none;
+	font-size: .37rem;
+	color: #fff;
+}
+.app-layout-header>.app-back{
+	color: #fff;
+}
+.app-layout-header>.helpfriends{
+	position: absolute;
+    font-size: .33rem;
+	padding-right: 11px;
+    right: 0px;
+    bottom: 0px;
+	color: #fff;
+	font-weight: 400;
+}
+.app-layout-content-a, .app-layout-content-b {
+	padding-top: 0px;
+	margin-top: 20px;
+}

+ 115 - 0
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/css/invite.css

@@ -0,0 +1,115 @@
+html,body{
+  width: 100%;
+  height: 100%;
+  background: url(../images/bg2.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+.invite .logo {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-pack: center;
+      -ms-flex-pack: center;
+          justify-content: center;
+}
+.invite .logo img {
+  margin-top: .5rem;
+  width: 2.16rem;
+  height: .56rem;
+}
+.invite .people {
+  width: 6.91rem;
+  height: 6.17rem;
+  margin: .32rem auto 0;
+  background: url(../images/invite.png) no-repeat center center;
+  background-size: 100% 100%;
+}
+.invite .code {
+  margin-top: .72rem;
+  text-align: center;
+  font-size: .32rem;
+  color: #fff;
+}
+.invite .code>div{
+  margin-top: 5px;
+}
+.invite .code_number{
+	font-size: .37rem;
+}
+.invite .copy {
+  width: 1.08rem;
+  margin: .3rem auto 0;
+  line-height: .5rem;
+  text-align: center;
+  border: 1px solid #fff3e2;
+  border-radius: 0.08rem;
+  color: #FFDF76;
+  font-size: .29rem;
+  display: block;
+  background: none;
+}
+.invite .download {
+  width: 5.4rem;
+  height: .9rem;
+  line-height: .9rem;
+  margin: .64rem auto;
+  background: -webkit-gradient(linear, left top, left bottom, from(#ffeacf), to(#ffd2a6));
+  background: linear-gradient(#ffeacf, #ffd2a6);
+  border-radius: .12rem;
+  text-align: center;
+  font-size: .36rem;
+  color: #7F2D03;
+  font-weight: bold;
+  display: block;
+}
+.rightcorner{
+	width: 259px;
+	position: absolute;
+	top: 10px;
+	right: 25px;
+	z-index: 1;
+}
+#rightcorner-bg{
+	position: absolute;
+	top: 0px;
+	left: 0px;
+	right: 0px;
+	bottom: 0px;
+	background-color: #000000;
+	z-index: 1;
+	opacity: .75;
+	display: none;
+}
+.rightcorner-close{
+	width: 37.5px;
+	position: absolute;
+	top: 160px;
+  		right: 135px;
+	bottom: 0px;
+}
+.easyalert{
+	position: fixed;
+	background-color: rgba(0,0,0,0.7);
+	top: 50%;
+	color: #fff;
+	z-index: 999;
+	border-radius: 6px;
+	padding: 17px 20px;
+    font-size: 15px;
+	line-height: 22px;
+	max-width: 260px;
+	text-align: center;
+	display: none;
+}
+.easyalert-icon{
+	font-size: 13px;
+	border-radius: 5px;
+	width: 120px;
+	height: 120px;
+	padding: 0px;
+	left: 50%;
+	right: 50%;
+	margin-top: -60px;
+	margin-left: -60px;
+	margin-right: -60px;
+}

二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/add.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/bg.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/bg2.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/circle_left.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/circle_right.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/invite.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/logo.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/people.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/pullnew.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/square.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/text1.png


二进制
src/jfw/modules/app/src/web/staticres/jyapp/active/pullnew/images/toast.png


+ 3 - 5
src/jfw/modules/app/src/web/staticres/jyapp/css/wxsearch.css

@@ -156,13 +156,11 @@ form{
   background: url(../images/search/dataExport.png) 0.3rem 0.32rem no-repeat, url(../images/search/search-lists-rightBg.png) right bottom no-repeat;
   background-size: 0.57rem 0.57rem,1.39rem 1.39rem;
 }
-/*#searchIndex .content li:nth-of-type(1) a {
-  background-size: 0.57rem 0.57rem,1.39rem 1.39rem;
-}
 
-#searchIndex .content li:nth-of-type(2) a {
+#searchIndex .content li:nth-of-type(4) a {
+  background: url(../active/pullnew/images/pullnew.png) 0.3rem 0.32rem no-repeat, url(../images/search/search-lists-rightBg.png) right bottom no-repeat;
   background-size: 0.57rem 0.57rem,1.39rem 1.39rem;
-}*/
+}
 /*超级搜索*/
 /**************/
 .operation{

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

@@ -115,7 +115,7 @@
   font-size: .32rem;
 }
 #choose_area .main .slide {
-  background: #eee;
+  background:transparent;
   position: fixed;
   right: 0;
   top: 50%;

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

@@ -168,7 +168,7 @@ html .page .elseChoose .elseChooseList ul li a i {
   float: right;
   color: #707070;
 }
-html .page button {
+.confirm .saveData {
   width: 100%;
   height: 0.94rem;
   background: #2cb7ca;

+ 6 - 6
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/css/keyWord.css

@@ -1,8 +1,9 @@
 .keyWord .title {
+  height: 1.12rem;
   font-size: .26rem;
   color: #888;
-  padding: .3rem;
-  line-height: .38rem;
+  padding: .2rem;
+  line-height: .85rem;
 }
 .keyWord .enter .enterOne {
   min-height: 0.94rem;
@@ -141,8 +142,6 @@
 }
 .keyWord .addKeyWord {
   width: 100%;
-  position: fixed;
-  bottom: 0.4rem;
   text-align: center;
 }
 .keyWord .addKeyWord i {
@@ -216,8 +215,9 @@
 
 .text-overflow100 .weui-toast {
   margin-left: 0;
-  width: 2.6rem;
-  min-height: .4rem;
+  width: 4.4rem;
+  min-height: .42rem;
+  font-size: 20px;
   -webkit-transform: translateX(-50%);
           transform: translateX(-50%);
 }

+ 18 - 6
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/additionWord.js

@@ -10,11 +10,13 @@ $(function(){
     function hasWords () {
         var showKeyWordLength = $(".showKeyWord ul").find('li').length;
         if(showKeyWordLength === 0){
-            $(".addkeyWord").show();
+            $(".enter.addkeyWord").show();
+            $(".addKeyWord").hide();
             $(".showKeyWord").hide();
         } else {
-            $(".addkeyWord").hide();
+            $(".enter.addkeyWord").hide();
             $(".showKeyWord").show();
+            $(".addKeyWord").show();
         }
     }
     hasWords();
@@ -29,10 +31,10 @@ $(function(){
     // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
     $('.addkeyWord input.enterOne').on('input', function() {
         if ($(this).val().length >= 100) {
-            var s = $(this).val().slice(0,100);
+            var s = $(this).val().slice(0,99);
             $(this).val(s);
 
-            weui.toast('附加词不能超过100字', {
+            weui.toast('采购单位不能超过100字', {
                 duration: 2000,
                 className: 'text-overflow100',
                 callback: function(){ console.log('close') }
@@ -73,8 +75,9 @@ $(function(){
         $('.showKeyWord > ul').prepend(html)
         
         // 隐藏
-        $(".addkeyWord").hide();
-        $('.showKeyWord').show();
+        $(".enter.addkeyWord").hide();
+        $(".showKeyWord").show();
+        $(".addKeyWord").show();
         $('.enter.addkeyWord > input').val('')
         var buttonDOM = $('.enter.addkeyWord .btn button')[0]
         buttonDOM.style.opacity = .5
@@ -115,6 +118,15 @@ $(function(){
                 }
             });
             return
+        }else if($(this).parent().find("span").text().length >= 100){
+            var s = $(this).parent().find("span").text().slice(0,99);
+            $(this).parent().find("span").text(s);
+            weui.toast('采购单位不能超过100字', {
+                duration: 2000,
+                className: 'text-overflow100',
+                callback: function(){}
+            });
+            return
         }else{
             for(var i in buyerArr){
                 if(buyerArr[i] === buyer){

+ 17 - 5
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/keyWord.js

@@ -13,11 +13,13 @@ $(function(){
     function hasWords () {
         var showKeyWordLength = $(".showKeyWord ul").find('li').length;
         if(showKeyWordLength === 0){
-            $(".addkeyWord").show();
+            $(".enter.addkeyWord").show();
+            $(".addKeyWord").hide();
             $(".showKeyWord").hide();
         } else {
-            $(".addkeyWord").hide();
+            $(".enter.addkeyWord").hide();
             $(".showKeyWord").show();
+            $(".addKeyWord").show();
         }
     }
     hasWords();
@@ -31,7 +33,7 @@ $(function(){
     // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
     $('.addkeyWord input.enterOne').on('input', function() {
         if ($(this).val().length >= 100) {
-            var s = $(this).val().slice(0,100)
+            var s = $(this).val().slice(0,99);
             $(this).val(s)
 
             weui.toast('关键词不能超过100字', {
@@ -96,8 +98,9 @@ $(function(){
         $('.showKeyWord > ul').prepend(html);
 
         // 隐藏
-        $(".addkeyWord").hide();
-        $('.showKeyWord').show();
+        $(".enter.addkeyWord").hide();
+        $(".showKeyWord").show();
+        $(".addKeyWord").show();
         $('.enter.addkeyWord > input').val('')
         var buttonDOM = $('.enter.addkeyWord .btn button')[0]
         buttonDOM.style.opacity = .5
@@ -181,6 +184,15 @@ $(function(){
                 }
             });
             return
+        }else if($(this).parent().find("span").text().length >= 100){
+            var s = $(this).parent().find("span").text().slice(0,99);
+            $(this).parent().find("span").text(s);
+            weui.toast('关键词不能超过100字', {
+                duration: 2000,
+                className: 'text-overflow100',
+                callback: function(){}
+            });
+            return
         }else{
             for(var i in keyWordArr){
                 if(keyWordArr[i].keyWord === keyWords){

+ 11 - 5
src/jfw/modules/app/src/web/staticres/jyapp/dataExport/js/mapJSON.js

@@ -1125,7 +1125,7 @@ var chinaMapJSON = [{
     "area": ["江岸区", "江汉区", "硚口区", "汉阳区", "武昌区", "青山区", "洪山区", "东西湖区", "汉南区", "蔡甸区", "江夏区", "黄陂区", "新洲区"]
   }, {
     "CityID": 160,
-    "name": "襄市",
+    "name": "襄市",
     "ProID": 17,
     "CitySort": 160,
     "area": ["襄城区", "樊城区", "襄阳区", "南漳县", "谷城县", "保康县", "老河口市", "枣阳市", "宜城市"]
@@ -1555,6 +1555,12 @@ var chinaMapJSON = [{
     "ProID": 20,
     "CitySort": 272,
     "area": ['其他']
+  }, {
+    "CityID": 273,
+    "name": "三沙市",
+    "ProID": 20,
+    "CitySort": 273,
+    "area": ['其他']
   }]
 }, {
   "ProID": 21,
@@ -1875,7 +1881,7 @@ var chinaMapJSON = [{
     "area": ['其他']
   }, {
     "CityID": 344,
-    "name": "吐鲁番地区",
+    "name": "吐鲁番",
     "ProID": 24,
     "CitySort": 344,
     "area": ["吐鲁番市", "鄯善县", "托克逊县"]
@@ -1935,7 +1941,7 @@ var chinaMapJSON = [{
     "area": ["城东区", "城中区", "城西区", "城北区", "大通回族土族自治县", "湟中县", "湟源县"]
   }, {
     "CityID": 291,
-    "name": "海东地区",
+    "name": "海东",
     "ProID": 25,
     "CitySort": 291,
     "area": ["平安县", "民和回族土族自治县", "乐都县", "互助土族自治县", "化隆回族自治县", "循化撒拉族自治县"]
@@ -2187,13 +2193,13 @@ var chinaMapJSON = [{
     "area": ["凯里市", "黄平县", "施秉县", "三穗县", "镇远县", "岑巩县", "天柱县", "锦屏县", "剑河县", "台江县", "黎平县", "榕江县", "从江县", "雷山县", "麻江县", "丹寨县"]
   }, {
     "CityID": 251,
-    "name": "铜仁地区",
+    "name": "铜仁",
     "ProID": 29,
     "CitySort": 251,
     "area": ["铜仁市", "江口县", "玉屏侗族自治县", "石阡县", "思南县", "印江土家族苗族自治县", "德江县", "沿河土家族自治县", "松桃苗族自治县", "万山特区"]
   }, {
     "CityID": 252,
-    "name": "毕节地区",
+    "name": "毕节",
     "ProID": 29,
     "CitySort": 252,
     "area": ["毕节市", "大方县", "黔西县", "金沙县", "织金县", "纳雍县", "威宁彝族回族苗族自治县", "赫章县"]

文件差异内容过多而无法显示
+ 6 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/clipboard.min.js


+ 16 - 28
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -1,4 +1,14 @@
 $(function(){
+	if(isIphoneX()){
+		$(".app-layout-header").css("padding-top"," 40px");//标题
+		$(".app-back.jyapp-icon.jyapp-icon-zuojiantou").css("padding-top"," 40px");//返回
+		$(".header-share").css("padding-top"," 40px");//分享
+		$(".app-layout-content-a, .app-layout-content-b").css("top","64px");//正文
+		$(".feedback-nav").css("top","85px");//意见反馈
+		$(".setpage .noticehead").css("top","85px");//关注项目
+		$(".app-back.jyapp-icon.jyapp-icon-zuojiantou").addClass("jyapp-icon-zuojiantou-x");//登录
+		$("#header.reg").css("padding-top","50px");//注册
+	}
 	//自定义tap
     $(document).on("touchstart", function(e) {
         var $target = $(e.target);
@@ -18,7 +28,7 @@ $(function(){
         if($target.data("isMoved") == 1){
 			return;
 		}
-		$target.trigger("tap");
+		$target.trigger("tap",e);
     });
 	$(".app-layout-header .app-back").unbind("tap").on("tap",function(){
 		if(typeof(clickBack)=="function"){
@@ -158,19 +168,6 @@ function timeDiff(date){
 	}
 	return td;
 }
-function redirect(zbadd,link,sid,sds){
-	if(link != null && typeof(link) != "undefined"){
-		link = link.replace(/\n/g,"");
-		if(!/^http/.test(link)){
-			link="http://"+link
-		}
-	}
-	if(sds){
-		window.location.href=zbadd+"/jyapp/article/content/"+sid+".html?keywords="+encodeURIComponent(sds);
-	}else{
-		window.location.href=zbadd+"/jyapp/article/content/"+sid+".html?";
-	}
-}
 function newredirect(zbadd,link,sid,sds){
 	if(link != null && typeof(link) != "undefined"){
 		link = link.replace(/\n/g,"");
@@ -329,7 +326,7 @@ function loginSuccess(result){
 	//
 	var callBackUrl = getUrlParam("url",decodeURIComponent);
 	if(callBackUrl != null){
-		afterLoginSuccess("",false);
+		afterLoginSuccess("",true);
 		//window.location.href = callBackUrl;
 		location.replace(callBackUrl);
 		return
@@ -637,17 +634,8 @@ function savePushIdMsg(){
 	}
 }
 function isIphoneX(){
-     return /iphone/gi.test(navigator.userAgent) && (screen.height >= 812)
+    return /iphone/gi.test(navigator.userAgent) && (screen.height >= 812)
 }
-$(function(){
-	if(isIphoneX()){
-		$(".app-layout-header").css("padding-top"," 40px");//标题
-		$(".app-back.jyapp-icon.jyapp-icon-zuojiantou").css("padding-top"," 40px");//返回
-		$(".header-share").css("padding-top"," 40px");//分享
-		$(".app-layout-content-a, .app-layout-content-b").css("top","64px");//正文
-		$(".feedback-nav").css("top","85px");//意见反馈
-		$(".setpage .noticehead").css("top","85px");//关注项目
-		$(".app-back.jyapp-icon.jyapp-icon-zuojiantou").addClass("jyapp-icon-zuojiantou-x");//登录
-		$("#header.reg").css("padding-top","50px");//注册
-	}
-})
+function myDomain(){
+	return window.location.protocol+"//"+window.location.host;
+}

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/js/jypraise.js

@@ -241,7 +241,7 @@ function myCommonShare(shareType,flag){
 	}
 	title += "向您推荐了剑鱼标讯";
 	var content = "全国招标信息免费看,不遮挡";
-	var url = ZBADDRESS+"/swordfish/about?source=app_labshare";
+	var url = jyDomain+"/swordfish/about?source=app_labshare";
 	if(shareType == 3){
 		content = getShareText();
 		title = getShareText();

+ 352 - 66
src/jfw/modules/app/src/web/staticres/jyapp/js/popup/tap.js

@@ -1,74 +1,360 @@
-
-//$(function () {
-	window.onload =function(){
-		/*setTimeout(function(){
-			var version = JyObj.getVersion();
-			if (localStorage.getItem("popup_bx_"+version) != "A"){
-				var tapHtml = '<div class="modal fade" id="myModal-tap" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="true">'
-				+'<div class="modal-dialog">'
-				+'<div class="pop-new" style="width: 5.6rem;height: 7.2rem;background: url(../images/search/popup.png);background-size: cover;border-radius: 8px;position: relative;top: 3.5rem;left: 50%;margin-left: -2.8rem;">'
-				+'<div style="position: absolute;top: -1rem;left: 5.25rem;height: 1rem; border-left: 1px solid #fff;font-family: 微软雅黑;"></div>'
-				+'<div style="position: absolute;color: #0687DB;font-size: 14px;bottom: .6rem;left: 50%;margin-left: -2.3rem;font-family: 微软雅黑;width: 4.6rem;border: 1px solid #fff;border-radius: 6px;text-align: center;background-color: #fff;cursor: pointer;height: .8rem;line-height: .8rem;" onclick="details()">查看详情</div>'
-				+'<div style="width: .5rem;height: .5rem;position: absolute;left: 5rem;top: -1.5rem;cursor: pointer;border: 1px solid #fff;border-radius: 15px;padding: 2px;" ><img class="popClose" style="width: 100%;" src="../images/search/dy_close.png" onclick="popClose(\''+version+'\')"></div>'
-				+'</div>'
-				+'</div>'
-				+'</div>'
-				$("body").append(tapHtml)
-				$("#myModal-tap").modal("show");
-				addStorge(version);
-			}else{
-				try{
-					$("#myModal-tap").modal("hide");
-				}catch(e){}
+var Active_Tip = function(){
+	this.currentActive = null;
+	this.tapFlag = false;
+	this.nowTime = new Date().getTime();
+	this.active = null;
+	this.isLogin = false;
+	var _this = this;
+	$.post("/jyapp/free/active/info?t="+new Date().getTime(),{reqType:"pullnew"},function(r){
+		//拉新活动
+		_this.isLogin = r.isLogin;
+		if(r.pullnew.isActiveTime){
+			$(".content ul li a:eq(3)").unbind("tap").on("tap",function(){
+				if(r.isLogin){
+					window.location.href = "/jyapp/active/pullnew/index?source=index";
+				}else{
+					window.location.href = "/jyapp/free/login?url="+encodeURIComponent("/jyapp/active/pullnew/index?source=index");
+				}
+		    });
+			//弹出输入助力好友的邀请码
+			if(_this.active == null && r.pullnew.isCodeTip){
+				_this.active = new Active_PullNew_Code(_this.nowTime);	
+			}
+			//拉新活动邀请用户弹出框
+			if(_this.active == null){
+				var time = localStorage.getItem("active_pullnew_invite_tiptime")
+				if(!time||_this.nowTime>parseInt(time)+1000*60*60*24*3){
+					_this.active = new Active_PullNew_Invite(_this.nowTime);
+				}
 			}
-		},500)*/
-		var lastAlertDate=localStorage.getItem("lastAlertDate")
-		if (!lastAlertDate||new Date().getTime()>parseInt(lastAlertDate)+1000*60*60*24*30){
-			var tapHtml = '<div class="modal fade" id="myModal-tap" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="true">'
-			+'<div class="modal-dialog" style="height:100%;margin:0px">'
-			+'<div class="pop-new" style="width: 5.6rem;height: 7.2rem;background: url(../images/search/dataexportAd.png);background-size: cover;border-radius: 8px;position: relative;top: 3.5rem;left: 50%;margin-left: -2.8rem;">'
-			+'<div style="position: absolute;top: -1rem;left: 5.25rem;height: 1rem; border-left: 1px solid #fff;font-family: 微软雅黑;"></div>'
-			+'<div style="position: absolute;color: #0687DB;font-size: 14px;bottom: .6rem;left: 50%;margin-left: -2.3rem;font-family: 微软雅黑;width: 4.6rem;border: 1px solid #fff;border-radius: 6px;text-align: center;cursor: pointer;height: .8rem;line-height: .8rem;" onclick="details()"></div>'
-			+'<div style="width: .5rem;height: .5rem;position: absolute;left: 5rem;top: -1.5rem;cursor: pointer;border: 1px solid #fff;border-radius: 15px;padding: 2px;" ><img class="popClose" style="left: 0.12rem;width: 54%;position: absolute;top: 0.1rem;" src="../images/search/dy_close.png" onclick="popClose()"></div>'
-			+'</div>'
-			+'</div>'
-			+'</div>'
-			$("body").append(tapHtml)
+		}
+		//默认弹出框
+		if(_this.active == null){
+			var time = localStorage.getItem("lastAlertDate")
+			if(!time||_this.nowTime>parseInt(time)+1000*60*60*24*30){
+				_this.active = new Active_Default(_this.nowTime);
+			}
+		}
+		if(_this.active != null){
+			$("body").append('<div class="modal fade" id="myModal-tap" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="true" style="z-index: 100001;">'	
+							+'<div class="modal-dialog" style="height:100%;margin:0px;">'
+								+'<div style="width: 5.6rem;height: 7.2rem;position: relative;top: 3.5rem;left: 50%;margin-left: -2.8rem;">'
+									+'<img src="/jyapp/active/common/images/close.png" style="position: absolute;width: 27px;top:-66.5px;right: .3rem;" onclick="ActiveTip.close()">'
+									+_this.active.getHtml()
+								+'</div>'
+							+'</div>'
+						+'</div>');
 			$("#myModal-tap").modal("show");
+			$(".modal-backdrop").css("z-index","100000");
+			_this.active.init();
 		}else{
-			try{
-				$("#myModal-tap").modal("hide");
-			}catch(e){}
+			_this.close();
 		}
+	});
+}
+Active_Tip.prototype.close = function(){
+	try{
+		$("#myModal-tap").modal("hide");
+	}catch(e){}
+}
+var Active_PullNew_Invite = function(nowTime){
+	this.getHtml = function(){
+		var html = '<div class="pop-new" style="background: url(/jyapp/active/pullnew/images/toast.png);background-size: cover;height: inherit;width: inherit;border-radius: 8px;">'
+					+'<div style="background:linear-gradient(rgba(255,234,207,1),rgba(255,210,166,1));position: absolute;color:rgba(127,45,3,1);font-size: .35rem;font-weight:bold;bottom: .6rem;left: 50%;margin-left: -2.3rem;width: 4.6rem;border-radius: 4px;text-align: center;line-height: .85rem;" id="goToInvite">去邀请</div>'
+				+'</div>';
+		return html;
+	}
+	this.init = function(){
+		$("#goToInvite").on("tap",function(){
+			if(ActiveTip.isLogin){
+				ActiveTip.close();
+				window.location.href = "/jyapp/active/pullnew/index?source=tip";
+			}else{
+				window.location.href = "/jyapp/free/login?url="+encodeURIComponent("/jyapp/active/pullnew/index?source=tip");
+			}
+		});
+		localStorage.setItem("active_pullnew_invite_tiptime",nowTime);
 	}
-//});
-
-function popClose(){
-	//addStorge(version);
-	localStorage.setItem("lastAlertDate",new Date().getTime())
-	$("#myModal-tap").modal("hide");
 }
-
-function details(){
-	popClose();
-	var href=window.location.protocol+"//"+window.location.host+"/sjdc/index.html"
-	JyObj.openExternalLink(href,"");
-//	var loginFlag = true
-//	var tapRefer = "N"
-//	var link = "http://res.jianyu360.com/sjdc/index.html";
-//	if(userId != null&&userId != ""){
-//		tapRefer = "T"
-//		window.location.href = link+"?tapRefer="+tapRefer;
-//	}else{
-//		JyObj.openExternalLink(link+"?tapRefer="+tapRefer,"");
-//	}
+var Active_PullNew_Code = function(nowTime){
+	this.currentTap = 1;
+	this.letterReg = /^[A-Z]$/;
+	this.width = 5.6;
+	this.padding = 0.5;
+	this.inputWidth = 0.86;
+	this.getHtml = function(){
+		var html = '<div class="pop-new" style="background-color: #fff;height: inherit;width: inherit;border-radius: 8px;">'
+						+'<div class="invite_code_box invite_toast" style="-webkit-box-sizing: border-box;box-sizing: border-box;position: absolute;width: '+this.width+'rem;height: 7.2rem;left: 50%;top: 50%;z-index: 5000;padding: 0 '+this.padding+'rem;-webkit-transform: translate(-50%, -50%);transform: translate(-50%, -50%);border-radius: .12rem;text-align: center;padding-top: .9rem;">'
+					        +'<div class="top_title">'
+					            +'<span style="margin-right: 0.08rem;background: transparent url(/jyapp/active/pullnew/images/circle_left.png);background-size: contain;display: inline-block;width: 0.75rem;height: 0.3rem;"></span>'
+								+'<p style="margin: 0px;display: inline-block;color: #e26214;font-size: .36rem;">输入好友的邀请码</p>'
+								+'<span style="margin-left: 0.08rem;background: transparent url(/jyapp/active/pullnew/images/circle_left.png);background-size: contain;-webkit-transform: rotate(180deg);transform: rotate(180deg);display: inline-block;width: 0.75rem;height: 0.3rem;"></span>'
+					            +'<p style="margin-top: .1rem;color: #666;font-size: .3rem;font-weight: 500;">给好友助力</p>'
+					        +'</div>'
+							+'<div style="position: relative;" id="val_box_p">'
+								+'<div class="val_box" id="val_box" style="margin-top: 1.1rem;display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-pack: distribute;justify-content: space-around;">'
+								+'<input type="text" style="width: '+this.inputWidth+'rem;height: .86rem;background-color: #f4f4f9;text-align: center;font-size: .36rem;color: #e26214;caret-color: #e26214;outline: none;border: 0;-webkit-appearance: none;padding-left: 0px;">'
+					            +'<input type="text" style="width: '+this.inputWidth+'rem;height: .86rem;background-color: #f4f4f9;text-align: center;font-size: .36rem;color: #e26214;caret-color: #e26214;outline: none;border: 0;-webkit-appearance: none;padding-left: 0px;">'
+					            +'<input type="text" style="width: '+this.inputWidth+'rem;height: .86rem;background-color: #f4f4f9;text-align: center;font-size: .36rem;color: #e26214;caret-color: #e26214;outline: none;border: 0;-webkit-appearance: none;padding-left: 0px;">'
+					            +'<input type="text" style="width: '+this.inputWidth+'rem;height: .86rem;background-color: #f4f4f9;text-align: center;font-size: .36rem;color: #e26214;caret-color: #e26214;outline: none;border: 0;-webkit-appearance: none;padding-left: 0px;">'
+					            +'<input type="text" style="width: '+this.inputWidth+'rem;height: .86rem;background-color: #f4f4f9;text-align: center;font-size: .36rem;color: #e26214;caret-color: #e26214;outline: none;border: 0;-webkit-appearance: none;padding-left: 0px;">'
+					        +'</div>';
+		if(mySysIsIos()){
+			html += '<input type="text" class="imitate" id="imitate" maxlength="5" style="border: none;position: absolute;left: 0px;top: 0px;height: 100%;width: 100%;font-size: .28rem;background-color: transparent;padding-left: 0rem;color: #e26214;z-index: 1;-webkit-text-fill-color: #e26214;caret-color: #e26214;">';
+		}
+		html+='</div>'
+		        +'<a class="go_btn" id="submit_code" href="javascript:;" style="position: absolute;width: 4.6rem;height: .9rem;left: 50%;bottom: .53rem;color: #7f2d03 !important;font-size: .34rem;font-weight: 700;line-height: .9rem;-webkit-transform: translateX(-50%);transform: translateX(-50%);border-radius: .08rem;background: -webkit-gradient(linear, left top, left bottom, from(#ffeacf), to(#ffd2a6));background: linear-gradient(to bottom, #ffeacf, #ffd2a6);opacity: .5;">马上提交</a>'
+		    +'</div>'
+		+'</div>';
+		return html;
+	}
+	this.init = function(){
+		var interval = setInterval(function(){
+			if(localStorage.active_pullnew_hashelp=="1"){
+				localStorage.removeItem("active_pullnew_hashelp");
+				ActiveTip.close();
+			}
+		},3000);
+		$('#myModal-tap').on('hide.bs.modal', function (e) {
+			clearInterval(interval);
+		});
+		var _this = this;
+		if(mySysIsIos()){
+			var fontSize = RootNodeFontSize();
+			var oneInputWidthPx = fontSize*_this.inputWidth+(fontSize*_this.width-fontSize*_this.padding*2-fontSize*_this.inputWidth*5)/4;
+			if(oneInputWidthPx > 0){
+				$("#myModal-tap .imitate").on("tap",function(e1,e){
+					$(this).val("");
+					var clientX = null;
+					try{
+						clientX = e.originalEvent.changedTouches[0].clientX;
+					}catch(er){}
+					if(clientX==null||typeof(clientX) == "undefined"){
+						_this.compatible();
+					}else{
+						_this.currentTap = Math.ceil((clientX-((document.body.clientWidth-_this.width*fontSize)/2+_this.padding*fontSize)) / oneInputWidthPx);
+						if(_this.currentTap <= 0){
+							_this.currentTap = 1;
+						}else if(_this.currentTap > 5){
+							_this.currentTap = 5;
+						}
+					}
+					_this.setCursor();
+				}).blur(function(){
+					$(this).val("");
+				});
+			}else{
+				$("#myModal-tap .imitate").css("left","-1000px");
+				_this.compatible();
+			}
+			$("#myModal-tap .imitate").on('keyup',function(e) {
+				if(e.keyCode === 8) {
+					var obj = $("#myModal-tap #val_box>input:eq("+(_this.currentTap-1)+")");
+					if(_this.currentTap == 1 && obj.val() == ""){
+						return
+					}
+					_this.currentTap--;
+					if(_this.currentTap == 0){
+						_this.currentTap = 1;
+					}
+					if(obj.val() == ""){
+						$("#myModal-tap #val_box>input:eq("+(_this.currentTap-1)+")").val("");
+					}else{
+						obj.val("");
+					}
+					_this.setCursor();
+					_this.isCanSubmit();
+				}
+			}).on('input', function(e) {
+				var value = this.value.toUpperCase();
+				$(this).val("");
+				if(!_this.letterReg.test(value)){
+					return;
+				}
+				$("#myModal-tap #val_box>input:eq("+(_this.currentTap-1)+")").val(value);
+				if(_this.currentTap==5 && _this.inviteCode().length==5){
+					$(this).blur();
+				}
+				_this.currentTap++;
+				if(_this.currentTap > 5){
+					_this.currentTap = 5;
+				}
+				_this.setCursor();
+				_this.isCanSubmit();
+			}).on('paste', function (e) {
+	            var code = _this.getPasteValue(e);
+				$(this).val(code);
+				_this.imitateSetValue(code);
+	            _this.isCanSubmit();
+				$(this).blur();
+	        });
+			$('#myModal-tap #val_box>input').prop("readonly",true);
+		}else{
+			var focusVal = null;
+			var isfocus = false;
+		    // 光标的移动
+		    $('#myModal-tap #val_box>input').on('keyup',function(e) {
+		        // 删除,光标前移。最后一个删除时候光标不移动,最后一个为空时候光标前移
+		        if (e.keyCode === 8) {
+		            if (focusVal==""){
+						$(this).prev('input').val('');
+				    }
+					focusVal = this.value;
+					$(this).prev('input').trigger('focus');
+		        }
+				_this.isCanSubmit();
+		    }).on('input',function(e){
+				this.value = this.value.toUpperCase();
+				if(!/^[A-Z]{1,2}$/.test(this.value)){
+					this.value = "";
+					return;
+				}
+				this.value = this.value.substring(this.value.length-1,this.value.length);
+		        // 输入,光标后移
+		        if (this.value.length === 1) {
+		            if($(this).index()==4 && _this.inviteCode().length==5){
+						$(this).blur();
+					}else{
+					    $(this).next('input').trigger('focus');
+					}
+		        }
+				_this.isCanSubmit();
+		    }).on('focus', function (e) {
+				focusVal = this.value;
+				isfocus = true;
+				if(!SuperSearch.isMyPage && !EntSearch.isMyPage){
+					JyObj.hiddenBottom("0");
+				}
+			}).on('blur', function (e) {
+				isfocus = false;
+				if(!SuperSearch.isMyPage && !EntSearch.isMyPage){
+					setTimeout(function(){
+						if(!isfocus){
+							JyObj.hiddenBottom("1");
+						}
+					},500);
+				}
+			}).on('paste', function (e) {
+		        var code = _this.getPasteValue(e);
+	            // 给input赋值,最后一个input获取焦点
+	            $(this).parent().children().each(function(i,dom){
+					if(code[i]==undefined){
+						return true;
+					}
+	                $(dom).val(code[i].toUpperCase())
+	                if (i === 4) {
+	                    $(this).trigger('focus')
+	                }
+	            });
+				_this.isCanSubmit();
+				if(code.length == 5){
+					$(this).blur();
+				}
+		    });
+		}
+	    $('#myModal-tap #submit_code').on('click', function () {
+	        var code = _this.inviteCode();
+	        if(_this.verify(code)) {
+				$.post("/jyapp/active/pullnew/helpfriends/invitecode",{code:code},function(r){
+					var thiscss = {
+						"z-index": 1000003,
+						"padding": "12px 20px"
+					};
+					if(r.status == "n"){
+						EasyAlert.show("邀请码提交失败",thiscss,2000);
+					}else if(r.status == "b"){
+						EasyAlert.show("邀请码不存在",thiscss,2000);
+					}else if(r.status=="m"){
+						EasyAlert.show("不能提交自己的邀请码",thiscss,2000);
+					}else{
+						EasyAlert.show("邀请码提交成功",thiscss,2000);
+						$("#myModal-tap").modal("hide");
+					}
+				});
+	        }
+	    });
+		$.post("/jyapp/active/pullnew/once");
+	}
+	this.compatible = function(){
+		var _this = this;
+		$("#myModal-tap .imitate").blur(function(){
+			$(this).val("").css("left","-1000px");
+		});
+		$('#myModal-tap #val_box>input').click(function(){
+			_this.currentTap = $(this).index()+1;
+			$("#myModal-tap .imitate").val("").css("left","0px").focus();
+			_this.setCursor();
+		});
+	}
+	this.inviteCode = function(){
+		var codeArr = []
+        $('#myModal-tap #val_box input').each(function(i,dom){
+            codeArr.push($(dom).val())
+        });
+        return codeArr.join('');
+	}
+	this.verify = function(value){
+		return /^[a-z]{5}$/i.test(value);
+	}
+	this.isCanSubmit = function(){
+		if(this.verify(this.inviteCode())){
+			$('#myModal-tap #submit_code').css("opacity","1");
+		}else{
+			$('#myModal-tap #submit_code').css("opacity",".5");
+		}
+	}
+	this.imitateSetValue = function(value){
+		if(value == ""){
+			return;
+		}
+		for(var i=0;i<value.length;i++){
+			$("#myModal-tap #val_box>input:eq("+i+")").val(value[i]);
+		}
+	}
+	this.getPasteValue = function(e){
+		e.preventDefault();
+           e.stopPropagation();
+           var text = e.originalEvent.clipboardData.getData("Text");
+           // 去空格,去换行,去回车
+           text = text.replace(/\s+/g, '');
+           text = text.replace(/[\r\n]/g, '');
+           // 截取5位邀请码,从【的下一位开始截取
+           var startIndex = text.indexOf('【');
+		var code = "";
+           try {
+            if (startIndex === -1) {
+                code = /[a-z]{5}/ig.exec(text)[0]
+            } else {
+                code = text.substr(startIndex+1, 5)
+            }
+	 	} catch (error) {}
+		return code;
+	}
+	this.setCursor = function(){
+		var num = 0.4+(this.currentTap-1)*0.9;
+		if($("#myModal-tap #val_box>input:eq("+(this.currentTap-1)+")").val() != ""){
+			num += 0.25;
+		}
+		$("#myModal-tap .imitate").css("padding-left",num+"rem");
+	}
+}
+var Active_Default = function(nowTime){
+	this.init = function(){
+		$("#goToInvite").on("tap",function(){
+			ActiveTip.close();
+			JyObj.openExternalLink(myDomain()+"/sjdc/index.html","");
+		});
+		localStorage.setItem("lastAlertDate",nowTime);
+	}
+	this.getHtml = function(){
+		var html = '<div class="pop-new" style="background: url(/jyapp/images/search/dataexportAd.png);background-size: cover;height: inherit;width: inherit;border-radius: 8px;">'
+					+'<div style="position: absolute;color: #0687DB;font-size: 14px;bottom: .6rem;left: 50%;margin-left: -2.3rem;font-family: 微软雅黑;width: 4.6rem;border: 1px solid #fff;border-radius: 6px;text-align: center;cursor: pointer;height: .8rem;line-height: .8rem;" id="goToInvite"></div>'
+				+'</div>';
+		return html;
+	}
 }
-
-//function addStorge(version){
-//	localStorage.setItem("popup_bx_"+version, "A")
-//}
-
-
-function mySysIsIos(){
-	return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
+//
+var ActiveTip = null;
+window.onload = function(){
+	ActiveTip = new Active_Tip();
 }

+ 19 - 18
src/jfw/modules/app/src/web/staticres/jyapp/js/rem.js

@@ -1,18 +1,19 @@
-(function(){
-    function w() {
-        var r = document.documentElement;
-        var a = r.getBoundingClientRect().width;
-        if (a > 750 ){
-            a = 750;
-        } 
-        //750/w = 100/font-size
-        rem = a / 7.5;
-        r.style.fontSize = rem + "px"
-    }
-    var t;
-    w();
-    window.addEventListener("resize", function() {
-        clearTimeout(t);
-        t = setTimeout(w, 300);
-    }, false);
-})();
+(function(doc, win) {
+	var docEl = doc.documentElement,
+		resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
+		recalc = function() {
+			var fontSize = RootNodeFontSize();
+			if(fontSize == 0) return;
+			docEl.style.fontSize = fontSize + 'px';
+		};
+	if(!doc.addEventListener) return;
+	win.addEventListener(resizeEvt, recalc, false);
+	doc.addEventListener('DOMContentLoaded', recalc, false);
+})(document, window);
+//获取根节点的font-size
+function RootNodeFontSize(){
+	var clientWidth = document.documentElement.clientWidth;
+	if(!clientWidth) return 0;
+	if(clientWidth > 750) clientWidth = 750;
+	return clientWidth / 7.5;
+}

+ 12 - 11
src/jfw/modules/app/src/web/staticres/jyapp/js/wxSupersearch.js

@@ -5,7 +5,6 @@ var SuperSearch = {
 	isMyPage: false,
 	initFlag: false,
 	dropload: null,
-	ZBADDRESS: "",
 	s_words:  "",
 	myHistory:  "",
 	msgset:  "",
@@ -77,6 +76,9 @@ var SuperSearch = {
 			return;
 		}
 		this.initFlag = true;
+		$("#supersearchPage #wrapper .more").on("click",function(){
+			JyObj.openExternalLink(myDomain()+"/sjdc/index.html","");
+		});
 		$("#supersearchPage #feedback").on("tap",function(){
 			SuperSearch.goToFeedbackPage();
 		});
@@ -570,7 +572,7 @@ var SuperSearch = {
 		}
 		if(!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){ //处理ios输入框光标无法遮盖问题
 			$("#supersearchPage .app-layout-content-b").scrollTop(0);
-			$("#supersearchPage .app-layout-content-b").off("scroll", SuperSearchInputblur).on("scroll",SuperSearchInputblur);
+			$("#supersearchPage .app-layout-content-b").off("scroll", SuperSearch.SuperSearchInputblur).on("scroll",SuperSearch.SuperSearchInputblur);
 		}
 	},
 	toOpenSupersearch: function(){
@@ -914,6 +916,7 @@ var SuperSearch = {
 				$("#supersearchPage #working").addClass("hidden");
 				SuperSearch.appendInterceptWord(data.interceptWord);
 				SuperSearch.s_words = data.keyWord;
+				$("#supersearchPage input[name=super_searchinput]").val(SuperSearch.s_words);
 				SuperSearch.requesting = false;
 				//历史记录和我的订阅
 				if(data.isLogin){
@@ -968,7 +971,6 @@ var SuperSearch = {
 					SuperSearch.show();
 					$(window).scrollTop(0);
 					$(".loading_").hide();
-					return
 				}else{
 					SuperSearch.showNull = false;
 					SuperSearch.hasData();
@@ -2038,13 +2040,12 @@ var SuperSearch = {
 				SuperSearch.iosScreeninit=true;
 			}
 		}
+	},
+	SuperSearchInputblur: function(){
+		if($('#supersearchPage .app-layout-content-b').scrollTop()>46){
+			$('#supersearchPage .searchinput').addClass("nocaret");
+		}else{
+			$('#supersearchPage .searchinput').removeClass("nocaret");
+		}
 	}
 };
-
-function SuperSearchInputblur(){
-	if($('#supersearchPage .app-layout-content-b').scrollTop()>46){
-		$('#supersearchPage .searchinput').addClass("nocaret");
-	}else{
-		$('#supersearchPage .searchinput').removeClass("nocaret");
-	}
-}

+ 14 - 1
src/jfw/modules/app/src/web/staticres/jyapp/me/css/index.css

@@ -141,7 +141,7 @@ body {
   display: block;
 }
 
-#main .install {
+#main .install,#main .pullnew {
   margin-top: 13px;
   background: #fff;
   border-top: 1px solid #E6E6E6;
@@ -171,4 +171,17 @@ body {
 }
 #main .follow i.jyapp-icon{
 	top: 2px;
+}
+#main .pullnew img{
+	width: 20px;
+    position: absolute;
+    left: 17px;
+    top: 50%;
+    margin-top: -10px;
+}
+#main .pullnew>a>i{
+	position: absolute;
+    right: 20px;
+	color: #2CB7CA;
+	font-size: 14px;
 }

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/wxtsguide/main.js

@@ -319,7 +319,7 @@ var Guide = {
 			$(this).addClass("li-active");
 			var url = $(this).attr("data-url");
 			var id = $(this).attr("data-id");
-			newredirect(tsadd,url,id,"subkey_"+keys.join("_").replace(/\s+/g,"+"));
+			newredirect("",url,id,"subkey_"+keys.join("_").replace(/\s+/g,"+"));
 		});
 	},
 	getKeyWord: function(flag){

+ 35 - 0
src/jfw/modules/app/src/web/templates/active/explain.html

@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    {{include "/common/meta.html"}}
+    <title>活动说明</title>
+	<link href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/explain.css?v={{Msg "seo" "version"}}">
+	<script src="/jyapp/js/jquery.js"></script>
+	{{include "/common/js.html"}}
+</head>
+<body>
+	<div class="app-layout-header">
+		<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+		活动说明
+	</div>
+	<div class="app-layout-content-b">
+	    <div class="explain">
+	        <div class="title">剑鱼标讯活动说明</div>
+	        <div class="main">
+	            <p>参与本次活动前,请用户详细阅读活动说明及相关条款。凡参与本次活动,则视为用户已阅读、理解并同意活动规则、说明等全部内容。</p>
+	            <p>1、用户不得以任何不正当手段或舞弊方式参与本活动。一经发现,本平台有权采取限制登录、封禁账号、撤消活动资格、账号金额清零、限制再次注册使用等措施,亦有权收回用户已领取的红包、追讨已抵现的金额或与奖品同等价值的金额,并保留追究该用户责任的权利。如因此给用户造成损失,本平台不进行任何赔偿或补偿。不正当手段及舞弊行为包括但不限于:下载非官方客户端;使用模拟器、插件、外挂等非法工具扫码、下载、安装、注册、登录、赠与、领取红包;注册多个账号;篡改设备数据;恶意牟利等扰乱平台秩序;使用插件、外挂、系统或第三方工具对本平台及本活动进行干扰、破坏、修改或施加其他影响及本平台认为的其他不正当手段。</p>
+	            <p>2、本平台依法运营此次活动,如因不可抗力、相关政策、活动调整等原因导致本次活动调整、暂停举办或无法进行的,本平台有权随时决定修改、暂停、取消或终止本活动,并无需为此承担任何法律责任。</p>
+	            <p>3、如因第三方通过各种不当手段攻击、篡改,对本平台及本次活动进行干扰、破坏、修改或施加其他影响或系统故障致使领取的红包发放、抵现等发生错误、用户无法参与或参与失败的,本平台无需为此承担任何法律责任。</p>
+	            <p>4、活动期间,因用户操作不当或用户所在地区网络故障、支付平台网络故障、电信运营商故障、第三方其他平台限制等非本平台所能控制的原因导致的用户无法参与活动、或参与失败,本平台无需为此承担任何法律责任。</p>
+	            <p>5、请用户务必通过剑鱼标讯手机官方客户端参与本次活动。任何人或第三方以本平台的名义宣称或从事类似活动或恶意发放、转让或销售红包、恶意通知用户中奖、领取红包、欺诈等造成用户损失的,本平台无需为此承担任何法律责任。</p>
+	            <p>6、在法律允许的范围内,本平台有权对本活动规则进行变动或调整。相关变动或调整将公布在活动规则页面上,并于公布时即时生效,用户继续参与该活动则视为对前述变动或者调整后的活动规则予以同意。如果用户拒绝上述活动规则的变更或者调整,应停止参与变更后的该活动。</p>
+	            <p>7、任何人不应利用本次活动进行博彩或其他违法行为。对于本平台用户,一经发现,本平台有权取消此用户参与本次活动的资格、收回所获红包或相关奖品。如其行为构成犯罪,本平台有权移交相应司法机关处理。如因其行为给本平台造成损失,同时应当承担赔偿责任。</p>
+	            <p>8、本平台的《用户协议》、《隐私政策》同样适用于本次活动,本次活动规则及相关条款与《用户协议》、《隐私政策》相冲突的,以本次活动规则及相关条款为准。本次活动规则及相关条款未约定的内容,仍以剑鱼标讯《用户协议》、《隐私政策》为准。</p>
+	        </div>
+	    </div>
+	</div>
+</body>
+</html>

+ 48 - 0
src/jfw/modules/app/src/web/templates/active/pullnew/datapacket.html

@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	{{include "/common/meta.html"}}
+    <title>资料包领取</title>
+	<link href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/datapacket.css?v={{Msg "seo" "version"}}">
+	<script src="/jyapp/js/jquery.js"></script>
+	{{include "/common/js.html"}}
+</head>
+<body>
+	<div class="app-layout-header">
+		<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+		资料包限时免费领
+	</div>
+	<div class="app-layout-content-b">
+	    <div class="link">
+	        <div class="link_box">
+	            <p class="address">
+	                <span>链接:</span>
+	                <a class="network_disk" href="javascript:void(0)">{{.T.domain}}/jyapp/free/pullnew/mydatapacket</a>
+	            </p>
+	            <p class="code">提取码:<span>{{.T.password}}</span></p>
+	            <p class="tip">复制链接,用电脑打开百度网盘下载资料包,操作更方便哦!</p>
+	            <button class="copy_link">复制</button>
+	        </div>
+	    </div>
+	</div>
+    <script src="/jyapp/js/clipboard.min.js"></script>
+    <script>
+        $(function () { 
+            var clipboard = new ClipboardJS('.copy_link', {
+                text: function() {
+					return "复制这段内容后打开百度网盘手机App,操作更方便哦 链接:{{.T.url}} 提取码:{{.T.password}}";
+                }
+            });
+            clipboard.on('success', function(e) {
+				EasyAlert.show("复制成功",undefined,2000);
+            });
+            clipboard.on('error', function(e) {
+                console.log(e); 
+            });  
+         })
+    </script>
+</body>
+</html>

+ 256 - 0
src/jfw/modules/app/src/web/templates/active/pullnew/helpfriends.html

@@ -0,0 +1,256 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    {{include "/common/meta.html"}}
+    <title>拉新活动</title>
+	<link href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/helpfriends.css?v={{Msg "seo" "version"}}">
+	<script src="/jyapp/js/jquery.js"></script>
+	<script src="/jyapp/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
+	{{include "/common/js.html"}}
+</head>
+<body>
+    <div class="app-layout-header">
+		<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+		助力好友
+	</div>
+	<div class="app-layout-content-b">
+	    <div class="invite">
+		    <!-- 邀请好友弹框 -->
+		    <div class="goto_invite_box invite_toast" style="display: none;">
+		        <a class="go_btn" href="javascript:;">去邀请</a>
+		    </div>
+		    <!-- 输入验证码弹框 -->
+		    <div class="invite_code_box invite_toast">
+		        <div class="top_title">
+		            <p>输入好友的邀请码</p>
+		            <p>给好友助力</p>
+		        </div>
+				<div class="val_box_p">
+			        <div class="val_box" id="val_box">
+			            <input type="text"/>
+			            <input type="text"/>
+			            <input type="text"/>
+			            <input type="text"/>
+			            <input type="text"/>
+			        </div>
+				</div>
+		        <a class="go_btn" id="submit_code" href="javascript:;">马上提交</a>
+		    </div>
+		</div>
+	</div>
+
+    <script>
+		var currentTap = 1;
+		var letterReg = /^[A-Z]$/;
+        $(function(){
+			if(mySysIsIos()){
+				$(".val_box_p").append('<input type="text" class="imitate" id="imitate" maxlength="5">');
+				var width = 5.6,padding = 0.5,inputWidth = 0.86;
+				var fontSize = RootNodeFontSize();
+				var oneInputWidthPx = fontSize*inputWidth+(fontSize*width-fontSize*padding*2-fontSize*inputWidth*5)/4;
+				if(oneInputWidthPx > 0){
+					$(".imitate").on("tap",function(e1,e){
+						$(this).val("");
+						var clientX = null;
+						try{
+							clientX = e.originalEvent.changedTouches[0].clientX;
+						}catch(er){}
+						if(clientX==null||typeof(clientX) == "undefined"){
+							compatible();
+						}else{
+							currentTap = Math.ceil((clientX-((document.body.clientWidth-width*fontSize)/2+padding*fontSize)) / oneInputWidthPx);
+							if(currentTap <= 0){
+								currentTap = 1;
+							}else if(currentTap > 5){
+								currentTap = 5;
+							}
+						}
+						setCursor();
+					}).blur(function(){
+						$(this).val("");
+					});
+				}else{
+					$(".imitate").css("left","-1000px");
+					compatible();
+				}
+				$(".imitate").on('keyup',function(e) {
+					if(e.keyCode === 8) {
+						var obj = $("#val_box>input:eq("+(currentTap-1)+")");
+						if(currentTap == 1 && obj.val() == ""){
+							return
+						}
+						if(currentTap == 0){
+							currentTap = 1;
+						}
+						if(obj.val() == ""){
+							currentTap--;
+							$("#val_box>input:eq("+(currentTap-1)+")").val("");
+						}else{
+							obj.val("");
+						}
+						setCursor();
+						isCanSubmit();
+					}
+				}).on('input', function(e) {
+					var value = this.value.toUpperCase();
+					$(this).val("");
+					if(!letterReg.test(value)){
+						return;
+					}
+					$("#val_box>input:eq("+(currentTap-1)+")").val(value);
+					if(currentTap==5 && inviteCode().length==5){
+						$(this).blur();
+					}
+					currentTap++;
+					if(currentTap > 5){
+						currentTap = 5;
+					}
+					setCursor();
+					isCanSubmit();
+				}).on('paste', function (e) {
+			    	var code = getPasteValue(e);
+					$(this).val(code);
+					imitateSetValue(code);
+			    	isCanSubmit();
+					$(this).blur();
+				});
+				$('#val_box>input').prop("readonly",true);
+			}else{
+				var focusVal = null;
+	            // 光标的移动
+			    $('#val_box>input').focus(function(){
+					focusVal = this.value;
+				}).on('keyup',function(e) {
+					// 删除,光标前移。最后一个删除时候光标不移动,最后一个为空时候光标前移
+					if (e.keyCode === 8) {
+					    if (focusVal==""){
+							$(this).prev('input').val('');
+					    }
+						focusVal = this.value;
+						$(this).prev('input').trigger('focus');
+					}
+					isCanSubmit();
+			    }).on('input',function(e){
+					this.value = this.value.toUpperCase();
+					if(!/^[A-Z]{1,2}$/.test(this.value)){
+						this.value = "";
+						return;
+					}
+					this.value = this.value.substring(this.value.length-1,this.value.length);
+					// 输入,光标后移
+					if (this.value.length === 1) {
+						if($(this).index()==4 && inviteCode().length==5){
+							$(this).blur();
+						}else{
+						    $(this).next('input').trigger('focus');
+						}
+					}
+					isCanSubmit();
+			    }).on('focus', function (e) {
+					focusVal = this.value;
+				}).on('paste', function (e) {
+					var code = getPasteValue(e);
+				    // 给input赋值,最后一个input获取焦点
+				    $(this).parent().children().each(function(i,dom){
+						if(code[i]==undefined){
+							return true;
+						}
+						$(dom).val(code[i].toUpperCase())
+						if (i === 4) {
+						    $(this).trigger('focus')
+						}
+				    });
+					isCanSubmit();
+					if(code.length == 5){
+						$(this).blur();
+					}
+			    });
+			}
+            $('#submit_code').on('click', function () {
+                var code = inviteCode();
+                if(verify(code)) {
+					$.post("/jyapp/active/pullnew/helpfriends/invitecode",{code:code},function(r){
+						if(r.status=="n"){
+							EasyAlert.show("邀请码提交失败",undefined,2000);
+						}else if(r.status == "b"){
+							EasyAlert.show("邀请码不存在",undefined,2000);
+						}else if(r.status=="m"){
+							EasyAlert.show("不能提交自己的邀请码",undefined,2000);
+						}else{
+							EasyAlert.show("邀请码提交成功",undefined,2000);
+							localStorage.active_pullnew_hashelp = "1";
+							setTimeout(function(){
+								window.history.back();
+							},2000);
+						}
+					});
+                }
+            })
+        });
+		function compatible(){
+			$(".imitate").blur(function(){
+				$(this).val("").css("left","-1000px");
+			});
+			$('#val_box>input').click(function(){
+				currentTap = $(this).index()+1;
+				$(".imitate").val("").css("left","0px").focus();
+				setCursor();
+			});
+		}
+		function inviteCode(){
+			var codeArr = []
+	        $('#val_box input').each(function(i,dom){
+	            codeArr.push($(dom).val())
+	        });
+	        return codeArr.join('');
+		}
+		function verify(value){
+			return /^[a-z]{5}$/i.test(value);
+		}
+		function isCanSubmit(){
+			if(verify(inviteCode())){
+				$('#submit_code').css("opacity","1");
+			}else{
+				$('#submit_code').css("opacity",".5");
+			}
+		}
+		function imitateSetValue(value){
+			if(value == ""){
+				return;
+			}
+			for(var i=0;i<value.length;i++){
+				$("#val_box>input:eq("+i+")").val(value[i]);
+			}
+		}
+		function getPasteValue(e){
+			e.preventDefault();
+            e.stopPropagation();
+            var text = e.originalEvent.clipboardData.getData("Text");
+            // 去空格,去换行,去回车
+            text = text.replace(/\s+/g, '');
+            text = text.replace(/[\r\n]/g, '');
+            // 截取5位邀请码,从【的下一位开始截取
+            var startIndex = text.indexOf('【');
+			var code = "";
+            try {
+	            if (startIndex === -1) {
+	                code = /[a-z]{5}/ig.exec(text)[0]
+	            } else {
+	                code = text.substr(startIndex+1, 5)
+	            }
+		 	} catch (error) {}
+			return code;
+		}
+		function setCursor(){
+			var num = 0.4+(currentTap-1)*0.9;
+			if($("#val_box>input:eq("+(currentTap-1)+")").val() != ""){
+				num += 0.25;
+			}
+			$(".imitate").css("padding-left",num+"rem");
+		}
+    </script>
+</body>
+</html>

+ 173 - 0
src/jfw/modules/app/src/web/templates/active/pullnew/index.html

@@ -0,0 +1,173 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	{{include "/common/meta.html"}}
+    <title>活动详情</title>
+	<link href="/jyapp/css/layout.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/index.css?v={{Msg "seo" "version"}}">
+	<script src="/jyapp/js/jquery.js"></script>
+	{{include "/common/js.html"}}
+</head>
+<body>
+	<div class="activity_detail">
+		<div class="app-layout-header">
+			<span class="app-back jyapp-icon jyapp-icon-zuojiantou"></span>
+			资料包限时免费领
+			{{if not .T.hasHelp}}<a class="helpfriends hide" href="/jyapp/active/pullnew/helpfriends">助力好友</a>{{end}}
+		</div>
+		<div class="app-layout-content-b">
+	        <div class="content">
+	            <div class="people"></div>
+	            <div class="dashed_line"></div>
+	            <!-- 邀请操作 -->
+	            <div class="handle_area">
+	                <p class="invite_title">现在邀请好友使用剑鱼标讯App,立即免费拿</p>
+	                <div class="invite_btn">开始邀请</div>
+	                <div class="invite_code">
+	                    <span>我的邀请码:</span> 
+	                    <span id="code_text">{{.T.inviteCode}}</span>
+	                    <span class="copy" id="copy_btn">复制</span>
+	                </div>    
+	            </div>
+	            <!-- 已邀请的好友 -->
+	            <div class="hasinvite_friends">
+	                <div class="hasinvite_title">已邀请的好友</div>
+	                <div class="friend_name"></div>
+	                <button disabled class="get_btn">免费领取资料包</button>
+	            </div>
+	            <!-- 活动玩法 -->
+	            <div class="activity_play">
+	                <div class="play_title">活动玩法</div>
+	                <div class="play_info">
+	                    <p>邀请好友下载、注册成为剑鱼标讯App新用户,</p>
+	                    <p>并绑定你的邀请码;</p> 
+	                    <p>邀请满3人,可免费领取资料包。</p> 
+	                </div>
+	            </div>
+	            <!-- 活动规则 -->
+	            <div class="activity_rule">
+	                <div class="rule_title">活动规则</div>
+	                <div class="rule_info">
+	                    <p>①用户成功邀请满3人,可领取信息技术行业招标文件资料包;</p>
+	                    <p>②好友必须完成注册登录,并绑定五位英文字母邀请码,才能算作邀请成功;</p> 
+	                    <p>③邀请的好友必须是未注册剑鱼标讯的新用户;</p> 
+	                    <p>④剑鱼标讯保留对该活动的最终解释权,如有相关疑问,可通过剑鱼标讯微信公众号或拨打电话:400-108-6670联系剑鱼标讯客服人员。</p>
+	                </div>
+	            </div>
+	            <a href="/jyapp/free/active/explain" class="activity_explain">活动说明</a>
+	        </div>
+	    </div>
+	    <div class="invite_way" id="invite_container">
+	        <p class="way_title">立即邀请</p>
+	        <div class="way_list">
+	            <div class="way_list_item">
+	                <span class="jyapp-icon jyapp-icon-weixin"></span>
+	                <span>微信好友</span>
+	            </div>
+	            <div class="way_list_item">
+	                <span class="jyapp-icon jyapp-icon-qq"></span>
+	                <span>QQ好友</span>
+	            </div>
+	            <div class="way_list_item">
+	                <span class="jyapp-icon jyapp-icon-pengyouquan"></span>
+	                <span>朋友圈</span>
+	            </div>
+	        </div>
+	    </div>
+	</div>
+    <script src="/jyapp/js/clipboard.min.js"></script>
+    <script>
+		var myShareTexts = [
+			"这个工具最近在投标圈超火的,推荐给你",
+			"我们都在剑鱼标讯找项目,就差你了",
+			"好嗨哟,最近中标多亏了它!你在用吗?",
+			"我发现了一个投标神器,竟然还是免费的!",
+			"自从用了剑鱼标讯,我中标的项目越来越多了"
+		]
+        $(function () {
+			var html = "";
+			var myInvites= {{.T.myInvites}};
+			if(!myInvites){
+				myInvites = [];
+			}
+			if(myInvites.length == 3){
+				$(".get_btn").prop("disabled",false);
+			}
+			for(var i in myInvites){
+				if(!myInvites[i].headimageurl){
+					myInvites[i].headimageurl = "/jyapp/me/images/core_1.png";
+				}
+				html += '<div class="friend_name_item">'
+	                        +'<img src="'+myInvites[i].headimageurl+'" alt="">'
+	                        +'<span style="color: #333;">'+myInvites[i].nickname+'</span>'
+	                    +'</div>';
+			}
+			for(var i=0;i<3-myInvites.length;i++){
+				html += '<div class="friend_name_item">'
+	                        +'<img src="/jyapp/active/pullnew/images/add.png" alt="" class="wait_invite" onclick="toShare()">'
+	                        +'<span>待邀请</span>'
+	                    +'</div>';
+			}
+			$(".friend_name").html(html);
+			if(localStorage.active_pullnew_hashelp!="1"){
+				$(".helpfriends").removeClass("hide");
+			}
+			$('.get_btn').on('click',function () {
+				window.location.href = '/jyapp/active/pullnew/datapacket';
+			});
+            $('.invite_btn').on('click',toShare);
+            var clipboard = new ClipboardJS('#copy_btn', {
+                text: function() {
+                    return "用剑鱼标讯\n全国招标信息免费看,不遮挡\n去应用市场下载剑鱼标讯APP\n填我的邀请码【{{.T.inviteCode}}】\n立即免费使用!";
+                }
+            });
+            clipboard.on('success', function(e) {
+				EasyAlert.show("邀请码复制成功",undefined,2000);
+            });
+            clipboard.on('error', function(e) {
+                console.log(e); 
+            });
+			$(".app-layout-content-b").on("click",function(e){
+				if($(e.target).hasClass("invite_btn") || $(e.target).hasClass("wait_invite")){
+					return;
+				}
+				$('#invite_container').hide();
+				$('.content').css("padding-bottom",'0');
+			});
+			$("#invite_container .way_list_item").click(function(){
+				var shareType = $(this).index() + 1;
+				var title = myShareTexts[randomNum(0,myShareTexts.length-1)];
+				var content = "您的好友向您推荐了剑鱼标讯";
+				if(shareType == 3){
+					content = title;
+				}
+				var type = "";
+				if (shareType == 1) {
+					type = "wx"
+				} else if (shareType == 2) {
+					type = "qq"
+				} else if (shareType == 3) {
+					type = "pyq"
+				}
+				$.post("/jyapp/active/pullnew/share",{type:type,title:title});
+				JyObj.share(shareType,title,content,myDomain()+"/jyapp/free/active/pullnew/invite?t="+type+"&n={{.T.shareNickName}}&i={{.T.shareInviteCode}}");
+			});
+        });
+		function toShare(){
+			$('#invite_container').toggle();
+            if($('#invite_container').is(":hidden")){
+                $('.content').css("padding-bottom",'0');
+            }else{
+                $('.content').css("padding-bottom",'2.54rem');
+            }
+		}
+		function afterJyObjInit(){
+			try{
+				JyObj.hiddenBottom("0");
+			}catch(e){}
+		}
+    </script>
+</body>
+</html>

+ 76 - 0
src/jfw/modules/app/src/web/templates/active/pullnew/invite.html

@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    {{include "/common/meta.html"}}
+    <title>资料包限时免费领</title>
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/base.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/active/pullnew/css/invite.css?v={{Msg "seo" "version"}}">
+	<script src="/jyapp/js/jquery.js"></script>
+	{{include "/common/js.html"}}
+</head>
+<body>
+	<div id="rightcorner-bg">
+		<img class="rightcorner" src="/jyapp/images/rightcorner.png"/>
+		<img class="rightcorner-close" src="/jyapp/images/rightcorner-close.png"/>
+	</div>
+    <div class="invite">
+        <div class="logo">
+            <img src="/jyapp/active/pullnew/images/logo.png" alt="logo">
+        </div>
+        <div class="people"></div>
+        <div class="code">
+            下载、注册后,记得输入:
+			<div><span class="code_number">{{.T.inviteCode}}</span>(好友{{.T.nickName}}的邀请码)</span></div>
+        </div>
+        <button class="copy">复制</button>
+		<a href="{{Msg "seo" "jyDomain"}}/front/downloadJyApp?page=active_pullnew&source={{.T.source}}&code=active_pullnew" class="download" id="download">立即下载剑鱼标讯App</a>
+    </div>
+    <script src="/jyapp/js/clipboard.min.js"></script>
+    <script>
+        var clipboard = new ClipboardJS('.copy', {
+            text: function() {
+                return "用剑鱼标讯\n全国招标信息免费看,不遮挡\n去应用市场下载剑鱼标讯APP\n填我的邀请码【{{.T.inviteCode}}】\n立即免费使用!";
+            }
+        });
+        clipboard.on('success', function(e) {
+			EasyAlert.show("邀请码复制成功",undefined,2000);
+        });
+        clipboard.on('error', function(e) {
+            console.log(e); 
+        });
+		var isIos = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
+		//
+		document.getElementById("rightcorner-bg").onclick = function(){
+			this.style.display = "none";
+		}
+		document.getElementById("download").onclick = function(e){
+			if(isIos){
+				if(!isWeixin()){
+					//如果已安装,直接打开app
+					try{
+						//window.location.href = "jianyuiosapp://";
+					}catch(e){}
+				}
+			}else{
+				if(isWeixin()){
+					document.getElementById("rightcorner-bg").style.display = "block";
+					e.preventDefault();
+				}else{
+					//如果已安装,直接打开app
+					try{
+						//window.location.href = "jyscheme://host";
+					}catch(e){}
+				}
+			}
+		}
+		function isWeixin(){
+		    var ua = navigator.userAgent.toLowerCase();
+		    if(ua.match(/MicroMessenger/i)=="micromessenger"){
+				return true;
+			}else{
+				return false;
+			}
+		}
+    </script>
+</body>
+</html>

+ 129 - 8
src/jfw/modules/app/src/web/templates/dataExport/dataExport.html

@@ -8,7 +8,7 @@
     <title>数据导出</title>
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/dataExport.css?v={{Msg "seo" "version"}}3">
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
@@ -139,7 +139,26 @@
         top: 18px;
         color: #444444;
     }
-
+    .resetOne {
+        position: fixed;
+        left: 0;
+        bottom: 0;
+        width: 100%;
+        border-top: 1px solid #F4F4F9;
+        display: none;
+    }
+    .resetOne button:first-child {
+        background: #fff;
+        color: #2cb7ca;
+    }
+    .resetOne button {
+        width: 50%;
+        height: 0.94rem;
+        background: #2cb7ca;
+        font-size: .36rem;
+        color: #fff;
+        float: left;
+    }
 </style>
 <body>
     <div class="app-layout-header">
@@ -150,7 +169,7 @@
         <div class="progress">
         	<div class="p-item">
         		<p class="p-item-icon" style="background: #2cb7ca;">
-                    <i class="icon iconfont" style="position: absolute;left: 1.15rem;top: 0.05rem;">&#xe606;</i>
+                    <i class="icon iconfont">&#xe606;</i>
         		</p>
         		<span class="active">条件筛选</span>
         		<div class="line"></div>
@@ -158,7 +177,7 @@
         
         	<div class="p-item">
         		<p class="p-item-icon">
-        			<i class="icon iconfont" style="position: absolute;left: 1.15rem;top: 0.01rem;">&#xe617;</i>
+        			<i class="icon iconfont">&#xe617;</i>
         		</p>
         		<span>支付订单</span>
         		<div class="line"></div>
@@ -166,7 +185,7 @@
         
         	<div class="p-item">
         		<p class="p-item-icon icon-gray">
-        			<i class="icon iconfont" style="position: absolute;left: 1.1rem;top: 0.01rem;">&#xe616;</i>
+        			<i class="icon iconfont">&#xe616;</i>
         		</p>
         		<span>数据导出</span>
         	</div>
@@ -240,7 +259,13 @@
         <!-- elseChooseEnd -->
 
         <!-- btn -->
-        <button class="saveData">确认</button>
+        <div class="confirm">
+            <button class="saveData">确认</button>
+        </div>
+        <div class="resetOne">
+            <button class="reset">重置</button>
+            <button class="saveData">确认</button>
+        </div>
 
     </div>
 
@@ -321,6 +346,8 @@
                 // 转化时间戳
                 var tval = valueText.replace("年","-").replace("月","-").replace("日","");
                 var val = new Date(tval).getTime();
+                var vals = Number(val.toString().slice(0,-3));
+                localStorage.export_starttime = vals;
                 // 判空
                 if ($("#endtime").val()!=""){
                     var ete = $("#endtime").val().replace("年","-").replace("月","-").replace("日","");
@@ -337,14 +364,17 @@
                     $(".dateMake").css({"color":"#24C0D7"});
                     $(".chooseTime ul li").removeClass('active');
                 }
-
+                $(".confirm").hide();
+                $(".resetOne").show();
             },
             onClear: function (inst) {
+                localStorage.removeItem("export_starttime");
                 if ($("#endtime").val()==""){
                     $("#endtime").removeClass("timeSelect");
                     $("#starttime").removeClass("timeSelect");
                     $(".dateMake").css({"color":"#000"});
                     $(".chooseTime > i").css("color","#888");
+                    $(".chooseTime ul li").removeClass('active');
                     $(".chooseTime ul li:eq(0)").addClass('active');
                 }
             }
@@ -386,6 +416,8 @@
                 // 转化时间戳
                 var tval = valueText.replace("年","-").replace("月","-").replace("日","");
                 var val = new Date(tval).getTime();
+                var vals = Number(val.toString().slice(0,-3));
+                localStorage.export_endtime = vals;
                 // 判空
                 if ($("#starttime").val()!=""){
                     var ste = $("#starttime").val().replace("年","-").replace("月","-").replace("日","");
@@ -402,13 +434,18 @@
                     $(".dateMake").css({"color":"#24C0D7"});
                     $(".chooseTime ul li").removeClass('active');
                 }
+                //
+                $(".confirm").hide();
+                $(".resetOne").show();
             },
             onClear: function (inst) {
+                localStorage.removeItem("export_endtime");
                 if ($("#starttime").val()==""){
                     $("#endtime").removeClass("timeSelect");
                     $("#starttime").removeClass("timeSelect");
                     $(".dateMake").css({"color":"#000"});
                     $(".chooseTime > i").css("color","#888");
+                    $(".chooseTime ul li").removeClass('active');
                     $(".chooseTime ul li:eq(0)").addClass('active');
                 }
             }
@@ -434,11 +471,15 @@
 				price="大于"+priceArr[0]+"万元"
 			}
             $("#price").text(price);
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         //区域
         if(localStorage.area!==undefined && localStorage.area!==""){
             var area = localStorage.area;
             $("#area").text(area);
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         //行业
         if(localStorage.industry!==undefined && localStorage.industry!==""){
@@ -453,6 +494,8 @@
                 arr.push(str)
             }
             $("#industry").text(arr.toString().replace(/,/g," "));
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         //关键词
         if(localStorage.keyWord!==undefined && localStorage.keyWord!==""){
@@ -460,24 +503,66 @@
             for(var i in keyWord){
                 $("#keyWord").append(keyWord[i].keyWord + " ");
             }
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         //信息类型
         if(localStorage.subType!==undefined && localStorage.subType!==""){
             var subType = localStorage.subType;
             $("#subType").text(subType);
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         if(localStorage.buyer!==undefined && localStorage.buyer!==""){
             var buyer = localStorage.buyer;
             var buyers = buyer.replace(/,/g," ");
             $("#buyer").text(buyers);
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         //中标单位
         if(localStorage.winner!==undefined && localStorage.winner!==""){
             var winner = localStorage.winner;
             var winners = winner.replace(/,/g," ");
             $("#winner").text(winners);
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
         //时间
+        if(localStorage.export_starttime!==undefined && localStorage.export_starttime!==""){
+            let start = new Date(Number(localStorage.export_starttime));
+            let starts = formatTime(start, 'Y/M/D').split("/");
+            let year = starts[0];
+            let mouth = starts[1];
+            let day = starts[2];
+            let startTimeVal = year+"年"+mouth+"月"+day+"日";
+            $("#starttime").attr("value",startTimeVal);
+            $("#starttime").val(startTimeVal);
+            //
+            $("#starttime").addClass("timeSelect");
+            $("#endtime").addClass("timeSelect");
+            $(".dateMake").css({"color":"#24C0D7"});
+            $(".chooseTime ul li").removeClass('active');
+            $(".confirm").hide();
+            $(".resetOne").show();
+        }
+        if(localStorage.export_endtime!==undefined && localStorage.export_endtime!==""){
+            let end = new Date(Number(localStorage.export_endtime));
+            let ends = formatTime(end, 'Y/M/D').split("/");
+            let year = ends[0];
+            let mouth = ends[1];
+            let day = ends[2];
+            let endTimeVal = year+"年"+mouth+"月"+day+"日";
+            $("#endtime").attr("value",endTimeVal);
+            $("#endtime").val(endTimeVal);
+            //
+            $("#starttime").addClass("timeSelect");
+            $("#endtime").addClass("timeSelect");
+            $(".dateMake").css({"color":"#24C0D7"});
+            $(".chooseTime ul li").removeClass('active');
+            $(".confirm").hide();
+            $(".resetOne").show();
+        }
         if(localStorage.date!==undefined && localStorage.date!==""){
             if(localStorage.index !== "-1"){
                 $(".chooseTime ul li.active").removeClass("active");
@@ -518,7 +603,8 @@
                     $(".chooseTime ul li").removeClass('active');
                 }
             }
-
+            $(".confirm").hide();
+            $(".resetOne").show();
         }
 
         //筛选条件发送
@@ -591,6 +677,41 @@
             })
         });
         //
+        $(".reset").on('click', function () {
+            localStorage.removeItem("date");
+            localStorage.removeItem("province");
+            localStorage.removeItem("city");
+            localStorage.removeItem("area");
+            localStorage.removeItem("industry");
+            localStorage.removeItem("keyWord");
+            localStorage.removeItem("price");
+            localStorage.removeItem("subType");
+            localStorage.removeItem("buyer");
+            localStorage.removeItem("winner");
+            localStorage.removeItem("export_starttime");
+            localStorage.removeItem("export_endtime");
+            //
+            $("#area").text("");
+            $("#industry").text("");
+            $("#keyWord").text("");
+            $("#price").text("");
+            $("#subType").text("");
+            $("#winner").text("");
+            $("#buyer").text("");
+            //
+            $(".chooseTime ul li").removeClass('active');
+            $(".chooseTime ul li:eq(0)").addClass('active');
+            //
+            $("#starttime").removeClass("timeSelect");
+            $("#endtime").removeClass("timeSelect");
+            $(".dateMake").css({"color":"#888"});
+            $("#starttime").val("");
+            $("#endtime").val("");
+            //
+            $(".confirm").show();
+            $(".resetOne").hide();
+        });
+        //
         function getDate() {
             var start;
             var end;

+ 20 - 11
src/jfw/modules/app/src/web/templates/dataExport/dataExport_appended.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}3">
     <script src="/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -46,9 +46,6 @@
         top: 18px;
         color: #444444;
     }
-    .text-overflow100 .weui-toast {
-        font-size: .1rem;
-    }
 </style>
 <body>
 <div class="app-layout-header">
@@ -138,7 +135,7 @@
                                 sessionStorage.removeItem("flag"); // 这里我做了清除sessionStorage的操作
 
                                 // 强行回退一步,就不用多点一次了😎
-                                history.go(-2); // 直接跳过没有哈希值的页面,就不会出现要点两次才能回到真正的上一页了
+                                history.go(-1); // 直接跳过没有哈希值的页面,就不会出现要点两次才能回到真正的上一页了
                             }
                         }
                     });
@@ -228,11 +225,13 @@
             function hasWords () {
                 var showKeyWordLength = $(".showKeyWord ul").find('li').length;
                 if(showKeyWordLength === 0){
-                    $(".addkeyWord").show();
+                    $(".enter.addkeyWord").show();
+                    $(".addKeyWord").hide();
                     $(".showKeyWord").hide();
                 } else {
-                    $(".addkeyWord").hide();
+                    $(".enter.addkeyWord").hide();
                     $(".showKeyWord").show();
+                    $(".addKeyWord").show();
                 }
             }
             hasWords();
@@ -247,7 +246,7 @@
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
                 if ($(this).val().length >= 100) {
-                    var s = $(this).val().slice(0,100);
+                    var s = $(this).val().slice(0,99);
                     $(this).val(s);
 
                     weui.toast('附加词不能超过100字', {
@@ -316,14 +315,14 @@
                 $('.showKeyWord > ul').prepend(html);
 
                 // 隐藏
-                $(".addkeyWord").hide();
-                $('.showKeyWord').show();
+                $(".enter.addkeyWord").hide();
+                $(".showKeyWord").show();
+                $(".addKeyWord").show();
                 $('.enter.addkeyWord > input').val('');
                 var buttonDOM = $('.enter.addkeyWord .btn button')[0];
                 buttonDOM.style.opacity = .5;
                 buttonDOM.setAttribute("disabled", true)
             });
-
             // 编辑
             $(".showKeyWord").on('click', '.editKeyWord',function(e){
                 $('.modify span').each(function(item){
@@ -363,6 +362,16 @@
                         }
                     });
                     return
+                }else if(appended.length >= 100){
+                    var s = $(this).siblings('span').text().slice(0,99);
+                    $(this).siblings('span').text(s);
+
+                    weui.toast('附加词不能超过100字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){ console.log('close') }
+                    });
+                    return
                 }else{
                     for(var i in appendedArr){
                         if(appendedArr[i] === appendeds){

+ 13 - 6
src/jfw/modules/app/src/web/templates/dataExport/dataExport_appendedInput.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}"2>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}6">
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -46,9 +46,6 @@
             top: 18px;
             color: #444444;
         }
-        .text-overflow100 .weui-toast {
-            font-size: .1rem;
-        }
     </style>
     <body>
     <div class="app-layout-header">
@@ -137,7 +134,7 @@
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
                 if ($(this).val().length >= 100) {
-                    var s = $(this).val().slice(0,100);
+                    var s = $(this).val().slice(0,99);
                     $(this).val(s);
 
                     weui.toast('附加词不能超过100字', {
@@ -164,6 +161,16 @@
                 if(appendedArr===undefined){
                     appendedArr = [];
                 }
+                for (var a in appendedArr){
+                    if (appended === appendedArr[a]){
+                        weui.toast('附加词重复了', {
+                            duration: 2000,
+                            className: 'text-overflow100',
+                            callback: function(){}
+                        });
+                        return
+                    }
+                }
                 appendedArr.push(appended);
                 for(var i in keyWordArr){
                     if(keyWordArr[i].keyWord === token){
@@ -202,7 +209,7 @@
                 // console.log(olength)
                 if(olength >= 100){
                     $('.fontLength').show();
-                    var s = $(this).text().slice(0,100);
+                    var s = $(this).text().slice(0,99);
                     $(this).text(s);
                     weui.toast('附加词不能超过100字', {
                         duration: 2000,

+ 25 - 17
src/jfw/modules/app/src/web/templates/dataExport/dataExport_area.html

@@ -11,7 +11,7 @@
 		<link rel="stylesheet" type="text/css" href="/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" type="text/css" href="/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}" />
 		<link rel="stylesheet" href="/jyapp/dataExport/css/public.css?v={{Msg "seo" "version"}}">
-		<link rel="stylesheet" href="/jyapp/dataExport/css/choose_area.css?v={{Msg "seo" "version"}}">
+		<link rel="stylesheet" href="/jyapp/dataExport/css/choose_area.css?v={{Msg "seo" "version"}}3">
 		<script src="/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
 		<script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
 		<link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -392,22 +392,22 @@
 				</li>
 				</ul>
 				<div class="slide">
-				<a href="#all">#</a>
-				<a href="#A">A</a>
-				<a href="#B">B</a>
-				<a href="#C">C</a>
-				<a href="#F">F</a>
-				<a href="#G">G</a>
-				<a href="#H">H</a>
-				<a href="#J">J</a>
-				<a href="#L">L</a>
-				<a href="#N">N</a>
-				<a href="#Q">Q</a>
-				<a href="#S">S</a>
-				<a href="#T">T</a>
-				<a href="#X">X</a>
-				<a href="#Y">Y</a>
-				<a href="#Z">Z</a>
+				<a href="javascript:;">#</a>
+				<a href="javascript:;">A</a>
+				<a href="javascript:;">B</a>
+				<a href="javascript:;">C</a>
+				<a href="javascript:;">F</a>
+				<a href="javascript:;">G</a>
+				<a href="javascript:;">H</a>
+				<a href="javascript:;">J</a>
+				<a href="javascript:;">L</a>
+				<a href="javascript:;">N</a>
+				<a href="javascript:;">Q</a>
+				<a href="javascript:;">S</a>
+				<a href="javascript:;">T</a>
+				<a href="javascript:;">X</a>
+				<a href="javascript:;">Y</a>
+				<a href="javascript:;">Z</a>
 				</div>
 				</div>
 				</div>
@@ -464,6 +464,14 @@
 				return tempHtml
 			}
 			 $(function(){
+				 $("body").on('click','.slide a',function(){
+					 var s = $(this).html();
+					 if(s === '#'){
+						 return;
+					 }
+					 document.querySelector('#' + s).scrollIntoView({block:'center'});
+				 });
+
 				 $(".select-area-box .tab:not(.municipality)").on('click',function(event){
 					 $(this).toggleClass('selected').next('.tab_content').slideDown(500);
 					 $(this).parent().siblings().children('.tab_content').slideUp(500);

+ 1 - 4
src/jfw/modules/app/src/web/templates/dataExport/dataExport_buyerEdit.html

@@ -52,9 +52,6 @@
 		/*top: 100%;*/
 		text-align: center;
 	}
-	.text-overflow100 .weui-toast {
-		font-size: .1rem;
-	}
 </style>
 
 <body>
@@ -85,7 +82,7 @@
 </div>
 <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/zepto.js"></script>
 <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/weui.min.js"></script>
-<script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/additionWord.js?v={{Msg "seo" "version"}}26"></script>
+<script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/additionWord.js?v={{Msg "seo" "version"}}31"></script>
 <script>
 	var buyerArr = [];
 	if(localStorage.buyer !== "" && localStorage.buyer !== undefined){

+ 13 - 6
src/jfw/modules/app/src/web/templates/dataExport/dataExport_buyerInput.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}2">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}3">
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -52,9 +52,6 @@
             top: 100%;
             text-align: center;
         }
-        .text-overflow100 .weui-toast {
-            font-size: .1rem;
-        }
     </style>
 
     <body>
@@ -125,6 +122,16 @@
         // 添加 按钮的点击事件
         $('.addkeyWord .btn .save-btn').on('click', function(){
             var keyWord = $('.addkeyWord input.enterOne').val();
+            for (var a in buyerArr){
+                if (keyWord === buyerArr[a]){
+                    weui.toast('采购单位重复了', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
+            }
             buyerArr.push(keyWord);
             localStorage.setItem("buyer", buyerArr);
             history.back();
@@ -141,9 +148,9 @@
             // console.log(olength)
             if(olength >= 100){
                 $('.fontLength').show();
-                var s = $(this).text().slice(0,100);
+                var s = $(this).text().slice(0,99);
                 $(this).text(s);
-                weui.toast('附加词不能超过100字', {
+                weui.toast('采购单位不能超过100字', {
                     duration: 2000,
                     className: 'text-overflow100',
                     callback: function(){ console.log('close') }

+ 20 - 11
src/jfw/modules/app/src/web/templates/dataExport/dataExport_exclude.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}3">
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -46,9 +46,6 @@
         top: 18px;
         color: #444444;
     }
-    .text-overflow100 .weui-toast {
-        font-size: .1rem;
-    }
 </style>
 <body>
 <div class="app-layout-header">
@@ -138,7 +135,7 @@
                                 sessionStorage.removeItem("flag"); // 这里我做了清除sessionStorage的操作
 
                                 // 强行回退一步,就不用多点一次了😎
-                                history.go(-2); // 直接跳过没有哈希值的页面,就不会出现要点两次才能回到真正的上一页了
+                                history.go(-1); // 直接跳过没有哈希值的页面,就不会出现要点两次才能回到真正的上一页了
                             }
                         }
                     });
@@ -228,11 +225,13 @@
             function hasWords () {
                 var showKeyWordLength = $(".showKeyWord ul").find('li').length;
                 if(showKeyWordLength === 0){
-                    $(".addkeyWord").show();
+                    $(".enter.addkeyWord").show();
+                    $(".addKeyWord").hide();
                     $(".showKeyWord").hide();
                 } else {
-                    $(".addkeyWord").hide();
+                    $(".enter.addkeyWord").hide();
                     $(".showKeyWord").show();
+                    $(".addKeyWord").show();
                 }
             }
             hasWords();
@@ -247,10 +246,10 @@
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
                 if ($(this).val().length >= 100) {
-                    var s = $(this).val().slice(0,100);
+                    var s = $(this).val().slice(0,99);
                     $(this).val(s);
 
-                    weui.toast('附加词不能超过100字', {
+                    weui.toast('排除词不能超过100字', {
                         duration: 2000,
                         className: 'text-overflow100',
                         callback: function(){ console.log('close') }
@@ -316,8 +315,9 @@
                 $('.showKeyWord > ul').prepend(html);
 
                 // 隐藏
-                $(".addkeyWord").hide();
-                $('.showKeyWord').show();
+                $(".enter.addkeyWord").hide();
+                $(".showKeyWord").show();
+                $(".addKeyWord").show();
                 $('.enter.addkeyWord > input').val('');
                 var buttonDOM = $('.enter.addkeyWord .btn button')[0];
                 buttonDOM.style.opacity = .5;
@@ -363,6 +363,15 @@
                         }
                     });
                     return
+                }else if($(this).parent().find("span").text().length >= 100){
+                    var s = $(this).parent().find("span").text().slice(0,99);
+                    $(this).parent().find("span").text(s);
+                    weui.toast('排除词不能超过100字', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
                 }else{
                     for(var i in excludeArr){
                         if(excludeArr[i] === excludes){

+ 13 - 6
src/jfw/modules/app/src/web/templates/dataExport/dataExport_excludeInput.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}"3>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}"4>
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -46,9 +46,6 @@
             top: 18px;
             color: #444444;
         }
-        .text-overflow100 .weui-toast {
-            font-size: .1rem;
-        }
     </style>
     <body>
     <div class="app-layout-header">
@@ -149,10 +146,10 @@
             // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
             $('.addkeyWord input.enterOne').on('input', function() {
                 if ($(this).val().length >= 100) {
-                    var s = $(this).val().slice(0,100);
+                    var s = $(this).val().slice(0,99);
                     $(this).val(s);
 
-                    weui.toast('附加词不能超过100字', {
+                    weui.toast('排除词不能超过100字', {
                         duration: 2000,
                         className: 'text-overflow100',
                         callback: function(){ console.log('close') }
@@ -176,6 +173,16 @@
                 if(excludeArr===undefined){
                     excludeArr = [];
                 }
+                for (var a in excludeArr){
+                    if (exclude === excludeArr[a]){
+                        weui.toast('采购单位重复了', {
+                            duration: 2000,
+                            className: 'text-overflow100',
+                            callback: function(){}
+                        });
+                        return
+                    }
+                }
                 excludeArr.push(exclude);
                 for(var i in keyWordArr){
                     if(keyWordArr[i].keyWord === token){

+ 3 - 2
src/jfw/modules/app/src/web/templates/dataExport/dataExport_industry.html

@@ -20,7 +20,7 @@
         body .industry .list ul li dd {
             background: #F4F4F9;
             display: inline-block;
-            width: 2.2rem;
+            width: 2.1rem;
             height: .7rem;
             border-radius: 3px;
             text-align: center;
@@ -154,7 +154,8 @@
                 <li>
                 <dl>
                 <dt>交通工程</dt>
-                <dd data-value="交通工程_道路轨道">道路轨道</dd>
+                <dd data-value="交通工程_道路">道路</dd>
+                <dd data-value="交通工程_轨道">轨道</dd>
                 <dd data-value="交通工程_桥梁">桥梁</dd>
                 <dd data-value="交通工程_隧道">隧道</dd>
                 <dd data-value="交通工程_其他">其他</dd>

+ 4 - 14
src/jfw/modules/app/src/web/templates/dataExport/dataExport_keyWord.html

@@ -9,19 +9,12 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}13">
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
 </head>
 <style>
-    .keyWord .addKeyWord {
-        width: 0;
-        left: 43%;
-        position: fixed;
-        bottom: 0.4rem;
-        text-align: center;
-    }
     .app-layout-header{
         line-height: 44px;
         background-color: #FFFFFF;
@@ -54,9 +47,6 @@
         top: 18px;
         color: #444444;
     }
-    .text-overflow100 .weui-toast {
-        font-size: .1rem;
-    }
     .addAdjunctWord{
         margin-top: 0!important;
         border-top: 1px solid #e0e0e0;
@@ -137,7 +127,7 @@
     </div>
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/zepto.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-    <script src="/jyapp/dataExport/js/keyWord.js?v={{Msg "seo" "version"}}23"></script>
+    <script src="/jyapp/dataExport/js/keyWord.js?v={{Msg "seo" "version"}}33"></script>
     <script>
         var keyWordArr = [];
         if(localStorage.keyWord !== "" && localStorage.keyWord !== undefined){
@@ -262,7 +252,7 @@
             buttonDOM.prop("disabled", true);
             var obj = [{"keyWord":keyWord}];
             sessionStorage.keyWord = JSON.stringify(obj);
-            window.location.href = "/jyapp/front/dataExport/appendedInput?keyWord="+keyWord;
+            window.location.href = "/jyapp/front/dataExport/appended?keyWord="+keyWord;
         });
         $(".exclude").on('click', function () {
             var keyWord = $(this).parent().prev().val();
@@ -270,7 +260,7 @@
             buttonDOM.prop("disabled", true);
             var obj = [{"keyWord":keyWord}];
             sessionStorage.keyWord = JSON.stringify(obj);
-            window.location.href = "/jyapp/front/dataExport/excludeInput?keyWord="+keyWord;
+            window.location.href = "/jyapp/front/dataExport/exclude?keyWord="+keyWord;
         });
         //
         $(".showKeyWord").on('click', '.addAdjunctWord',function(e){

+ 13 - 6
src/jfw/modules/app/src/web/templates/dataExport/dataExport_keyWordInput.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}2">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}3">
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -46,9 +46,6 @@
         top: 18px;
         color: #444444;
     }
-    .text-overflow100 .weui-toast {
-        font-size: .1rem;
-    }
 </style>
 <body>
 <div class="app-layout-header">
@@ -122,7 +119,7 @@
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function() {
             if ($(this).val().length >= 100) {
-                var s = $(this).val().slice(0,100)
+                var s = $(this).val().slice(0,99);
                 $(this).val(s)
 
                 weui.toast('关键词不能超过100字', {
@@ -153,6 +150,16 @@
         $('.addkeyWord .btn .save').on('click', function () {
             var keyWord = $('.addkeyWord input.enterOne').val();
             var Obj = {"keyWord": keyWord};
+            for (var a in keyWordArr){
+                if (keyWord === keyWordArr[a].keyWord){
+                    weui.toast('关键词重复了', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
+            }
             keyWordArr.push(Obj);
             localStorage.setItem("keyWord", JSON.stringify(keyWordArr));
             window.history.back();
@@ -173,7 +180,7 @@
             // console.log(olength)
             if(olength >= 100){
                 $('.fontLength').show();
-                var s = $(this).text().slice(0,100)
+                var s = $(this).text().slice(0,99)
                 $(this).text(s)
                 weui.toast('关键词不能超过100字', {
                     duration: 2000,

+ 21 - 12
src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerEdit.html

@@ -9,7 +9,7 @@
 	<link rel="stylesheet" href="/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
 	<link rel="stylesheet" href="/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
 	<link rel="stylesheet" href="/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-	<link rel="stylesheet" href="/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}">
+	<link rel="stylesheet" href="/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}3">
 	<script src="/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
 	<script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
 	<link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -52,9 +52,6 @@
 			/*top: 100%;*/
 			text-align: center;
 		}
-		.text-overflow100 .weui-toast {
-			font-size: .1rem;
-		}
 	</style>
 	<body>
 	<div class="app-layout-header">
@@ -83,8 +80,8 @@
 			</div>
 
 			</div>
-			<script src="/dataExport/js/zepto.js?v={{Msg "seo" "version"}}"></script>
-	<script src="/dataExport/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+			<script src="/jyapp/dataExport/js/zepto.js?v={{Msg "seo" "version"}}"></script>
+	<script src="/jyapp/dataExport/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
 	<script>
 		var winnerArr = [];
 		if(localStorage.winner !== "" && localStorage.winner !== undefined){
@@ -123,11 +120,13 @@
 			function hasWords () {
 				var showKeyWordLength = $(".showKeyWord ul").find('li').length;
 				if(showKeyWordLength === 0){
-					$(".addkeyWord").show();
+					$(".enter.addkeyWord").show();
+					$(".addKeyWord").hide();
 					$(".showKeyWord").hide();
 				} else {
-					$(".addkeyWord").hide();
+					$(".enter.addkeyWord").hide();
 					$(".showKeyWord").show();
+					$(".addKeyWord").show();
 				}
 			}
 			hasWords();
@@ -142,10 +141,10 @@
 			// 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
 			$('.addkeyWord input.enterOne').on('input', function() {
 				if ($(this).val().length >= 100) {
-					var s = $(this).val().slice(0,100);
+					var s = $(this).val().slice(0,99);
 					$(this).val(s);
 
-					weui.toast('附加词不能超过100字', {
+					weui.toast('中标单位不能超过100字', {
 						duration: 2000,
 						className: 'text-overflow100',
 						callback: function(){ console.log('close') }
@@ -186,8 +185,9 @@
 				$('.showKeyWord > ul').prepend(html);
 
 				// 隐藏
-				$(".addkeyWord").hide();
-				$('.showKeyWord').show();
+				$(".enter.addkeyWord").hide();
+				$(".showKeyWord").show();
+				$(".addKeyWord").show();
 				$('.enter.addkeyWord > input').val('');
 				var buttonDOM = $('.enter.addkeyWord .btn button')[0];
 				buttonDOM.style.opacity = .5;
@@ -228,6 +228,15 @@
 						}
 					});
 					return
+				}else if($(this).parent().find("span").text().length >= 100){
+					var s = $(this).parent().find("span").text().slice(0,99);
+					$(this).parent().find("span").text(s);
+					weui.toast('中标单位不能超过100字', {
+						duration: 2000,
+						className: 'text-overflow100',
+						callback: function(){}
+					});
+					return
 				}else{
 					for(var i in winnerArr){
 						if(winnerArr[i] === winner){

+ 13 - 6
src/jfw/modules/app/src/web/templates/dataExport/dataExport_winnerInput.html

@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/base.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}3">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/jyapp/dataExport/css/keyWord.css?v={{Msg "seo" "version"}}4">
     <script src="{{Msg "seo" "cdn"}}/jyapp/dataExport/js/rem.js?v={{Msg "seo" "version"}}"></script>
     <script src="{{Msg "seo" "cdn"}}/jyapp/js/jquery.js"></script>
     <link rel="stylesheet" type="text/css" href="/jyapp/css/font.css?v={{Msg "seo" "version"}}" />
@@ -52,9 +52,6 @@
             top: 100%;
             text-align: center;
         }
-        .text-overflow100 .weui-toast {
-            font-size: .1rem;
-        }
     </style>
     <body>
 
@@ -103,10 +100,10 @@
         // 添加keyWords检查输入框内是否有文字,如果有才能点击添加按钮
         $('.addkeyWord input.enterOne').on('input', function() {
             if ($(this).val().length >= 100) {
-                var s = $(this).val().slice(0,100);
+                var s = $(this).val().slice(0,99);
                 $(this).val(s);
 
-                weui.toast('附加词不能超过100字', {
+                weui.toast('中标单位不能超过100字', {
                     duration: 2000,
                     className: 'text-overflow100',
                     callback: function(){ console.log('close') }
@@ -127,6 +124,16 @@
         // 添加 按钮的点击事件
         $('.addkeyWord .btn .save-btn').on('click', function(){
             var keyWord = $('.addkeyWord input.enterOne').val();
+            for (var a in winnerArr){
+                if (keyWord === winnerArr[a]){
+                    weui.toast('中标单位重复了', {
+                        duration: 2000,
+                        className: 'text-overflow100',
+                        callback: function(){}
+                    });
+                    return
+                }
+            }
             winnerArr.push(keyWord);
             localStorage.setItem("winner", winnerArr);
             history.back();

+ 3 - 23
src/jfw/modules/app/src/web/templates/followent/set.html

@@ -26,7 +26,6 @@ if(sessionStorage){
 	var winner = {{.T.winner}}; //企业名称
 	var id = {{.T.s_id}}; //企业id 
 	var follow = {{.T.follow}};   
-	var zbadd = {{Msg "seo" "ZBADDRESS"}};
 	var isOld = 0; 
 	///////////////////////
 	function afterJyObjInit(){
@@ -186,37 +185,18 @@ function isVisited(sid){
 }
 function beforeRedirect(obj,sid,link,isOld){
 	if($(obj).hasClass("visited")){
-		if(isOld){
-			myRedirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}else{
-			newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}
+		newredirect("",link,sid);
 		return;
 	}
 	var _id = {{.T._id}}
 	$(obj).addClass("visited");
 	if(typeof(sid) != "undefined" && sid != null && sid != "" && typeof(_id) != "undefined" && _id != null && _id != ""){
 		$.post("/jyapp/followent/notice/visited",{id:_id,sid:sid},function(r){
-			if(isOld){
-				myRedirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-			}else{
-				newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-			}	
+			newredirect("",link,sid);	
 		});
 	}else{
-		if(isOld){
-			myRedirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}else{
-			newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}
-	}
-}
-function myRedirect(zbadd,link,sid){
-	link = link.replace(/\n/g,"");
-	if(!/^http/.test(link)){
-		link="http://"+link
+		newredirect("",link,sid);
 	}
-	window.location.href="/";
 }
 </script>
 </head>

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

@@ -92,7 +92,7 @@
 			<img class="jyicon" src="/jyapp/images/jyicon_new.png"/>
 		{{end}}
 		<div class="download">
-			<a href="/front/downloadJyApp?page=app_download&source={{.T.source}}&code={{.T.code}}" id="download">立即下载App</a>
+			<a href="{{Msg "seo" "jyDomain"}}/front/downloadJyApp?page=app_download&source={{.T.source}}&code={{.T.code}}" id="download">立即下载App</a>
 		</div>
 	</body>
 	<script type="text/javascript">

+ 17 - 3
src/jfw/modules/app/src/web/templates/me/index.html

@@ -154,7 +154,17 @@
 			<i class="jyapp-icon jyapp-icon-youjiantou"> </i>
 		</div>
 		<!--通知end-->
-		
+		<!--我的订单-->
+		{{if .T.pullnew}}
+		<div class="notice pullnew" id="pullnew">
+			<img src="/jyapp/active/pullnew/images/pullnew.png">
+			<a>
+				<strong>邀请活动</strong>
+				<i src="/jyapp/active/pullnew/pullnew.png">资料包限时免费领</i>
+			</a>
+			<i class="jyapp-icon jyapp-icon-youjiantou"> </i>
+		</div>
+		{{end}}
 		<!--我的订单-->
 		<div class="order">
 			<ul>
@@ -166,8 +176,6 @@
 				</li>			
 			</ul>
 		</div>
-		<!--我的订单-->
-
 		<!--我的关注start-->
 		<div class="follow">
 			<ul>
@@ -274,6 +282,12 @@
 			setLiActive(this);
 			autoLogin('/jyapp/free/notice');
 		});
+		{{if .T.pullnew}}
+		$("#pullnew").click(function(){
+			setLiActive(this);
+			autoLogin('/jyapp/active/pullnew/index');
+		});
+		{{end}}
 		$(".install").click(function(){
 			//setTimeout(function(){
 			//	JyObj.backUrl("H");

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

@@ -286,7 +286,7 @@
 		function loginByWeixinCallBack222(){
 			//var wxSign = "D00THAAVRlVFXBkKUlRUQQMHBwFGWUNXSVZdQFRbHQtSVEcbUWhUdEQFEwsjTHliRFswBAcIXBFVZAVXPyZITElWQFlVF05NQVlUTQUGV1RMDkgPVRAHVVIBEU1cTBYdVV4TD1YNEl5VEVcBVABFWhILBBcHVgkEElkRWlxCBVQAABBbRExJVkZJQVBWVUAT";
 			var wxSign="D00THAAVRlVFXBkKUlRUQQQEBwdGXUJeSVZdQFRbHQtSVEdWHhJERhEdGQpHThAFVQQWXUUPAxIGVQUMTF4RCF0QVABTV01NXEwXHVYSCxdFXEBYUBJUUQVQQF4VDFBEC1MBF1hNAwcCGhAKE1ZFVxINBEcBUlIAElgUWwQQUVJVBUNYFgtUF1AJUFYRTVxMEQ1CVRMPRhI=";
-      $.ajax({
+      		$.ajax({
 				url: "/jyapp/free/login",
 				type: "post",
 				data: {reqType:"signLogin",sign:wxSign},

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

@@ -164,7 +164,7 @@
 			if(shareType == 3){
 				title = getShareText();
 			}
-			JyObj.share(shareType,title,content,"{{Msg "seo" "ZBADDRESS"}}/swordfish/about?source=app_setshare");
+			JyObj.share(shareType,title,content,"{{Msg "seo" "jyDomain"}}/swordfish/about?source=app_setshare");
 		});
 		$(".quit").click(function(){
 			setLiActive(this);

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

@@ -351,7 +351,7 @@ $(function(){
 		if(shareType == 3){
 			title = getShareText();
 		}
-		JyObj.share(shareType,title,content,"{{Msg "seo" "ZBADDRESS"}}/swordfish/about?source=app_aboutshare");
+		JyObj.share(shareType,title,content,"{{Msg "seo" "jyDomain"}}/swordfish/about?source=app_aboutshare");
 	});
 	////////柱状图自适应
 	var originalWidth = 320;

+ 2 - 2
src/jfw/modules/app/src/web/templates/weixin/follow/notice.html

@@ -123,14 +123,14 @@ function isVisited(sid){
 }
 function beforeRedirect(obj,sid,link,isOld){
 	if($(obj).hasClass("visited")){
-		newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
+		newredirect("",link,sid);
 		return;
 	}
 	var id = {{.T.id}};
 	var followId = {{.T.followId}};
 	$(obj).addClass("visited");
 	$.post("/jyapp/follow/notice/visited",{followId:followId,id:id,sid:sid,type:2},function(r){
-		newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
+		newredirect("",link,sid);
 	});
 }
 </script>

+ 3 - 22
src/jfw/modules/app/src/web/templates/weixin/follow/set.html

@@ -457,28 +457,16 @@ function isVisited(sid){
 }
 function beforeRedirect(obj,sid,link,isOld){
 	if($(obj).hasClass("visited")){
-		if(isOld){
-			myRedirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}else{
-			newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}
+		newredirect("",link,sid);
 		return;
 	}
 	$(obj).addClass("visited");
 	if(typeof(sid) != "undefined" && sid != null && sid != "" && _id != ""){
 		$.post("/jyapp/follow/notice/visited",{id:_id,sid:sid,type:1},function(r){
-			if(isOld){
-				myRedirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-			}else{
-				newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-			}
+			newredirect("",link,sid);
 		});
 	}else{
-		if(isOld){
-			myRedirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}else{
-			newredirect({{Msg "seo" "ZBADDRESS"}},link,sid);
-		}
+		newredirect("",link,sid);
 	}
 }
 function afterRemindtimeSelect(date){
@@ -539,13 +527,6 @@ function followSave(flag){
 		}
 	});
 }
-function myRedirect(zbadd,link,sid){
-	link = link.replace(/\n/g,"");
-	if(!/^http/.test(link)){
-		link="http://"+link
-	}
-	window.location.href="/";
-}
 //是否关注
 function isFollow(){
 	$.ajax({

+ 0 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-cjss.html

@@ -121,7 +121,6 @@
         var userId = {{session "userId"}};
         var support = "";
 		var thistype = "cjss";
-		var ZBADDRESS = {{Msg "seo" "ZBADDRESS"}};
 		var nickname = ""
 		if({{session "i_type"}} == 2){
 			nickname = {{session "s_nickname"}};	

+ 0 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-gzqy.html

@@ -120,7 +120,6 @@
         var userId = {{session "userId"}};
         var support = "";
 		var thistype = "gzqy";
-		var ZBADDRESS = {{Msg "seo" "ZBADDRESS"}};
 		var nickname = ""
 		if({{session "i_type"}} == 2){
 			nickname = {{session "s_nickname"}};	

+ 0 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-sjdc.html

@@ -119,7 +119,6 @@
         var userId = {{session "userId"}};
         var support = "";
 		var thistype = "sjdc";
-		var ZBADDRESS = {{Msg "seo" "ZBADDRESS"}};
 		var nickname = ""
 		if({{session "i_type"}} == 2){
 			nickname = {{session "s_nickname"}};	

+ 0 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zbqy.html

@@ -101,7 +101,6 @@
         var userId = {{session "userId"}};
         var support = "";
 		var thistype = "zbqy";
-		var ZBADDRESS = {{Msg "seo" "ZBADDRESS"}};
 		var nickname = ""
 		if({{session "i_type"}} == 2){
 			nickname = {{session "s_nickname"}};	

+ 0 - 1
src/jfw/modules/app/src/web/templates/weixin/jylab/lab-zndy.html

@@ -121,7 +121,6 @@
 		var userId = {{session "userId"}};
 		var support = "";
 		var thistype = "zndy";
-		var ZBADDRESS = {{Msg "seo" "ZBADDRESS"}};
 		var nickname = ""
 		if({{session "i_type"}} == 2){
 			nickname = {{session "s_nickname"}};	

+ 2 - 2
src/jfw/modules/app/src/web/templates/weixin/messagedetail.html

@@ -176,13 +176,13 @@ function execShare(thisIndex){
 	content += "向您推荐了剑鱼标讯";
 	var link = window.location.href;
 	//if(shareType != 2){
-		link = window.location.href.replace("/jyapp/","/").replace("res.","");
+		link = window.location.href.replace(myDomain()+"/jyapp/","{{Msg "seo" "jyDomain"}}/");
 		if(link.indexOf("?") == -1){
 			link += "?";
 		}else{
 			link += "&";
 		}
-		link += "source=app_infocontentshare";
+		link += "source=app_messagedetailshare";
 	//}
 	JyObj.share(shareType,{{.T.data.s_title}},content,link);
 }

+ 2 - 2
src/jfw/modules/app/src/web/templates/weixin/privacy.html

@@ -176,13 +176,13 @@ function execShare(thisIndex){
 	content += "向您推荐了剑鱼标讯";
 	var link = window.location.href;
 	if(shareType != 2){
-		link = window.location.href.replace("/jyapp/","/");
+		link = window.location.href.replace(myDomain()+"/jyapp/","{{Msg "seo" "jyDomain"}}/");
 		if(link.indexOf("?") == -1){
 			link += "?";
 		}else{
 			link += "&";
 		}
-		link += "source=app_infocontentshare";
+		link += "source=app_privacyshare";
 	}
 	JyObj.share(shareType,{{.T.data.s_title}},content,link);
 }

+ 2 - 3
src/jfw/modules/app/src/web/templates/weixin/resultpreview.html

@@ -9,7 +9,6 @@
 <script src="/jyapp/js/dropload.js?v={{Msg "seo" "version"}}"></script>
 <script src="/jyapp/js/fastclick.js?v={{Msg "seo" "version"}}"></script>
 <script>
-var zbadd = {{Msg "seo" "ZBADDRESS"}};
 var a_key = {{.T.a_key}};
 var keys = [];
 var sds = "";
@@ -26,7 +25,7 @@ if(a_key){
 }
 var firstPage = {{.T.firstPage}};
 if(firstPage != null && firstPage.length == 1){
-	newredirect(zbadd,firstPage[0].href,firstPage[0]._id,sds);
+	newredirect("",firstPage[0].href,firstPage[0]._id,sds);
 }else{
 	var scrollTop = 0;
 	var pageNum = 2;
@@ -423,7 +422,7 @@ if(firstPage != null && firstPage.length == 1){
 			sessionStorage.resultpreviewTableCache = tableCache;
 			sessionStorage.resultpreviewNoMoreCache = noMore;
 		}
-		newredirect(zbadd,h,eid,sds);
+		newredirect("",h,eid,sds);
 	}
 }
 </script>

+ 39 - 53
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -27,7 +27,6 @@
 	var userId = {{session "userId"}};
 	var pageSize = {{.T.pageSize}};
 	var encode = {{ConEncode "/jyapp/jylab/mainSearch/"}};
-	SuperSearch.ZBADDRESS = {{Msg "seo" "ZBADDRESS"}};
 	SuperSearch.industry = {{.T.industry}};
 	SuperSearch.sortArray = {{.T.sortArray}};
     // 动画隐藏tab栏
@@ -196,6 +195,14 @@
 					<div>导出任意条件的招标数据,按条数付费</div>
 				</a>
 			</li>
+			{{if .T.pullnew}}
+			<li>
+				<a>
+					<div>邀请活动</div>
+					<div>资料包限时免费领</div>
+				</a>
+			</li>
+			{{end}}
 		</ul>
 	</section>
 </section>
@@ -212,8 +219,8 @@
 	<div class="app-layout-content-b">
 		<form class="wxhead" action="">
 			<div class="searchhead">
-				<input class="form-control searchinput" name="super_searchinput" maxlength ="50"  placeholder="示例:税务局 软件"/>
-        <div class="inputDiv hidden">
+				<input class="form-control searchinput" name="super_searchinput" maxlength="50"  placeholder="示例:税务局 软件"/>
+        		<div class="inputDiv hidden">
 					<div class="inpTitle_history"><img src="/jyapp/images/search/history.png"><span>历史搜索</span><img id="del_history" src="/jyapp/images/search/history_clean.png"></div>
 					<div>
 						<ul class="history"></ul>
@@ -497,12 +504,9 @@
 	                </div>
 					<div class="TableTip" id="TableTip" style="display:none;"><img class="tableclose" src="/jyapp/images/table_close.png"><div class="TableText">推荐使用电脑浏览器访问剑鱼标讯网站<br>jianyu360.com查看数据表格,体验更佳。</div></div>
 				</div>
-        <div class="shade_table">
-        <div class="more">
-          查看更多
-        </div>
-      </div>
-				
+		        <div class="shade_table">
+		        	<div class="more">查看更多</div>
+		      	</div>
 			</div>
 		</div>
 		<div id="working" class="hidden" style="text-align: center;position: absolute;top: 50%;left: 50%;margin-left: -81px;margin-top: -50px;"><img style="width:163px;" src="/jyapp/images/wx/working.gif"><div style="font-size:16px;">剑鱼标讯正在努力工作中···</div></div>
@@ -723,8 +727,6 @@
 	</div>
 </section>
 <!--{{include "/common/footer.html"}}-->
-
-
 {{$s:=(Ad "jyapp-wxsearch-middle" -1)}}
 {{if $s}}
 <div id="advertscript" class="hidden">
@@ -736,58 +738,26 @@
 	+"<img src=\"/jyapp/images/wxqc.png\" class=\"closeadv\" onclick=\"SuperSearch.closeadv(this)\">";
 	if(AD.s_pic){
 		if(AD.s_link){
-			//if (AD.s_link.indexOf("w2b")>-1||AD.s_link.indexOf("jianyu360")>-1){
-			//	var arrUrl = AD.s_link.split("//");
-			//	var start = arrUrl[1].indexOf("/");
-			//	var advurl = arrUrl[1].substring(start);
-			//	AD.s_link={{Msg "seo" "ZBADDRESS"}}+advurl;
-			//}
 			var ADtitle = "";
 			if(AD.o_extend.title!=undefined){
 				ADtitle=AD.o_extend.title;
 			}
-			/*if(AD.o_extend.linktype=="within"){
-				ADHtml+="<a href='"+AD.s_link+"'><img src='"+AD.s_pic+"'/></a>"
-			}else if(AD.o_extend.linktype=="abroad"){
-				ADHtml+="<a href=\"javascript:JyObj.openExternalLink('"+AD.s_link+"','"+ADtitle+"')\"><img src='"+AD.s_pic+"'/></a>"
-			}*/
-      
-      if(AD.o_extend.linktype=="within"){
-        ADHtml+="<a onclick=\"AdClick(this,"+false+",'"+AD.s_link+"')\"><img src='"+AD.s_pic+"'/></a>"
-      }else{
-        ADHtml+="<a onclick=\"AdClick(this,"+true+",'"+AD.s_link+"','"+ADtitle+"')\"><img src='"+AD.s_pic+"'/></a>"
-      }
+	      	if(AD.o_extend.linktype=="within"){
+	        	ADHtml+="<a onclick=\"AdClick(this,"+false+",'"+AD.s_link+"')\"><img src='"+AD.s_pic+"'/></a>"
+	      	}else{
+	        	ADHtml+="<a onclick=\"AdClick(this,"+true+",'"+AD.s_link+"','"+ADtitle+"')\"><img src='"+AD.s_pic+"'/></a>"
+	      	}
 		}else{
 			ADHtml+="<img src='"+AD.s_pic+"'/>"
 		}	
 	}else{
 		ADHtml+=AD.s_script
 	}
-  $("#advertscript").html(ADHtml);
+  	$("#advertscript").html(ADHtml);
 </script>
 </div>
 {{end}}
 <script type="text/javascript">
-  function AdClick(e,isExternal,link,title){
-     //不登录点击广告位跳转登录页面
-    if(!userId){
-  		window.location.href = "/jyapp/free/login?to=back";
-  		return;
-  	}
-	//百度统计
-	var ce = $(e).parent();
-	adv_statistics(ce);
-    if(isExternal){
-      if(!title){
-        title="剑鱼标讯"
-      }
-      //清除页面数据
-      SuperSearch.clearSessionStorage();
-      JyObj.openExternalLink(link,title)
-    }else{
-      window.location.href = link;
-    }
-  }
 	if(sessionStorage.onceTipUpdate != "1"){
 		localStorage.removeItem("onceTipUpdate");
 	}
@@ -932,10 +902,26 @@
 		EntSearch.inputBlur();
 		JyObj.hiddenBottom("1");
 	}
-  $("#wrapper .more").on("click",function(){
-    	var href=window.location.protocol+"//"+window.location.host+"/sjdc/index.html"
-	    JyObj.openExternalLink(href,"");
-  })
+	function AdClick(e,isExternal,link,title){
+	    //不登录点击广告位跳转登录页面
+	    if(!userId){
+	  		window.location.href = "/jyapp/free/login?to=back";
+	  		return;
+	  	}
+		//百度统计
+		var ce = $(e).parent();
+		adv_statistics(ce);
+	    if(isExternal){
+	      	if(!title){
+	        	title="剑鱼标讯"
+	      	}
+		    //清除页面数据
+		    SuperSearch.clearSessionStorage();
+		    JyObj.openExternalLink(link,title)
+	    }else{
+	      	window.location.href = link;
+	    }
+  	}
 </script>
 <!--百度统计end-->
 {{include "/common/baiducc.html"}}

+ 2 - 8
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -725,12 +725,6 @@ pre {
 					var ADHtml="";
 					if(AD.s_pic){
 						if(AD.s_link){
-							//if (AD.s_link.indexOf("w2b")>-1||AD.s_link.indexOf("jianyu360")>-1){
-							//	var arrUrl = AD.s_link.split("//");
-							//	var start = arrUrl[1].indexOf("/");
-							//	var advurl = arrUrl[1].substring(start);
-							//	AD.s_link={{Msg "seo" "ZBADDRESS"}}+advurl;
-							//}
 							var ADtitle = "";
 							if(AD.o_extend.title!=undefined){
 								ADtitle=AD.o_extend.title;
@@ -799,12 +793,12 @@ function execShare(thisIndex){
 		content += {{session "s_nickname"}};	
 	}
 	content += "向您推荐了剑鱼标讯";
-	var link = "{{Msg "seo" "ZBADDRESS"}}/swordfish/about?source=app_infocontentshare";
+	var link = "{{Msg "seo" "jyDomain"}}/swordfish/about?source=app_infocontentshare";
 	var shareTitle = {{.T.obj.title}};
 	shareTitle=shareTitle.replace(/<\/?.+?>/g,"");
  	shareTitle=shareTitle.replace(/ /g,"");
 	if(shareType == 1){
-		link = window.location.href.replace("/jyapp/","/");
+		link = window.location.href.replace(myDomain()+"/jyapp/","{{Msg "seo" "jyDomain"}}/");
 		if(link.indexOf("?") == -1){
 			link += "?";
 		}else{

+ 3 - 14
src/jfw/modules/app/src/web/templates/weixin/wxpush.html

@@ -54,7 +54,6 @@ if(sessionStorage){
 	sessionStorage.version="1"
 }
 var b_view = "{{.T.view}}";
-var zbadd = {{Msg "seo" "ZBADDRESS"}}
 var sds = "";
 var o_pushinfo={{.T.data.o_pushinfo}};
 var s_content={{.T.data.s_content}};
@@ -349,11 +348,7 @@ $(function(){
 				var h=$(this).attr("s");
 				var sid=$(this).attr("sid");
 				var eid=$(this).attr("eid");
-				//if(eid){
-					newredirect(zbadd,h,eid,sds);
-				//}else{
-					//redirect(zbadd,h,sid,sds);
-				//}
+				newredirect("",h,eid,sds);
 				return false;
 			})
 		},800);
@@ -397,7 +392,7 @@ function toShare(){
         removeMask();
     },3000);
     var shareTitle = getShareText();
-    var link = "{{Msg "seo" "ZBADDRESS"}}/swordfish/about?source=app_pushshare&qrcodeType=app_push_timeline_b";
+    var link = "{{Msg "seo" "jyDomain"}}/swordfish/about?source=app_pushshare&qrcodeType=app_push_timeline_b";
     JyObj.share(3,shareTitle,"",link);
 }
 //
@@ -408,7 +403,7 @@ function tablejump(eid,href){
 				sessionStorage.setItem("listortable"+{{.T._id}},"T");
 			}
 		}
-		newredirect(zbadd,href,eid,sds);
+		newredirect("",href,eid,sds);
 	}
 }
 
@@ -707,12 +702,6 @@ a{
 				var ADHtml="";
 				if(AD.s_pic){
 					if(AD.s_link){
-						//if (AD.s_link.indexOf("w2b")>-1||AD.s_link.indexOf("jianyu360")>-1){
-						//	var arrUrl = AD.s_link.split("//");
-						//	var start = arrUrl[1].indexOf("/");
-						//	var advurl = arrUrl[1].substring(start);
-						//	AD.s_link={{Msg "seo" "ZBADDRESS"}}+advurl;
-						//}
 						var ADtitle = "";
 						if(AD.o_extend.title!=undefined){
 							ADtitle=AD.o_extend.title;

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

@@ -3,7 +3,6 @@
 <title>招标订阅向导</title>
 {{include "/common/meta.html"}}
 <script>
-var tsadd = {{Msg "seo" "ZBADDRESS"}}
 var isBodyShow = true;
 if(localStorage && localStorage.tsGuide_status == "1"){
 	isBodyShow = false;

+ 8 - 7
src/jfw/modules/pushent/src/config.json

@@ -10,14 +10,13 @@
     },
     "durationMinutes": "30",
     "elasticPoolSize": 30,
-    "elasticsearch": "http://192.168.3.18:9800",
-    "lastid": "596f20265d11e1c7455dc5bc",
-    "maxSearch": 10000,
+    "elasticsearch": "http://192.168.3.128:9800",
+    "lastid": "",
+    "maxSearch": 40000,
     "mongodbName": "qfw",
     "mongodbPoolSize": "20",
-    "mongodbServers": "192.168.3.18:27080",
-    "redisServers": "sso=192.168.3.18:2379,other=192.168.3.18:2379,push=192.168.3.18:2379",
-    "rpcPort": "8759",
+    "mongodbServers": "192.168.3.128:27080",
+    "redisServers": "sso=192.168.3.128:3379,other=192.168.3.128:3379,push=192.168.3.128:3379",
     "viewDomain": "https://web-jydev-wcj.jianyu360.cn",
     "weixinRpcServer": "127.0.0.1:8083",
     "wxcolor": "#25c78c",
@@ -26,5 +25,7 @@
     "wxtitle": "您关注的企业“%s”有新的公告信息!如果不想继续收到此类信息,可进入发现-我关注的企业进行取消。",
 	"wxdetailcolor":"#686868",
 	"appPushServiceRpc":"127.0.0.1:5566",
-	"testids":["5cb7e94c25ef871e6463e074"]
+	"testids":[],
+	"pushPool": 30,
+	"eachPool": 30
 }

+ 0 - 18
src/jfw/modules/pushent/src/followpush/followpush_test.go

@@ -1,18 +0,0 @@
-package followpush
-
-import (
-	"log"
-	"testing"
-	"time"
-)
-
-func Test_updateSetting(t *testing.T) {
-	UpdateUserSetting()
-	for k, v := range Setting {
-		for _, vv := range *v {
-			log.Println(k, (*vv)["s_openid"])
-		}
-	}
-	Job()
-	time.Sleep(100 * time.Second)
-}

+ 213 - 279
src/jfw/modules/pushent/src/followpush/push.go

@@ -34,11 +34,10 @@ var (
 	DB                = "bidding"
 	KEEPCOUNT         = 100
 	MaxSearch         = 10000 //缓存中总共加载这么多条
-	searchpool        = make(chan bool, 8)
-	pushpool          = make(chan bool, 50)
-	findpool          = make(chan bool, 10)
-	eachpool          = make(chan bool, 100)
-	Pushlock          = sync.Mutex{}
+	PushPool          chan bool
+	EachPool          chan bool
+	lock              = &sync.Mutex{}
+	pushWaitGroup     = &sync.WaitGroup{}
 	searchWaitGroup   = &sync.WaitGroup{}
 	eachInfoWaitGroup = &sync.WaitGroup{}
 	Mongodb_ShowField = `{"_id":1,"title":1,"publishtime":1,"area":1,"type":1,"toptype":1,"subtype":1,"winner":1,"s_winner":1,"href":1,"infoformat":1,"s_subscopeclass":1}`
@@ -48,7 +47,6 @@ type PushUser struct {
 	Id      string
 	UserId  string
 	EntName string
-	Title   string
 }
 
 //开始推送
@@ -89,6 +87,7 @@ func pushByEs(_id string, lastTime int64) bool {
 		"_id":        1,
 	}).Iter()
 	users := []*PushUser{}
+	user_index := 0
 	for tmp := make(map[string]interface{}); cur.Next(tmp); {
 		entname := util.ObjToString(tmp["s_entname"])
 		userid := util.ObjToString(tmp["s_userid"])
@@ -98,11 +97,15 @@ func pushByEs(_id string, lastTime int64) bool {
 		users = append(users, &PushUser{
 			UserId:  userid,
 			Id:      util.BsonIdToSId(tmp["_id"]),
-			Title:   util.ObjToString(tmp["s_title"]),
 			EntName: entname,
 		})
 		tmp = make(map[string]interface{})
+		user_index++
+		if user_index%500 == 0 {
+			log.Println("加载用户:", user_index)
+		}
 	}
+	log.Println("加载用户完成", user_index)
 	if len(users) == 0 {
 		log.Println("未查找到需要推送的用户...")
 		return false
@@ -116,14 +119,17 @@ func pushByEs(_id string, lastTime int64) bool {
 	userMap := EachAllBidInfo(&users, res)
 	//遍历用户,推送
 	for k, v := range *userMap {
-		pushpool <- true
-		func(tmp *[]map[string]interface{}) {
+		PushPool <- true
+		pushWaitGroup.Add(1)
+		go func(pushUser *PushUser, tmp *[]map[string]interface{}) {
 			defer func() {
-				<-pushpool
+				<-PushPool
+				pushWaitGroup.Done()
 			}()
-			push(k.Id, k.EntName, k.Title, k.UserId, v)
-		}(v)
+			push(pushUser.Id, pushUser.EntName, pushUser.UserId, tmp)
+		}(k, v)
 	}
+	pushWaitGroup.Wait()
 	Sysconfig["StartTime"] = util.FormatDateWithObj(&comeintime, util.Date_Full_Layout)
 	Sysconfig["lastid"] = lastid
 	log.Println("push-over", lastid, comeintime)
@@ -134,45 +140,42 @@ func pushByEs(_id string, lastTime int64) bool {
 func EachAllBidInfo(users *[]*PushUser, res *[]map[string]interface{}) *map[*PushUser]*[]map[string]interface{} {
 	var count int
 	userMap := map[*PushUser]*[]map[string]interface{}{}
-	for _, v := range *res {
-		eachpool <- true
+	for _, u := range *users {
+		EachPool <- true
 		eachInfoWaitGroup.Add(1)
 		count++
-		func(tmp map[string]interface{}) {
+		go func(user *PushUser) {
 			defer func() {
 				eachInfoWaitGroup.Done()
-				<-eachpool
+				<-EachPool
 			}()
-			for _, user := range *users {
-				isContinue := true
-				for _, winner := range strings.Split(util.ObjToString(tmp["s_winner"]), ",") {
+			for _, v := range *res {
+				for _, winner := range strings.Split(util.ObjToString(v["s_winner"]), ",") {
 					if winner == "" {
 						continue
 					}
 					if winner == user.EntName {
-						isContinue = false
+						lock.Lock()
+						s := userMap[user]
+						if s == nil {
+							s = &[]map[string]interface{}{}
+							userMap[user] = s
+						}
+						if len(*s) < 50 {
+							*s = append(*s, v)
+						}
+						lock.Unlock()
+						break
 					}
 				}
-				if isContinue {
-					continue
-				}
-				s := userMap[user]
-				if s == nil {
-					s = &[]map[string]interface{}{}
-					userMap[user] = s
-				}
-				*s = append(*s, tmp)
-				if len(*s) >= 50 {
-					break
-				}
 			}
-		}(v)
+		}(u)
 		if count%500 == 0 {
-			log.Println("当前信息索引:", count)
+			log.Println("当前匹配:", count)
 		}
 	}
 	eachInfoWaitGroup.Wait()
-	log.Println("数据遍历完成!")
+	log.Println("匹配结束", count)
 	return &userMap
 }
 
@@ -222,266 +225,197 @@ func InitBiddingCache(_id, lastid string, lastTime int64) (bool, *[]map[string]i
 			break
 		}
 	}
-	log.Println(count, "条数据已经加载完成!")
+	log.Println("数据加载结束", count)
 	return true, &res
 }
 
-/*func InitBiddingCache(_id, lastid string, lastTime int64) (bool, *[]map[string]interface{}) {
+//开始推送
+func push(fid, sname, userId string, res *[]map[string]interface{}) {
 	defer util.Catch()
-	//filter全局查询
-	c_query := fmt.Sprintf(FilterQuery, fmt.Sprintf(IDRange, _id, lastid, lastTime-7*86400))
-	log.Println("es query:", c_query)
-	//testquery := `{"terms":{"_id":["59cefaa12cf26913ca07fd56"]}}`
-	//testquery := ``
-	//c_query = fmt.Sprintf(FilterQuery, testquery)
-	var res []map[string]interface{}
-	count := int(elastic.Count(DB, DB, c_query))
-	log.Println("本次推送共查到数据", count, "条")
-	if count == 0 {
-		return false, &res
-	}
-	if count > MaxSearch {
-		count = MaxSearch
-		log.Println("目前数据多于", MaxSearch, ",只加载了", MaxSearch, "条!")
-	}
-	onceSize := 400 //ES一次查询这么多条
-	if onceSize > count {
-		onceSize = count
-	}
-	totalPage := int((count + onceSize - 1) / onceSize)
-	log.Println("数据一共", totalPage, "页!")
-	//如果res长度和cout相差5条,重试
-	for t := 1; t <= 3; t++ {
-		res = []map[string]interface{}{}
-		for i := 0; i < totalPage; i++ {
-			searchpool <- true
-			searchWaitGroup.Add(1)
-			go func(start int) {
-				defer func() {
-					searchWaitGroup.Done()
-					<-searchpool
-				}()
-				size := onceSize
-				if start == totalPage-1 && count%onceSize != 0 {
-					size = count % onceSize
-				}
-				r := elastic.GetAllByNgram(DB, DB, c_query, "", SortQuery, ShowField, start*onceSize, size, 0, false)
-				if r != nil {
-					res = append(res, *r...)
-					log.Println("第", start+1, "页数据加载完成!")
-				}
-			}(i)
+	var pushArray = &Arr{}
+	titleMap := map[string]bool{}
+	//1.组织信息、
+	//a_relationinfo s_id s_title s_projectname  s_projectcode  l_publishtime s_url
+	var ids []string
+	for _, info := range *res {
+		if titleMap[util.ObjToString(info["title"])] {
+			continue
 		}
-		searchWaitGroup.Wait()
-		if len(res) >= count-5 {
-			break
+		titleMap[util.ObjToString(info["title"])] = true
+		tmp := map[string]interface{}{}
+		sid := util.BsonIdToSId(info["_id"])
+		tmp["s_id"] = sid
+		tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
+		tmp["s_title"] = info["title"]
+		tmp["l_publishtime"] = info["publishtime"]
+		area := util.ObjToString(info["area"])
+		if area == "A" {
+			area = "全国"
 		}
-		log.Println("第", t, "次加载数据完成,数据总数", len(res), ",由于数据量不够,重新加载!")
-	}
-	resLenght := len(res)
-	if resLenght == 0 {
-		return false, &res
+		tmp["s_province"] = area
+		tmp["s_type"] = util.ObjToString(info["type"])
+		tmp["s_toptype"] = util.ObjToString(info["toptype"])
+		tmp["s_subtype"] = util.ObjToString(info["subtype"])
+		tmp["s_entname"] = util.ObjToString(info["winner"])
+		tmp["s_url"] = util.ObjToString(info["href"])
+		tmp["s_subscopeclass"] = util.ObjToString(info["s_subscopeclass"])
+		if exists, _ := redis.Exists("push", "push_"+userId+"_"+sid); exists {
+			continue
+		} else {
+			redis.PutCKV("push", "push_"+userId+"_"+sid, 1)
+		}
+		ids = append(ids, sid)
+		*pushArray = append(*pushArray, &tmp)
 	}
-	log.Println(resLenght, "条数据已经加载完成!")
-	return true, &res
-}*/
-
-//开始推送
-func push(fid, sname, title, userId string, res *[]map[string]interface{}) *Arr {
-	var pushArray = &Arr{}
-	util.Try(func() {
-		Pushlock.Lock()
-		defer Pushlock.Unlock()
-		//1.组织信息、
-		//a_relationinfo s_id s_title s_projectname  s_projectcode  l_publishtime s_url
-		var ids []string
-		for _, info := range *res {
-			tmp := map[string]interface{}{}
-			sid := util.BsonIdToSId(info["_id"])
-			tmp["s_id"] = sid
-			tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
-			tmp["s_title"] = info["title"]
-			tmp["l_publishtime"] = info["publishtime"]
-			area := util.ObjToString(info["area"])
-			if area == "A" {
-				area = "全国"
+	//2.推送、
+	if pushArray.Len() > 0 {
+		sort.Sort(pushArray)
+		//更新用户关注的a_relationinfo、保存到推送记录表、推送给用户
+		//log.Println(fid, ids)
+		//项目公告保留包括本身在内的最新100条
+		updateFlag := false
+		followObject, fok := tools.MQFW.FindById(FOLLOW_COLLECTION, fid, `{"l_publishtime":1,"a_relationinfo":1}`)
+		if fok && followObject != nil && len(*followObject) > 0 {
+			relationinfo, _ := (*followObject)["a_relationinfo"].([]interface{})
+			rLength := len(relationinfo)
+			pLength := pushArray.Len()
+			setMap := bson.M{
+				"a_lastpushids":   ids,
+				"l_lastpushtime":  (*((*pushArray)[0]))["l_publishtime"],
+				"i_apppushunread": 1,
 			}
-			tmp["s_province"] = area
-			tmp["s_type"] = util.ObjToString(info["type"])
-			tmp["s_toptype"] = util.ObjToString(info["toptype"])
-			tmp["s_subtype"] = util.ObjToString(info["subtype"])
-			tmp["s_entname"] = util.ObjToString(info["winner"])
-			tmp["s_url"] = util.ObjToString(info["href"])
-			tmp["s_subscopeclass"] = util.ObjToString(info["s_subscopeclass"])
-			if exists, _ := redis.Exists("push", "push_"+userId+"_"+sid); exists {
-				continue
-			} else {
-				redis.PutCKV("push", "push_"+userId+"_"+sid, 1)
+			updateMap := &bson.M{"$set": setMap}
+			if rLength > 0 && rLength+pLength > KEEPCOUNT { //保留100条
+				start := rLength + pLength - KEEPCOUNT
+				var relationinfoTemp []interface{}
+				if start < rLength {
+					relationinfoTemp = append(relationinfoTemp, relationinfo[start:]...)
+				}
+				for _, v := range *pushArray {
+					relationinfoTemp = append(relationinfoTemp, v)
+				}
+				setMap["a_relationinfo"] = relationinfoTemp
+			} else { //追加
+				(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
 			}
-			ids = append(ids, sid)
-			*pushArray = append(*pushArray, &tmp)
+			updateFlag = tools.MQFW.UpdateById(FOLLOW_COLLECTION, fid, updateMap)
 		}
-		go func() {
-			//2.推送、
-			if pushArray.Len() > 0 {
-				sort.Sort(pushArray)
-				//更新用户关注的a_relationinfo、保存到推送记录表、推送给用户
-				//log.Println(fid, ids)
-				//项目公告保留包括本身在内的最新100条
-				updateFlag := false
-				followObject, fok := tools.MQFW.FindById(FOLLOW_COLLECTION, fid, `{"l_publishtime":1,"a_relationinfo":1}`)
-				if fok && followObject != nil && len(*followObject) > 0 {
-					relationinfo, _ := (*followObject)["a_relationinfo"].([]interface{})
-					rLength := len(relationinfo)
-					pLength := pushArray.Len()
-					setMap := bson.M{
-						"a_lastpushids":   ids,
-						"l_lastpushtime":  (*((*pushArray)[0]))["l_publishtime"],
-						"i_apppushunread": 1,
-					}
-					updateMap := &bson.M{"$set": setMap}
-					if rLength > 0 && rLength+pLength > KEEPCOUNT { //保留100条
-						start := rLength + pLength - KEEPCOUNT
-						var relationinfoTemp []interface{}
-						if start < rLength {
-							relationinfoTemp = append(relationinfoTemp, relationinfo[start:]...)
-						}
-						for _, v := range *pushArray {
-							relationinfoTemp = append(relationinfoTemp, v)
+		if updateFlag {
+			userdata, userdata_ok := tools.MQFW.FindById("user", userId, `{"s_m_openid":1,"a_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_applystatus":1,"i_ispush":1,"i_type":1,"a_mergeorder":1}`)
+			if !userdata_ok || userdata == nil {
+				return
+			}
+			s_m_openid, _ := (*userdata)["s_m_openid"].(string)
+			a_m_openid, _ := (*userdata)["a_m_openid"].(string)
+			s_phone, _ := (*userdata)["s_phone"].(string)
+			jpushid, _ := (*userdata)["s_jpushid"].(string)
+			opushid, _ := (*userdata)["s_opushid"].(string)
+			phoneType, _ := (*userdata)["s_appponetype"].(string)
+			isPushWx := util.IntAllDef((*userdata)["i_ispush"], 1)
+			applystatus := util.IntAll((*userdata)["i_applystatus"])
+			usertype := util.IntAllDef((*userdata)["i_type"], 0)
+			a_mergeorder, _ := (*userdata)["a_mergeorder"].([]interface{})
+
+			//进入推送逻辑
+			md, _ := json.Marshal(pushArray)
+			isSaveOk := cassandra.SaveCache("jy_pushent", bson.M{
+				"id":      time.Now().Format(util.Date_Short_Layout),
+				"openid":  jy.GetOldOpenid(s_m_openid, a_m_openid, s_phone, a_mergeorder),
+				"date":    time.Now().UnixNano(),
+				"jpushid": jpushid,
+				"info":    string(md),
+				"entname": sname,
+				"fid":     fid,
+			})
+			if !isSaveOk {
+				log.Println("保存到cassandra出错!", userId)
+				return
+			}
+			pushnum := len(*pushArray)
+			//微信推送
+			if usertype == 0 && applystatus == 1 && isPushWx == 1 && s_m_openid != "" {
+				lastTime := util.Int64All((*(*pushArray)[0])["l_publishtime"])
+				pushtt := fmt.Sprintf(WxTitle, sname)
+				Tip1 := ""
+				minute := time.Now().Unix() - lastTime
+				if minute > -1 && minute < 61 {
+					Tip1 = fmt.Sprintf("%d秒前发布的:\n", minute)
+				} else {
+					minute = minute / 60
+					if minute < 121 {
+						if minute < 1 {
+							minute = 1
 						}
-						setMap["a_relationinfo"] = relationinfoTemp
-					} else { //追加
-						(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+						Tip1 = fmt.Sprintf("%d分钟前发布的:\n", minute)
 					}
-					updateFlag = tools.MQFW.UpdateById(FOLLOW_COLLECTION, fid, updateMap)
 				}
-				if updateFlag {
-					userdata, userdata_ok := tools.MQFW.FindById("user", userId, `{"s_m_openid":1,"a_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_applystatus":1,"i_ispush":1,"i_type":1,"a_mergeorder":1}`)
-					if !userdata_ok || userdata == nil {
-						return
-					}
-					s_m_openid, _ := (*userdata)["s_m_openid"].(string)
-					a_m_openid, _ := (*userdata)["a_m_openid"].(string)
-					s_phone, _ := (*userdata)["s_phone"].(string)
-					jpushid, _ := (*userdata)["s_jpushid"].(string)
-					opushid, _ := (*userdata)["s_opushid"].(string)
-					phoneType, _ := (*userdata)["s_appponetype"].(string)
-					isPushWx := util.IntAllDef((*userdata)["i_ispush"], 1)
-					applystatus := util.IntAll((*userdata)["i_applystatus"])
-					usertype := util.IntAllDef((*userdata)["i_type"], 0)
-					a_mergeorder, _ := (*userdata)["a_mergeorder"].([]interface{})
-
-					//进入推送逻辑
-					tit := sname
-					if tit == "" {
-						tit = title
-					}
-					if tit != "" {
-						md, _ := json.Marshal(pushArray)
-						isSaveOk := cassandra.SaveCache("jy_pushent", bson.M{
-							"id":      time.Now().Format(util.Date_Short_Layout),
-							"openid":  jy.GetOldOpenid(s_m_openid, a_m_openid, s_phone, a_mergeorder),
-							"date":    time.Now().UnixNano(),
-							"jpushid": jpushid,
-							"info":    string(md),
-							"title":   title,
-							"entname": sname,
-							"fid":     fid,
-						})
-						if !isSaveOk {
-							log.Println("保存到cassandra出错!", userId)
-							return
-						}
-						pushnum := len(*pushArray)
-						//微信推送
-						if usertype == 0 && applystatus == 1 && isPushWx == 1 && s_m_openid != "" {
-							lastTime := util.Int64All((*(*pushArray)[0])["l_publishtime"])
-							pushtt := fmt.Sprintf(WxTitle, tit)
-							Tip1 := ""
-							minute := time.Now().Unix() - lastTime
-							if minute > -1 && minute < 61 {
-								Tip1 = fmt.Sprintf("%d秒前发布的:\n", minute)
-							} else {
-								minute = minute / 60
-								if minute < 121 {
-									if minute < 1 {
-										minute = 1
-									}
-									Tip1 = fmt.Sprintf("%d分钟前发布的:\n", minute)
-								}
-							}
-							LastTip := ""
-							if pushnum > 1 {
-								LastTip = fmt.Sprintf("...(共%d条)", pushnum)
-							}
-							LastLen = LastLen - len([]rune(pushtt)) - len([]rune(Tip1))
-							Remark := ""
-							bshow := false
-							for n := 1; n < pushnum+1; n++ {
-								Remark += fmt.Sprintf("%d %s\n", n, (*(*pushArray)[n-1])["s_title"])
-								if len([]rune(Remark)) > LastLen {
-									if n == pushnum {
-										bshow = true
-									}
-									break
-								}
-							}
-							if bshow {
-								LastTip = ""
-							}
-							log.Println("push", s_m_openid, pushnum, tit)
-							lastcreatetime := ""
-							lastdata, _ := tools.MQFW.Find(FOLLOW_COLLECTION, map[string]interface{}{
-								"s_userid": userId,
-							}, `{"l_createtime":-1}`, `{"l_createtime":1}`, false, -1, -1)
-							if lastdata != nil && len(*lastdata) == 1 {
-								if (*lastdata)[0]["l_createtime"] != nil {
-									l_createtime, _ := (*lastdata)[0]["l_createtime"].(int64)
-									if l_createtime > 0 {
-										lastcreatetime = util.FormatDateByInt64(&l_createtime, util.Date_Short_Layout)
-									}
-								}
-							}
-							if lastcreatetime == "" {
-								now := time.Now()
-								lastcreatetime = util.FormatDate(&now, util.Date_Short_Layout)
-							}
-							rpccall.SendWinXin(&qrpc.NotifyMsg{
-								Openid:      s_m_openid,
-								Title:       fmt.Sprintf(WxTitle, tit),
-								Remark:      Tip1 + Remark + LastTip,
-								Detail:      WxGroup,
-								Service:     lastcreatetime,
-								Color:       WxColor,
-								DetailColor: WxDetailColor,
-								Url:         ViewDomain + "/front/sess/" + se.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",followEntDetail") + "__" + util.EncodeArticleId2ByCheck(fid),
-							}, userId)
+				LastTip := ""
+				if pushnum > 1 {
+					LastTip = fmt.Sprintf("...(共%d条)", pushnum)
+				}
+				LastLen = LastLen - len([]rune(pushtt)) - len([]rune(Tip1))
+				Remark := ""
+				bshow := false
+				for n := 1; n < pushnum+1; n++ {
+					Remark += fmt.Sprintf("%d %s\n", n, (*(*pushArray)[n-1])["s_title"])
+					if len([]rune(Remark)) > LastLen {
+						if n == pushnum {
+							bshow = true
 						}
-						if jpushid != "" || opushid != "" {
-							jpushtitle := strings.Replace((*((*pushArray)[0]))["s_title"].(string), "\n", "", -1)
-							if len([]rune(jpushtitle)) > 80 {
-								jpushtitle = string([]rune(jpushtitle)[:80]) + "..."
-							}
-							if pushnum > 1 {
-								jpushtitle = fmt.Sprintf("1. %s\n...(共%d条)", jpushtitle, pushnum)
-							}
-							isPushOk := rpccall.AppPushServiceCall(map[string]interface{}{
-								"phoneType":   phoneType,
-								"otherPushId": opushid,
-								"jgPushId":    jpushid,
-								"descript":    jpushtitle,
-								"type":        "entname",
-								"userId":      userId,
-								"url":         "/jyapp/free/sess/" + se.EncodeString(userId+",_id,"+strconv.Itoa(int(time.Now().Unix()))+",followEntDetail") + "__" + util.EncodeArticleId2ByCheck(fid),
-							})
-							log.Println("app推送", userId, s_m_openid, a_m_openid, s_phone, phoneType, jpushid, opushid, isPushOk, pushnum, tit)
+						break
+					}
+				}
+				if bshow {
+					LastTip = ""
+				}
+				lastcreatetime := ""
+				lastdata, _ := tools.MQFW.Find(FOLLOW_COLLECTION, map[string]interface{}{
+					"s_userid": userId,
+				}, `{"l_createtime":-1}`, `{"l_createtime":1}`, false, -1, -1)
+				if lastdata != nil && len(*lastdata) == 1 {
+					if (*lastdata)[0]["l_createtime"] != nil {
+						l_createtime, _ := (*lastdata)[0]["l_createtime"].(int64)
+						if l_createtime > 0 {
+							lastcreatetime = util.FormatDateByInt64(&l_createtime, util.Date_Short_Layout)
 						}
 					}
 				}
+				if lastcreatetime == "" {
+					now := time.Now()
+					lastcreatetime = util.FormatDate(&now, util.Date_Short_Layout)
+				}
+				isPushOk := rpccall.SendWinXin(&qrpc.NotifyMsg{
+					Openid:      s_m_openid,
+					Title:       fmt.Sprintf(WxTitle, sname),
+					Remark:      Tip1 + Remark + LastTip,
+					Detail:      WxGroup,
+					Service:     lastcreatetime,
+					Color:       WxColor,
+					DetailColor: WxDetailColor,
+					Url:         ViewDomain + "/front/sess/" + se.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",followEntDetail") + "__" + util.EncodeArticleId2ByCheck(fid),
+				}, userId)
+				log.Println("微信推送", isPushOk, userId, s_m_openid, pushnum, sname)
+			}
+			if jpushid != "" || opushid != "" {
+				jpushtitle := strings.Replace((*((*pushArray)[0]))["s_title"].(string), "\n", "", -1)
+				if len([]rune(jpushtitle)) > 80 {
+					jpushtitle = string([]rune(jpushtitle)[:80]) + "..."
+				}
+				if pushnum > 1 {
+					jpushtitle = fmt.Sprintf("1. %s\n...(共%d条)", jpushtitle, pushnum)
+				}
+				isPushOk := rpccall.AppPushServiceCall(map[string]interface{}{
+					"phoneType":   phoneType,
+					"otherPushId": opushid,
+					"jgPushId":    jpushid,
+					"descript":    jpushtitle,
+					"type":        "entname",
+					"userId":      userId,
+					"url":         "/jyapp/free/sess/" + se.EncodeString(userId+",_id,"+strconv.Itoa(int(time.Now().Unix()))+",followEntDetail") + "__" + util.EncodeArticleId2ByCheck(fid),
+				})
+				log.Println("app推送", isPushOk, userId, s_m_openid, a_m_openid, s_phone, phoneType, jpushid, opushid, pushnum, sname)
 			}
-		}()
-	}, func(e interface{}) {
-		log.Println("给用户推送关注信息时出错:", e)
-	})
-	return pushArray
+		}
+	}
+	return
 }

+ 4 - 13
src/jfw/modules/pushent/src/main.go

@@ -4,13 +4,10 @@ import (
 	"config"
 	"followpush"
 	"log"
-	"net"
-	"net/http"
 	_ "net/http/pprof"
 	"qfw/util"
 	"qfw/util/elastic"
 	"qfw/util/redis"
-	"rpccall"
 	"time"
 	ca "ucbsutil/cassandra"
 )
@@ -19,8 +16,8 @@ func init() {
 	redis.InitRedisBySize(config.Sysconfig["redisServers"].(string), 200, 30, 300)
 	elastic.InitElasticSize(config.Sysconfig["elasticsearch"].(string), util.IntAllDef(config.Sysconfig["elasticPoolSize"], 30))
 	followpush.MaxSearch = util.IntAllDef(config.Sysconfig["maxSearch"], 10000)
-	rpccall.WeixinRpcServer = config.Sysconfig["weixinRpcServer"].(string)
-
+	followpush.PushPool = make(chan bool, util.IntAllDef(config.Sysconfig["pushPool"], 30))
+	followpush.EachPool = make(chan bool, util.IntAllDef(config.Sysconfig["eachPool"], 30))
 	//初始化cassandra
 	cassandra := config.Sysconfig["cassandra"].(map[string]interface{})
 	ca.ViewCacheLen = true
@@ -35,15 +32,9 @@ func init() {
 }
 
 func main() {
-	time.Sleep(2 * time.Second)
-	log.Println(config.Sysconfig["rpcPort"], config.Sysconfig)
 	go runJob()
-	port, _ := config.Sysconfig["rpcPort"].(string)
-	l, _ := net.Listen("tcp", ":"+port)
-	go http.Serve(l, nil)
-	log.Println("启动关注推送系统", port)
-	b := make(chan bool)
-	<-b
+	log.Println("企业推送程序启动。。。")
+	<-chan bool(nil)
 }
 
 func runJob() {

+ 0 - 27
src/jfw/modules/pushent/src/main_test.go

@@ -1,27 +0,0 @@
-package main
-
-import (
-	"log"
-	"strings"
-	"testing"
-
-	"gopkg.in/mgo.v2/bson"
-)
-
-func Test_main(t *testing.T) {
-	tmp := make(map[string]interface{})
-	tmp["ss"] = "ssss"
-	ss := tmp
-	m1 := map[string]*map[string]interface{}{}
-	m1["aa"] = &ss
-	tmp = make(map[string]interface{})
-	log.Println(m1["aa"])
-
-	log.Println(bson.ObjectIdHex("100000ee36b82b12a0000001").Hex())
-
-}
-
-func Test_1(t *testing.T) {
-	log.Println(strings.Contains("aassdf", "0"))
-
-}

+ 24 - 52
src/jfw/modules/pushent/src/rpccall/weixinrpc.go

@@ -1,66 +1,38 @@
 package rpccall
 
 import (
+	"config"
 	"log"
 	"net/rpc"
-	"qfw/util"
 	qrpc "qfw/util/rpc"
 	"strings"
 	"time"
 	"tools"
 )
 
-var wxpool chan bool = make(chan bool, 30)
-var WeixinRpcServer string
-
-//微信远程调用,实现模板发送消息
-func SendWinXin(p *qrpc.NotifyMsg, userId string) {
-	wxpool <- true
-	defer func() {
-		<-wxpool
-	}()
-	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
-		defer client.Close()
-		if err != nil {
-			log.Println(err.Error())
-			return
-		}
-		var repl qrpc.RpcResult
-		err = client.Call("WeiXinRpc.SendPushMsg", p, &repl)
-		if err != nil {
-			log.Println(err.Error())
-		}
-		res := string(repl)
-		if strings.Contains(res, "[46004]") || strings.Contains(res, "[65302]") || strings.Contains(res, "[43004]") || strings.Contains(res, "[40003]") {
-			tools.MQFW.UpdateById("user", userId, map[string]interface{}{
-				"$set": map[string]interface{}{
-					"i_ispush": 0,
-				},
-			})
-		}
-	}, func(e interface{}) {})
-	time.Sleep(10 * time.Millisecond)
-}
-
 //微信远程调用,实现模板发送消息
-func FollowPush(p *qrpc.NotifyMsg) {
-	wxpool <- true
-	defer func() {
-		<-wxpool
-	}()
-	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
-		defer client.Close()
-		if err != nil {
-			log.Println(err.Error())
-			return
-		}
-		var repl qrpc.RpcResult
-		err = client.Call("WeiXinRpc.SendPushMsg", p, &repl)
-		if err != nil {
-			log.Println(err.Error())
-		}
-	}, func(e interface{}) {})
+func SendWinXin(p *qrpc.NotifyMsg, userId string) bool {
 	time.Sleep(10 * time.Millisecond)
+	client, err := rpc.DialHTTP("tcp", config.Sysconfig["weixinRpcServer"].(string))
+	if err != nil {
+		log.Println(err.Error())
+		return false
+	}
+	defer client.Close()
+	var repl qrpc.RpcResult
+	err = client.Call("WeiXinRpc.SendPushMsg", p, &repl)
+	if err != nil {
+		log.Println(err.Error())
+		return false
+	}
+	res := string(repl)
+	if strings.Contains(res, "[46004]") || strings.Contains(res, "[65302]") || strings.Contains(res, "[43004]") || strings.Contains(res, "[40003]") {
+		tools.MQFW.UpdateById("user", userId, map[string]interface{}{
+			"$set": map[string]interface{}{
+				"i_ispush": 0,
+			},
+		})
+		return false
+	}
+	return repl == "Y"
 }

+ 9 - 7
src/jfw/modules/pushproject/src/config.json

@@ -8,15 +8,15 @@
 	},
 	"durationMinutes": "3",
 	"elasticPoolSize": 30,
-	"elasticsearch": "http://192.168.3.18:9800",
-	"lastid": "596f20265d11e1c7455dc5bc",
-	"maxSearch": 80000,
+	"elasticsearch": "http://192.168.3.128:9800",
+	"lastid": "",
+	"maxSearch": 50000,
 	"mongodbName": "qfw",
 	"mongodbPoolSize": "20",
-	"mongodbServers": "192.168.3.18:27080",
-	"redisServers": "sso=192.168.3.18:1379,other=192.168.3.18:1379,push=192.168.3.18:1379",
+	"mongodbServers": "192.168.3.128:27080",
+	"redisServers": "sso=192.168.3.128:3379,other=192.168.3.128:3379,push=192.168.3.128:3379",
 	"rpcPort": "8759",
-	"viewDomain": "http://webws.qmx.top",
+	"viewDomain": "http://web-jydev-wcj.jianyu360.cn",
 	"weixinRpcServer": "127.0.0.1:8083",
 	"wxcolor": "#ffba00",
 	"wxcontent": "剑鱼标讯推送",
@@ -24,5 +24,7 @@
 	"wxtitle": "您关注的项目《%s》有新的公告信息!如果不想继续收到此类信息,可进入发现-我关注的项目进行取消。",
 	"wxdetailcolor":"#686868",
 	"appPushServiceRpc":"127.0.0.1:5566",
-	"testids":["ocXeA0jceF8KRunDkwf9egT4bKI8","15838235928","13603456869"]
+	"testids":[],
+	"pushPool": 30,
+	"eachPool": 30
 }

+ 0 - 18
src/jfw/modules/pushproject/src/followpush/followpush_test.go

@@ -1,18 +0,0 @@
-package followpush
-
-import (
-	"log"
-	"testing"
-	"time"
-)
-
-func Test_updateSetting(t *testing.T) {
-	UpdateUserSetting()
-	for k, v := range Setting {
-		for _, vv := range *v {
-			log.Println(k, (*vv)["s_openid"])
-		}
-	}
-	Job()
-	time.Sleep(100 * time.Second)
-}

+ 242 - 288
src/jfw/modules/pushproject/src/followpush/push.go

@@ -11,6 +11,7 @@ import (
 	"qfw/util/mongodb"
 	"qfw/util/redis"
 	qrpc "qfw/util/rpc"
+	"regexp"
 	"rpccall"
 	"sort"
 	"strconv"
@@ -34,14 +35,15 @@ var (
 	DB                = "bidding"
 	KEEPCOUNT         = 100
 	MaxSearch         = 10000 //缓存中总共加载这么多条
-	searchpool        = make(chan bool, 8)
-	pushpool          = make(chan bool, 50)
+	PushPool          chan bool
+	EachPool          chan bool
 	findpool          = make(chan bool, 10)
-	eachpool          = make(chan bool, 100)
-	Pushlock          = sync.Mutex{}
+	lock              = &sync.Mutex{}
+	pushWaitGroup     = &sync.WaitGroup{}
 	searchWaitGroup   = &sync.WaitGroup{}
 	eachInfoWaitGroup = &sync.WaitGroup{}
 	Mongodb_ShowField = `{"_id":1,"title":1,"publishtime":1,"area":1,"type":1,"toptype":1,"subtype":1,"projectname":1,"projectcode":1,"href":1,"infoformat":1,"s_subscopeclass":1}`
+	reg               = regexp.MustCompile(`\\+"`)
 )
 
 type PushUser struct {
@@ -91,6 +93,7 @@ func pushByEs(_id string, lastTime int64) bool {
 		"_id":           1,
 	}).Iter()
 	users := []*PushUser{}
+	user_index := 0
 	for tmp := make(map[string]interface{}); cur.Next(tmp); {
 		scode := util.ObjToString(tmp["s_projectcode"])
 		sname := util.ObjToString(tmp["s_projectname"])
@@ -106,7 +109,12 @@ func pushByEs(_id string, lastTime int64) bool {
 			ProjectName: sname,
 		})
 		tmp = make(map[string]interface{})
+		user_index++
+		if user_index%500 == 0 {
+			log.Println("加载用户:", user_index)
+		}
 	}
+	log.Println("加载用户完成", user_index)
 	if len(users) == 0 {
 		log.Println("未查找到需要推送的用户...")
 		return false
@@ -120,14 +128,17 @@ func pushByEs(_id string, lastTime int64) bool {
 	userMap := EachAllBidInfo(&users, res)
 	//遍历用户,推送
 	for k, v := range *userMap {
-		pushpool <- true
-		func(tmp *[]map[string]interface{}) {
+		PushPool <- true
+		pushWaitGroup.Add(1)
+		go func(pushUser *PushUser, tmp *[]map[string]interface{}) {
 			defer func() {
-				<-pushpool
+				<-PushPool
+				pushWaitGroup.Done()
 			}()
-			push(k.Id, k.ProjectName, k.ProjectCode, k.Title, k.UserId, v, true, true)
-		}(v)
+			push(pushUser.Id, pushUser.ProjectName, pushUser.ProjectCode, pushUser.Title, pushUser.UserId, tmp, true, true)
+		}(k, v)
 	}
+	pushWaitGroup.Wait()
 	Sysconfig["StartTime"] = util.FormatDateWithObj(&comeintime, util.Date_Full_Layout)
 	Sysconfig["lastid"] = lastid
 	log.Println("push-over", lastid, comeintime)
@@ -139,13 +150,13 @@ func EachAllBidInfo(users *[]*PushUser, res *[]map[string]interface{}) *map[*Pus
 	var count int
 	userMap := map[*PushUser]*[]map[string]interface{}{}
 	for _, v := range *res {
-		eachpool <- true
+		EachPool <- true
 		eachInfoWaitGroup.Add(1)
 		count++
 		func(tmp map[string]interface{}) {
 			defer func() {
 				eachInfoWaitGroup.Done()
-				<-eachpool
+				<-EachPool
 			}()
 			scode := util.ObjToString(tmp["projectcode"])
 			sname := util.ObjToString(tmp["projectname"])
@@ -160,23 +171,24 @@ func EachAllBidInfo(users *[]*PushUser, res *[]map[string]interface{}) *map[*Pus
 				if !flag {
 					continue
 				}
+				lock.Lock()
 				s := userMap[user]
 				if s == nil {
 					s = &[]map[string]interface{}{}
 					userMap[user] = s
 				}
-				*s = append(*s, tmp)
-				if len(*s) >= 50 {
-					break
+				if len(*s) < 50 {
+					*s = append(*s, tmp)
 				}
+				lock.Unlock()
 			}
 		}(v)
 		if count%500 == 0 {
-			log.Println("当前信息索引:", count)
+			log.Println("当前匹配:", count)
 		}
 	}
 	eachInfoWaitGroup.Wait()
-	log.Println("数据遍历完成!")
+	log.Println("匹配结束", count)
 	return &userMap
 }
 
@@ -226,70 +238,10 @@ func InitBiddingCache(_id, lastid string, lastTime int64) (bool, *[]map[string]i
 			break
 		}
 	}
-	log.Println(count, "条数据已经加载完成!")
+	log.Println("数据加载结束", count)
 	return true, &res
 }
 
-/*func InitBiddingCache(_id, lastid string, lastTime int64) (bool, *[]map[string]interface{}) {
-	defer util.Catch()
-	//filter全局查询
-	c_query := fmt.Sprintf(FilterQuery, fmt.Sprintf(IDRange, _id, lastid, lastTime-7*86400))
-	log.Println("es query:", c_query)
-	//testquery := `{"terms":{"_id":["59cefaa12cf26913ca07fd56"]}}`
-	//testquery := ``
-	//c_query = fmt.Sprintf(FilterQuery, testquery)
-	var res []map[string]interface{}
-	count := int(elastic.Count(DB, DB, c_query))
-	log.Println("本次推送共查到数据", count, "条")
-	if count == 0 {
-		return false, &res
-	}
-	if count > MaxSearch {
-		count = MaxSearch
-		log.Println("目前数据多于", MaxSearch, ",只加载了", MaxSearch, "条!")
-	}
-	onceSize := 400 //ES一次查询这么多条
-	if onceSize > count {
-		onceSize = count
-	}
-	totalPage := int((count + onceSize - 1) / onceSize)
-	log.Println("数据一共", totalPage, "页!")
-	//如果res长度和cout相差5条,重试
-	for t := 1; t <= 3; t++ {
-		res = []map[string]interface{}{}
-		for i := 0; i < totalPage; i++ {
-			searchpool <- true
-			searchWaitGroup.Add(1)
-			go func(start int) {
-				defer func() {
-					searchWaitGroup.Done()
-					<-searchpool
-				}()
-				size := onceSize
-				if start == totalPage-1 && count%onceSize != 0 {
-					size = count % onceSize
-				}
-				r := elastic.GetAllByNgram(DB, DB, c_query, "", SortQuery, ShowField, start*onceSize, size, 0, false)
-				if r != nil {
-					res = append(res, *r...)
-					log.Println("第", start+1, "页数据加载完成!")
-				}
-			}(i)
-		}
-		searchWaitGroup.Wait()
-		if len(res) >= count-5 {
-			break
-		}
-		log.Println("第", t, "次加载数据完成,数据总数", len(res), ",由于数据量不够,重新加载!")
-	}
-	resLenght := len(res)
-	if resLenght == 0 {
-		return false, &res
-	}
-	log.Println(resLenght, "条数据已经加载完成!")
-	return true, &res
-}*/
-
 //不保存不推送-只保存不推送-保存推送
 func FindData(fid interface{}, title, sname, scode, userid, idrange string, bsave, bpush bool) *Arr {
 	findpool <- true
@@ -301,7 +253,8 @@ func FindData(fid interface{}, title, sname, scode, userid, idrange string, bsav
 		q1 = append(q1, fmt.Sprintf(TERM, "projectcode", strings.Replace(scode, "\\", "\\\\", -1)))
 	}
 	if sname != "" {
-		newSname := elastic.ReplaceYH(sname)
+		newSname := reg.ReplaceAllString(sname, `"`)
+		newSname = elastic.ReplaceYH(newSname)
 		newSname = strings.Replace(newSname, "\\", "\\\\", -1)
 		q1 = append(q1, fmt.Sprintf(TERM, "projectname", newSname))
 	}
@@ -318,44 +271,18 @@ func FindData(fid interface{}, title, sname, scode, userid, idrange string, bsav
 
 //开始推送
 func push(fid interface{}, sname, scode, title, userId string, res *[]map[string]interface{}, bsave, bpush bool) *Arr {
+	defer util.Catch()
 	var pushArray = &Arr{}
-	util.Try(func() {
-		if !bsave {
-			for _, info := range *res {
-				tmp := map[string]interface{}{}
-				sid := util.BsonIdToSId(info["_id"])
-				if title != sid { //title在此处传的是关注信息id
-					tmp["s_id"] = sid
-					tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
-					tmp["s_title"] = info["title"]
-					tmp["l_publishtime"] = info["publishtime"]
-					area := util.ObjToString(info["area"])
-					if area == "A" {
-						area = "全国"
-					}
-					tmp["s_province"] = area
-					tmp["s_type"] = util.ObjToString(info["type"])
-					tmp["s_toptype"] = util.ObjToString(info["toptype"])
-					tmp["s_subtype"] = util.ObjToString(info["subtype"])
-					tmp["s_projectname"] = util.ObjToString(info["projectname"])
-					tmp["s_projectcode"] = util.ObjToString(info["projectcode"])
-					tmp["s_url"] = util.ObjToString(info["href"])
-					tmp["s_subscopeclass"] = util.ObjToString(info["s_subscopeclass"])
-					*pushArray = append(*pushArray, &tmp)
-				}
+	titleMap := map[string]bool{}
+	if !bsave {
+		for _, info := range *res {
+			if titleMap[util.ObjToString(info["title"])] {
+				continue
 			}
-		} else {
-			Pushlock.Lock()
-			defer Pushlock.Unlock()
-			//1.组织信息、
-			//a_relationinfo s_id s_title s_projectname  s_projectcode  l_publishtime s_url
-			var ids []string
-			for _, info := range *res {
-				sid := util.BsonIdToSId(info["_id"])
-				if title == sid && !bpush {
-					continue
-				}
-				tmp := map[string]interface{}{}
+			titleMap[util.ObjToString(info["title"])] = true
+			tmp := map[string]interface{}{}
+			sid := util.BsonIdToSId(info["_id"])
+			if title != sid { //title在此处传的是关注信息id
 				tmp["s_id"] = sid
 				tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
 				tmp["s_title"] = info["title"]
@@ -372,195 +299,222 @@ func push(fid interface{}, sname, scode, title, userId string, res *[]map[string
 				tmp["s_projectcode"] = util.ObjToString(info["projectcode"])
 				tmp["s_url"] = util.ObjToString(info["href"])
 				tmp["s_subscopeclass"] = util.ObjToString(info["s_subscopeclass"])
-				if exists, _ := redis.Exists("push", "push_"+userId+"_"+sid); exists {
-					continue
-				} else {
-					redis.PutCKV("push", "push_"+userId+"_"+sid, 1)
-				}
-				ids = append(ids, sid)
 				*pushArray = append(*pushArray, &tmp)
 			}
-			go func() {
-				//2.推送、
-				if pushArray.Len() > 0 {
-					sort.Sort(pushArray)
-					//更新用户关注的a_relationinfo、保存到推送记录表、推送给用户
-					//log.Println(fid, ids)
-					//项目公告保留包括本身在内的最新100条
-					updateFlag := false
-					if fid != nil {
-						followObject, fok := tools.MQFW.FindOneByField(FOLLOW_COLLECTION, &bson.M{"_id": fid}, `{"l_publishtime":1,"a_relationinfo":1,"s_id":1}`)
-						if fok && followObject != nil && len(*followObject) > 0 {
-							relationinfo, _ := (*followObject)["a_relationinfo"].([]interface{})
-							s_id, _ := (*followObject)["s_id"].(string)
-							rLength := len(relationinfo)
-							pLength := pushArray.Len()
-							setMap := bson.M{"a_lastpushids": ids}
-							if bpush {
-								setMap["l_lastpushtime"] = (*((*pushArray)[0]))["l_publishtime"]
-								setMap["i_apppushunread"] = 1
-							} else {
-								setMap["l_lastpushtime"] = (*followObject)["l_publishtime"]
+		}
+	} else {
+		//1.组织信息、
+		//a_relationinfo s_id s_title s_projectname  s_projectcode  l_publishtime s_url
+		var ids []string
+		for _, info := range *res {
+			if titleMap[util.ObjToString(info["title"])] {
+				continue
+			}
+			titleMap[util.ObjToString(info["title"])] = true
+			sid := util.BsonIdToSId(info["_id"])
+			if title == sid && !bpush {
+				continue
+			}
+			tmp := map[string]interface{}{}
+			tmp["s_id"] = sid
+			tmp["s_eid"] = util.EncodeArticleId2ByCheck(sid)
+			tmp["s_title"] = info["title"]
+			tmp["l_publishtime"] = info["publishtime"]
+			area := util.ObjToString(info["area"])
+			if area == "A" {
+				area = "全国"
+			}
+			tmp["s_province"] = area
+			tmp["s_type"] = util.ObjToString(info["type"])
+			tmp["s_toptype"] = util.ObjToString(info["toptype"])
+			tmp["s_subtype"] = util.ObjToString(info["subtype"])
+			tmp["s_projectname"] = util.ObjToString(info["projectname"])
+			tmp["s_projectcode"] = util.ObjToString(info["projectcode"])
+			tmp["s_url"] = util.ObjToString(info["href"])
+			tmp["s_subscopeclass"] = util.ObjToString(info["s_subscopeclass"])
+			if exists, _ := redis.Exists("push", "push_"+userId+"_"+sid); exists {
+				continue
+			} else {
+				redis.PutCKV("push", "push_"+userId+"_"+sid, 1)
+			}
+			ids = append(ids, sid)
+			*pushArray = append(*pushArray, &tmp)
+		}
+		//2.推送、
+		if pushArray.Len() > 0 {
+			sort.Sort(pushArray)
+			//更新用户关注的a_relationinfo、保存到推送记录表、推送给用户
+			//log.Println(fid, ids)
+			//项目公告保留包括本身在内的最新100条
+			updateFlag := false
+			if fid != nil {
+				followObject, fok := tools.MQFW.FindOneByField(FOLLOW_COLLECTION, &bson.M{"_id": fid}, `{"l_publishtime":1,"a_relationinfo":1,"s_id":1}`)
+				if fok && followObject != nil && len(*followObject) > 0 {
+					relationinfo, _ := (*followObject)["a_relationinfo"].([]interface{})
+					s_id, _ := (*followObject)["s_id"].(string)
+					rLength := len(relationinfo)
+					pLength := pushArray.Len()
+					setMap := bson.M{"a_lastpushids": ids}
+					if bpush {
+						setMap["l_lastpushtime"] = (*((*pushArray)[0]))["l_publishtime"]
+						setMap["i_apppushunread"] = 1
+					} else {
+						setMap["l_lastpushtime"] = (*followObject)["l_publishtime"]
+					}
+					updateMap := &bson.M{"$set": setMap}
+					if rLength > 0 && rLength+pLength > KEEPCOUNT { //保留100条
+						start := rLength + pLength - KEEPCOUNT
+						firstInfo, _ := relationinfo[0].(map[string]interface{})
+						firstInfoId, _ := firstInfo["s_id"].(string)
+						var relationinfoTemp []interface{}
+						//保留本身
+						if s_id == firstInfoId && !bpush {
+							relationinfoTemp = relationinfo[:1]
+							if start+1 < rLength {
+								relationinfoTemp = append(relationinfoTemp, relationinfo[start+1:]...)
 							}
-							updateMap := &bson.M{"$set": setMap}
-							if rLength > 0 && rLength+pLength > KEEPCOUNT { //保留100条
-								start := rLength + pLength - KEEPCOUNT
-								firstInfo, _ := relationinfo[0].(map[string]interface{})
-								firstInfoId, _ := firstInfo["s_id"].(string)
-								var relationinfoTemp []interface{}
-								//保留本身
-								if s_id == firstInfoId && !bpush {
-									relationinfoTemp = relationinfo[:1]
-									if start+1 < rLength {
-										relationinfoTemp = append(relationinfoTemp, relationinfo[start+1:]...)
-									}
-								} else {
-									if start < rLength {
-										relationinfoTemp = append(relationinfoTemp, relationinfo[start:]...)
-									}
-								}
-								for _, v := range *pushArray {
-									relationinfoTemp = append(relationinfoTemp, v)
-								}
-								setMap["a_relationinfo"] = relationinfoTemp
-							} else { //追加
-								(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+						} else {
+							if start < rLength {
+								relationinfoTemp = append(relationinfoTemp, relationinfo[start:]...)
 							}
-							updateFlag = tools.MQFW.Update(FOLLOW_COLLECTION, &bson.M{"_id": fid}, updateMap, false, false)
 						}
-					}
-					if updateFlag && bpush {
-						userdata, userdata_ok := tools.MQFW.FindById("user", userId, `{"s_m_openid":1,"a_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_applystatus":1,"i_ispush":1,"i_type":1,"a_mergeorder":1}`)
-						if !userdata_ok || userdata == nil {
-							return
+						for _, v := range *pushArray {
+							relationinfoTemp = append(relationinfoTemp, v)
 						}
-						s_m_openid, _ := (*userdata)["s_m_openid"].(string)
-						a_m_openid, _ := (*userdata)["a_m_openid"].(string)
-						s_phone, _ := (*userdata)["s_phone"].(string)
-						jpushid, _ := (*userdata)["s_jpushid"].(string)
-						opushid, _ := (*userdata)["s_opushid"].(string)
-						phoneType, _ := (*userdata)["s_appponetype"].(string)
-						isPushWx := util.IntAllDef((*userdata)["i_ispush"], 1)
-						applystatus := util.IntAll((*userdata)["i_applystatus"])
-						a_mergeorder, _ := (*userdata)["a_mergeorder"].([]interface{})
-						//进入推送逻辑
-						tit := sname
-						if tit == "" {
-							tit = title
+						setMap["a_relationinfo"] = relationinfoTemp
+					} else { //追加
+						(*updateMap)["$pushAll"] = bson.M{"a_relationinfo": pushArray}
+					}
+					updateFlag = tools.MQFW.Update(FOLLOW_COLLECTION, &bson.M{"_id": fid}, updateMap, false, false)
+				}
+			}
+			if updateFlag && bpush {
+				userdata, userdata_ok := tools.MQFW.FindById("user", userId, `{"s_m_openid":1,"a_m_openid":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_applystatus":1,"i_ispush":1,"i_type":1,"a_mergeorder":1}`)
+				if !userdata_ok || userdata == nil {
+					return pushArray
+				}
+				s_m_openid, _ := (*userdata)["s_m_openid"].(string)
+				a_m_openid, _ := (*userdata)["a_m_openid"].(string)
+				s_phone, _ := (*userdata)["s_phone"].(string)
+				jpushid, _ := (*userdata)["s_jpushid"].(string)
+				opushid, _ := (*userdata)["s_opushid"].(string)
+				phoneType, _ := (*userdata)["s_appponetype"].(string)
+				isPushWx := util.IntAllDef((*userdata)["i_ispush"], 1)
+				applystatus := util.IntAll((*userdata)["i_applystatus"])
+				a_mergeorder, _ := (*userdata)["a_mergeorder"].([]interface{})
+				//进入推送逻辑
+				tit := sname
+				if tit == "" {
+					tit = title
+				}
+				if tit == "" {
+					tit = scode
+				}
+				if tit != "" {
+					followid := util.BsonIdToSId(fid)
+					md, _ := json.Marshal(pushArray)
+					tmpid := fmt.Sprint(time.Now().UnixNano())
+					isSaveOk := cassandra.SaveCache("jy_pushproject", bson.M{
+						"id":     time.Now().Format(util.Date_Short_Layout),
+						"openid": jy.GetOldOpenid(s_m_openid, a_m_openid, s_phone, a_mergeorder),
+						"date":   tmpid,
+						"info":   string(md),
+						"title":  title,
+						"pcode":  scode,
+						"pname":  sname,
+						"fid":    followid,
+					})
+					if !isSaveOk {
+						log.Println("保存到cassandra出错!", userId)
+						return pushArray
+					}
+					pushnum := len(*pushArray)
+					//微信推送
+					if applystatus == 1 && isPushWx == 1 && s_m_openid != "" {
+						lastTime := util.Int64All((*(*pushArray)[0])["l_publishtime"])
+						pushtt := fmt.Sprintf(WxTitle, tit)
+						Tip1 := ""
+						minute := time.Now().Unix() - lastTime
+						if minute > -1 && minute < 61 {
+							Tip1 = fmt.Sprintf("%d秒前发布的:\n", minute)
+						} else {
+							minute = minute / 60
+							if minute < 121 {
+								if minute < 1 {
+									minute = 1
+								}
+								Tip1 = fmt.Sprintf("%d分钟前发布的:\n", minute)
+							}
 						}
-						if tit == "" {
-							tit = scode
+						LastTip := ""
+						if pushnum > 1 {
+							LastTip = fmt.Sprintf("...(共%d条)", pushnum)
 						}
-						if tit != "" {
-							followid := util.BsonIdToSId(fid)
-							md, _ := json.Marshal(pushArray)
-							tmpid := fmt.Sprint(time.Now().UnixNano())
-							isSaveOk := cassandra.SaveCache("jy_pushproject", bson.M{
-								"id":     time.Now().Format(util.Date_Short_Layout),
-								"openid": jy.GetOldOpenid(s_m_openid, a_m_openid, s_phone, a_mergeorder),
-								"date":   tmpid,
-								"info":   string(md),
-								"title":  title,
-								"pcode":  scode,
-								"pname":  sname,
-								"fid":    followid,
-							})
-							if !isSaveOk {
-								log.Println("保存到cassandra出错!", userId)
-								return
-							}
-							pushnum := len(*pushArray)
-							//微信推送
-							if applystatus == 1 && isPushWx == 1 && s_m_openid != "" {
-								lastTime := util.Int64All((*(*pushArray)[0])["l_publishtime"])
-								pushtt := fmt.Sprintf(WxTitle, tit)
-								Tip1 := ""
-								minute := time.Now().Unix() - lastTime
-								if minute > -1 && minute < 61 {
-									Tip1 = fmt.Sprintf("%d秒前发布的:\n", minute)
-								} else {
-									minute = minute / 60
-									if minute < 121 {
-										if minute < 1 {
-											minute = 1
-										}
-										Tip1 = fmt.Sprintf("%d分钟前发布的:\n", minute)
-									}
+						LastLen = LastLen - len([]rune(pushtt)) - len([]rune(Tip1))
+						Remark := ""
+						bshow := false
+						for n := 1; n < pushnum+1; n++ {
+							Remark += fmt.Sprintf("%d %s\n", n, (*(*pushArray)[n-1])["s_title"])
+							if len([]rune(Remark)) > LastLen {
+								if n == pushnum {
+									bshow = true
 								}
-								LastTip := ""
-								if pushnum > 1 {
-									LastTip = fmt.Sprintf("...(共%d条)", pushnum)
-								}
-								LastLen = LastLen - len([]rune(pushtt)) - len([]rune(Tip1))
-								Remark := ""
-								bshow := false
-								for n := 1; n < pushnum+1; n++ {
-									Remark += fmt.Sprintf("%d %s\n", n, (*(*pushArray)[n-1])["s_title"])
-									if len([]rune(Remark)) > LastLen {
-										if n == pushnum {
-											bshow = true
-										}
-										break
-									}
-								}
-								if bshow {
-									LastTip = ""
-								}
-								log.Println("微信推送", userId, s_m_openid, pushnum, tit)
-								lastcreatetime := ""
-								lastdata, _ := tools.MQFW.Find(FOLLOW_COLLECTION, map[string]interface{}{
-									"s_userid": userId,
-								}, `{"l_createtime":-1}`, `{"l_createtime":1}`, false, 0, 1)
-								if lastdata != nil && len(*lastdata) == 1 {
-									if (*lastdata)[0]["l_createtime"] != nil {
-										l_createtime, _ := (*lastdata)[0]["l_createtime"].(int64)
-										if l_createtime > 0 {
-											lastcreatetime = util.FormatDateByInt64(&l_createtime, util.Date_Short_Layout)
-										}
-									}
-								}
-								if lastcreatetime == "" {
-									now := time.Now()
-									lastcreatetime = util.FormatDate(&now, util.Date_Short_Layout)
-								}
-								rpccall.SendWinXin(&qrpc.NotifyMsg{
-									Openid:      s_m_openid,
-									Title:       fmt.Sprintf(WxTitle, tit),
-									Remark:      Tip1 + Remark + LastTip,
-									Detail:      WxGroup,
-									Service:     lastcreatetime,
-									Color:       WxColor,
-									DetailColor: WxDetailColor,
-									Url:         ViewDomain + "/front/sess/" + se.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushfollowlist") + "__" + tmpid + "__" + followid,
-								}, userId)
+								break
 							}
-							if jpushid != "" || opushid != "" { //极光推送
-								jpushtitle := strings.Replace((*((*pushArray)[0]))["s_title"].(string), "\n", "", -1)
-								if len([]rune(jpushtitle)) > 80 {
-									jpushtitle = string([]rune(jpushtitle)[:80]) + "..."
-								}
-								if pushnum > 1 {
-									jpushtitle = fmt.Sprintf("1. %s\n...(共%d条)", jpushtitle, pushnum)
+						}
+						if bshow {
+							LastTip = ""
+						}
+						lastcreatetime := ""
+						lastdata, _ := tools.MQFW.Find(FOLLOW_COLLECTION, map[string]interface{}{
+							"s_userid": userId,
+						}, `{"l_createtime":-1}`, `{"l_createtime":1}`, false, 0, 1)
+						if lastdata != nil && len(*lastdata) == 1 {
+							if (*lastdata)[0]["l_createtime"] != nil {
+								l_createtime, _ := (*lastdata)[0]["l_createtime"].(int64)
+								if l_createtime > 0 {
+									lastcreatetime = util.FormatDateByInt64(&l_createtime, util.Date_Short_Layout)
 								}
-								isPushOk := rpccall.AppPushServiceCall(map[string]interface{}{
-									"phoneType":   phoneType,
-									"otherPushId": opushid,
-									"jgPushId":    jpushid,
-									"descript":    jpushtitle,
-									"type":        "project",
-									"userId":      userId,
-									"url":         "/jyapp/free/sess/" + se.EncodeString(userId+",_id,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushfollowlist") + "__" + tmpid + "__" + followid,
-								})
-								log.Println("app推送", userId, s_m_openid, a_m_openid, s_phone, phoneType, jpushid, opushid, isPushOk, pushnum, tit)
 							}
-
 						}
+						if lastcreatetime == "" {
+							now := time.Now()
+							lastcreatetime = util.FormatDate(&now, util.Date_Short_Layout)
+						}
+						isPushOk := rpccall.SendWinXin(&qrpc.NotifyMsg{
+							Openid:      s_m_openid,
+							Title:       fmt.Sprintf(WxTitle, tit),
+							Remark:      Tip1 + Remark + LastTip,
+							Detail:      WxGroup,
+							Service:     lastcreatetime,
+							Color:       WxColor,
+							DetailColor: WxDetailColor,
+							Url:         ViewDomain + "/front/sess/" + se.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushfollowlist") + "__" + tmpid + "__" + followid,
+						}, userId)
+						log.Println("微信推送", isPushOk, userId, s_m_openid, pushnum, tit)
+					}
+					if jpushid != "" || opushid != "" { //极光推送
+						jpushtitle := strings.Replace((*((*pushArray)[0]))["s_title"].(string), "\n", "", -1)
+						if len([]rune(jpushtitle)) > 80 {
+							jpushtitle = string([]rune(jpushtitle)[:80]) + "..."
+						}
+						if pushnum > 1 {
+							jpushtitle = fmt.Sprintf("1. %s\n...(共%d条)", jpushtitle, pushnum)
+						}
+						isPushOk := rpccall.AppPushServiceCall(map[string]interface{}{
+							"phoneType":   phoneType,
+							"otherPushId": opushid,
+							"jgPushId":    jpushid,
+							"descript":    jpushtitle,
+							"type":        "project",
+							"userId":      userId,
+							"url":         "/jyapp/free/sess/" + se.EncodeString(userId+",_id,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushfollowlist") + "__" + tmpid + "__" + followid,
+						})
+						log.Println("app推送", userId, s_m_openid, a_m_openid, s_phone, phoneType, jpushid, opushid, isPushOk, pushnum, tit)
 					}
 				}
-			}()
+			}
 		}
-	}, func(e interface{}) {
-		log.Println("给用户推送关注信息时出错:", e)
-	})
+	}
 	return pushArray
 }

+ 0 - 116
src/jfw/modules/pushproject/src/listdb/listdb.go

@@ -1,116 +0,0 @@
-package listdb
-
-import (
-	"config"
-	"followpush"
-	"log"
-	"qfw/util"
-	"sort"
-	"sync"
-	"time"
-	"tools"
-
-	"gopkg.in/mgo.v2/bson"
-)
-
-type arr []*map[string]interface{}
-
-func (a *arr) Len() int {
-	return len(*a)
-}
-func (a *arr) Less(i, j int) bool {
-	return util.Int64All((*(*a)[i])["publishtime"]) < util.Int64All((*(*a)[j])["publishtime"])
-}
-func (a *arr) Swap(i, j int) {
-	tmp := (*a)[i]
-	(*a)[i] = (*a)[j]
-	(*a)[j] = tmp
-}
-
-type ListDB struct {
-	Lock      *sync.Mutex
-	DB        *arr
-	Stype     string
-	timestamp int64
-	Lastid    bson.ObjectId //更新的最后id
-}
-
-var fields map[string]interface{} = map[string]interface{}{
-	"type":        1,
-	"toptype":     1,
-	"subtype":     1,
-	"comeintime":  1,
-	"publishtime": 1,
-	"title":       1,
-	"projectname": 1,
-	"projectcode": 1,
-	"area":        1,
-	"href":        1,
-	"areaval":     1,
-}
-
-var Bid *ListDB
-
-func Inits() {
-	Bid = &ListDB{
-		Lock:      new(sync.Mutex),
-		DB:        &arr{},
-		timestamp: 0,
-	}
-	go Bid.update()
-}
-
-func (l *ListDB) update() {
-	l.UpdateData()
-	time.AfterFunc(3*time.Minute, l.update)
-}
-
-func (l *ListDB) UpdateData() {
-	util.Catch()
-	followpush.Lock.Lock()
-	pushlastid := config.Sysconfig["lastid"]
-	followpush.Lock.Unlock()
-	l.Lock.Lock()
-	defer l.Lock.Unlock()
-	pushOid := bson.ObjectIdHex(pushlastid.(string))
-	q := map[string]interface{}{
-		//"extracttype": bson.M{"$exists": true},
-		"extracttype": 2,
-	}
-	if l.Lastid.Valid() && l.Lastid.Hex() < pushOid.Hex() {
-		//此条件要更新
-		q["$and"] = []bson.M{
-			bson.M{"_id": bson.M{"$gt": l.Lastid}},
-			bson.M{"_id": bson.M{"$lte": pushOid}},
-		}
-	} else if !l.Lastid.Valid() {
-		//此条件是初始化数据,查询数据小于等于pushid即可
-		q["_id"] = bson.M{
-			"$lte": pushOid,
-		}
-	} else {
-		return
-	}
-	//log.Println(q, "query")
-	util.Try(func() {
-		session := tools.MQFW.GetMgoConn()
-		defer tools.MQFW.DestoryMongoConn(session)
-		//此处不排序,谁查谁排序(不索引会造成发布时间乱序)
-		query := session.DB(tools.MQFW.DbName).C("bidding").Find(q).Select(fields).Sort("publishtime").Iter()
-		for tmp := new(map[string]interface{}); query.Next(tmp); {
-			*l.DB = append(*l.DB, tmp)
-			last := (*tmp)["_id"].(bson.ObjectId)
-			if !l.Lastid.Valid() || l.Lastid.Hex() < last.Hex() {
-				l.Lastid = last
-			}
-			if l.DB.Len() > 400000 {
-				*l.DB = (*l.DB)[l.DB.Len()-400000:]
-			}
-			tmp = new(map[string]interface{})
-		}
-	}, func(e interface{}) {
-		log.Println(e)
-	})
-	sort.Sort(l.DB)
-	//log.Println(l.DB.Len())
-}

+ 4 - 9
src/jfw/modules/pushproject/src/main.go

@@ -11,7 +11,6 @@ import (
 	"qfw/util"
 	"qfw/util/elastic"
 	"qfw/util/redis"
-	"rpccall"
 	"rpcpush"
 	"time"
 	"timetask"
@@ -22,8 +21,8 @@ func init() {
 	redis.InitRedisBySize(config.Sysconfig["redisServers"].(string), 200, 30, 300)
 	elastic.InitElasticSize(config.Sysconfig["elasticsearch"].(string), util.IntAllDef(config.Sysconfig["elasticPoolSize"], 30))
 	followpush.MaxSearch = util.IntAllDef(config.Sysconfig["maxSearch"], 10000)
-	rpccall.WeixinRpcServer = config.Sysconfig["weixinRpcServer"].(string)
-
+	followpush.PushPool = make(chan bool, util.IntAllDef(config.Sysconfig["pushPool"], 30))
+	followpush.EachPool = make(chan bool, util.IntAllDef(config.Sysconfig["eachPool"], 30))
 	//初始化cassandra
 	cassandra := config.Sysconfig["cassandra"].(map[string]interface{})
 	ca.ViewCacheLen = true
@@ -38,20 +37,16 @@ func init() {
 }
 
 func main() {
-	time.Sleep(2 * time.Second)
-	log.Println(config.Sysconfig["rpcPort"], config.Sysconfig)
 	go runJob()
 	go timetask.ClearRedis()
-	//listdb.Inits()
 	crpc := new(rpcpush.FollowPushRpc)
 	rpc.Register(crpc)
 	rpc.HandleHTTP()
 	port, _ := config.Sysconfig["rpcPort"].(string)
 	l, _ := net.Listen("tcp", ":"+port)
 	go http.Serve(l, nil)
-	log.Println("启动关注推送系统", port)
-	b := make(chan bool)
-	<-b
+	log.Println("项目推送程序启动。。。", port)
+	<-chan bool(nil)
 }
 
 func runJob() {

+ 0 - 27
src/jfw/modules/pushproject/src/main_test.go

@@ -1,27 +0,0 @@
-package main
-
-import (
-	"log"
-	"strings"
-	"testing"
-
-	"gopkg.in/mgo.v2/bson"
-)
-
-func Test_main(t *testing.T) {
-	tmp := make(map[string]interface{})
-	tmp["ss"] = "ssss"
-	ss := tmp
-	m1 := map[string]*map[string]interface{}{}
-	m1["aa"] = &ss
-	tmp = make(map[string]interface{})
-	log.Println(m1["aa"])
-
-	log.Println(bson.ObjectIdHex("100000ee36b82b12a0000001").Hex())
-
-}
-
-func Test_1(t *testing.T) {
-	log.Println(strings.Contains("aassdf", "0"))
-
-}

部分文件因为文件数量过多而无法显示