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

userQuery 增加校验

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