Commit 5097b2d8 authored by 胡's avatar

fix: 关于极光推送ios崩溃的问题

parent 374efdff
...@@ -73,7 +73,9 @@ export default { ...@@ -73,7 +73,9 @@ export default {
'user_id': res.user_id, 'user_id': res.user_id,
'mobile': res.mobile, 'mobile': res.mobile,
} }
vm.Jpush._jpush_config(tagOption) let userPhone = window.localStorage.getItem('user_phone');
let phone = isNaN(parseInt(userPhone)) ? '11111111111': userPhone;
vm.Jpush._jpush_config(tagOption, phone);
} }
}) })
}, },
......
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
if (res.result === 'S' && res.info.login_flag === 'Y') { if (res.result === 'S' && res.info.login_flag === 'Y') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
// vm.updateVersion() // 版本更新 // vm.updateVersion() // 版本更新
window.localStorage.setItem('user_phone', isNaN(parseInt(vm.username)) ? '11111111111': vm.username) window.localStorage.setItem('user_phone', vm.username)
window.localStorage.setItem('password', md5passwprd) window.localStorage.setItem('password', md5passwprd)
// vm.$router.push({ // vm.$router.push({
// name: 'HomePage', // name: 'HomePage',
...@@ -153,9 +153,11 @@ export default { ...@@ -153,9 +153,11 @@ export default {
window.localStorage.setItem('app_user_id', res.info.app_user_id) window.localStorage.setItem('app_user_id', res.info.app_user_id)
let tagOption = { let tagOption = {
'username': isNaN(parseInt(vm.username)) ? '11111111111': vm.username 'username': isNaN(Number(vm.username)) ? '11111111111': vm.username
} }
vm.Jpush._jpush_config(tagOption);
let phone = isNaN(parseInt(vm.username)) ? '11111111111': vm.username;
vm.Jpush._jpush_config(tagOption, phone);
} else { } else {
......
...@@ -188,9 +188,9 @@ export default { ...@@ -188,9 +188,9 @@ export default {
}, },
// 极光推送 // 极光推送
_jpush_config: function (tagOption) { _jpush_config: function (tagOption, phone) {
if (process.env.isMobilePlatform) { if (process.env.isMobilePlatform) {
let phone = window.localStorage.user_phone // let phone = window.localStorage.user_phone
// alert('phone'+phone) // alert('phone'+phone)
let tags = [] let tags = []
for (let key in tagOption) { for (let key in tagOption) {
......
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