Browse Source

切换求职者不退出登录

lifanagju_citu 6 months ago
parent
commit
7e03904754
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/layout/company/navBar.vue

+ 3 - 3
src/layout/company/navBar.vue

@@ -17,7 +17,7 @@
             <v-img @click="enterpriseClick(2)" rounded width="40" height="40" :src="baseInfo?.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" ></v-img>
             <span @click="enterpriseClick(1)" class="ml-3 commonHover">{{ baseInfo?.enterpriseAnotherName || baseInfo?.enterpriseName || '--' }}</span>
           </div>
-          <div class="ml-3 cursor-pointer border-left border-right px-3 commonHover" @click="handleLogout">我要求职</div>
+          <div class="ml-3 cursor-pointer border-left border-right px-3 commonHover" @click="handleLogout(false)">我要求职</div>
           <div class="d-flex align-center px-3 border-right">
             <div>{{ $t('enterprise.account.remainingPoints') }}:{{ enterpriseUserAccount?.balance || 0 }}点</div>
           </div>
@@ -121,8 +121,8 @@ const enterpriseClick = (tabKey = 1) => {
 }
 
 // 退出登录、切换求职者
-const handleLogout = async () => {
-  await userStore.userLogout(2)
+const handleLogout = async (exit = true) => {
+  if (exit) await userStore.userLogout(2)
   router.push({ path: '/recruitHome' })
 }
 const enterpriseList = ref([])