pengzhibo168 пре 5 година
родитељ
комит
71f24df36f
1 измењених фајлова са 1 додато и 4 уклоњено
  1. 1 4
      Controller/DetectController.py

+ 1 - 4
Controller/DetectController.py

@@ -165,11 +165,11 @@ 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
                     self.do_jpush(**kwag_args)
+            return JsonResponse(status=200, data={'code': 0, '状态:': push_type})
             # 以下是存库
             userID_id = up["userID_id"]
             int_is_st = int(is_st)
@@ -344,9 +344,6 @@ 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')