Ver Fonte

feat: 博文页面显示更新时间

SongZihuan há 3 anos atrás
pai
commit
9d101c846d
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      object/blog.py
  2. 1 1
      templates/docx/article.html

+ 1 - 1
object/blog.py

@@ -33,7 +33,7 @@ def load_blog_by_id(blog_id) -> "Optional[BlogArticle]":
     subtitle = blog[2]
     subtitle = blog[2]
     context = blog[3]
     context = blog[3]
     update_time = blog[4]
     update_time = blog[4]
-    create_time = blog[4]
+    create_time = blog[5]
     top = blog[6]
     top = blog[6]
     comment = object.comment.load_comment_list(blog_id)
     comment = object.comment.load_comment_list(blog_id)
     archive = object.archive.Archive.get_blog_archive(blog_id)
     archive = object.archive.Archive.get_blog_archive(blog_id)

+ 1 - 1
templates/docx/article.html

@@ -14,7 +14,7 @@
             {# 检查是否具有读取权限 #}
             {# 检查是否具有读取权限 #}
             <div class="row">
             <div class="row">
                 <article class="col-12">
                 <article class="col-12">
-                    <h1> {{ article.title }} <small> {{ article.subtitle }} <small> {{ article.update_time}} </small> </small> </h1>
+                    <h1> {{ article.title }} <small> {{ article.subtitle }} <small> {{ article.update_time}} / {{ article.create_time}} </small> </small> </h1>
                     {% for archive in article.archive %}
                     {% for archive in article.archive %}
                         <span class="badge badge-info"> {{ archive.name }} </span>
                         <span class="badge badge-info"> {{ archive.name }} </span>
                     {% endfor %}
                     {% endfor %}