Browse Source

wip:首页广告位&&app下载路由

wangkaiyue 1 year ago
parent
commit
bbfbbcbdee

+ 19 - 11
src/jfw/front/index.go

@@ -23,19 +23,22 @@ type NewIndex struct {
 	*xweb.Action
 	newIndex          xweb.Mapper `xweb:"/"`                             //首页改版
 	entServerTransfer xweb.Mapper `xweb:"/front/entServerTransfer/(.*)"` //企业服务中转
+	appDownload       xweb.Mapper `xweb:"/front/appDownload"`            //新app下载页面
 }
 
-var entServerTransferMap map[string]map[bool]string
-var BiddingTypeUrl = map[int]string{
-	1:  "/list/stype/ZBYG.html",
-	2:  "/list/stype/ZBJG.html",
-	3:  "/list/stype/CGYX.html",
-	6:  "/list/stype/XMFB.html",
-	13: "/list/rmxm/",
-	14: "/list/xxxm/",
-	15: "/list/gjxm/",
-	16: "/list/sjxm/",
-}
+var (
+	entServerTransferMap map[string]map[bool]string
+	BiddingTypeUrl       = map[int]string{
+		1:  "/list/stype/ZBYG.html",
+		2:  "/list/stype/ZBJG.html",
+		3:  "/list/stype/CGYX.html",
+		6:  "/list/stype/XMFB.html",
+		13: "/list/rmxm/",
+		14: "/list/xxxm/",
+		15: "/list/gjxm/",
+		16: "/list/sjxm/",
+	}
+)
 
 func init() {
 	xweb.AddAction(&NewIndex{})
@@ -172,6 +175,11 @@ func (nIndex *NewIndex) EntServerTransfer(code string) {
 	_ = nIndex.Redirect(toUrl)
 }
 
+func (nIndex *NewIndex) AppDownload() {
+	nIndex.T["includedInfo"] = GetIncludedInfo()
+	nIndex.Render("/frontRouter/pc/AppDownload/free/index.html", &nIndex.T)
+}
+
 // 推荐标讯专区
 func GetRecommendBidZone(typ int, pageSize int) (list []map[string]interface{}, typs string) {
 	if typ == 0 {

+ 1 - 1
src/web/templates/common/pc-header-nav-mini.html

@@ -20,7 +20,7 @@
                     <a href="">付费指导</a>
                 </li>
                 <li class="menu-item">
-                    <a href="">APP下载</a>
+                    <a href="/front/appDownload">APP下载</a>
                 </li>
                 <li class="menu-item">
                     <a href="/helpCenter/index">帮助中心</a>

+ 8 - 27
src/web/templates/pc/template/index/banner-module-27.html

@@ -1,35 +1,16 @@
 <!-- module27 -->
+{{$ad_27:=(Ad "new-pc-index-twenty-seven" -1 .Host)}}
+{{if $ad_27}}
 <section class="banner-module-container-27">
   <ul class="banner-module-list-27">
+    {{range $ad := $ad_27}}
     <li class="banner-module-item-27">
-      <a href="">
-        <img src="" alt="">
-      </a>
-    </li>
-    <li class="banner-module-item-27">
-      <a href="">
-        <img src="" alt="">
-      </a>
-    </li>
-    <li class="banner-module-item-27">
-      <a href="">
-        <img src="" alt="">
-      </a>
-    </li>
-    <li class="banner-module-item-27">
-      <a href="">
-        <img src="" alt="">
-      </a>
-    </li>
-    <li class="banner-module-item-27">
-      <a href="">
-        <img src="" alt="">
-      </a>
-    </li>
-    <li class="banner-module-item-27">
-      <a href="">
-        <img src="" alt="">
+      <a href="{{$ad.S_link}}">
+        <img src='{{$ad.S_pic}}' alt="{{$ad.S_picalt}}">
       </a>
     </li>
+    {{end}}
   </ul>
 </section>
+{{end}}
+