|
发表于 2016-10-24 16:42:12
|
显示全部楼层
这个x只要是一个手机号,就可以推送成功吗?我没有申请极光推送的账号,用的是外卖案例的,只引用了一个插件,写了一个点击按钮的事件如下
require("cordova!cn.jpush.phonegap.JPushPlugin");
Model.prototype.sendBtnClick = function(event){
var id = '18245391681';
justep.Baas.sendRequest({
"method" : "post",
"url" : "/jpush/jpush",
"action" : "push",
"async" : false,
"params" : {registrationId : id},
"success" : function(data) {
alert(111);
}
});
};
但是报错了,执行action/push失败,控制台大概就是这样的错误:
[http-8080-7] INFO cn.jpush.api.common.connection.NativeHttpClient - Created instance with _maxRetryTimes = 3
[http-8080-7] INFO cn.jpush.api.common.connection.NativeHttpClient - Created instance with _maxRetryTimes = 3
[http-8080-7] INFO cn.jpush.api.common.connection.NativeHttpClient - Created instance with _maxRetryTimes = 3
[http-8080-7] INFO cn.jpush.api.common.connection.NativeHttpClient - Created instance with _maxRetryTimes = 3
[http-8080-7] WARN cn.jpush.api.common.connection.NativeHttpClient - Got error response - responseCode:400, responseContent:{"error":{"message":"The schedule-task is invalid, push is invalid:cannot find user by this audience","code":8100}}
[http-8080-7] ERROR cn.jpush.api.common.connection.NativeHttpClient - Your request params is invalid. Please check them according to error message.
{} |
|