123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <template>
- <view class="ezy-study-page">
- <view class="study-school-year">一年级上</view>
- <view class="ezy-study-wrap">
- <view class="chapter-box" @click="handleCheckCatalogue">
- 第二章
- </view>
- <view class="chapter-title-box">
- 小标题
- </view>
- <view class="brand" v-for="(item,index) in infoData.jieList" :key="index" @click="listClick(item)">aaaaaaaa</view>
- </view>
-
- <!-- <uni-button style="margin-top: 200px;display: block;" @click="goKaoshi">goKaoshi</uni-button>
- -->
- <!-- <uni-button @click="handleCheckCatalogue">go catalogue</uni-button>
- <uni-button @click="goKaoshi">goKaoshi</uni-button>
- <!-- 蛋 -->
- <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 {
- userZhangFirstInfo,
- userZhangInfo,
- userLocate
- } from "@/api/learnPlan.js"
- 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);
- let infoData = reactive({
- jieList: [],
- haveFlag:'',
- nianji:'',
- number:'',
- xueqi:'',
- zhangId:'',
- zhangName:'',
- });
- // 来自单元测试的路由参数缓存
- const routeParams = ref(null);
- onLoad((options) => {
- console.log(options)
- // 获取路由参数
- routeParams.value = options;
- // 选择年级进入调用此接口
- if(options.flag =='selectGrades'){
- getZhangFirst()
- }else{
-
- }
- // 蛋
- // eggDialogRef.value.eggShow();
- })
- function getZhangFirst(){
- let req = {
- nianji: routeParams.value.nianji,
- xueqi: routeParams.value.xueqi,
-
- }
- userZhangFirstInfo(req).then(res => {
- infoData.jieList = res.data.jieList
- infoData.haveFlag = res.data.haveFlag
- infoData.nianji = res.data.nianji
- infoData.number = res.data.number
- infoData.xueqi = res.data.xueqi
- infoData.zhangId = res.data.zhangId
- infoData.zhangName = res.data.zhangName
- console.log(infoData)
- })
- }
- 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) {
-
-
- const pageData = {
- // videoId:data.videoId,
- videoId:'b997f16cb9cb474cb93526cff77d8801',
- progressMarkers: [{
- offset: 30,
- isCustomized: true,
- coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/9A3F562E595E4764AD1DD546FA52C6E5-6-2.png',
- title: 'test title',
- describe: 'test string',
- }, {
- offset: 150,
- isCustomized: true,
- coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/1E7F402241CD4C0F94AD2BBB5CCC3EC7-6-2.png',
- title: 'test title',
- describe: 'test string',
- }, {
- offset: 250,
- isCustomized: true,
- coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
- title: 'test title',
- describe: 'test string',
- }, {
- offset: 550,
- isCustomized: true,
- coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
- title: 'test title',
- describe: 'test string',
- }, {
- offset: 320,
- isCustomized: true,
- coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
- title: 'test title',
- describe: 'test string',
- }, {
- offset: 650,
- isCustomized: true,
- coverUrl: 'https://alivc-demo-vod.aliyuncs.com/image/cover/553AEA01161342C8A2B1756E83B69B5B-6-2.png',
- title: 'test title',
- describe: 'test string',
- }],
- }
- uni.navigateTo({
- url: '/pages/study/lookShipin?studyData='+JSON.stringify(pageData)
- })
- }
- function handleCheckCatalogue() {
- catalogueRef.value.showPopup();
- }
- function goBack() {
- uni.navigateBack()
- }
-
- function eggBtn(){
- console.log('点击:开启提分之旅');
- }
- </script>
- <style>
- </style>
|