소스 검색

去掉多余代码

lifanagju_citu 8 달 전
부모
커밋
2bffc3cb8c
1개의 변경된 파일1개의 추가작업 그리고 39개의 파일을 삭제
  1. 1 39
      src/layout/company/navBar.vue

+ 1 - 39
src/layout/company/navBar.vue

@@ -84,11 +84,6 @@
         </div>
       </div>
     </v-toolbar>
-    <CtDialog :visible="show" title="请选择要切换的公司账号" :footer="true" widthType="2" @close="show = false" @submit="handleToAnotherEnterpriseSubmit">
-      <v-radio-group v-model="radios">
-        <v-radio v-for="item in enterpriseList" :key="item.enterpriseId" color="primary" :label="item.enterpriseName" :value="item.enterpriseId"></v-radio>
-      </v-radio-group>
-    </CtDialog>
   </div>
 </template>
 
@@ -155,7 +150,7 @@ const items = computed(() => {
 })
 
 // 企业logo、用户基本信息
-let baseInfo = ref(JSON.parse(localStorage.getItem('baseInfo')) || {})
+let baseInfo = ref(JSON.parse(localStorage.getItem('entBaseInfo')) || {})
 let enterpriseUserAccount = ref(JSON.parse(localStorage.getItem('enterpriseUserAccount')) || {}) // 账户信息
 
 userStore.$subscribe((mutation, state) => {
@@ -169,39 +164,6 @@ userStore.$subscribe((mutation, state) => {
 //   location.reload()
 // }
 
-// 企业相关操作
-const show = ref(false)
-const radios = ref(null)
-
-// // 注册新企业
-// const handleRegisteringNewEnterprise = async () => {
-//   const data = await getUserRegisterEnterpriseApply()
-//   const bool = data && Object.keys(data).length // 已经有数据说明已经申请过了
-//   const path = bool ? '/recruit/enterprise/register/inReview' : '/recruit/enterprise/register'
-//   router.push({ path })
-// }
-
-// // 切换其他企业
-// const handleSwitchToAnotherEnterprise = async () => {
-//   if (enterpriseList.value?.length) {
-//     if (enterpriseList.value.length > 1) {
-//       show.value = true
-//       radios.value = enterpriseList.value[0].enterpriseId
-//     } else {
-//       // 只有一个企业不能切换  只能再注册新的一个
-//       handleRegisteringNewEnterprise()
-//     }
-//   }
-// }
-// 手动切换企业提交
-const handleToAnotherEnterpriseSubmit = async () => { 
-  // 获取企业账号令牌以及企业用户个人信息
-  await userStore.changeRole(radios.value) // enterpriseId
-  // router.push({ path: '/recruit/enterprise' })
-  localStorage.setItem('loginType', 'enterprise')
-  window.location.href = '/recruit/enterprise'
-}
-
 const test = ref(false)
 // 企业列表
 const getEnterpriseListData = async () => {