chenjunkai 6 năm trước cách đây
mục cha
commit
50e1991912
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      Controller/Test.py

+ 5 - 2
Controller/Test.py

@@ -28,6 +28,7 @@ from django.http import JsonResponse
 from ratelimit.decorators import ratelimit
 from Object.ResponseObject import ResponseObject
 from Object.TokenObject import TokenObject
+from Object.RedisObject import RedisObject
 
 
 class Test(View):
@@ -47,8 +48,10 @@ class Test(View):
     # 查询
     def get(self, request, *args, **kwargs):
         response = ResponseObject()
-
-        return response.json(0)
+        redisObj = RedisObject()
+        key=request.GET.get('key')
+        return response.json(0,redisObj.get_data(key=key)
+)
 
     # 增加
     def post(self, request, *args, **kwargs):