Selaa lähdekoodia

改了一下return

pengzhibo168 5 vuotta sitten
vanhempi
commit
f885b6a79b
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      Controller/DetectController.py

+ 4 - 0
Controller/DetectController.py

@@ -165,6 +165,7 @@ class NotificationView(View):
             if detect_med_type == 2 or detect_med_type == 0:
                 if push_type == 0:  # ios apns
                     self.do_apns(**kwag_args)
+                    return JsonResponse(status=200, data={'返回内容': self.do_apns(**kwag_args), 'msg': ''})
                 elif push_type == 1:  # android gcm
                     self.do_fcm(**kwag_args)
                 elif push_type == 2:  # android jpush
@@ -343,6 +344,9 @@ class NotificationView(View):
             payload = apns2.Payload(alert=alert, custom=push_data)
             n = apns2.Notification(payload=payload, priority=apns2.PRIORITY_LOW)
             res = cli.push(n=n, device_token=token_val, topic=appBundleId)
+
+            return res
+
             print(res.status_code)
             if res.status_code == 200:
                 print('apns push success')