From 21f53f0b18c783a6f6c1d8c2d9a3218844c5e0e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BC=BA?= <1206709430@qq.com> Date: Mon, 5 Jun 2023 09:30:58 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9A=A1=20=E4=B8=AA=E4=BA=BA=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 4 ++-- README.md | 4 ++-- backend/dvadmin/system/views/datav.py | 8 ++++++-- backend/dvadmin/system/views/user.py | 2 +- .../header-aside/components/header-user/userinfo.vue | 7 +++++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/README.en.md b/README.en.md index 228c52c..7858826 100644 --- a/README.en.md +++ b/README.en.md @@ -106,7 +106,7 @@ github:[https://github.com/liqianglog/django-vue-admin](https://github.com/liq | [dvadmin-tenants 多租户管理](https://bbs.django-vue-admin.com/plugMarket/124.html) | Released | Saas mode for multi-tenancy management | | [dvadmin-third 第三方用户管理](https://bbs.django-vue-admin.com/plugMarket/122.html) | Released | Plugin for managing third-party users | | [dvadmin-ak-sk 加密密钥管理](https://bbs.django-vue-admin.com/plugMarket/120.html) | Released | Manages encryption keys for verifying authentication strings | -| [dvadmin-pay 支付插件]() | Released | Payment plugin for dvadmin, supports WeChat Pay and Alipay | +| [dvadmin-pay 支付插件](https://bbs.django-vue-admin.com/plugMarket/131.html) | Released | Payment plugin for dvadmin, supports WeChat Pay and Alipay | | [dvadmin-uniapp](https://bbs.django-vue-admin.com/plugMarket/130.html) | Released | Uniapp plugin for dvadmin | | dvadmin-cloud-storage 云存储插件 | Development | Plugin for storing files using various cloud storage providers | | dvadmin-es 搜索插件 | Development | Search plugin for Elasticsearch | @@ -221,7 +221,7 @@ docker-compose up -d --build ![image-12](https://foruda.gitee.com/images/1681118517168485285/f34152ba_5074988.png) -# Commercial License +## Commercial License ![image-13](https://foruda.gitee.com/images/1681118527820910716/43a7c660_5074988.png) diff --git a/README.md b/README.md index 9406fc1..1f51719 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ github地址:[https://github.com/liqianglog/django-vue-admin](https://github.c | [dvadmin-tenants 多租户管理](https://bbs.django-vue-admin.com/plugMarket/124.html) | 已发布 | 多租户的saas模式 | | [dvadmin-third 第三方用户管理](https://bbs.django-vue-admin.com/plugMarket/122.html) | 已发布 | 第三方用户管理插件 | | [dvadmin-ak-sk 加密密钥管理](https://bbs.django-vue-admin.com/plugMarket/120.html) | 已发布 | 用于加密认证字符串来验证认证字符串的密钥 | -| [dvadmin-pay 支付插件]() | 已发布 | 适用于dvadmin的支付插件,支持微信支持、支付宝支付 | +| [dvadmin-pay 支付插件](https://bbs.django-vue-admin.com/plugMarket/131.html) | 已发布 | 适用于dvadmin的支付插件,支持微信支持、支付宝支付 | | [dvadmin-uniapp](https://bbs.django-vue-admin.com/plugMarket/130.html) | 已发布 | 适用于dvadmin的uniapp插件 | | dvadmin-cloud-storage 云存储插件 | 开发中 | 适用各种云存储进行存储插件 | | dvadmin-es 搜索插件 | 开发中 | 适用于es的搜索插件 | @@ -231,7 +231,7 @@ docker-compose up -d --build ![image-12](https://foruda.gitee.com/images/1681118517168485285/f34152ba_5074988.png) -#商业授权 +## 商业授权 ![image-13](https://foruda.gitee.com/images/1681118527820910716/43a7c660_5074988.png) diff --git a/backend/dvadmin/system/views/datav.py b/backend/dvadmin/system/views/datav.py index 7ec88c7..a43cf7c 100644 --- a/backend/dvadmin/system/views/datav.py +++ b/backend/dvadmin/system/views/datav.py @@ -69,8 +69,12 @@ class DataVViewSet(GenericViewSet): :return: """ count = FileList.objects.all().count() - data = FileList.objects.aggregate(sum_size=Sum('size')) - return DetailResponse(data={"count": count, "occupy_space": format_bytes(data.get('sum_size') or 0)}, msg="获取成功") + if count != 0: + data = FileList.objects.aggregate(sum_size=Sum('size')) + else: + data = {"sum_size": 0} + return DetailResponse(data={"count": count, "occupy_space": format_bytes(data.get('sum_size') or 0)}, + msg="获取成功") @action(methods=["GET"], detail=False, permission_classes=[IsAuthenticated]) def database_total(self, request): diff --git a/backend/dvadmin/system/views/user.py b/backend/dvadmin/system/views/user.py index 23bb19a..2f91674 100644 --- a/backend/dvadmin/system/views/user.py +++ b/backend/dvadmin/system/views/user.py @@ -175,7 +175,7 @@ class UserInfoUpdateSerializer(CustomModelSerializer): class Meta: model = Users - fields = ['email', 'mobile', 'avatar', 'name', 'gender'] + fields = ['email', 'avatar', 'name', 'gender'] extra_kwargs = { "post": {"required": False, "read_only": True}, } diff --git a/web/src/layout/header-aside/components/header-user/userinfo.vue b/web/src/layout/header-aside/components/header-user/userinfo.vue index d02c51d..da9f577 100644 --- a/web/src/layout/header-aside/components/header-user/userinfo.vue +++ b/web/src/layout/header-aside/components/header-user/userinfo.vue @@ -16,11 +16,14 @@ + + + - + @@ -39,7 +42,7 @@ - +