增加了benginLogPageView

This commit is contained in:
zhangqinghe
2015-01-16 10:42:06 +08:00
parent 3d74b92952
commit 4e687db4d3
3 changed files with 69 additions and 10 deletions
+8
View File
@@ -1,6 +1,7 @@
var JPushPlugin = function(){
};
//private plugin function
JPushPlugin.prototype.isPlatformIOS = function(){
return device.platform == "iPhone" || device.platform == "iPad" || device.platform == "iPod touch" || device.platform == "iOS"
@@ -15,6 +16,7 @@ JPushPlugin.prototype.call_native = function(name, args, callback){
ret = cordova.exec(callback,this.error_callback,'JPushPlugin',name,args);
return ret;
}
//public plugin function
JPushPlugin.prototype.startLogPageView = function(data){
if(this.isPlatformIOS()){
@@ -28,6 +30,12 @@ JPushPlugin.prototype.stopLogPageView = function(data){
}
}
JPushPlugin.prototype.beginLogPageView = function(pageName,duration){
if(this.isPlatformIOS()){
this.call_native( "beginLogPageView",[pageName,duration],null);
}
}
JPushPlugin.prototype.setTagsWithAlias = function(tags,alias){
try{
if(tags==null){