mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-19 05:22:57 +08:00
fix set tag/alias
This commit is contained in:
parent
599952976f
commit
108b507210
@ -87,9 +87,21 @@
|
||||
|
||||
try{
|
||||
var tag1 = $("#tagText1").attr("value");
|
||||
console.log("tag1:"+tag1);
|
||||
var tag2 = $("#tagText2").attr("value");
|
||||
var tag3 = $("#tagText3").attr("value");
|
||||
|
||||
window.plugins.jPushPlugin.setTagsWithAlias("myTags","myTags1","myTags2","myAlias");
|
||||
var alias = $("#aliasText").attr("value");
|
||||
|
||||
console.log("tag1:"+tag1==null);
|
||||
console.log("tag1:"+tag2==null);
|
||||
console.log("tag1:"+tag3==null);
|
||||
var dd = [];
|
||||
dd[0]=tag1
|
||||
dd[1]=tag2
|
||||
dd[2]=tag3
|
||||
|
||||
console.log("dd:"+dd);
|
||||
window.plugins.jPushPlugin.setTagsWithAlias(dd,alias);
|
||||
}
|
||||
catch(exception){
|
||||
console.log(exception);
|
||||
|
@ -19,11 +19,11 @@
|
||||
[self writeJavascript:[NSString stringWithFormat:@"window.plugins.jPushPlugin.pushCallback('%@')",@""]];
|
||||
return ;
|
||||
}
|
||||
NSString *tags=[arguments objectAtIndex:0];
|
||||
NSString *alias=[arguments objectAtIndex:1];
|
||||
NSArray *arrayTags=[tags componentsSeparatedByString:@","];
|
||||
NSString *alias=[arguments objectAtIndex:0];
|
||||
NSArray *arrayTags=[arguments objectAtIndex:1];
|
||||
// NSArray *tags=[arguments subarrayWithRange:range];
|
||||
[APService setTags:[NSSet setWithArray:arrayTags]
|
||||
NSSet* set=[NSSet setWithArray:arrayTags];
|
||||
[APService setTags:set
|
||||
alias:alias
|
||||
callbackSelector:@selector(tagsWithAliasCallback:tags:alias:)
|
||||
object:self];
|
||||
|
@ -93,7 +93,7 @@ JPushPlugin.prototype.setTags = function (data) {
|
||||
this.call_native("setTags", [data]);
|
||||
}
|
||||
catch(exception){
|
||||
alert(exception);
|
||||
console.log(exception);
|
||||
}
|
||||
}
|
||||
JPushPlugin.prototype.setAlias = function (data) {
|
||||
@ -104,7 +104,7 @@ JPushPlugin.prototype.setAlias = function (data) {
|
||||
}
|
||||
catch(exception){
|
||||
|
||||
alert(exception);
|
||||
console.log(exception);
|
||||
}
|
||||
}
|
||||
JPushPlugin.prototype.pushCallback = function (data) {
|
||||
@ -117,7 +117,7 @@ JPushPlugin.prototype.pushCallback = function (data) {
|
||||
}
|
||||
catch(exception){
|
||||
|
||||
alert(exception);
|
||||
console.log(exception);
|
||||
}
|
||||
}
|
||||
JPushPlugin.prototype.registrationCallback = function (data) {
|
||||
@ -125,7 +125,7 @@ JPushPlugin.prototype.registrationCallback = function (data) {
|
||||
console.log("registrationCallback--registraionID is "+data);
|
||||
}
|
||||
catch(exception){
|
||||
alert(exception);
|
||||
console.log(exception);
|
||||
}
|
||||
}
|
||||
if(!window.plugins) {
|
||||
|
Loading…
Reference in New Issue
Block a user