From 6f78d5dc0a1d03f3a51d35e71aaab39f94c929e7 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 11 Apr 2022 14:55:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BB=E6=81=AF=E6=8E=A5=E5=8F=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/third/views.py | 4 ++-- apps/utils/xunxi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/third/views.py b/apps/third/views.py index 71071ce2..ec139e7a 100644 --- a/apps/third/views.py +++ b/apps/third/views.py @@ -95,7 +95,7 @@ class XxCommonViewSet(CreateModelMixin, CustomGenericViewSet): url=vdata['url'], method=vdata.get('method', 'post'), params=vdata.get('params', {}), - json=vdata.get('data', {})) + json=vdata.get('json', {})) return Response(res) @action(methods=['get'], detail=False, permission_classes=[IsAuthenticated]) @@ -128,7 +128,7 @@ class DhCommonViewSet(CreateModelMixin, CustomGenericViewSet): url=vdata['url'], method=vdata.get('method', 'post'), params=vdata.get('params', {}), - json=vdata.get('data', {})) + json=vdata.get('json', {})) return Response(res) @action(methods=['get'], detail=False, permission_classes=[IsAuthenticated]) diff --git a/apps/utils/xunxi.py b/apps/utils/xunxi.py index 1ac98b5b..9f0fdfa1 100644 --- a/apps/utils/xunxi.py +++ b/apps/utils/xunxi.py @@ -74,8 +74,8 @@ class XxClient: else: r = getattr(requests, method)('{}{}'.format(settings.XX_BASE_URL, url) , params=params, json=json, verify=False) - if settings.DEBUG: - print_roundtrip(r) + # if settings.DEBUG: + # print_roundtrip(r) ret = r.json() if ret.get('errorCode') == '1060000': self.get_token() # 重新获取token