Jelajahi Sumber

Merge branch 'feature/v4.8.83_wky' of qmx/jy into feature/v4.8.83

wangkaiyue 1 tahun lalu
induk
melakukan
86ec43316c

+ 14 - 0
src/index.yaml

@@ -97,6 +97,20 @@ topMenu:
       - name: 招标项目管理
         href: /front/entServerTransfer/tbxmgl
 
+topMenuSpecial:
+  - name: 招标公告
+    href: /list/stype/ZBGG.html
+  - name: 招标结果
+    href: /list/stype/ZBGG.html
+  - name: 采购意向
+    href: /list/stype/CGYX.html
+  - name: 企业直采
+    href: /list/stype/QYZC.html
+  - name: 热门项目
+    href: /list/rmxm/
+  - name: 市场分析
+    href: /big/page/sc
+
 # 区位配置
 areaLocation:
   - name: 华北

+ 1 - 0
src/jfw/tag/a_init.go

@@ -17,4 +17,5 @@ func init() {
 	xweb.RootApp().AddTmplVar("ParseHtmlAttr", ParseHtmlAttr)
 	xweb.RootApp().AddTmplVar("Export", Export)
 	xweb.RootApp().AddTmplVar("GetAreaLocations", GetAreaLocations)
+	xweb.RootApp().AddTmplVar("GetTopMenuSpecial", GetTopMenuSpecial)
 }

+ 11 - 1
src/jfw/tag/util.go

@@ -40,7 +40,10 @@ type AreaDom struct {
 	Url   string `json:"url"`
 }
 
-var JyAreaLocation []*AreaLocation
+var (
+	JyAreaLocation   []*AreaLocation
+	JyTopMenuSpecial []map[string]interface{}
+)
 
 var initAreaLocations = func() []*AreaLocation {
 	var jyAreaLocation []*AreaLocation
@@ -63,3 +66,10 @@ func GetAreaLocations() []*AreaLocation {
 	}
 	return JyAreaLocation
 }
+
+func GetTopMenuSpecial() []map[string]interface{} {
+	if len(JyTopMenuSpecial) == 0 {
+		return g.Cfg("index").MustGet(context.Background(), "topMenuSpecial").Maps()
+	}
+	return JyTopMenuSpecial
+}

+ 3 - 4
src/web/templates/common/pc-header-nav-second.html

@@ -8,10 +8,9 @@
       <p class="pc-header-nav-second-head-desc">全国招标信息<br>免费看,不遮挡</p>
     </div>
     <div class="pc-header-nav-second-head-right">
-      <a href="" class="pc-header-nav-second-head-right-item">招标公告</a>
-      <a href="" class="pc-header-nav-second-head-right-item">招标公告</a>
-      <a href="" class="pc-header-nav-second-head-right-item">招标公告</a>
-      <a href="" class="pc-header-nav-second-head-right-item">招标公告</a>
+      {{range $menu :=GetTopMenuSpecial}}
+        <a href="{{$menu.href}}" class="pc-header-nav-second-head-right-item">{{$menu.name}}</a>
+      {{end}}
     </div>
   </div>
  </div>