<template>
  <div>
    <div>个人用户首页</div>
    <v-btn color="primary" class="white--text mt-2" min-width="298" @click="changeRole">切换为企业用户</v-btn>
    <!-- 加入公司/新建公司 -->
    <Dialog :visible="show" :footer="true" title="企业注册" widthType="1">
      <enterpriseRegister ref="enterpriseRegisterRef"></enterpriseRegister>
    </Dialog>
  </div>
</template>
<script setup>
import Dialog from '@/components/Dialog'
import enterpriseRegister from '@/views/enterprise/components/register.vue'
import { ref } from 'vue';
defineOptions({ name:'personal-index'})
import { useRouter } from 'vue-router'
const router = useRouter()

const userType = ref(1) // 0企业用户、1个人用户
const show = ref(false)
const changeRole = () => {
  if (userType.value) {
    show.value = true
  } else {
    router.push({ path: '/' })
  }
}
</script>
<style lang="scss" scoped>

</style>