|
|
@@ -10,7 +10,7 @@
|
|
|
分步拆解,指引升学每一步
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="bg-white rounded-tr-15 z-1 relative px-12 py-20 grid grid-cols-3 gap-x-10 gap-y-20">
|
|
|
+ <view class="bg-white rounded-tr-15 z-1 relative px-12 py-20 grid grid-cols-4 gap-x-12 gap-y-20">
|
|
|
<view v-for="(m,i) in maps" :key="i" class="flex flex-col items-center" @click="handleMap(m)">
|
|
|
<view class="px-24 leading-36 text-20 text-fore-title font-bold bg-[#CEF57B] rounded-full z-1"
|
|
|
style="margin-bottom: -18rpx">
|
|
|
@@ -34,14 +34,30 @@
|
|
|
<script setup lang="ts">
|
|
|
import {routes} from "@/common/routes";
|
|
|
import {useTransferPage} from "@/hooks/useTransferPage";
|
|
|
+import {useUserStore} from "@/store/userStore";
|
|
|
|
|
|
interface SiteMap {
|
|
|
title: string;
|
|
|
desc: string;
|
|
|
pagePath: string;
|
|
|
+ handler?: () => void
|
|
|
}
|
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
const {transferTo} = useTransferPage()
|
|
|
+
|
|
|
+const goSimulate = () => {
|
|
|
+ const list = userStore.directedSchoolList || []
|
|
|
+ const first = list[0] || {}
|
|
|
+ if (!list.length || first.notice) {
|
|
|
+ transferTo(routes.studyIndex)
|
|
|
+ } else {
|
|
|
+ transferTo(routes.studySimulate, {
|
|
|
+ data: first
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const maps = ref<SiteMap[]>([{
|
|
|
title: '本省规则',
|
|
|
desc: '填志愿不踩坑',
|
|
|
@@ -69,7 +85,8 @@ const maps = ref<SiteMap[]>([{
|
|
|
}, {
|
|
|
title: '模拟测试',
|
|
|
desc: '全真模拟',
|
|
|
- pagePath: routes.studySimulate
|
|
|
+ pagePath: '',
|
|
|
+ handler: goSimulate
|
|
|
}, {
|
|
|
title: '测录取率',
|
|
|
desc: '录取风险评估',
|
|
|
@@ -77,9 +94,13 @@ const maps = ref<SiteMap[]>([{
|
|
|
}])
|
|
|
|
|
|
const handleMap = (m: SiteMap) => {
|
|
|
+ if (m.handler) return m.handler()
|
|
|
if (!m.pagePath) return
|
|
|
transferTo(m.pagePath)
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+onMounted(() => userStore.getDirectedSchoolList())
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|