diff --git a/article/serializers.py b/article/serializers.py index 6a8e442..f4adcce 100644 --- a/article/serializers.py +++ b/article/serializers.py @@ -154,7 +154,6 @@ class TagSerializer(serializers.ModelSerializer): # 显示url # url = serializers.HyperlinkedIdentityField(view_name='tag-detail') - class Meta: model = Tag fields = '__all__' @@ -167,11 +166,11 @@ class TagSerializer(serializers.ModelSerializer): def create(self, validated_data): self.check_tag_obj_exists(validated_data) - return super(TagSerializer, self).create(validated_data) + return super().create(validated_data) def update(self, instance, validated_data): self.check_tag_obj_exists(validated_data) - return super(TagSerializer, self).update(instance, validated_data) + return super().update(instance, validated_data) diff --git a/article/views.py b/article/views.py index 8d11b17..7530145 100644 --- a/article/views.py +++ b/article/views.py @@ -1,7 +1,7 @@ from rest_framework import viewsets from article.serializers import ArticleSerializer, CategorySerializer, CategoryDetailSerializer -from article.serializers import TagSerializer,ArticleDetailSerializer, AvatarSerializer -from article.models import Article, Category, Tag , Avatar +from article.serializers import TagSerializer, ArticleDetailSerializer, AvatarSerializer +from article.models import Article, Category, Tag, Avatar from article.permissions import IsAdminUserOrReadOnly from rest_framework.filters import SearchFilter diff --git a/db.sqlite3 b/db.sqlite3 index 24808d2..cf459ea 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/drf_vue_blog/settings.py b/drf_vue_blog/settings.py index 801c357..53aa989 100644 --- a/drf_vue_blog/settings.py +++ b/drf_vue_blog/settings.py @@ -139,7 +139,7 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' # simple_jwt配置 SIMPLE_JWT = { - 'ACCESS_TOKEN_LIFETIME': timedelta(minutes=1), # 令牌有效时间为1分钟,便于测试 + 'ACCESS_TOKEN_LIFETIME': timedelta(days=1), # 令牌有效时间为1天 'REFRESH_TOKEN_LIFETIME': timedelta(days=10), # 令牌每10天刷新一次 } diff --git a/frontend/.gitignore b/frontend/.gitignore index 403adbc..c10ad67 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules -/dist +# /dist文件夹保留 +# /dist # local env files diff --git a/frontend/src/App.vue b/frontend/src/App.vue index c746211..8b27212 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,10 +1,12 @@ diff --git a/frontend/src/components/ArticleList.vue b/frontend/src/components/ArticleList.vue index 88f12eb..d53a03b 100644 --- a/frontend/src/components/ArticleList.vue +++ b/frontend/src/components/ArticleList.vue @@ -1,47 +1,52 @@ @@ -159,12 +192,24 @@ export default { padding: 1rem; } +.image { + width: 100px; + border-radius: 10px; + box-shadow: darkslategrey 0 0 12px; +} +.image-container { + width: 100px; +} +.grid { + padding-bottom: 10px; +} + .article-title { - font-size: 1.2rem; + font-size: 1.5rem; font-weight: bolder; text-decoration: none; color: blue; - padding: 5px 0 5px 0; + padding: 15px 0 15px 0; } .tag { @@ -179,11 +224,12 @@ export default { #paginator { text-align: center; - padding-bottom: 4rem; + position: relative; } #paginator a { color: black; + padding-bottom: 75px; } .current-page { @@ -191,6 +237,7 @@ export default { font-weight: bold; padding-left: 10px; padding-right: 10px; + } .category { diff --git a/frontend/src/components/BlogFooter.vue b/frontend/src/components/BlogFooter.vue index 05feaa8..51f312e 100644 --- a/frontend/src/components/BlogFooter.vue +++ b/frontend/src/components/BlogFooter.vue @@ -1,15 +1,15 @@ diff --git a/frontend/src/components/BlogHeader.vue b/frontend/src/components/BlogHeader.vue index 4e9b7bc..6e89811 100644 --- a/frontend/src/components/BlogHeader.vue +++ b/frontend/src/components/BlogHeader.vue @@ -2,7 +2,7 @@