index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!-- 门墩儿入口管理列表 -->
  2. <template>
  3. <div class="d-flex justify-center" style="margin-top: 80px;">
  4. <div style="text-align: center;">
  5. <div style="font-size: 40px; font-weight: bold;">
  6. <span v-for="(val, i) in bigTitle" :key="'bigTitle' + i" :class="{'ml-2': i}">{{ val }}</span>
  7. </div>
  8. <div style="font-size: 24px; color: #777" class="mt-5">
  9. <span v-for="(val, i) in smallTitle" :key="'smallTitle' + i" :class="{'ml-5': i}">{{ val }}</span>
  10. </div>
  11. </div>
  12. </div>
  13. <div class="mt-10">
  14. <div class="listBox" v-for="(val, index) in menuList" :key="'menuBox' + index">
  15. <div
  16. v-for="(item, index) in val" :key="'menu' + index"
  17. class="listItem mb-6 mx-3"
  18. @click="handleClick(item)"
  19. >
  20. <v-icon color="primary" size="50" class="mt-6" style="height: 100px; line-height: 100px;">{{ item.icon }}</v-icon>
  21. <div style="font-size: 18px;">{{ item.title }}</div>
  22. <div style="font-size: 14px;" class="defaultLink mt-3">立即体验 ></div>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script setup>
  28. defineOptions({name: 'entrances-list'})
  29. import { ref } from 'vue'
  30. const bigTitle = ['酒店管理与职业发展社交一体化 SaaS 平台']
  31. const smallTitle = [
  32. '企业在线招聘专场',
  33. '更快找到合适人选',
  34. '尽享海量VIP特权',
  35. ]
  36. const menuList = ref([
  37. { icon: 'mdi-account-group-outline', title: '门墩儿直聘', to: '/personal' },
  38. { icon: 'mdi-shopping-outline', title: '甄选商城', to: '/mall' },
  39. { icon: 'mdi-school-outline', title: '火苗儿校企', to: '' },
  40. { icon: 'mdi-account-search', title: '门墩儿猎寻服务', to: '/headhunting' },
  41. { icon: 'mdi-town-hall', title: '门墩儿产业与院校联合会', to: '' },
  42. { icon: 'mdi-database-outline', title: '数据服务', to: '' },
  43. ])
  44. // 每行三个
  45. const chunkArray = (arr, chunkSize) => {
  46. const newArr = []
  47. for (let i = 0; i < arr.length; i += chunkSize) {
  48. const chunk = arr.slice(i, i + chunkSize)
  49. newArr.push(chunk)
  50. }
  51. return newArr
  52. }
  53. menuList.value = chunkArray(menuList.value, 3) // 分割数据,每行chunkSize个
  54. const handleClick = (item) => {
  55. if (item.to) window.open(item.to)
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .listBox {
  60. display: flex;
  61. flex-wrap: wrap;
  62. justify-content: center;
  63. .listItem {
  64. width: 250px;
  65. height: 250px;
  66. background-color: #fff;
  67. cursor: pointer;
  68. border-radius: 8px;
  69. text-align: center;
  70. box-shadow: 0px 0px 40px 0px var(--v-primary-lighten4);
  71. transition: transform 0.3s ease;
  72. &:hover {
  73. transform: translateY(-8px);
  74. }
  75. }
  76. }
  77. </style>