Merge branch 'dev'

This commit is contained in:
Hevin 2017-07-07 11:26:20 +08:00
commit 8e087e102a
5 changed files with 43 additions and 55 deletions

View File

@ -1,7 +1,7 @@
# JPush PhoneGap / Cordova Plugin
[![Build Status](https://travis-ci.org/jpush/jpush-phonegap-plugin.svg?branch=master)](https://travis-ci.org/jpush/jpush-phonegap-plugin)
[![release](https://img.shields.io/badge/release-3.2.0-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
[![release](https://img.shields.io/badge/release-3.2.1-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jpush-phonegap-plugin)
[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)

View File

@ -175,9 +175,9 @@ window.plugins.jPushPlugin.getRegistrationID(function(data) {
#### 接口定义
```
JPushPlugin.prototype.setTagsWithAlias(tags, alias)
JPushPlugin.prototype.setTags(tags)
JPushPlugin.prototype.setAlias(alias)
JPushPlugin.prototype.setTagsWithAlias(tags, alias, successCallback, errorCallback)
JPushPlugin.prototype.setTags(tags, successCallback)
JPushPlugin.prototype.setAlias(alias, errorCallback)
```
#### 参数说明
@ -197,21 +197,6 @@ JPushPlugin.prototype.setAlias(alias)
- 有效的别名组成:字母(区分大小写)、数字、下划线、汉字。
- 限制alias 命名长度限制为 40 字节(判断长度需采用 UTF-8 编码)。
#### 返回值说明
函数本身无返回值,但需要注册 `jpush.setTagsWithAlias` 事件来监听设置结果。
```js
var onTagsWithAlias = function(event) {
console.log("onTagsWithAlias")
var result = "result code:"+event.resultCode + " "
result += "tags:" + event.tags + " "
result += "alias:" + event.alias + " "
$("#tagAliasResult").html(result)
}
document.addEventListener("jpush.setTagsWithAlias", onTagsWithAlias, false)
```
#### 错误码定义
| Code | 描述 | 详细解释 |

View File

@ -1,6 +1,6 @@
{
"name": "jpush-phonegap-plugin",
"version": "3.2.0",
"version": "3.2.1",
"description": "JPush for cordova plugin",
"cordova": {
"id": "jpush-phonegap-plugin",

View File

@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="jpush-phonegap-plugin"
version="3.2.0">
version="3.2.1">
<name>JPush</name>
<description>JPush for cordova plugin</description>

View File

@ -109,6 +109,7 @@
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
}
[self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}];
}
@ -123,6 +124,7 @@
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
}
[self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}];
}
@ -137,6 +139,7 @@
} else {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
}
[self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
}];
}