|
@@ -33,7 +33,7 @@
|
|
|
|
|
|
<!-- 头像用户名 -->
|
|
|
<div class="d-flex align-center" v-if="getToken()">
|
|
|
- <span class="cursor-pointer mr-5" @click="toBeEnterprise">我要招聘</span>
|
|
|
+ <span class="cursor-pointer mr-5" @click="handleSwitch">我要招聘</span>
|
|
|
<span class="cursor-pointer" :class="{'routeActive': routeActive === 6}" @click="router.push({ path: paths[6] })">
|
|
|
{{t('enterprise.account.accountBalances')}}:{{ userAccount?.balance && userAccount?.balance > 0 ? (userAccount?.balance / 100.0).toFixed(2) : 0 }}
|
|
|
</span>
|
|
@@ -103,7 +103,7 @@
|
|
|
</div>
|
|
|
</v-toolbar>
|
|
|
|
|
|
- <CtDialog :visible="show" title="请选择要切换的公司账号" :footer="true" widthType="2" @close="show = false" @submit="handleSubmit">
|
|
|
+ <CtDialog :visible="show" title="请选择要切换的公司账号" :footer="true" widthType="2" @close="show = false" @submit="switchSubmit">
|
|
|
<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>
|
|
@@ -171,13 +171,12 @@ const routeActive = computed(() => {
|
|
|
})
|
|
|
|
|
|
const handleLogoClick = () => { window.open('/') } // 点击logo
|
|
|
-const handleSubmit = () => { toEnterprise(radios.value) }
|
|
|
|
|
|
const show = ref(false)
|
|
|
const radios = ref(null)
|
|
|
const enterpriseList = ref([])
|
|
|
// 切换为招聘者
|
|
|
-const toBeEnterprise = async () => {
|
|
|
+const handleSwitch = async () => {
|
|
|
await getApplyInfo() // 查询申请信息(注册进度)
|
|
|
const data = await getUserBindEnterpriseList() // 申请通过才有数据,否则空数组
|
|
|
enterpriseList.value = data || []
|
|
@@ -190,13 +189,10 @@ const toBeEnterprise = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 切换为招聘者
|
|
|
-const toEnterprise = async (enterpriseId) => {
|
|
|
- await getUserBindEnterpriseList({ enterpriseId })
|
|
|
+// 切换提交
|
|
|
+const switchSubmit = async () => {
|
|
|
// 获取企业账号令牌以及企业用户个人信息
|
|
|
- await userStore.changeRole(enterpriseId)
|
|
|
- // router.push({ path: '/recruit/enterprise' })
|
|
|
-
|
|
|
+ await userStore.changeRole(radios.value)
|
|
|
// 跳转企业路由 且验证是否已完善必填基本信息
|
|
|
window.location.href = '/enterpriseVerification'
|
|
|
}
|
|
@@ -235,7 +231,7 @@ const items = ref([
|
|
|
{ title: t('vipPackage.purchasePackage'), icon: 'mdi-gift-outline', change: () => router.push({ path: '/recruit/personal/purchasePackage' }) },
|
|
|
{ title: t('resume.onlineResume'), icon: 'mdi-list-box-outline', change: () => router.push({ path: '/recruit/personal/resume' }) },
|
|
|
{ title: t('setting.accountSettings'), icon: 'mdi-cog-outline', change: () => router.push({ path: '/recruit/personal/accountSettings/accountBinding' }) },
|
|
|
- // { title: t('setting.switchToRecruit'), icon: 'mdi-swap-horizontal', change: toBeEnterprise },
|
|
|
+ // { title: t('setting.switchToRecruit'), icon: 'mdi-swap-horizontal', change: handleSwitch },
|
|
|
{ title: t('publicRecruitment.bountyRewards'), icon: 'mdi-google-circles-extended', change: () => router.push({ path: '/publicRecruitment' }) },
|
|
|
{ title: t('points.wallet'), icon: ' mdi-database-outline', change: () => router.push({ path: '/recruit/personal/myWallet' }) },
|
|
|
{ title: t('taskCenter.taskCenter'), icon: 'mdi-calendar-check-outline', change: () => router.push({ path: '/recruit/personal/TaskCenter' }) },
|