Javascript 无法向移动设备发送推送通知连接失败通知:80

Javascript 无法向移动设备发送推送通知连接失败通知:80,javascript,parse-platform,Javascript,Parse Platform,大家好,我需要你们的帮助,我正在构建新的移动应用程序,我在使用javascript解析向我的移动应用程序发送通知时遇到了问题。我上传下面的代码在云代码 Parse.Cloud.define("hello", function(request, response) { Parse.Push.send({channels: [ "AppJSTest" ],data: { alert: "Quit Your Jibba Jabba"}}, { success: function() { alert:

大家好,我需要你们的帮助,我正在构建新的移动应用程序,我在使用javascript解析向我的移动应用程序发送通知时遇到了问题。我上传下面的代码在云代码

Parse.Cloud.define("hello", function(request, response) {
Parse.Push.send({channels: [ "AppJSTest" ],data: {
 alert: "Quit Your Jibba Jabba"}}, { success: function() { alert: "success function"},error: function(err) { alert: "fail function"}});  response.success("Hello world!");});
移动应用程序main.js中我的文件如下:

   $(document).ready(function() {
Parse.initialize(PARSE_APP, PARSE_JS);

NoteObject = Parse.Object.extend("NoteObject");

function getNotes() {
    var query = new Parse.Query(NoteObject);

    query.find({
        success:function(results) {
            console.dir(results);
            var s = "";
            for(var i=0, len=results.length; i<len; i++) {
                var note = results[i];
                s += "<p>";
                s += "<b>"+note.get("title")+"</b><br/>";
                s += "<b>Written "+note.createdAt + "<br/>";
                s += note.get("body");
                s += "</p>";
            }
            $("#notes").html(s);
        },
        error:function(error) {
            alert("Error when getting notes!");
        }
    });
}

$("#addNoteBtn").on("touchend", function(e) {
    e.preventDefault();

    //Grab the note details, no real validation for now
    var title = $("#noteTitle").val();
    var body = $("#noteBody").val();

    var note = new NoteObject();
    note.save({title:title, body:body}, {
        success:function(object) {
            console.log("Saved the object!");
            $("#noteTitle").val("");
            $("#noteBody").val("");
            getNotes();
        }, 
        error:function(object,error) {
            console.dir(error);
            alert("Sorry, I couldn't save it.");
        }
    });
});

//call getNotes immediately
getNotes();});

我的代码怎么了

异步JavaScript每次都会让您抓狂。移动响应。成功。。。进入您为Parse.Push提供的成功回调,以便它在退出之前实际等待提交推送

curl -X POST \ -H "X-Parse-Application-Id:kNZ1hmD7KFUdf7zcKQG8t19ZPC04itHpcnIrqAqz" \ -H "X-Parse-REST-API-Key:EDrUjXegE1ec01MmlWYo4IqjrG1sphFd3Vkk8OKR" \ -H "Content-Type: application/json" \ -d '{}' \ https://api.parse.com/1/push/hello