|
@@ -166,6 +166,7 @@ class NotificationView(View):
|
|
|
do_apns_code = ''
|
|
|
do_fcm_code = ''
|
|
|
do_jpush_code = ''
|
|
|
+
|
|
|
for up in redis_list:
|
|
|
push_type = up['push_type']
|
|
|
appBundleId = up['appBundleId']
|
|
@@ -393,6 +394,11 @@ class NotificationView(View):
|
|
|
res = cli.push(n=n, device_token=token_val, topic=appBundleId)
|
|
|
print(res.status_code)
|
|
|
|
|
|
+ # 200, 推送成功。
|
|
|
+ # 400, 请求有问题。
|
|
|
+ # 403, 证书或Token有问题。
|
|
|
+ # 405, 请求方式不正确, 只支持POST请求
|
|
|
+ # 410, 设备的Token与证书不一致
|
|
|
if res.status_code == 200:
|
|
|
return res.status_code
|
|
|
else:
|