|
@@ -173,8 +173,8 @@ class NotificationView(View):
|
|
|
#推送
|
|
|
if detect_med_type == 2 or detect_med_type == 0:
|
|
|
if push_type == 0: # ios apns
|
|
|
- self.do_apns(**kwag_args)
|
|
|
- do_apnsss['do_apns'] = str(self.do_apns(**kwag_args))
|
|
|
+ # self.do_apns(**kwag_args)
|
|
|
+ do_apnsss['do_apns'] = self.do_apns(**kwag_args)
|
|
|
elif push_type == 1: # android gcm
|
|
|
self.do_fcm(**kwag_args)
|
|
|
elif push_type == 2: # android jpush
|
|
@@ -356,7 +356,7 @@ class NotificationView(View):
|
|
|
res = cli.push(n=n, device_token=token_val, topic=appBundleId)
|
|
|
print(res.status_code)
|
|
|
|
|
|
- return JsonResponse(status=200, data={'pkey00000000000000000': 0, 'res':res})
|
|
|
+ return res.status_code
|
|
|
|
|
|
if res.status_code == 200:
|
|
|
print('apns push success')
|
|
@@ -367,7 +367,7 @@ class NotificationView(View):
|
|
|
return
|
|
|
except Exception as e:
|
|
|
print(repr(e))
|
|
|
- return
|
|
|
+ return 'yic'
|
|
|
|
|
|
|
|
|
# http://test.dvema.com/detect/add?uidToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJQMldOR0pSRDJFSEE1RVU5MTExQSJ9.xOCI5lerk8JOs5OcAzunrKCfCrtuPIZ3AnkMmnd-bPY&n_time=1526845794&channel=1&event_type=51&is_st=0
|