Procházet zdrojové kódy

lot 新增 CVM注册 ,创建证书2

chenshibin před 4 roky
rodič
revize
ecd8637f55
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      Controller/IotCoreController.py

+ 3 - 3
Controller/IotCoreController.py

@@ -86,7 +86,7 @@ class IotCoreView(View):
         time_stamp = request_dict.get('time_stamp', None)
 
         if uid and token and time_stamp and uid_code:
-            uid_code = int(CommonService.decode_data(uid_code))
+            uid_code = CommonService.decode_data(uid_code)
             token = int(CommonService.decode_data(token))
             time_stamp = int(time_stamp)
 
@@ -94,8 +94,8 @@ class IotCoreView(View):
             distance = now_time - time_stamp
 
             # if token != time_stamp and distance > 600: 暂时去掉延时
-            if token != time_stamp or uid != uid_code or distance > 600 :
-                return response.json(404)
+            #if token != time_stamp or uid != uid_code or distance > 600 :
+                #return response.json(404)
 
             region_country_qs = Device_Info.objects.filter(UID=uid).values('userID__region_country')
             if not region_country_qs.exists():