Javascript 如何正确传递Parse.com云代码参数?

Javascript 如何正确传递Parse.com云代码参数?,javascript,parameters,parse-platform,parse-cloud-code,Javascript,Parameters,Parse Platform,Parse Cloud Code,我正在用Parse js调用一个云代码函数 Parse.Cloud.run('enterproductwithid', { "token": token, "objId": objectIdOfCurrentProd, "username": currentUser1.username } 我的云代码功能是: Parse.Cloud.define("enterproductwithid", function(requ

我正在用Parse js调用一个云代码函数

Parse.Cloud.run('enterproductwithid', 
     { 
         "token": token,
         "objId": objectIdOfCurrentProd,
         "username": currentUser1.username
     }
我的云代码功能是:

Parse.Cloud.define("enterproductwithid", function(request, response) 
  {
     console.log(request.params);
  });
只传递令牌参数。没有其他日志。有什么想法可以让我停止拔头发吗


谢谢

不要将参数键放在引号中。它类似于$.ajax POST函数

Parse.Cloud.run('enterproductwithid', 
      {
        token: token, 
        objId: objectIdOfCurrentProd, 
        username: currentUser1.username
      },{
      success: function(result) {
          //do neat stuff
      }, 
      error: function(e) {
         //error
      }
});

不要将参数键放在引号中。它类似于$.ajax POST函数

Parse.Cloud.run('enterproductwithid', 
      {
        token: token, 
        objId: objectIdOfCurrentProd, 
        username: currentUser1.username
      },{
      success: function(result) {
          //do neat stuff
      }, 
      error: function(e) {
         //error
      }
});

不要将参数键放在引号中。它类似于$.ajax POST函数

Parse.Cloud.run('enterproductwithid', 
      {
        token: token, 
        objId: objectIdOfCurrentProd, 
        username: currentUser1.username
      },{
      success: function(result) {
          //do neat stuff
      }, 
      error: function(e) {
         //error
      }
});

不要将参数键放在引号中。它类似于$.ajax POST函数

Parse.Cloud.run('enterproductwithid', 
      {
        token: token, 
        objId: objectIdOfCurrentProd, 
        username: currentUser1.username
      },{
      success: function(result) {
          //do neat stuff
      }, 
      error: function(e) {
         //error
      }
});

代码对我来说运行良好。您是否检查了您在请求中使用的变量是否确实包含数据并且不是空的?代码对我来说运行良好。您是否检查了您在请求中使用的变量是否确实包含数据并且不是空的?代码对我来说运行良好。您是否检查了您在请求中使用的变量是否确实包含数据并且不是空的?代码对我来说运行良好。您是否检查了请求中使用的变量是否确实包含数据且不为空?