瀏覽代碼

lot 获取临时证书

chenshibin 4 年之前
父節點
當前提交
2a3f925b73
共有 1 個文件被更改,包括 3 次插入2 次删除
  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')