selectedPersonRole.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <div class="register-box" :style="{'background-image': 'url(' + webContent.loginBgUrl + ')'}">
  3. <navBar v-if="!isMobile" :showLoginBtn="false" class="navBar"></navBar>
  4. <div class="register-content">
  5. <h2 style="color: #666; font-weight: 400;">请选择当前角色</h2>
  6. <div class="d-flex mt-16">
  7. <div style="width: 50%;" class="cursor-pointer item d-flex flex-column justify-center align-center" @click="handleClickRole(0)">
  8. <v-icon color="primary" size="100">mdi-account-circle-outline</v-icon>
  9. <span class="color-primary" style="font-size: 24px">职场人士</span>
  10. </div>
  11. <div style="width: 50%; border-left: 1px solid #ccc;" class="cursor-pointer item d-flex flex-column justify-center align-center" @click="handleClickRole(1)">
  12. <v-icon color="primary" size="100">mdi-account-school-outline</v-icon>
  13. <span class="color-primary" style="font-size: 24px">在校学生</span>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script setup>
  20. import navBar from '@/layout/personal/navBar.vue'
  21. defineOptions({ name: 'register-selectedPersonRole'})
  22. // import { useRouter } from 'vue-router'; const router = useRouter()
  23. import { ref, onMounted, nextTick } from 'vue'
  24. import { webContentStore } from '@/store/webContent'
  25. const webContent = webContentStore()
  26. const isMobile = ref(false)
  27. onMounted(async () => {
  28. await webContent.getSystemWebContent()
  29. const userAgent = navigator.userAgent
  30. isMobile.value = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(userAgent)
  31. })
  32. // 强制填写个人信息 ready: 已具备; showChoose: 选择角色; student: 学生; person: 职场人士
  33. const handleClickRole = (type) => {
  34. localStorage.setItem('necessaryInfoReady', type ? 'student' : 'person')
  35. nextTick(() => {
  36. window.location.href = '/recruitHome'
  37. })
  38. }
  39. </script>
  40. <style scoped lang="scss">
  41. .register-box {
  42. position: relative;
  43. width: 100%;
  44. height: 100%;
  45. background-size: cover;
  46. }
  47. .register-content {
  48. position: absolute;
  49. top: 50%;
  50. left: 50%;
  51. translate: -50% -50%;
  52. width: 660px;
  53. height: 453px;
  54. background-color: #fff;
  55. border-radius: 8px;
  56. text-align: center;
  57. padding: 90px 62px;
  58. }
  59. .item:hover {
  60. span {
  61. border-bottom: 1px solid #00897B;
  62. }
  63. }
  64. .navBar {
  65. position: absolute;
  66. top: 0;
  67. }
  68. </style>