mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-04-19 00:03:45 +08:00
aplace new lib and change demo
This commit is contained in:
+3
-5
@@ -3,7 +3,7 @@ var JPushPlugin = function(){
|
||||
|
||||
};
|
||||
JPushPlugin.prototype.call_native = function ( name, args) {
|
||||
console.log("JPushPlugin.call_native:"+name);
|
||||
|
||||
ret = cordova.exec(null,
|
||||
null,
|
||||
'JPushPlugin',
|
||||
@@ -11,9 +11,9 @@ JPushPlugin.prototype.call_native = function ( name, args) {
|
||||
args);
|
||||
return ret;
|
||||
}
|
||||
|
||||
JPushPlugin.prototype.setTagsWithAlias = function (tags,alias) {
|
||||
|
||||
console.log("JPushPlugin:setTagsWithAlias");
|
||||
if(tags==null){
|
||||
this.setAlias(alias);
|
||||
return;
|
||||
@@ -28,7 +28,6 @@ JPushPlugin.prototype.setTagsWithAlias = function (tags,alias) {
|
||||
}
|
||||
JPushPlugin.prototype.setTags = function (data) {
|
||||
|
||||
console.log("JPushPlugin:setTags");
|
||||
try{
|
||||
this.call_native("setTags", [data]);
|
||||
}
|
||||
@@ -38,7 +37,6 @@ JPushPlugin.prototype.setTags = function (data) {
|
||||
}
|
||||
JPushPlugin.prototype.setAlias = function (data) {
|
||||
|
||||
console.log("JPushPlugin:setAlias");
|
||||
try{
|
||||
|
||||
this.call_native("setAlias", [data]);
|
||||
@@ -54,7 +52,7 @@ JPushPlugin.prototype.pushCallback = function (data) {
|
||||
var code = bToObj.resultCode;
|
||||
var tags = bToObj.resultTags;
|
||||
var alias = bToObj.resultAlias;
|
||||
console.log("JPushPlugin:callBack--code is "+code+" tags is "+tags + " alias is "+alias);
|
||||
|
||||
}
|
||||
catch(exception){
|
||||
alert(exception);
|
||||
|
||||
Reference in New Issue
Block a user