Merge pull request 'master' (#568) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/568
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<ul>
|
||||
<li>主次账号切换</li>
|
||||
<li class="avatar-li" v-for="item in accountList" @click="accountChange(item.userId)">
|
||||
<el-badge :value="item.taskCount" v-if="item.taskCount!==0" @click="taskClick">
|
||||
<el-badge :value="item.taskCount" v-if="item.taskCount!==0">
|
||||
<el-avatar>{{ item.nickName }}</el-avatar>
|
||||
</el-badge>
|
||||
<el-avatar v-else>{{ item.nickName }}</el-avatar>
|
||||
@@ -108,23 +108,13 @@ const handleVisitedP = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const taskClick = () => {
|
||||
router.push('/')
|
||||
}
|
||||
|
||||
const accountChange = (userId) => {
|
||||
switchAccount(userId).then(res => {
|
||||
if (res.code == 1000) {
|
||||
if (res.code === 1000) {
|
||||
visitedP.value = !visitedP.value
|
||||
authStore.userLogout()
|
||||
setToken(res.data)
|
||||
console.log('router', route)
|
||||
if (route.path !== '/') {
|
||||
|
||||
}
|
||||
location.reload()
|
||||
// router.push('/home')
|
||||
visitedP.value = false
|
||||
window.location.href = "/home"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user