Jelajahi Sumber

保存和获取用户按钮

peng 1 tahun lalu
induk
melakukan
bee826d230
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      Controller/EquipmentManagerV3.py

+ 1 - 2
Controller/EquipmentManagerV3.py

@@ -1180,7 +1180,6 @@ class EquipmentManagerV3(View):
         if not uid:
         if not uid:
             return response.json(444)
             return response.json(444)
         try:
         try:
-            Device_Info.objects.filter(UID=uid).update(audioVideoButton=0)
             if button_user1:
             if button_user1:
                 Device_Info.objects.filter(UID=uid, userID=button_user1).update(audioVideoButton=1)
                 Device_Info.objects.filter(UID=uid, userID=button_user1).update(audioVideoButton=1)
             if button_user2:
             if button_user2:
@@ -1198,7 +1197,7 @@ class EquipmentManagerV3(View):
         if not uid:
         if not uid:
             return response.json(444)
             return response.json(444)
         try:
         try:
-            device_qs = Device_Info.objects.filter(UID=uid).values('userID', 'audioVideoButton')
+            device_qs = Device_Info.objects.filter(UID=uid).values('userID', 'audioVideoButton', 'NickName')
             return response.json(0, list(device_qs))
             return response.json(0, list(device_qs))
         except Exception as e:
         except Exception as e:
             return response.json(500, repr(e))
             return response.json(500, repr(e))