succes方法一直显示未定义

时间:2014-10-07 19:31:08

标签: javascript parse-platform cloud-code

我的云日志说它无法调用方法"成功"在query.first.success中未定义    但我不明白这一点,因为我的console.log正在显示在成功块内部调用。这段代码中有什么未定义的?

var query = new Parse.Query("Messages");
  query.first({
    success: function(results, response){

      console.log("The first object was retrieved");
      body = (results.get("messageBody"));
      senderName = (results.get("senderName"));
      senderId = (results.get("senderId"));

      results.destroy({
        success: function(results){

        }, error: function(results, error){

        }
      });
      response.success(results);
    }, error: function(error){
      response.error("Error");
    }

  });

0 个答案:

没有答案