Эх сурвалжийг харах

推送消息内容增加51类型

locky 2 жил өмнө
parent
commit
af152a9e96

+ 6 - 2
Service/DevicePushService.py

@@ -333,7 +333,9 @@ class DevicePushService:
         event_type = int(event_type)
         device_type = int(device_type)
         if lang == 'cn':
-            if event_type == 704:
+            if event_type == 51:
+                msg_type = '检测到画面变化'
+            elif event_type == 704:
                 msg_type = '剩余电量 ' + electricity
             elif event_type == 702:
                 msg_type = '摄像头休眠'
@@ -365,7 +367,9 @@ class DevicePushService:
                 else:
                     send_text = '{} 日期:{}'.format(msg_type, n_date)
         else:
-            if event_type == 704:
+            if event_type == 51:
+                msg_type = 'Screen change detected'
+            elif event_type == 704:
                 msg_type = 'Battery remaining ' + electricity
             elif event_type == 702:
                 msg_type = 'Camera sleep'