|
@@ -116,7 +116,7 @@ class DevicePushService:
|
|
if tz is None or tz == '':
|
|
if tz is None or tz == '':
|
|
tz = 0
|
|
tz = 0
|
|
# 发送标题
|
|
# 发送标题
|
|
- msg_title = cls.get_msg_title(appBundleId=appBundleId, nickname=params['nickname'])
|
|
|
|
|
|
+ msg_title = cls.get_msg_title(nickname=params['nickname'])
|
|
# 发送内容
|
|
# 发送内容
|
|
msg_text = cls.get_msg_text(channel=params['channel'], n_time=params['n_time'], lang=lang,
|
|
msg_text = cls.get_msg_text(channel=params['channel'], n_time=params['n_time'], lang=lang,
|
|
tz=tz, event_type=params['event_type'],
|
|
tz=tz, event_type=params['event_type'],
|
|
@@ -241,14 +241,11 @@ class DevicePushService:
|
|
)
|
|
)
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|
|
- def get_msg_title(appBundleId, nickname):
|
|
|
|
|
|
+ def get_msg_title(nickname):
|
|
"""
|
|
"""
|
|
获取消息标题
|
|
获取消息标题
|
|
"""""
|
|
"""""
|
|
- if appBundleId in APP_BUNDLE_DICT.keys():
|
|
|
|
- return APP_BUNDLE_DICT[appBundleId] + '(' + nickname + ')'
|
|
|
|
- else:
|
|
|
|
- return nickname
|
|
|
|
|
|
+ return nickname
|
|
|
|
|
|
@staticmethod
|
|
@staticmethod
|
|
def get_msg_text(channel, n_time, lang, tz, event_type, electricity='', is_sys=0):
|
|
def get_msg_text(channel, n_time, lang, tz, event_type, electricity='', is_sys=0):
|