ie-voluntary.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view>
  3. <ie-image :is-oss="true" src="/volunteer/page-bg.png" custom-class="w-full h-auto absolute top-0 left-0 -z-1" />
  4. <ie-image :is-oss="true" src="/volunteer/title-right.png" custom-class="w-400 h-auto absolute top-100 right-0" />
  5. <view class="pt-200 ml-30">
  6. <ie-image :is-oss="true" src="/volunteer/title.png" custom-class="w-fit h-140 bg-back" mode="heightFix" />
  7. </view>
  8. <view class="relative">
  9. <ie-image :is-oss="true" src="/volunteer/volunteer-bg.png" custom-class="w-full h-220" mode="scaleToFill" />
  10. <view class="text-28 text-white absolute top-40 left-60">我的信息</view>
  11. <view
  12. class="px-46 h-1/2 absolute left-0 right-0 top-1/2 -translate-y-1/2 flex items-center justify-between box-border pt-50 text-24 text-primary">
  13. <text>姓名:{{ userStore.nickName }}</text>
  14. <text>省份:{{ userStore.getLocation || '--' }}</text>
  15. <text>类别:<ie-dict :dict-name="EnumDictName.EXAM_TYPE" :dict-value="userStore.getExamType || '--'" /></text>
  16. </view>
  17. </view>
  18. <view class="mx-26">
  19. <view class="mb-20 shadow-card px-30 py-20 bg-white rounded-8 flex items-center justify-between gap-x-30"
  20. v-for="item in menu" :key="item.title" @click="handleClick(item)">
  21. <ie-image :is-oss="true" :src="item.icon" custom-class="w-96 h-96 rounded-full" mode="aspectFill" />
  22. <view class="flex-1">
  23. <view class="text-28 text-fore-title">{{ item.title }}</view>
  24. <view class="mt-8 text-22 text-fore-light">{{ item.desc }}</view>
  25. </view>
  26. <uv-icon name="arrow-right" size="16" color="#B2B2B2" />
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script lang="ts" setup>
  32. import { useUserStore } from '@/store/userStore';
  33. import { useTransferPage } from '@/hooks/useTransferPage';
  34. import { EnumDictName } from '@/common/enum';
  35. const { transferTo } = useTransferPage();
  36. const userStore = useUserStore();
  37. type MenuItem = {
  38. title: string;
  39. desc: string;
  40. icon: string;
  41. pagePath: string;
  42. };
  43. const menu: MenuItem[] = [
  44. {
  45. title: '院校录取概率测试',
  46. desc: '输入院校专业,精准测算录取结果',
  47. icon: '/volunteer/single.png',
  48. pagePath: '/pagesOther/pages/ie/entry-single/entry-single'
  49. },
  50. // {
  51. // title: '模拟志愿分析',
  52. // desc: '精准分析你的志愿表',
  53. // icon: '/volunteer/analysis.png',
  54. // pagePath: '/pagesOther/pages/ie/entry-analysis/entry-analysis'
  55. // },
  56. // {
  57. // title: 'AI志愿',
  58. // desc: '精准推荐合理志愿,生成志愿表',
  59. // icon: '/volunteer/ai.png',
  60. // pagePath: '/pagesOther/pages/ie/entry-ai/entry-ai'
  61. // },
  62. {
  63. title: '测职业技能分',
  64. desc: '结合院校录取规则,快速测算',
  65. icon: '/volunteer/calculate.png',
  66. pagePath: '/pagesOther/pages/ie/entry-calculate/entry-calculate'
  67. }
  68. ];
  69. const handleClick = async (item: MenuItem) => {
  70. const isLogin = await userStore.checkLogin();
  71. if (isLogin) {
  72. transferTo(item.pagePath);
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped></style>