소스 검색

先清空企业邮箱信息,避免求职切换招聘有邮箱登录信息遗留导致使用邮箱信息

lifanagju_citu 6 달 전
부모
커밋
adbb6cbd5b
2개의 변경된 파일1개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 4
      src/layout/personal/navBar.vue
  2. 0 2
      src/store/user.js

+ 1 - 4
src/layout/personal/navBar.vue

@@ -223,14 +223,11 @@ const handleSwitch = async () => {
 
 // 切换提交
 const switchSubmit = async () => {
-  // await logout() // 先退出个人登录
   localStorage.setItem('enterpriseId', radios.value)
+  localStorage.setItem('emailLoginInfo', "false") // 先清空企业邮箱信息,避免求职切换招聘有邮箱登录信息遗留导致使用邮箱信息
 
   // 跳转企业路由 且验证是否已完善必填基本信息
   window.location.href = '/enterpriseVerification'
-
-  // 获取企业账号令牌以及企业用户个人信息
-  // await userStore.changeRole(radios.value)
 }
 
 const btnType = ref(0)

+ 0 - 2
src/store/user.js

@@ -155,8 +155,6 @@ export const useUserStore = defineStore('user',
         if (res?.type === 'emailLogin') {
           data = res
         } else {
-          // 先退出个人登录
-          // await logout()
           const enterpriseId = localStorage.getItem('enterpriseId') || ''
           if (!enterpriseId) return Snackbar.error('切换失败,请重新登录!')
           data = await switchLoginOfEnterprise({ enterpriseId })