Browse Source

Merge branch 'master' into feature/v4.8.36

lianbingjie 2 years ago
parent
commit
fdff36f616

+ 1 - 0
src/jfw/front/pcIndex.go

@@ -475,6 +475,7 @@ func (f *PcIndex) SearchResult(at, name string) error {
 	if userid := f.GetSession("userId"); userid != nil {
 		f.T["portraitpower"] = jylabutil.IsAuthorized(userid.(string), "i_portraitpower")
 	}
+	f.T["simpleTemplateData"] = map[string]interface{}{"simpleTemplateData": ""}
 	return f.Render("/pc/classifylist.html", &f.T)
 }
 

+ 37 - 1
src/jfw/front/shorturl.go

@@ -21,11 +21,12 @@ import (
 	"app.yhyue.com/moapp/jybase/date"
 	mg "app.yhyue.com/moapp/jybase/mongodb"
 
-	elastic "app.yhyue.com/moapp/jybase/es"
 	"regexp"
 	"strings"
 	"time"
 
+	elastic "app.yhyue.com/moapp/jybase/es"
+
 	"app.yhyue.com/moapp/jybase/encrypt"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"app.yhyue.com/moapp/jybase/redis"
@@ -1137,6 +1138,41 @@ func (s *Short) NologinCommon(userId, stype, id, sid string) error {
 			s.T["newBidInfoList"] = tg.GetNewBidInfo()
 			s.T["industryInfoList"] = tg.GetConsult()
 			s.T["hotLabelList"] = tg.GetHotLabel(30)
+			s.T["simpleTemplateData"] = map[string]interface{}{
+				"obj": map[string]interface{}{
+					"subtype":         obj["subtype"],
+					"purchasing":      obj["purchasing"],
+					"package":         obj["package"],
+					"fwtscode":        obj["fwtscode"],
+					"fwtsname":        obj["fwtsname"],
+					"s_winner":        obj["s_winner"],
+					"projectname":     obj["projectname"],
+					"title":           obj["title"],
+					"area":            obj["area"],
+					"city":            obj["city"],
+					"agency":          obj["agency"],
+					"buyer":           obj["buyer"],
+					"buyerperson":     obj["buyerperson"],
+					"buyertel":        obj["buyertel"],
+					"winnertel":       obj["winnertel"],
+					"winner_enttel":   obj["winner_enttel"],
+					"bidamount":       obj["bidamount"],
+					"winner":          obj["winner"],
+					"budget":          obj["budget"],
+					"_id":             obj["_id"],
+					"projectinfo":     obj["projectinfo"],
+					"href":            obj["href"],
+					"winnerMap":       obj["winnerMap"],
+					"entId":           obj["entId"],
+					"publishtime":     obj["publishtime"],
+					"industry":        obj["industry"],
+					"s_subscopeclass": obj["s_subscopeclass"],
+					"areaadd":         obj["areaadd"],
+					"stypeadd":        obj["stypeadd"],
+					"indadd":          obj["indadd"],
+					"type":            obj["type"],
+				},
+			}
 			content, _ := s.Render4Cache("/pc/tags/detail.html", &s.T)
 			redis.Put("newother", catchKey, string(content), 60*2)
 			return s.SetBody(content)

+ 13 - 0
src/jfw/front/supsearch.go

@@ -550,6 +550,19 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		p.T["portraitpower"] = jylabutil.IsAuthorized(userId, "i_portraitpower")
 	}
 	p.T["isLimit"] = isLimit
+	if module == "supsearch" {
+		p.T["simpleTemplateData"] = map[string]interface{}{
+			"isEntniche":      p.T["isEntniche"],
+			"isVip":           p.T["isVip"],
+			"isMember":        p.T["isMember"],
+			"vipBefore202209": p.T["vipBefore202209"],
+			"searchMode":      searchMode,
+			"searchvalue":     keywords,
+			"additionalWords": additionalWords,
+			"listLength":      util.If(list != nil, len(list), 0),
+			"list":            p.T["list"],
+		}
+	}
 	return p.Render("/pc/supsearch.html", &p.T)
 }
 

+ 13 - 0
src/jfw/front/tags.go

@@ -253,6 +253,11 @@ func (this *Tags) Index(types, name string) {
 	this.T["url"] = this.Url()
 	this.T["filters"] = filters
 	this.T["nologin"] = qu.ObjToString(this.GetSession("userId")) == ""
+	this.T["simpleTemplateData"] = map[string]interface{}{
+		"filters":  filters,
+		"haveList": haveList,
+		"type":     types,
+	}
 	this.Render("/pc/tags/index.html", &this.T)
 }
 
@@ -680,6 +685,14 @@ func (this *Tags) GetBidding(industry, area, city, stype, keyword string, reques
 				for _, v := range *datas {
 					v["_id"] = encrypt.CommonEncodeArticle("content", qu.ObjToString(v["_id"]))
 					v["date"] = time.Unix(qu.Int64All(v["publishtime"]), 0).Format(date.Date_Short_Layout)
+					highlight, _ := v["highlight"].(map[string][]string)
+					detail := ""
+					for _, val := range highlight["detail"] {
+						detail += public.ClearHtml.ReplaceAllString(val, "")
+					}
+					if detail != "" {
+						v["detail"] = detail
+					}
 				}
 				if strings.Contains(industry, "_") {
 					industry = strings.Split(industry, "_")[0]

+ 0 - 9
src/web/staticres/public-pc/js/pc-bottom.js

@@ -335,12 +335,3 @@ var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : "
 setTimeout(function(){
   $("#cnzz_stat_icon_1261815924 a").text("");
 },1000)
-
-$(function () {
-  function fastNav() {
-   	if (!loginflag){
-		$(".fast-nav").show();
-	}
-  }
-  fastNav();
-});

+ 2 - 0
src/web/staticres/tags/css/tags-lib.css

@@ -172,6 +172,8 @@ a:hover {
     font-size: 14px;
     line-height: 22px;
     color: #686868;
+    text-align: left;
+    word-break: break-all;
 }
 .search-list-item .list-item-tags {
     margin-right: 8px;

+ 1 - 8
src/web/templates/common/pcbottom.html

@@ -24,17 +24,10 @@
             <dl>
               <dt><a {{if $v.Link}} href="{{$v.Link}}"{{else}} href="javascript:;"{{end}}>{{$v.Title}}</a></dt>
               {{range $ii,$c := $v.Child }}
-                <dd><a {{if $v.Link}} href="{{$c.Link}}"{{else}} href="javascript:;"{{end}}>{{$c.Title}}</a></dd>
+                <dd><a {{if $c.Link}} href="{{$c.Link}}"{{else}} href="javascript:;"{{end}}>{{$c.Title}}</a></dd>
               {{end}}
             </dl>
           {{end}}
-
-          <dl class="fast-nav" style="display:none">
-              <dt>快速导航</dt>
-              <dd><a href="/tags/area/all.html">招标地区分类</a></dd>
-              <dd><a href="/tags/industry/all.html">招标行业分类</a></dd>
-              <dd><a href="/sitemap.html">网站地图</a></dd>
-          </dl>
         </div>
                 <div class="jy_classify_r">
                     <div class="jy_classify_kefu">

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

@@ -19,7 +19,7 @@
     // 全局模版变量
     window.goTemplateData = {
       inIframe: window.parent !== window,
-      params: {{.T}},
+      params: {{if .T.simpleTemplateData}} {{.T.simpleTemplateData}}  {{else}} {{.T}} {{end}},
       session: {
         s_avatar: {{session "s_avatar"}},
         s_headimageurl: {{session "s_headimageurl"}}