Sfoglia il codice sorgente

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

malin 3 anni fa
parent
commit
aa3eb06161

+ 3 - 0
README.md

@@ -2,5 +2,8 @@
 微信和pc端功能
 weixin sdk https://github.com/wizjin/weixin
 web用xweb框架
+<<<<<<< HEAD
 v4.6.3.4
 大会员等落地页及购买页优化
+=======
+>>>>>>> release

+ 1 - 1
src/jfw/front/supsearch.go

@@ -292,7 +292,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 	secondKWS := ""
 	if len(s_word) > 0 || len(industry) > 0 {
 		status = 2
-		_, _, _, _, secondFlag, count, totalPage, list = bidsearch.SearchData(2, p.Request, 1, util.ObjToString(p.GetSession("userId")), secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, queryItems, bidSearch_field_1, notkey, isPayedUser)
+		_, _, _, _, secondFlag, count, totalPage, list = bidsearch.SearchData("pc", p.Request, 1, util.ObjToString(p.GetSession("userId")), secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, queryItems, bidSearch_field_1, notkey, isPayedUser)
 	} else {
 		p.DisableHttpCache()
 		p.T["list"] = PCS_list("") //Newbids("")[0]

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

@@ -150,7 +150,7 @@ func (m *Front) PcAjaxReq() {
 			}
 		}
 		if isLimit == 1 {
-			_, _, _, pcAjaxFlag, secondFlag, count, totalPage, list = bidsearch.SearchData(1, m.Request, currentPage, util.ObjToString(m.GetSession("userId")), secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, queryItems, field, notkey, isPayedUser)
+			_, _, _, pcAjaxFlag, secondFlag, count, totalPage, list = bidsearch.SearchData("pc", m.Request, currentPage, util.ObjToString(m.GetSession("userId")), secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, queryItems, field, notkey, isPayedUser)
 		}
 	}
 	secondList, totalPage, _ = bidsearch.LisetData(1, currentPage, list, secondFlag, config.Sysconfig, isPayedUser) //只有前20条
@@ -375,7 +375,7 @@ func (m *Front) WxsearchlistPaging() {
 				}
 			}
 			if isLimit == 1 {
-				secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData(4, m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser)
+				secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData("wx", m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser)
 			}
 			//新增历史记录
 			arrs = bidsearch.AddHistory(history, searchvalue)

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

@@ -283,7 +283,7 @@ func (m *Front) WxsearchlistPaging() {
 			filed = bidSearch_field
 		}
 		if isLimit == 1 {
-			secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData(3, m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser)
+			secondKWS, b_word, a_word, _, secondFlag, _, _, list = bidsearch.SearchData("app", m.Request, pageNum, util.ObjToString(m.GetSession("userId")), secondKWS, searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_APP, true, queryItems, filed, notkey, isPayedUser)
 		}
 	}
 

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

@@ -19,7 +19,7 @@
   if (typeof window._jyGlobal !== 'object') { window._jyGlobal = {} }
   try { window._jyGlobal.baseURL = {{Msg "seo" "buryingPointUrl"}} } catch (e) { window._jyGlobal.baseURL = '' }
 </script>
