|
@@ -1,11 +1,15 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="pt-20 pb-30 px-50 flex justify-between items-center">
|
|
<view class="pt-20 pb-30 px-50 flex justify-between items-center">
|
|
|
- <volunteer-menu-item v-for="m in menus" :key="m.title" :title="m.title" :icon="m.icon" @click="goPage(m)" />
|
|
|
|
|
|
|
+ <volunteer-menu-item v-for="m in menus" :key="m.title" :title="m.title" :icon="m.icon" @click="goPage(m)"/>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts" name="VolunteerMenu">
|
|
<script setup lang="ts" name="VolunteerMenu">
|
|
|
import VolunteerMenuItem from "@/pagesMain/pages/volunteer/components/volunteer-menu-item.vue";
|
|
import VolunteerMenuItem from "@/pagesMain/pages/volunteer/components/volunteer-menu-item.vue";
|
|
|
|
|
+import {routes} from "@/common/routes";
|
|
|
|
|
+import {useTransferPage} from "@/hooks/useTransferPage";
|
|
|
|
|
+
|
|
|
|
|
+const {transferTo} = useTransferPage()
|
|
|
|
|
|
|
|
type Menu = {
|
|
type Menu = {
|
|
|
title: string
|
|
title: string
|
|
@@ -15,15 +19,15 @@ type Menu = {
|
|
|
const menus: Menu[] = [{
|
|
const menus: Menu[] = [{
|
|
|
title: '找院校',
|
|
title: '找院校',
|
|
|
icon: '/volunteer/index/menu_college.png',
|
|
icon: '/volunteer/index/menu_college.png',
|
|
|
- pagePath: ''
|
|
|
|
|
|
|
+ pagePath: routes.universityIndex
|
|
|
}, {
|
|
}, {
|
|
|
title: '查专业',
|
|
title: '查专业',
|
|
|
icon: '/volunteer/index/menu_major.png',
|
|
icon: '/volunteer/index/menu_major.png',
|
|
|
- pagePath: ''
|
|
|
|
|
|
|
+ pagePath: routes.majorIndex
|
|
|
}, {
|
|
}, {
|
|
|
title: '看职业',
|
|
title: '看职业',
|
|
|
icon: '/volunteer/index/menu_vocation.png',
|
|
icon: '/volunteer/index/menu_vocation.png',
|
|
|
- pagePath: ''
|
|
|
|
|
|
|
+ pagePath: routes.careerIndex
|
|
|
}, {
|
|
}, {
|
|
|
title: '志愿分析',
|
|
title: '志愿分析',
|
|
|
icon: '/volunteer/index/menu_analysis.png',
|
|
icon: '/volunteer/index/menu_analysis.png',
|
|
@@ -31,7 +35,8 @@ const menus: Menu[] = [{
|
|
|
}]
|
|
}]
|
|
|
|
|
|
|
|
const goPage = function (menu: Menu) {
|
|
const goPage = function (menu: Menu) {
|
|
|
- console.log('goPage', menu)
|
|
|
|
|
|
|
+ if (menu.pagePath) transferTo(menu.pagePath)
|
|
|
|
|
+ else uni.$ie.showModal({title: '提示', content: '开发中,敬请期待', showCancel: false})
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|