Forráskód Böngészése

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

lifanagju_citu 6 hónapja
szülő
commit
adbb6cbd5b
2 módosított fájl, 1 hozzáadás és 6 törlés
  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 })