company.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="box" style="overflow-x: hidden;">
  3. <navBar :showLoginBtn="false" class="navBar"></navBar>
  4. <PhonePage v-if="!valid" :isCompany="true" @success="handleValidate" :isLogin="query.login ? true : false"></PhonePage>
  5. </div>
  6. </template>
  7. <script setup>
  8. defineOptions({ name: 'registerCompany'})
  9. import { getUserRegisterEnterpriseApply } from '@/api/personal/user'
  10. import navBar from '@/layout/personal/navBar.vue'
  11. import { ref } from 'vue'
  12. import PhonePage from './person.vue'
  13. import { useRouter } from 'vue-router'
  14. const router = useRouter()
  15. const query = router.currentRoute.value.query
  16. const valid = ref(false)
  17. const handleValidate = async () => {
  18. // 已短信登录
  19. valid.value = true
  20. if (query.login) {
  21. router.push({ path: '/recruit/entRegister' })
  22. return
  23. }
  24. // 查看用户是否有在申请中的数据
  25. const data = await getUserRegisterEnterpriseApply()
  26. const bool = data && Object.keys(data).length && data.status !== '1' // 已经有数据说明已经申请过了 且申请状态如果为已通过,则跳转到注册页面让用户可以注册新的企业
  27. const path = bool ? '/recruit/entRegister/inReview' : '/recruit/entRegister'
  28. router.push({ path, query: { type: 'noLoginToRegister' } })
  29. }
  30. // handleValidate() // 测试
  31. </script>
  32. <style scoped lang="scss">
  33. .navBar {
  34. position: absolute;
  35. top: 0;
  36. z-index: 2;
  37. }
  38. .box {
  39. position: relative;
  40. width: 100%;
  41. height: 100%;
  42. background-image: url('https://minio.menduner.com/dev/menduner/login-banner.png');
  43. background-size: cover;
  44. background-repeat: no-repeat;
  45. background-position: center center;
  46. }
  47. .content {
  48. position: absolute;
  49. top: 50%;
  50. left: 50%;
  51. translate: -50% -50%;
  52. width: 600px;
  53. height: 90%;
  54. overflow: auto;
  55. background-color: #fff;
  56. border-radius: 10px;
  57. }
  58. .note {
  59. color: var(--color-666);
  60. font-size: 14px;
  61. line-height: 32px;
  62. }
  63. .login-tips {
  64. width: 100%;
  65. font-size: 14px;
  66. text-align: center;
  67. }
  68. ::-webkit-scrollbar {
  69. width: 4px;
  70. height: 4px;
  71. }
  72. ::-webkit-scrollbar-thumb, .temporaryAdd ::-webkit-scrollbar-thumb, .details_edit ::-webkit-scrollbar-thumb {
  73. // 滚动条-颜色
  74. background: #c3c3c379;
  75. }
  76. ::-webkit-scrollbar-track, .temporaryAdd ::-webkit-scrollbar-track, .details_edit ::-webkit-scrollbar-track {
  77. // 滚动条-底色
  78. background: #e5e5e58f;
  79. }
  80. </style>