Commit cf754486 authored by jiacheng.mao's avatar jiacheng.mao

userQuery 增加校验

parent 1c6e32bb
...@@ -159,7 +159,9 @@ export default { ...@@ -159,7 +159,9 @@ export default {
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
// if (true) { // if (true) {
next(vm => { next(vm => {
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
}) })
// } // }
// next() // next()
......
...@@ -102,7 +102,9 @@ export default { ...@@ -102,7 +102,9 @@ export default {
next(vm => { next(vm => {
// if (from.name === 'Login') { // if (from.name === 'Login') {
vm.moduleSeparateList = [...functionState.moduleSeparateList] vm.moduleSeparateList = [...functionState.moduleSeparateList]
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
// vm.guessingQuery() // 猜你喜欢查询 // vm.guessingQuery() // 猜你喜欢查询
vm.isVisitor = !window.localStorage.getItem('password') vm.isVisitor = !window.localStorage.getItem('password')
// vm.guessingQuery() // 猜你喜欢查询 // vm.guessingQuery() // 猜你喜欢查询
......
...@@ -296,7 +296,9 @@ export default { ...@@ -296,7 +296,9 @@ export default {
vm.carCount = '0' vm.carCount = '0'
vm.multiRoleList = [] vm.multiRoleList = []
vm.multipleRole = window.localStorage.getItem('multipleRole') vm.multipleRole = window.localStorage.getItem('multipleRole')
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
vm.numQuery() vm.numQuery()
}) })
next() next()
...@@ -606,7 +608,9 @@ export default { ...@@ -606,7 +608,9 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.showLongCenter('解绑成功') vm.hlsPopup.showLongCenter('解绑成功')
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
vm.approveBtn = false vm.approveBtn = false
vm.$router.push({ vm.$router.push({
name: 'UserBind', name: 'UserBind',
...@@ -642,7 +646,9 @@ export default { ...@@ -642,7 +646,9 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.showLongCenter('解绑成功') vm.hlsPopup.showLongCenter('解绑成功')
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
// vm.flag = true // vm.flag = true
vm.approveBtn = false vm.approveBtn = false
} else { } else {
...@@ -1002,7 +1008,9 @@ export default { ...@@ -1002,7 +1008,9 @@ export default {
function (suc) { function (suc) {
let success = JSON.parse(suc) let success = JSON.parse(suc)
if (success.code === 1) { if (success.code === 1) {
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
} }
}, },
function (reason) { function (reason) {
...@@ -1024,7 +1032,9 @@ export default { ...@@ -1024,7 +1032,9 @@ export default {
} }
} else if (authFlag === false) { } else if (authFlag === false) {
hlsPopup.showLongCenter('用户已绑定!') hlsPopup.showLongCenter('用户已绑定!')
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
} }
}, },
async getNpCertificationUrl () { async getNpCertificationUrl () {
...@@ -1062,7 +1072,9 @@ export default { ...@@ -1062,7 +1072,9 @@ export default {
hlsPopup.showLongCenter('绑定失败!') hlsPopup.showLongCenter('绑定失败!')
} else if ((res.info.code === 0) && (res.info.data.openId)) { } else if ((res.info.code === 0) && (res.info.data.openId)) {
hlsPopup.showLongCenter('绑定成功!') hlsPopup.showLongCenter('绑定成功!')
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
} else { } else {
hlsPopup.showError(res.info.msg) hlsPopup.showError(res.info.msg)
} }
......
...@@ -214,7 +214,9 @@ export default { ...@@ -214,7 +214,9 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.showLongCenter('解绑成功') vm.hlsPopup.showLongCenter('解绑成功')
vm.userQuery() if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
// vm.flag = true // vm.flag = true
vm.approveBtn = false vm.approveBtn = false
} else { } else {
......
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