|
@@ -124,6 +124,9 @@ import { useRouter } from 'vue-router'; const router = useRouter()
|
|
import { getUserBindEnterpriseList, getUserRegisterEnterpriseApply } from '@/api/personal/user'
|
|
import { getUserBindEnterpriseList, getUserRegisterEnterpriseApply } from '@/api/personal/user'
|
|
import MessageNotification from '../message.vue'
|
|
import MessageNotification from '../message.vue'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
|
|
+import {
|
|
|
|
+ logout
|
|
|
|
+} from '@/api/common'
|
|
|
|
|
|
// import { useIMStore } from '@/store/im'
|
|
// import { useIMStore } from '@/store/im'
|
|
defineOptions({ name: 'personal-navbar' })
|
|
defineOptions({ name: 'personal-navbar' })
|
|
@@ -191,10 +194,14 @@ const handleSwitch = async () => {
|
|
|
|
|
|
// 切换提交
|
|
// 切换提交
|
|
const switchSubmit = async () => {
|
|
const switchSubmit = async () => {
|
|
- // 获取企业账号令牌以及企业用户个人信息
|
|
|
|
- await userStore.changeRole(radios.value)
|
|
|
|
|
|
+ await logout() // 先退出个人登录
|
|
|
|
+ localStorage.setItem('enterpriseId', radios.value)
|
|
|
|
+
|
|
// 跳转企业路由 且验证是否已完善必填基本信息
|
|
// 跳转企业路由 且验证是否已完善必填基本信息
|
|
window.location.href = '/enterpriseVerification'
|
|
window.location.href = '/enterpriseVerification'
|
|
|
|
+
|
|
|
|
+ // 获取企业账号令牌以及企业用户个人信息
|
|
|
|
+ // await userStore.changeRole(radios.value)
|
|
}
|
|
}
|
|
|
|
|
|
const btnType = ref(0)
|
|
const btnType = ref(0)
|