mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-21 21:43:02 +08:00
Merge branch 'dev'
This commit is contained in:
commit
8e087e102a
@ -1,7 +1,7 @@
|
||||
# JPush PhoneGap / Cordova Plugin
|
||||
|
||||
[](https://travis-ci.org/jpush/jpush-phonegap-plugin)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin)
|
||||
[](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
|
||||
|
||||
|
@ -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 | 描述 | 详细解释 |
|
||||
|
@ -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",
|
||||
|
@ -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>
|
||||
|
@ -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];
|
||||
}];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user