index-map.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="mx-30 mt-32 bg-white shadow-card overflow-hidden rounded-15 relative">
  3. <view class="w-full h-150 bg-[#F7FEE7] absolute"/>
  4. <view class="flex justify-between z-1 relative">
  5. <view class="py-14 pl-40 pr-80 bg-white"
  6. style="clip-path: polygon(0 0, calc(100% - 40rpx) 0, 100% 80rpx, 100% 100%, 0 100%);">
  7. <ie-image src="/map-title.png" is-oss custom-class="w-182 h-57"/>
  8. </view>
  9. <view class="flex-1 flex justify-center items-center text-24 text-fore-title">
  10. 分步拆解,指引升学每一步
  11. </view>
  12. </view>
  13. <view class="bg-white rounded-tr-15 z-1 relative px-12 py-20 grid grid-cols-4 gap-x-12 gap-y-20">
  14. <view v-for="(m,i) in maps" :key="i" class="flex flex-col items-center" @click="handleMap(m)">
  15. <view class="px-24 leading-36 text-20 text-fore-title font-bold bg-[#CEF57B] rounded-full z-1"
  16. style="margin-bottom: -18rpx">
  17. 第{{ i + 1 }}步
  18. </view>
  19. <view class="w-full bg-back-light rounded-15 flex flex-col items-center pt-36 pb-28"
  20. style="box-shadow: 1px 2px 0px 0px #DCF8BC;">
  21. <view>
  22. <view class="text-24 text-fore-title flex items-center gap-12">
  23. <view class="font-bold">{{ m.title }}</view>
  24. <uv-icon name="arrow-right" color="white" size="12" custom-class="bg-black rounded-full"/>
  25. </view>
  26. <view class="mt-3 text-22 text-fore-tip">{{ m.desc }}</view>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script setup lang="ts">
  34. import {routes} from "@/common/routes";
  35. import {useTransferPage} from "@/hooks/useTransferPage";
  36. import {useUserStore} from "@/store/userStore";
  37. interface SiteMap {
  38. title: string;
  39. desc: string;
  40. pagePath: string;
  41. handler?: () => void
  42. }
  43. const userStore = useUserStore()
  44. const {transferTo} = useTransferPage()
  45. const goSimulate = () => {
  46. const list = userStore.directedSchoolList || []
  47. const first = list[0] || {}
  48. if (!list.length || first.notice) {
  49. transferTo(routes.studyIndex)
  50. } else {
  51. transferTo(routes.studySimulate, {
  52. data: first
  53. });
  54. }
  55. }
  56. const maps = ref<SiteMap[]>([{
  57. title: '本省规则',
  58. desc: '填志愿不踩坑',
  59. pagePath: routes.newsDetail + '?id=' + 1065
  60. }, {
  61. title: '自我评价',
  62. desc: '了解自身优势',
  63. pagePath: ''
  64. }, {
  65. title: '职业规划',
  66. desc: '锁定职业方向',
  67. pagePath: routes.careerIndex
  68. }, {
  69. title: '了解专业',
  70. desc: '选择对口专业',
  71. pagePath: routes.majorIndex
  72. }, {
  73. title: '锁定院校',
  74. desc: '了解院校实力',
  75. pagePath: routes.universityIndex
  76. }, {
  77. title: '定向刷题',
  78. desc: '根据考纲练习',
  79. pagePath: routes.studyIndex
  80. }, {
  81. title: '模拟测试',
  82. desc: '全真模拟',
  83. pagePath: '',
  84. handler: goSimulate
  85. }, {
  86. title: '测录取率',
  87. desc: '录取风险评估',
  88. pagePath: routes.voluntaryIndex
  89. }])
  90. const handleMap = (m: SiteMap) => {
  91. if (m.handler) return m.handler()
  92. if (!m.pagePath) return
  93. transferTo(m.pagePath)
  94. }
  95. onMounted(() => userStore.getDirectedSchoolList())
  96. </script>
  97. <style scoped>
  98. </style>