Sfoglia il codice sorgente

Merge branch 'test' of http://192.168.136.99:3000/servers/ASJPush into peng

peng 2 anni fa
parent
commit
dc36c4e1bc
2 ha cambiato i file con 3 aggiunte e 7 eliminazioni
  1. 1 4
      Service/DevicePushService.py
  2. 2 3
      Service/PushService.py

+ 1 - 4
Service/DevicePushService.py

@@ -167,7 +167,7 @@ class DevicePushService:
                 LOGGING.info('APP准备推送:{}, {}'.format(param['uid'], param))
                 # 推送显示图片
                 if (param['is_st'] == 1 or param['is_st'] == 3) and \
-                        (push_type == 0 or push_type == 1 or push_type == 3 or push_type == 4 or push_type == 5):
+                        (push_type == 0 or push_type == 1 or push_type == 3 or push_type == 4):
                     if param['is_st'] == 1:
                         key = '{}/{}/{}.jpeg'.format(param['uid'], param['channel'], param['n_time'])
                     else:
@@ -415,9 +415,6 @@ 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_vivopush(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)))
 

+ 2 - 3
Service/PushService.py

@@ -276,6 +276,8 @@ class PushObject:
             redisObj = RedisObject()
             # 获取redis里面的authToken
             redis_authToken = redisObj.get_data(key=authToken)
+            if msg_title == '':
+                msg_title = '设备'
             if redis_authToken is not False:
                 app_secret = VIVOPUSH_CONFIG[app_bundle_id]['Secret']
                 sender_send = APISender(app_secret)
@@ -303,10 +305,7 @@ class PushObject:
                 .content(msg_text) \
                 .push_mode(1) \
                 .notify_type(1) \
-                .network_type(-1) \
                 .skip_type(skip_type) \
-                .skip_content('') \
-                .time_to_live(1000) \
                 .request_id('123456') \
                 .classification(1) \
                 .client_custom_map(**push_data) \