123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <template>
- <view class="ezy-study-page">
- <!-- <view class="study-school-year">一年级上</view>
- <view class="ezy-study-wrap">
- <view class="chapter-box"></view>
- <view class="chapter-title-box"></view>
- <view class="brand"></view>
- </view> -->
- <view @click="goBack">{{gradeTerm.text}}</view>
- <view>
- <view v-for="item in data.list" :key="item.index" @click="listClick"> {{item.index}} {{item.label}} </view>
- </view>
- <view>
- <uni-button @click="handleCheckCatalogue">go catalogue</uni-button>
- <uni-button @click="goKaoshi">goKaoshi</uni-button>
- <navigator :url="`/pages/study/catalogue?gradeId=1&termId=1&text=一年级上册`" hover-class="navigator-hover">
- <button type="default">学习计划</button>
- </navigator>
- <navigator url="/pages/unitTest/index" hover-class="navigator-hover">
- <button type="default">成长</button>
- </navigator>
- <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
- <button type="default">伙伴</button>
- </navigator>
- <navigator url="navigate/navigate?title=navigate" hover-class="navigator-hover">
- <button type="default">我的</button>
- </navigator>
- </view>
- <!-- 蛋 -->
- <egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
-
- <catalogue ref="catalogueRef" :nianji="routeParams.nianji" :xueqi="routeParams.xueqi" @change-zhang="handleChangeZhang"></catalogue>
- <CustomTabBar></CustomTabBar>
- </view>
- </template>
- <script setup>
- import {
- reactive,
- ref,
- onMounted
- } from "vue";
- import {
- onLoad,
- } from '@dcloudio/uni-app';
- import catalogue from "@/components/catalogue/catalogue.vue";
- import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
- import eggDialog from './eggDialog.vue'
- const eggDialogRef = ref(null);
-
- const catalogueRef = ref(null);
- const gradeTerm = ref('');
- const selectZhang = ref(null);
- // 来自单元测试的路由参数缓存
- const routeParams = ref(null);
- onLoad((options) => {
- // 获取路由参数
- routeParams.value = options;
- // 赋值 ?
- gradeTerm.value = options;
- // 蛋
- // eggDialogRef.value.eggShow();
- })
- const data = reactive({
- list: [{
- label: '长度中的隐含条件问题',
- id: 1,
- },
- {
- label: '解决重叠问题',
- id: 2,
- },
- {
- label: '列表法解决方案问题',
- id: 3,
- },
- {
- label: '真题测试',
- id: 4,
- },
- ]
- })
- function handleChangeZhang(data) {
- console.log("章", data);
- selectZhang.value = data;
- }
- function goKaoshi() {
- let zhangId = selectZhang.value.zhangId;
- let nianji = routeParams.value.nianji;
- let xueqi = routeParams.value.xueqi;
- uni.navigateTo({
- url: `/pages/unitTest/index?jieId=1&zhangId=${zhangId}&nianji=${nianji}&xueqi=${xueqi}`
- })
- }
- function listClick(data) {
- uni.navigateTo({
- url: '/pages/study/lookShipin'
- })
- }
- function handleCheckCatalogue() {
- catalogueRef.value.showPopup();
- }
- function goBack() {
- uni.navigateBack()
- }
-
- function eggBtn(){
- console.log('点击:开启提分之旅');
- }
- </script>
- <style>
- </style>
|