Forráskód Böngészése

Merge branch 'hotfix/v1.0.6.1_wky' of jianyu/jyseo into hotfix/v1.0.6.1

wangkaiyue 1 éve
szülő
commit
cadcd6fdfa

+ 8 - 0
internal/tags/util.go

@@ -72,3 +72,11 @@ func Highlight(desc, keyword string) string {
 	}
 	return strings.ReplaceAll(desc, keyword, fmt.Sprintf("<i>%s</i>", keyword))
 }
+
+func GetALlLetterCode() []string {
+	var rData []string
+	for i := 65; i <= 90; i++ {
+		rData = append(rData, fmt.Sprintf("%c", rune(i)))
+	}
+	return rData
+}

+ 19 - 0
resource/template/mobile/components/tag-card-zimu.html

@@ -0,0 +1,19 @@
+<section>
+    <section class="tag-card bg-white text-list-container mt12" style="margin-top: 0.24rem;">
+      <header class="tag-card-hd">
+        <h3 class="tag-card-title">按字母分类</h3>
+        <div class="tag-card-actions"></div>
+      </header>
+      <main class="tag-card-bd">
+        <div class="tag-card-bd-content">
+          <ul class="tag-card-i-content-list max-height clearfix">
+            {{range $v:=GetALlLetterCode}}
+            <li class="text-list-item text-button fl">
+              <a href="/tags/letter/{{$v}}_1.html">{{$v}}</a>
+            </li>
+            {{end}}
+          </ul>
+        </div>
+      </main>
+    </section>
+  </section>

+ 2 - 1
resource/template/mobile/industry_index.html

@@ -19,7 +19,8 @@
 
             <!-- 数据列表-->
             {{include "mobile/components/tag-card-text-list.html" .}}
-
+            <!-- 字母 -->
+            {{include "mobile/components/tag-card-zimu.html" .}}
             {{include "mobile/components/tag-footer.html" .}}
         </div>
     </main>

+ 2 - 1
resource/template/mobile/keywordLetter_index.html

@@ -41,7 +41,8 @@
             <section class="tag-breadcrumb-navigation ellipsis">
                 <span>当前位置:</span>
                 <a href="/">剑鱼标讯首页</a>
-                &gt; <span class="current-tag">{{.keywordsNode.KeyWord}}招标采购</span>
+                &gt; <a href="/tags/industry/all.html">{{.keywordsNode.KeyWord}}招标采购</a>
+                &gt; <span class="current-tag">招标采购{{.letterCode}}类汇总</span>
             </section>
             {{include "mobile/components/tag-footer.html" .}}
         </div>