|
|
@@ -41,7 +41,13 @@
|
|
|
import { useTransferPage } from '@/hooks/useTransferPage';
|
|
|
import { DirectedSchool, SelectedUniversityMajor, SimulationTestInfo, SimulationTestOptions } from '@/types/study';
|
|
|
import { getSimulationInfo } from '@/api/modules/study';
|
|
|
+import { useUserStore } from '@/store/userStore';
|
|
|
+
|
|
|
+const userStore = useUserStore();
|
|
|
+const { hasDirectedSchool, directedSchoolList } = toRefs(userStore);
|
|
|
+const firstDirectedSchool = computed(() => directedSchoolList.value[0] || {});
|
|
|
const { transferTo } = useTransferPage();
|
|
|
+
|
|
|
type Props = {
|
|
|
directedSchool: DirectedSchool;
|
|
|
}
|
|
|
@@ -60,10 +66,20 @@ const handleSelectCollege = () => {
|
|
|
data: {}
|
|
|
});
|
|
|
}
|
|
|
-const handleStartTest = () => {
|
|
|
- transferTo('/pagesStudy/pages/simulation-entry/simulation-entry', {
|
|
|
- data: props.directedSchool
|
|
|
- });
|
|
|
+const handleStartTest = async () => {
|
|
|
+ const notice = firstDirectedSchool.value.notice;
|
|
|
+ if (notice) {
|
|
|
+ await uni.$ie.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: notice,
|
|
|
+ showCancel: false,
|
|
|
+ confirmText: '知道了'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ transferTo('/pagesStudy/pages/simulation-entry/simulation-entry', {
|
|
|
+ data: props.directedSchool
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
const loadData = () => {
|
|
|
getSimulationInfo().then(res => {
|