Commit 14ab878e authored by jiacheng.mao's avatar jiacheng.mao

userQuery增加校验

parent 0adea6e1
......@@ -159,7 +159,9 @@ export default {
beforeRouteEnter (to, from, next) {
// if (true) {
next(vm => {
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]
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')
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('解绑成功')
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('解绑成功')
if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
// vm.flag = true
vm.approveBtn = false
} else {
......@@ -1002,8 +1008,10 @@ export default {
function (suc) {
let success = JSON.parse(suc)
if (success.code === 1) {
if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
}
},
function (reason) {
let error = JSON.parse(reason)
......@@ -1024,8 +1032,10 @@ export default {
}
} else if (authFlag === false) {
hlsPopup.showLongCenter('用户已绑定!')
if (window.localStorage.getItem('user_phone')) {
vm.userQuery()
}
}
},
async getNpCertificationUrl () {
let vm = this
......@@ -1062,7 +1072,9 @@ export default {
hlsPopup.showLongCenter('绑定失败!')
} else if ((res.info.code === 0) && (res.info.data.openId)) {
hlsPopup.showLongCenter('绑定成功!')
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('解绑成功')
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