Explorar el Código

lot 获取临时证书

chenshibin hace 4 años
padre
commit
13ed58558e
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      Controller/IotCoreController.py

+ 3 - 2
Controller/IotCoreController.py

@@ -40,13 +40,14 @@ class IotCoreView(View):
         time_stamp = request_dict.get('time_stamp', None)
 
         if uid and token and time_stamp:
-            token = CommonService.decode_data(token)
+            token = int(CommonService.decode_data(token))
             time_stamp = int(time_stamp)
 
             now_time = int(time.time())
             distance = now_time - time_stamp
 
-            if token != time_stamp and distance > 600:
+            #if token != time_stamp and distance > 600: 暂时去掉延时
+            if token != time_stamp:
                 return response.json(404)
 
             region_country_qs = Device_Info.objects.filter(UID=uid).values('userID__region_country')