Skip to content

Commit 2ebacad

Browse files
authored
Merge pull request #409 from weiruiyang/master
更新版本
2 parents ee3e6b9 + 9751b15 commit 2ebacad

17 files changed

+383
-120
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Created by https://www.gitignore.io/api/macos,apachecordova
2-
2+
.idea
33
### ApacheCordova ###
44
# Apache Cordova generated files and directories
55
bin/*

example/index.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<html>
3-
3+
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
66
<title>JPush Phonegap Simple Demo</title>
@@ -18,15 +18,15 @@
1818

1919
initiateUI();
2020
};
21-
21+
2222
var getRegistrationID = function() {
2323
window.JPush.getRegistrationID(onGetRegistrationID);
2424
};
25-
25+
2626
var onGetRegistrationID = function(data) {
2727
try {
2828
console.log("JPushPlugin:registrationID is " + data);
29-
29+
3030
if (data.length == 0) {
3131
var t1 = window.setTimeout(getRegistrationID, 1000);
3232
}
@@ -36,7 +36,7 @@
3636
console.log(exception);
3737
}
3838
};
39-
39+
4040
var onTagsWithAlias = function(event) {
4141
try {
4242
console.log("onTagsWithAlias");
@@ -48,7 +48,7 @@
4848
console.log(exception)
4949
}
5050
};
51-
51+
5252
var onOpenNotification = function(event) {
5353
try {
5454
var alertContent;
@@ -62,7 +62,7 @@
6262
console.log("JPushPlugin:onOpenNotification" + exception);
6363
}
6464
};
65-
65+
6666
var onReceiveNotification = function(event) {
6767
try {
6868
var alertContent;
@@ -76,7 +76,7 @@
7676
console.log(exception)
7777
}
7878
};
79-
79+
8080
var onReceiveMessage = function(event) {
8181
try {
8282
var message;
@@ -90,7 +90,7 @@
9090
console.log("JPushPlugin:onReceiveMessage-->" + exception);
9191
}
9292
};
93-
93+
9494
var initiateUI = function() {
9595
try {
9696
window.JPush.init();
@@ -110,7 +110,7 @@
110110
var tag2 = $("#tagText2").val()
111111
var tag3 = $("#tagText3").val()
112112
var tags = []
113-
113+
114114
if (tag1) {
115115
tags.push(tag1)
116116
}
@@ -123,7 +123,7 @@
123123

124124
window.JPush.setTags({ sequence: 1, tags: tags },
125125
function (result) {
126-
$("#tagsResult").html(result.tags)
126+
$("#tagsResult").html(JSON.stringify(result.tags))
127127
}, function (error) {
128128
alert(error.code)
129129
})
@@ -135,7 +135,7 @@
135135
$("#getAllTags").click(function (event) {
136136
window.JPush.getAllTags({ sequence: 2 },
137137
function (result) {
138-
$("#tagsResult").html(result.tags)
138+
$("#tagsResult").html(JSON.stringify(result.tags))
139139
}, function (error) {
140140
alert(error.code)
141141
})
@@ -179,14 +179,14 @@
179179
})
180180
});
181181
};
182-
182+
183183
document.addEventListener("deviceready", onDeviceReady, false);
184184
document.addEventListener("jpush.openNotification", onOpenNotification, false);
185185
document.addEventListener("jpush.receiveNotification", onReceiveNotification, false);
186186
document.addEventListener("jpush.receiveMessage", onReceiveMessage, false);
187187
</script>
188188
</head>
189-
189+
190190
<body>
191191
<div data-role="page" id="page">
192192
<div data-role="content">
@@ -235,7 +235,7 @@ <h3>JPushPlugin Example</h3>
235235
<input type="button" id="getAllTags" value="Get all tags" />
236236
<input type="button" id="cleanTags" value="Clean tags" />
237237
</div>
238-
238+
239239
<div data-role="fieldcontain">
240240
<input type="button" id="setAlias" value="Set alias" />
241241
<input type="button" id="getAlias" value="Get alias" />

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jpush-phonegap-plugin",
3-
"version": "3.6.4",
3+
"version": "3.7.0",
44
"description": "JPush for cordova plugin",
55
"cordova": {
66
"id": "jpush-phonegap-plugin",
@@ -23,7 +23,7 @@
2323
],
2424
"devDependencies": {
2525
"cordova-plugin-device": "*",
26-
"cordova-plugin-jcore": ">=1.2.8"
26+
"cordova-plugin-jcore": ">=1.3.0"
2727
},
2828
"author": "JiGuang",
2929
"license": "MIT",

0 commit comments

Comments
 (0)