From ce31dd562191056186fb93df63f8c305e25672b8 Mon Sep 17 00:00:00 2001 From: nineven Date: Mon, 7 Feb 2022 08:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9F=9F=E5=90=8D=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_client/vue.config.js | 2 +- fir_ser/api/views/domain.py | 8 ++++++-- fir_ser/config.py | 2 +- fir_ser/fir_ser/settings.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fir_client/vue.config.js b/fir_client/vue.config.js index 094dce6..c4d894e 100644 --- a/fir_client/vue.config.js +++ b/fir_client/vue.config.js @@ -82,7 +82,7 @@ if (page) { } } -const version='1.4.2'; +const version='2.0.0'; const pro_base_env = { baseUrl: 'https://flyapps.cn', diff --git a/fir_ser/api/views/domain.py b/fir_ser/api/views/domain.py index a7bf800..814eb54 100644 --- a/fir_ser/api/views/domain.py +++ b/fir_ser/api/views/domain.py @@ -79,10 +79,14 @@ class DomainCnameView(APIView): def get(self, request): res = BaseResponse() res.data = {'domain_name': '', 'domain_record': '', 'is_enable': False} - user_domain_obj = UserDomainInfo.objects.filter(**get_domain_filter(request)).first() + user_domain_obj = UserDomainInfo.objects.filter(**get_domain_filter(request)).last() + domain_type = request.query_params.get("domain_type", -1) + + user_domain_obj2 = UserDomainInfo.objects.filter(user_id=request.user, domain_type=domain_type, + is_enable=False).last() domain_name = request.query_params.get("domain_name", '') if user_domain_obj and (domain_name or user_domain_obj.domain_type in [0, 2] or ( - domain_name == '' and user_domain_obj.domain_type == 1)): + domain_name == '' and user_domain_obj.domain_type == 1 and user_domain_obj2)): res.data['domain_name'] = user_domain_obj.domain_name res.data['is_enable'] = user_domain_obj.is_enable if user_domain_obj.cname_id: diff --git a/fir_ser/config.py b/fir_ser/config.py index 165c26e..863e3f6 100644 --- a/fir_ser/config.py +++ b/fir_ser/config.py @@ -12,7 +12,7 @@ BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class BASECONF(object): - VERSION = '1.3.1' + VERSION = '2.0.0' DEBUG = True diff --git a/fir_ser/fir_ser/settings.py b/fir_ser/fir_ser/settings.py index 4d7d6c0..37b673e 100644 --- a/fir_ser/fir_ser/settings.py +++ b/fir_ser/fir_ser/settings.py @@ -316,7 +316,7 @@ LOGGING = { }, 'handlers': { 'console': { - 'level': 'INFO', + 'level': 'DEBUG', 'filters': ['require_debug_true'], # 只有在Django debug为True时才在屏幕打印日志 'class': 'logging.StreamHandler', 'formatter': 'simple'