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