index.vue 3.2 KB

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