Browse Source

文集列表页文章链接增加文集id

visuddhinanda 4 years ago
parent
commit
2c2d816c80
1 changed files with 6 additions and 7 deletions
  1. 6 7
      app/collect/index.js

+ 6 - 7
app/collect/index.js

@@ -18,7 +18,7 @@ function collect_load(begin = 0) {
                     html += "<div class='subtitle'>" + iterator.subtitle + "</div>";
                 }
                 if (iterator.summary && iterator.summary != "null") {
-                    html += "<div class='summary'>" + iterator.summary + "</div>";
+                    html += "<div class='summary'>" + marked(iterator.summary) + "</div>";
                 }
                 if (iterator.tag) {
                     html += "<div style='overflow-wrap: anywhere;'>" + iterator.tag + "</div>";
@@ -39,12 +39,11 @@ function collect_load(begin = 0) {
                 html += "<div>";
                 for (const article of article_list) {
                     html += "<div style='padding:6px 0; border-top: #707070 1px solid;'>";
-                    html +=
-                        "<a class='article_title' style='color:var(--main_color);font-weight:700;' href='../article/?id=" +
-                        article.article +
-                        "' target='_blank'>" +
-                        article.title +
-                        "</a>";
+                    html += "<a class='article_title'";
+					html +=" style='color:var(--main_color);font-weight:700;'";
+					html +=" href='../article/?id=" + article.article +"&collection="+iterator.id+"' target='_blank'>" ;
+					html += article.title ;
+					html += "</a>";
                     html += "</div>";
                     article_count++;
                     if (article_count > article_limit) {