فهرست منبع

equipmnetInfo

chenjunkai 6 سال پیش
والد
کامیت
28c31df1ae
3فایلهای تغییر یافته به همراه6 افزوده شده و 8 حذف شده
  1. 1 4
      Controller/EquipmentInfo.py
  2. 4 3
      Object/TokenObject.py
  3. 1 1
      Service/TemplateService.py

+ 1 - 4
Controller/EquipmentInfo.py

@@ -44,10 +44,7 @@ class EquipmentInfo(View):
         userID = tko.userID
         operation = request_dict.get('operation', None)
         if not userID:
-            return response.json(444, {"parm": "operation"})
-
-            # return response.json(309)
-            # return response.json(444, 'operation')
+            return response.json(309)
         if operation == 'query':
             return self.query_info(request_dict, userID, response)
         elif operation == 'add':

+ 4 - 3
Object/TokenObject.py

@@ -42,9 +42,10 @@ class TokenObject:
             self.lang = res.get('lang', None)
             self.user = res.get('user', '')
             # 刷新登录时间
-            device_user = Device_User.objects.get(userID=self.userID)
-            device_user.online = True
-            device_user.save()
+            if self.userID:
+                device_user = Device_User.objects.get(userID=self.userID)
+                device_user.online = True
+                device_user.save()
         except jwt.ExpiredSignatureError as e:
             print('过期')
             print(repr(e))

+ 1 - 1
Service/TemplateService.py

@@ -64,7 +64,7 @@ class TemplateService:
             'cloudVod/status',
             'cloudVod/details',
             'cloudVod/playlist',
-            'equipment/info'
+            # 'equipment/info'
         ]
         return apiList