Commit fcada8cf authored by Hello's avatar Hello

ios闪退修复

parent 694f29f0
......@@ -144,6 +144,7 @@ export default {
let tagOption = {
'username': vm.username,
}
localStorage.setItem('appUserId', res.info.app_user_id)
vm.Jpush._jpush_config(tagOption)
} else {
hlsPopup.hideLoading()
......
......@@ -6,20 +6,19 @@ export default {
onGetRegistrationID: function (data) {
let vm = this
try {
//alert("JPushPlugin:registrationID is " + JSON.stringify(data));
// alert("JPushPlugin:registrationID is " + JSON.stringify(data));
if (data) {
// alert('111')
window.localStorage.setItem('registrationID', data)
}
if (!data) {
//alert('222')
// alert('222')
window.plugins.jPushPlugin.getRegistrationID(this.onGetRegistrationID.bind(vm))
//window.setTimeout(() => this.getRegistrationID(),1000)
// window.setTimeout(() => this.getRegistrationID(),1000)
/* window.setTimeout(function () {
vm.getRegistrationID()
}, 1000)*/
}, 1000) */
}
} catch (exception) {
// alert('###'+exception);
}
......@@ -190,7 +189,7 @@ export default {
// 极光推送
_jpush_config: function (tagOption) {
if (process.env.isMobilePlatform) {
let phone = window.localStorage.user_phone
let userId = window.localStorage.appUserId
// alert('phone'+phone)
let tags = []
for (let key in tagOption) {
......@@ -199,7 +198,7 @@ export default {
/* if (userName) {
tags.push(userName.toUpperCase())
} */
window.plugins.jPushPlugin.setTags({sequence: Number(phone), tags: tags},
window.plugins.jPushPlugin.setTags({sequence: Number(userId), tags: tags},
function (result) {
// alert('11'+result.tags)
}, function (error) {
......
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