-<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/track/j-track.min.js?v={{Msg "seo" "mod_version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/track/j-track.min.js?v={{Msg "seo" "version"}}'></script>
 <!--E-meta-->
 
 <!--S-必定会使用的资源-->

+ 1 - 1
src/jfw/modules/app/src/web/templates/common/js.html

@@ -9,4 +9,4 @@
       console.log = function () {}
   }
 </script>
-<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/track/j-track.min.js?v={{Msg "seo" "mod_version"}}'></script>
+<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/track/j-track.min.js?v={{Msg "seo" "version"}}'></script>

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

@@ -307,7 +307,7 @@ func PublicSearch(userId, selectType, publishtime string, bidSearchOldUserLimit
 }
 
 //所有的再次分词查询 只查标题
-func IntegratedData(stype int, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, secondFlag, area, publishtime, subtype, buyerclass, notkey string, queryItems []string, list *[]map[string]interface{}) (string, string, string, string) {
+func IntegratedData(platform string, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, secondFlag, area, publishtime, subtype, buyerclass, notkey string, queryItems []string, list *[]map[string]interface{}) (string, string, string, string) {
 	var pcAjaxFlag string
 	secondSearch := false
 	for _, item := range queryItems {
@@ -323,7 +323,7 @@ func IntegratedData(stype int, s_word, secondKWS, industry, minprice, maxprice,
 		secRel := elastic.GetAllByNgram(INDEX, TYPE, qstr, findfields, bidSearch_sort, bidSearch_field, 0, 2*SearchPageSize_PC, 0, false)
 		if secRel != nil && len(*secRel) > 0 {
 			public.BidListConvert(industry, secRel)
-			if stype == 3 || stype == 4 {
+			if platform == "app" || platform == "wx" {
 				for _, v := range *secRel {
 					v["_id"] = util.EncodeArticleId2ByCheck(util.ObjToString(v["_id"]))
 				}
@@ -432,21 +432,12 @@ func LisetData(stype, pageNum int, list *[]map[string]interface{}, secondFlag st
 	return secondList, totalPage, hasNextPage
 }
 
-//1 2 pc 3 app 4 wx
-func SearchData(stype int, request *http.Request, currentPage int, userId, secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel string, start, pageSize int, isGetCount bool, queryItems []string, field, notkey string, isPayedUser bool) (second, b_word, a_word, pcAjaxFlag, secondFlag string, count, totalPage int64, list *[]map[string]interface{}) {
-	var (
-		platform    string
-		searchvalue = s_word
-	)
-	number := util.If(stype == 3 || stype == 4, 1, 0)
-	if stype == 3 {
-		platform = "app"
-		list, b_word, a_word, s_word = GetWxsearchlistData(s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, start, SearchPageSize_APP, queryItems, field, notkey)
-	} else if stype == 4 {
-		platform = "wx"
+func SearchData(platform string, request *http.Request, currentPage int, userId, secondKWS, s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel string, start, pageSize int, isGetCount bool, queryItems []string, field, notkey string, isPayedUser bool) (second, b_word, a_word, pcAjaxFlag, secondFlag string, count, totalPage int64, list *[]map[string]interface{}) {
+	var searchvalue = s_word
+	number := util.If(platform == "app" || platform == "wx", 1, 0)
+	if platform == "app" || platform == "wx" {
 		list, b_word, a_word, s_word = GetWxsearchlistData(s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, start, SearchPageSize_APP, queryItems, field, notkey)
 	} else {
-		platform = "pc"
 		count, totalPage, list = GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, winner, buyerclass, hasBuyerTel, hasWinnerTel, start, pageSize, isGetCount, queryItems, field, notkey, isPayedUser)
 	}
 
@@ -455,10 +446,10 @@ func SearchData(stype int, request *http.Request, currentPage int, userId, secon
 		listSize = len(*list)
 	}
 	if len([]rune(s_word)) > 3 && int(count) < SearchPageSize_PC && start == number {
-		s_word, pcAjaxFlag, secondFlag, second = IntegratedData(stype, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, secondFlag, area, publishtime, subtype, buyerclass, notkey, queryItems, list)
+		s_word, pcAjaxFlag, secondFlag, second = IntegratedData(platform, s_word, secondKWS, industry, minprice, maxprice, hasBuyerTel, hasWinnerTel, secondFlag, area, publishtime, subtype, buyerclass, notkey, queryItems, list)
 	}
 	public.SaveUserSearchLog(request, userId, -1, platform, "超级搜索", map[string]interface{}{
-		"search_word":        util.If(stype == 3 || stype == 4, searchvalue, s_word),
+		"search_word":        util.If(platform == "app" || platform == "wx", searchvalue, s_word),
 		"search_area":        area,
 		"search_price":       []string{minprice, maxprice},
 		"search_publishtime": publishtime,

+ 1 - 1
src/web/staticres/common-module/public/head.js

@@ -18,7 +18,7 @@
 try {
   // 剑鱼荟聚Event
   var hm = document.createElement("script");
-  hm.src = '/common-module/track/j-track.min.js?v=1'
+  hm.src = '/common-module/track/j-track.min.js?v=2'
   setTimeout(function(){
     var s = document.getElementsByTagName("script")[0];
     s.parentNode.insertBefore(hm, s);

File diff suppressed because it is too large
+ 0 - 0
src/web/staticres/common-module/track/j-track.min.js


File diff suppressed because it is too large
+ 0 - 0
src/web/staticres/common-module/track/j-track.min.js.map


+ 1 - 1
src/web/templates/big-member/wx/meta.html

@@ -19,7 +19,7 @@
   if (typeof window._jyGlobal !== 'object') { window._jyGlobal = {} }
   try { window._jyGlobal.baseURL = {{Msg "seo" "buryingPointUrl"}} } catch (e) { window._jyGlobal.baseURL = '' }
 </script>
-<script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "mod_version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "version"}}'></script>
 <!--E-meta-->
 
 <!--S-必定会使用的资源-->

+ 1 - 1
src/web/templates/big-member/wx/page_unit_portrayal.html

@@ -23,7 +23,7 @@
     if (typeof window._jyGlobal !== 'object') { window._jyGlobal = {} }
     try { window._jyGlobal.baseURL = {{Msg "seo" "buryingPointUrl"}} } catch (e) { window._jyGlobal.baseURL = '' }
     </script>
-    <script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "mod_version"}}'></script>
+    <script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "version"}}'></script>
     <script src="/big-member/js/rem.js"></script>
     <!--S-当前页面的css资源-->
     <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />

+ 1 - 1
src/web/templates/common/pnc.html

@@ -54,7 +54,7 @@
     });
   }
 </script>
-<script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "mod_version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "version"}}'></script>
 {{Html `<!--[if lt IE 9]><script src="{{Msg "seo" "cdn"}}/js/jquery.js?v={{Msg "seo" "version"}}"><![endif]-->`}}
 <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <script src="{{Msg "seo" "cdn"}}/js/bootstrap.min.js"></script>

+ 1 - 1
src/web/templates/common/weixin.html

@@ -4,4 +4,4 @@
   if (typeof window._jyGlobal !== 'object') { window._jyGlobal = {} }
   try { window._jyGlobal.baseURL = {{Msg "seo" "buryingPointUrl"}} } catch (e) { window._jyGlobal.baseURL = '' }
 </script>
-<script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "mod_version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/track/j-track.min.js?v={{Msg "seo" "version"}}'></script>

Some files were not shown because too many files changed in this diff