|
@@ -167,7 +167,7 @@ class DevicePushService:
|
|
|
try:
|
|
|
kwag_args = param['kwag_args']
|
|
|
result = {'do_apns_code': '', 'do_fcm_code': '', 'do_jpush_code': '', 'do_xmpush_code': '',
|
|
|
- 'do_vivopush_code': '', 'do_meizupush_code': ''}
|
|
|
+ 'do_vivopush_code': '', 'do_meizupush_code': '', 'do_oppopush_code': ''}
|
|
|
# 判断是否进行APP消息推送,如app_push不为空,则不进行推送
|
|
|
if not param['app_push']:
|
|
|
LOGGING.info('APP准备推送:{}, {}'.format(param['uid'], param))
|
|
@@ -428,9 +428,9 @@ class DevicePushService:
|
|
|
result = response.json()
|
|
|
# 发送推送
|
|
|
push_url = url + 'server/v1/message/notification/unicast'
|
|
|
- push_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
|
|
|
- 'received_at': n_time, 'event_time': n_time, 'event_type': event_type,
|
|
|
- 'uid': uid, 'channel': channel}
|
|
|
+ extra_data = {'alert': 'Motion', 'msg': '', 'sound': 'sound.aif', 'zpush': '1',
|
|
|
+ 'received_at': n_time, 'event_time': n_time, 'event_type': event_type,
|
|
|
+ 'uid': uid, 'channel': channel}
|
|
|
message = {
|
|
|
"target_type": 2,
|
|
|
"target_value": token_val,
|
|
@@ -472,15 +472,7 @@ class DevicePushService:
|
|
|
elif push_type == 4:
|
|
|
PushObject.android_xmpush(uid, appBundleId, token_val, n_time, event_type, msg_title,
|
|
|
msg_text, uid, channel, image_url)
|
|
|
- elif push_type == 5:
|
|
|
- PushObject.android_meizupush(uid, appBundleId, token_val, n_time, event_type, msg_title,
|
|
|
- msg_text, uid, channel, image_url)
|
|
|
- elif push_type == 6:
|
|
|
- PushObject.android_oppopush(uid, appBundleId, token_val, n_time, event_type, msg_title,
|
|
|
- msg_text, uid, channel, image_url)
|
|
|
- elif push_type == 7:
|
|
|
- PushObject.android_meizupush(uid, appBundleId, token_val, n_time, event_type, msg_title,
|
|
|
- msg_text, uid, channel, image_url)
|
|
|
+
|
|
|
except Exception as e:
|
|
|
LOGGING.info('异常详情,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
|