|
@@ -12,51 +12,11 @@
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
</ie-navbar>
|
|
</ie-navbar>
|
|
|
- <view class="mx-30 mt-20 flex items-center bg-[#E3F4FA] rounded-8 py-16 px-16 gap-x-40">
|
|
|
|
|
- <view class="text-24 text-[#34B0D7] flex-1">
|
|
|
|
|
- <text v-if="!hasDirectedSchool">你还未开启定向学习,快来设置吧!</text>
|
|
|
|
|
- <view v-else class="flex items-center">
|
|
|
|
|
- <text class="flex-shrink-0">定向:</text>
|
|
|
|
|
- <text class="min-w-1 ellipsis-1">{{ firstDirectedSchool.universityName }}</text>
|
|
|
|
|
- <uv-icon name="arrow-right" size="14" color="#0DACF5"></uv-icon>
|
|
|
|
|
- <text class="flex-shrink-0">{{ firstDirectedSchool.majorName }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="text-24 text-white bg-gradient-to-r from-[#26C5F7] to-[#0DACF5] rounded-full px-18 py-6"
|
|
|
|
|
- @click="handleSetting">{{ hasDirectedSchool ? '已开启' : '去开启' }}</view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mx-30 mt-20">
|
|
|
|
|
- <view class="flex items-center gap-x-28">
|
|
|
|
|
- <view class="bg-gradient-to-r from-[#0088FE] to-[#31A0FC] flex-1 rounded-15 relative overflow-hidden">
|
|
|
|
|
- <view class="mt-30 p-30 z-1 relative">
|
|
|
|
|
- <view class="text-30 text-white font-bold">全量刷题</view>
|
|
|
|
|
- <view class="mt-8 text-24 text-white">全面刷题,高效备考</view>
|
|
|
|
|
- <view class="mt-32 w-200 h-56 flex items-center justify-center rounded-full text-26 text-primary bg-white"
|
|
|
|
|
- @click="handlePracticeAll">
|
|
|
|
|
- 开始练习
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <ie-image :is-oss="true" src="/study-bg13.png" custom-class="absolute bottom-0 left-0 w-full h-full z-0"
|
|
|
|
|
- mode="aspectFill" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="bg-gradient-to-r from-[#32B5FD] to-[#79DCFD] flex-1 rounded-15 relative overflow-hidden">
|
|
|
|
|
- <view class="mt-30 p-30 z-1 relative">
|
|
|
|
|
- <view class="text-30 text-white font-bold">定向刷题</view>
|
|
|
|
|
- <view class="mt-8 text-24 text-white">紧扣考纲,精准练习</view>
|
|
|
|
|
- <view class="mt-32 w-200 h-56 flex items-center justify-center rounded-full text-26 text-primary bg-white"
|
|
|
|
|
- @click="handlePracticeDirected">
|
|
|
|
|
- 开始练习
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <ie-image :is-oss="true" src="/study-bg13.png" custom-class="absolute bottom-0 left-0 w-full h-full z-0"
|
|
|
|
|
- mode="aspectFill" />
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <index-practice-entry />
|
|
|
<index-menu />
|
|
<index-menu />
|
|
|
<index-banner />
|
|
<index-banner />
|
|
|
- <henan-exam v-if="getLocation === '河南'" :directed-school="firstDirectedSchool" />
|
|
|
|
|
- <hunan-exam v-else-if="getLocation === '湖南'" :directed-school="firstDirectedSchool" />
|
|
|
|
|
|
|
+ <henan-exam v-if="isVHS" :directed-school="firstDirectedSchool" />
|
|
|
|
|
+ <hunan-exam v-else :directed-school="firstDirectedSchool" />
|
|
|
</ie-page>
|
|
</ie-page>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -65,6 +25,7 @@ import IndexMenu from './compoentns/index-menu.vue';
|
|
|
import IndexBanner from './compoentns/index-banner.vue';
|
|
import IndexBanner from './compoentns/index-banner.vue';
|
|
|
import HunanExam from './compoentns/hunan-exam.vue';
|
|
import HunanExam from './compoentns/hunan-exam.vue';
|
|
|
import HenanExam from './compoentns/henan-exam.vue';
|
|
import HenanExam from './compoentns/henan-exam.vue';
|
|
|
|
|
+import IndexPracticeEntry from './compoentns/index-practice-entry.vue';
|
|
|
import { EnumDictName, EnumExamType, EnumUserRole } from '@/common/enum';
|
|
import { EnumDictName, EnumExamType, EnumUserRole } from '@/common/enum';
|
|
|
import { useUserStore } from '@/store/userStore';
|
|
import { useUserStore } from '@/store/userStore';
|
|
|
import { useTransferPage } from '@/hooks/useTransferPage';
|
|
import { useTransferPage } from '@/hooks/useTransferPage';
|
|
@@ -76,47 +37,9 @@ const userStore = useUserStore();
|
|
|
const { hasPermission } = useAuth();
|
|
const { hasPermission } = useAuth();
|
|
|
// 通过 ref 获取 ie-page 组件实例
|
|
// 通过 ref 获取 ie-page 组件实例
|
|
|
const iePageRef = ref<InstanceType<typeof IePage>>();
|
|
const iePageRef = ref<InstanceType<typeof IePage>>();
|
|
|
-const { hasDirectedSchool, directedSchoolList, getExamType, getLocation } = storeToRefs(userStore);
|
|
|
|
|
|
|
+const { hasDirectedSchool, directedSchoolList, getExamType, isVHS } = storeToRefs(userStore);
|
|
|
const firstDirectedSchool = computed(() => directedSchoolList.value[0] || {});
|
|
const firstDirectedSchool = computed(() => directedSchoolList.value[0] || {});
|
|
|
|
|
|
|
|
-const handlePracticeAll = () => {
|
|
|
|
|
- transferTo('/pagesStudy/pages/knowledge-practice/knowledge-practice', {
|
|
|
|
|
- data: {
|
|
|
|
|
- directed: false
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-}
|
|
|
|
|
-const handlePracticeDirected = async () => {
|
|
|
|
|
- if (!hasDirectedSchool.value) {
|
|
|
|
|
- addTarget();
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- const notice = firstDirectedSchool.value.notice;
|
|
|
|
|
- if (notice) {
|
|
|
|
|
- await uni.$ie.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: notice,
|
|
|
|
|
- showCancel: false,
|
|
|
|
|
- confirmText: '知道了'
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- transferTo('/pagesStudy/pages/knowledge-practice/knowledge-practice', {
|
|
|
|
|
- data: {
|
|
|
|
|
- directed: true
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const handleSetting = async () => {
|
|
|
|
|
- if (hasDirectedSchool.value) {
|
|
|
|
|
- transferTo('/pagesStudy/pages/targeted-setting/targeted-setting');
|
|
|
|
|
- } else {
|
|
|
|
|
- addTarget();
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-const addTarget = () => {
|
|
|
|
|
- transferTo('/pagesStudy/pages/targeted-add/targeted-add');
|
|
|
|
|
-}
|
|
|
|
|
const loadData = async () => {
|
|
const loadData = async () => {
|
|
|
await userStore.getDirectedSchoolList();
|
|
await userStore.getDirectedSchoolList();
|
|
|
}
|
|
}
|