From 3e23fb912941b86ea9bafeaf69d1fe384b06b713 Mon Sep 17 00:00:00 2001 From: zhangqinghe Date: Fri, 16 Jan 2015 15:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8F=82=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=92=8C=E5=87=BD=E6=95=B0=E5=9C=A8=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/JPushPlugin.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/www/JPushPlugin.js b/www/JPushPlugin.js index 7c12147..bc7d93a 100644 --- a/www/JPushPlugin.js +++ b/www/JPushPlugin.js @@ -55,7 +55,24 @@ JPushPlugin.prototype.setTagsWithAlias = function(tags,alias){ } } +JPushPlugin.prototype.setTags = function(tags){ + + try{ + this.call_native("setTags",tags,null); + } + catch(exception){ + console.log(exception); + } +} +JPushPlugin.prototype.setAlias = function(alias){ + try{ + this.call_native("setAlias",[alias],null); + } + catch(exception){ + console.log(exception); + } +} JPushPlugin.prototype.getRegistrationID = function(callback){ try{ @@ -66,29 +83,12 @@ JPushPlugin.prototype.getRegistrationID = function(callback){ console.log(exception); } } -JPushPlugin.prototype.setTags = function(data){ - - try{ - this.call_native("setTags",data,null); - } - catch(exception){ - console.log(exception); - } -} -JPushPlugin.prototype.setAlias = function(data){ - try{ - this.call_native("setAlias",[data],null); - } - catch(exception){ - console.log(exception); - } -} -JPushPlugin.prototype.setBadge = function(data){ +JPushPlugin.prototype.setBadge = function(value){ if(this.isPlatformIOS()){ try{ - this.call_native("setBadge",[data],null); + this.call_native("setBadge",[value],null); } catch(exception){ console.log(exception);