Commit 7eea27b0 authored by 李晓兵's avatar 李晓兵

'推送'

parent 55631cb8
...@@ -5,7 +5,7 @@ export default { ...@@ -5,7 +5,7 @@ export default {
// 获取设备号 // 获取设备号
onGetRegistrationID: function (data) { onGetRegistrationID: function (data) {
try { try {
// alert("JPushPlugin:registrationID is " + JSON.stringify(data)); alert("JPushPlugin:registrationID is " + JSON.stringify(data));
if (data.length != 0) { if (data.length != 0) {
window.localStorage.setItem('registrationID', data) window.localStorage.setItem('registrationID', data)
} }
...@@ -13,7 +13,7 @@ export default { ...@@ -13,7 +13,7 @@ export default {
window.setTimeout(this.getRegistrationID, 1000) window.setTimeout(this.getRegistrationID, 1000)
} }
} catch (exception) { } catch (exception) {
// alert(angular.toJson(exception)); alert('###'+angular.toJson(exception));
} }
}, },
// 获取设备号 // 获取设备号
...@@ -183,6 +183,7 @@ export default { ...@@ -183,6 +183,7 @@ export default {
_jpush_config: function (tagOption) { _jpush_config: function (tagOption) {
if (process.env.isMobilePlatform) { if (process.env.isMobilePlatform) {
let phone = window.localStorage.user_phone let phone = window.localStorage.user_phone
alert('phone'+phone)
let tags = [] let tags = []
for (let key in tagOption) { for (let key in tagOption) {
tags.push(tagOption[key]) tags.push(tagOption[key])
...@@ -192,9 +193,9 @@ export default { ...@@ -192,9 +193,9 @@ export default {
} */ } */
window.plugins.jPushPlugin.setTags({sequence: Number(phone), tags: tags}, window.plugins.jPushPlugin.setTags({sequence: Number(phone), tags: tags},
function (result) { function (result) {
// alert(result.tags) alert('11'+result.tags)
}, function (error) { }, function (error) {
// alert(error.code) alert('22'+error.code)
}) })
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment