浏览代码

添加注释

locky 4 月之前
父节点
当前提交
7a59f3be0b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Service/PushService.py

+ 1 - 0
Service/PushService.py

@@ -212,6 +212,7 @@ class PushObject:
             n_time = str(n_time)
             # 跳转类型
             jump_type = str(CommonService.get_jump_type(event_type))
+            # 推送数据类型必须为字符串,否则抛ValueError('Message.data must not contain non-string values.')异常
             push_data = {'alert': msg_text, 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
                          'received_at': n_time, 'event_time': n_time, 'event_type': event_type, 'nickname': nickname,
                          'uid': uid, 'channel': channel, 'jump_type': jump_type