|
@@ -402,8 +402,8 @@ class NotificationView(View):
|
|
|
appBundleId = uaql['appBundleId']
|
|
|
apns_config = {
|
|
|
'com.ansjer.loocamccloud': {
|
|
|
- 'pem_path': os.path.join(BASE_DIR, 'Ansjer/file/apns_pem/apns-loocamccloud.pem'),
|
|
|
- 'password': '123'
|
|
|
+ 'pem_path': os.path.join(BASE_DIR, 'Ansjer/file/apns_pem/apns-dev-test.pem'),
|
|
|
+ 'password': '111111'
|
|
|
}
|
|
|
}
|
|
|
try:
|
|
@@ -411,7 +411,7 @@ class NotificationView(View):
|
|
|
password=apns_config[appBundleId]['password'])
|
|
|
push_data = {"alert": "Motion ", "event_time": n_time, "event_type": event_type, "msg": "",
|
|
|
"received_at": n_time, "sound": "sound.aif", "uid": uid, "zpush": "1"}
|
|
|
- body = json.dumps({'uid': uid, 'n_time': n_time})
|
|
|
+ body = json.dumps(push_data)
|
|
|
alert = apns2.PayloadAlert(body=body, title="title!")
|
|
|
payload = apns2.Payload(alert=alert)
|
|
|
n = apns2.Notification(payload=payload, priority=apns2.PRIORITY_LOW)
|