Procházet zdrojové kódy

Merge branch 'feature/v4.9.27' of https://jygit.jydev.jianyu360.cn/qmx/jy into dev/v4.9.27_wmh

wenmenghao321 před 1 rokem
rodič
revize
967b6926f7

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

@@ -304,7 +304,7 @@ func GetDocsData() (docClass []string, indexDocs [][]map[string]interface{}) {
 	if docClassNames != nil && len(*docClassNames) > 0 {
 		docSql := `SELECT d.id,d.docName,d.docFileSuffix,d.docTags,d.previewImgId,d.productType,d.source FROM jydocs.doc d LEFT JOIN jydocs.doc_statistics ds ON d.id=ds.docId WHERE FIND_IN_SET(?,d.docTags) ORDER BY ds.viewTimes DESC LIMIT 10 `
 		for _, dv := range *docClassNames {
-			if len(docClass) > 8 {
+			if len(docClass) > 7 {
 				break
 			}
 			name := common.InterfaceToStr(dv["name"])

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

@@ -715,7 +715,11 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 			"listLength":      util.If(list != nil, len(list), 0),
 		}
 	}
-	return p.Render("/pc/supsearch.html", &p.T)
+	//老版搜索页面
+	if strings.Contains(p.Request.URL.String(), "useOld") {
+		return p.Render("/pc/supsearch.html", &p.T)
+	}
+	return p.Render("/pc/search/index.html", &p.T)
 }
 
 // Newbids  最新招标信息 --已失效

+ 39 - 61
src/jfw/front/tags.go

@@ -511,54 +511,25 @@ func (this *Tags) GetNewBidInfo() (list []map[string]interface{}) {
 	list = bidInfosByCache(redisKey)
 	if len(list) == 0 {
 		list = bidInfosByCache(redisKeySL)
-		for {
-			if redisLock.TryLock() {
-				if len(list) == 0 {
-					list = newBidInfos()
-				}
-				if len(list) > 0 {
-					bidInfosToCache(list)
+		if len(list) == 0 {
+			list = newBidInfos()
+			bidInfosToCache(list)
+		} else {
+			go func() {
+				for {
+					if redisLock.TryLock() {
+						bidInfosToCache(newBidInfos())
+						redisLock.Unlock()
+					}
+					ri++
+					if len(list) > 0 || ri >= rn {
+						break
+					}
+					time.Sleep(100 * time.Millisecond)
 				}
-				redisLock.Unlock()
-			}
-			ri++
-			if len(list) > 0 || ri >= rn {
-				break
-			}
-			time.Sleep(100 * time.Millisecond)
+			}()
 		}
 	}
-	//rediskey := fmt.Sprintf("pcindex_newArticle")
-	//if l, ok := redis.Get("seoCache", rediskey).([]interface{}); ok && l != nil && len(l) > 0 {
-	//	list = qu.ObjArrToMapArr(l)
-	//} else {
-	//	// p397 未登录详情页最新招投标信息去掉拟建
-	//	var (
-	//		now         = time.Now()
-	//		startTime   = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix()) //最近7天
-	//		endTime     = fmt.Sprint(now.Unix())
-	//		publishTime = fmt.Sprintf("%s_%s", startTime, endTime)
-	//	)
-	//	_, _, lists := bidsearch.GetPcBidSearchData("", "", "", publishTime, "招标预告,招标公告,招标结果,招标信用信息", "", "", "", "", "", "", "", "", 1, false, nil, bidSearch_field_1, "", false, false, "", 50, "")
-	//	if lists != nil && len(*lists) > 10 {
-	//		*lists = (*lists)[0:10]
-	//		for _, v := range *lists {
-	//			v["_id"] = encrypt.CommonEncodeArticle("content", v["_id"].(string))
-	//			delete(v, "toptype")
-	//			delete(v, "s_subscopeclass")
-	//			tmpdate := v["publishtime"]
-	//			v["publishtime"] = qu.Int64All(tmpdate.(float64))
-	//			v["date"] = time.Unix(qu.Int64All(tmpdate.(float64)), 0).Format(date.Date_Short_Layout)
-	//			if v["budget"] != nil {
-	//				v["budget"] = ConversionMoeny(v["budget"])
-	//			} else if v["bidamount"] != nil {
-	//				v["budget"] = ConversionMoeny(v["bidamount"])
-	//			}
-	//		}
-	//		list = *lists
-	//		redis.Put("seoCache", rediskey, list, cacheTime)
-	//	}
-	//}
 	return list
 }
 
@@ -822,23 +793,30 @@ func (this *Tags) GetBidding(industry, area, city, stype, keyword string, reques
 	data, count, b = biddingByCache(rediskey, rediskeyCount)
 	if data == nil || len(data) == 0 || count == 0 {
 		data, count, b = biddingByCache(redisKeySL, redisKeyCountSL)
-		for {
-			if redisLock.TryLock() {
-				if data == nil || len(data) == 0 || count == 0 {
-					//获取数据库数据
-					data, count, b = biddingData()
-				}
-				//更新缓存
-				if data != nil && len(data) > 0 && count > 0 {
-					biddingToCache(data, count)
+		if data == nil || len(data) == 0 || count == 0 {
+			data, count, b = biddingData()
+			biddingToCache(data, count)
+		} else {
+			go func() {
+				for {
+					if redisLock.TryLock() {
+						if data == nil || len(data) == 0 || count == 0 {
+							//获取数据库数据
+							data, count, b = biddingData()
+						}
+						//更新缓存
+						if data != nil && len(data) > 0 && count > 0 {
+							biddingToCache(data, count)
+						}
+						redisLock.Unlock()
+					}
+					ri++
+					if (data != nil && len(data) > 0 && count > 0) || ri >= rn {
+						break
+					}
+					time.Sleep(100 * time.Millisecond)
 				}
-				redisLock.Unlock()
-			}
-			ri++
-			if (data != nil && len(data) > 0 && count > 0) || ri >= rn {
-				break
-			}
-			time.Sleep(100 * time.Millisecond)
+			}()
 		}
 	}
 	return data, count, b

+ 3 - 3
src/jfw/modules/app/src/app/front/wx.go

@@ -26,8 +26,8 @@ func init() {
 // 微信首页地址
 func (w *WX) Index(pageLabel string) error {
 	log.Println("---sessionId----:", w.Session().Id())
-	//是否是移动
-	if bm := mobileReg.MatchString(w.Header("User-Agent")); bm {
+	//是否是电脑
+	if bm := mobileReg.MatchString(w.Header("User-Agent")); !bm {
 		return w.Redirect(fmt.Sprintf("%s/partner/%s", config.Sysconfig["mainDomainName"].(string), pageLabel))
 	}
 	//未登录
@@ -37,5 +37,5 @@ func (w *WX) Index(pageLabel string) error {
 		return w.Redirect("/jyapp/jylab/mainSearch?partner=" + pageLabel)
 	}
 	//已登录
-	return w.Redirect("/jy_mobile/tabbar/home?from=wx")
+	return w.Redirect("/jy_mobile/tabbar/home?partner=" + pageLabel)
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 1
src/jfw/modules/bigmember/src/config.json


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

@@ -98,6 +98,7 @@ type config struct {
 	RestrictionSwitch     bool
 	RestrictionDoPool     int
 	RestrictionWaitPool   int
+	BidSearchOldUserLimit int64 // p480  原/publicapply/bidcoll/power 接口返回值的isOld添加到isAdd接口
 }
 
 type CustomerInfo struct {

+ 2 - 0
src/jfw/modules/bigmember/src/service/use/use.go

@@ -723,6 +723,7 @@ type UserInfo struct {
 	VipBefore202209 bool                  `json:"vipBefore202209"` //超级订阅:超前项目权限
 	EntSubscribe    int64                 `json:"entSubscribe"`    // 是否有企业订阅权限;0:否 1:是
 	DocsInfo        Docs                  `json:"docsInfo"`        //文库会员信息
+	IsOld           bool                  `json:"isOld"`           // 是否是老用户  注册时间在
 }
 
 // 文库会员信息
@@ -773,6 +774,7 @@ func (u *Use) IsAdd() {
 				EndDate:      bigPower.Data.Docs.EndDate,
 				FreeDownload: bigPower.Data.Docs.FreeDownload,
 			},
+			IsOld: bigPower.Data.Free.Registedate != 0 && bigPower.Data.Free.Registedate < config.Config.BidSearchOldUserLimit, //p480  原/publicapply/bidcoll/power 接口返回值的isOld添加到isAdd接口
 		}
 		var (
 			//Name string

+ 6 - 0
src/jfw/modules/bigmember/src/test/p480_test.http

@@ -0,0 +1,6 @@
+POST {{addr}}/bigmember/use/isAdd
+Cookie: SESSIONID={{session}};
+Content-Type: application/x-www-form-urlencoded
+
+
+###

+ 1 - 1
src/web/staticres/public-pc/js/header-nav-mini.js

@@ -115,7 +115,7 @@ var headerNavMini = {
     })
   },
   doLogin: function () {
-    if (location.pathname === '/') {
+    if (location.pathname === '/'||location.pathname === '/jylab/supsearch/index.html') {
       // 打开登录窗口,登录成功后去工作桌面
       openLoginDig(true)
     } else {

+ 1 - 1
src/web/templates/frontRouter/pc/page_big_pc/sess/index.html

@@ -14,7 +14,7 @@
     <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
     <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
     <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
-  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.2.21/iconfont.css">
+  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.5.6/iconfont.css">
     <!-- 高级语法兼容性处理  -->
     <script>
         if (String.prototype.startsWith === 'undefined') {

+ 10 - 1
src/web/templates/order/pc/docMember/detail.html

@@ -282,6 +282,15 @@
                               $(".pay_num").text(r.data.transaction_id);
                           }
                       }
+                      //发票
+                      if (r.data.order.is_can_invoice) {
+                          $(".openinvoice").css("display", "");
+                      }
+                      if (r.data.order.invoice_show) {
+                          $(".lookinvoice").css("display", "").on("click", function () {
+                              checkinvoice(r.data.applybill_status, orderCode)
+                          })
+                      }
                   }
                 if (r.data.order.order_status == -2 || r.data.order.order_status == -3) {
                   $("#status_cancelled").removeClass("hide");
@@ -407,7 +416,7 @@
         })
       })
       $(".payOrder").on("click", function () {
-        location.href = "/front/subvip/orderPay/" + orderCode;
+        location.href = "/front/docMember/orderPay/" + orderCode;
       })
       function diffCountdown(endTime) {
         timerId = setInterval(function () {

+ 1 - 1
src/web/templates/pc/detail/biddetail_login.html

@@ -15,7 +15,7 @@
   <link href="{{Msg "seo" "cdn"}}/pccss/pc-detail.css?v={{Msg "seo" "version"}}" rel="stylesheet">
   <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
   <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
-  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.2.21/iconfont.css">
+  <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.5.6/iconfont.css">
   <!-- 高级语法兼容性处理  -->
   <script>
     if (String.prototype.startsWith === 'undefined') {

+ 2 - 0
src/web/templates/pc/orderDetail.html

@@ -302,6 +302,8 @@
             var regionHtml = "";
             if (!area && !city && !district && !region) {
               regionHtml += "<span>全国</span>";
+            } else if(area && city && district && region &&  area.length === 0 && city.length === 0 && district.length === 0 && region.length === 0) {
+              regionHtml += "<span>全国</span>";
             } else {
               if (area && area.length > 0) {
                 for (var i = 0; i < area.length; i++) {

+ 109 - 0
src/web/templates/pc/search/index.html

@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+    <title>剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible"/>
+    <meta content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯" name="Keywords"/>
+    <meta content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。" name="Description"/>
+    <meta content="webkit" name="renderer">
+    <meta content="telephone=no" name="format-detection"/>
+    <meta content="招标采购搜索" theme="light" name="enable-header">
+    {{include "/common/pnc.html"}}
+    <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link rel="stylesheet" href="https://cdn-common.jianyu360.com/cdn/assets/iconfont/pc/24.5.6/iconfont.css">
+    <script src='{{Msg "seo" "cdn"}}/antiRes/js/mainHook.js?v={{Msg "seo" "version"}}'></script>
+    <!-- 高级语法兼容性处理  -->
+    <script>
+        if (String.prototype.startsWith === 'undefined') {
+            String.prototype.startsWith = function (str) {
+                if (str==null || str == "" || this.length == 0 || str.length > this.length) {
+                    return false
+                }
+                if (this.substr(0,str.length) == str) {
+                    return true
+                } else {
+                    return false
+                }
+            }
+        }
+        if (typeof Promise === 'undefined') {
+            document.write('<script src="https://cdn-common.jianyu360.com/cdn/lib/bluebird/3.7.2/js/browser/bluebird.core.min.js"><\/script>');
+        }
+        if (typeof fetch === 'undefined') {
+            document.write('<script src="//cdn-common.jianyu360.com/cdn/lib/whatwg-fetch/3.4.1/dist/fetch.umd.min.js"><\/script>');
+        }
+    </script>
+    <style>
+        #public-nav {
+            border-bottom: 1px solid #e0e0e0;
+            background: #fff;
+        }
+        .in-iframe.page--search--index .page-container {
+          padding-top: 0;
+        }
+        .page--search--index .page-container {
+            min-height: calc(100vh - 364px);
+            box-sizing: border-box;
+        }
+    </style>
+</head>
+<body class="page--search--index">
+{{include "/common/pchead.html"}}
+<div class="w-box page-container" >
+    <div id="main-app"></div>
+</div>
+<!-- 主应用依赖 -->
+<script src=//cdn-common.jianyu360.com/cdn/lib/url-polyfill/1.1.12/url-polyfill.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/qiankun/2.7.0/index.umd.min.js></script>
+<script src='{{Msg "seo" "cdn"}}/micro/js/qiankun-common-functions.js?v={{Msg "seo" "version"}}'></script>
+<script>
+    window.__QIANKUN_ROUTER_BASE = '/swordfish/page_big_pc'
+    qiankun.registerMicroApps(
+      [
+        {
+          name: 'bigMemberSubApp',
+          entry: '/page_big_pc/index.html',
+          container: '#main-app',
+          activeRule: '/',
+          props: {
+            className: window.parent !== window ? 'in-app' : 'in-web',
+            inject: function (options) {
+              options.Vue.prototype.$BRACE = window.$BRACE
+              if (options.router) {
+                addNotFindPage(options.router)
+              }
+            }
+          }
+        }
+      ],
+      {
+        beforeLoad: function (app) {
+          console.log('before load', app)
+        },
+        beforeMount: [
+          function (app) {
+            console.log('before mount', app)
+          }
+        ]
+      }
+    )
+    qiankun.start({
+      sandbox: false
+    })
+</script>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script>
+    $(function () {
+        haslogin({{.T.logid}});
+    })
+</script>
+<!--S-百度统计-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--E-百度统计-->
+</body>
+</html>

+ 1 - 1
src/web/templates/pc/template/index/doc-card-module.html

@@ -16,7 +16,7 @@
           <ul class="bidding-desc-card-column clearfix">
             {{range $kk,$vv := $v}}
             <li class="doc-card-list-item">
-              <div class='doc-card-list-item-img {{if not $vv.productType}}{{else if Eq $vv.productType 1}}free{{else if Eq $vv.productType 2}}good{{end}}'>
+              <div class='doc-card-list-item-img {{if not $vv.productType}}{{else if Eq $vv.productType 1}}free{{end}}'>
                 <img class="doc-main-img" src="{{$vv.previewImg}}" alt="doc-name">
                 {{if or (eq $vv.docFileSuffix "doc") (eq $vv.docFileSuffix "docx")}}
                 <img class="doc-type-img" src='/images/pc/word.png' alt="doc-type">

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů