소스 검색

新增无登录获取主用户信息2

chenshibin 4 년 전
부모
커밋
4f044e974b
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      Controller/EquipmentManagerV3.py

+ 5 - 0
Controller/EquipmentManagerV3.py

@@ -771,8 +771,13 @@ class EquipmentManagerV3(View):
 
         if not all([token, time_stamp]):
             return response.json(444)
+
+        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 or distance > 60000 or distance < -60000:  # 为了全球化时间控制在一天内
             return response.json(404)