更新JPush版本为v4.8.5

This commit is contained in:
李良喜 2022-12-23 16:56:39 +08:00
parent 00599ca0bc
commit abb4b6432b
5 changed files with 36 additions and 2 deletions

View File

@ -261,3 +261,36 @@ window.JPush.setBadgeNumber(badgeNumb)
#### 参数说明
- badgeNumb: 角标显示数字小于或等0角标显示数字清楚
### API - setAuth
设置用户是否同意隐私协议
#### 接口定义
```js
window.JPush.setAuth(isAuth)
```
#### 参数说明
- isAuth: 是否同意隐私协议true 已同意false未同意
#### 调用逻辑
- 宿主 APP 在首次安装,冷启动
- 用户隐私协议告知
- 用户确认授权
- 告知极光授权结果
同意隐私协议:
```js
window.JPush.setAuth(true)
```
不同意隐私协议:
```js
window.JPush.setAuth(false)
```

BIN
example/css/.DS_Store vendored

Binary file not shown.

View File

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

View File

@ -482,6 +482,7 @@ JPushPlugin.prototype.setBadgeNumber = function(badgeNumb) {
}
};
//设备是否同意隐私协议
JPushPlugin.prototype.setAuth = function(isAuth){
if(device.platform === "Android"){
this.callNative("setAuth", [isAuth], null);