Commit 8a7ed781 authored by 罗超's avatar 罗超

2

parent d84e18eb
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</view> </view>
</navbar> </navbar>
<view class="activeContent" v-if="ActivityList.length >= 0"> <view class="activeContent" v-if="ActivityList.length > 0">
<swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" indicator-color="#CCCCCC" <swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" indicator-color="#CCCCCC"
indicator-active-color="#000000" :vertical="true" circular> indicator-active-color="#000000" :vertical="true" circular>
<swiper-item v-for="(item, index) in ActivityList" :key="index" @click="goActiveDetail(item.Id)"> <swiper-item v-for="(item, index) in ActivityList" :key="index" @click="goActiveDetail(item.Id)">
...@@ -67,10 +67,6 @@ ...@@ -67,10 +67,6 @@
@click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId}&&ChapterId=${pageData.Words.NextCourseNo}&&ReviewChapterId=${pageData.Words.ReviewCourseNo}&&ClassId=${pageData.Words.ClassId}`)"> @click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId}&&ChapterId=${pageData.Words.NextCourseNo}&&ReviewChapterId=${pageData.Words.ReviewCourseNo}&&ClassId=${pageData.Words.ClassId}`)">
开始学习 开始学习
</view> </view>
<view class="wordBtn"
@click="jumpPage(`/pages/word/test?CourseId=${pageData.Words.CourseId}&&ChapterId=${pageData.Words.NextCourseNo}&&ReviewChapterId=${pageData.Words.ReviewCourseNo}&&ClassId=${pageData.Words.ClassId}`)">
开始ces
</view>
</view> </view>
<view class="courseBox"> <view class="courseBox">
<view class="courseInnerBox" @click="jumpTimetable"> <view class="courseInnerBox" @click="jumpTimetable">
...@@ -103,18 +99,24 @@ ...@@ -103,18 +99,24 @@
下节课 下节课
</view> </view>
</view> </view>
<view class="learningGarden"> <view class="learningGarden" v-if="pageData.LearningGardenList.length>0">
<view class="learningGardenSbutitle"> <view class="learningGardenSbutitle">
扩展学习 扩展学习
</view> </view>
<view v-for="(item,index) in pageData.LearningGardenList" :key="index" v-if="item.List.length>0"> <view v-for="(item,index) in pageData.LearningGardenList" :key="index" v-if="item.List.length>0">
<view class="learningGardenTitle"> <view class="learningGardenTitle">
<text>{{item.Name}}</text> <text>{{item.Name}}</text>
<text style="font-size: 24rpx; <view style="
height: 60rpx;
line-height: 59rpx;
font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #4C50E7;" @click="jumpGarden(item.Id)">查看更多</text> color: #4C50E7;display: flex;" @click="jumpGarden(item.Id)">查看更多
<van-icon name="arrow" />
</view>
</view> </view>
<view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img" @click="jumpPage(`/pages/learningGarden/learningGardenDetails?Id=${item1.Id}`)"> <view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img"
@click="jumpPage(`/pages/learningGarden/learningGardenDetails?Id=${item1.Id}`)">
<image :src="item1.Img" mode="aspectFill" :id="'img'+index1" <image :src="item1.Img" mode="aspectFill" :id="'img'+index1"
style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image> style="width: 100%;height:100%;border-radius: 24rpx 24rpx 0 0;"></image>
<view class="gardenTextBox" <view class="gardenTextBox"
...@@ -130,7 +132,7 @@ ...@@ -130,7 +132,7 @@
</view> </view>
</view> </view>
<bottom></bottom> <bottom></bottom>
<canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas> <canvas canvas-id="myCanvas" class="canvas" style="position:absolute;left: -1000px;"></canvas>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
</view> </view>
</template> </template>
...@@ -175,7 +177,9 @@ ...@@ -175,7 +177,9 @@
SelectIsEnd: 0, SelectIsEnd: 0,
}, },
ActivityList: [], ActivityList: [],
pageData: {}, pageData: {
LearningGardenList:[]
},
userData: {} userData: {}
}); });
...@@ -259,8 +263,7 @@ ...@@ -259,8 +263,7 @@
}; };
onMounted(() => { onMounted(() => {
methods.getIndexData();
data.userData = uni.getStorageSync('userInfo');
}); });
return { return {
...toRefs(data), ...toRefs(data),
...@@ -269,6 +272,8 @@ ...@@ -269,6 +272,8 @@
}, },
onShow() { onShow() {
this.getActivityData(); this.getActivityData();
this.getIndexData();
this.userData = uni.getStorageSync('userInfo');
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
......
<template> <template>
<view class="wordTest"> <view class="wordTest">
<van-skeleton title row="10" v-if="reviewGroupList.length===0&&prepGroupList.length===0"/> <van-skeleton title row="10" v-if="loading" />
<swiper class="swiper" @change="changeSwiper" :current="curTest" v-else> <van-empty description="暂无数据" v-if="nodata"/>
<swiper class="swiper" @change="changeSwiper" :current="curTest" v-if="!loading&&!nodata">
<swiper-item v-for="(item, index) in reviewGroupList" :key="index" class="swiper-item" v-if="item"> <swiper-item v-for="(item, index) in reviewGroupList" :key="index" class="swiper-item" v-if="item">
<Choice v-if="item.QuestionTypeId == 1" :item="item" @next="next($event, item)"></Choice> <Choice v-if="item.QuestionTypeId == 1" :item="item" @next="next($event, item)"></Choice>
<FillIn v-if="item.QuestionTypeId == 3" :item="item" @next="next($event, item)"></FillIn> <FillIn v-if="item.QuestionTypeId == 3" :item="item" @next="next($event, item)"></FillIn>
...@@ -12,7 +13,8 @@ ...@@ -12,7 +13,8 @@
</swiper-item> </swiper-item>
<swiper-item> <swiper-item>
<van-popup :show="true" position="center" custom-style="background-color: transparent;"> <van-popup :show="true" position="center" custom-style="background-color: transparent;">
<van-loading size="50rpx" type="spinner" color="#ffffff"> <text style="color:#ffffff">交卷中...</text></van-loading> <van-loading size="50rpx" type="spinner" color="#ffffff"> <text style="color:#ffffff">交卷中...</text>
</van-loading>
</van-popup> </van-popup>
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -51,14 +53,21 @@ ...@@ -51,14 +53,21 @@
curTest: 0, curTest: 0,
reviewGroupList: [], reviewGroupList: [],
prepGroupList: [], prepGroupList: [],
loading: false,
nodata: false,
}); });
let methods = { let methods = {
getList() { getList() {
data.loading = true
proxy proxy
.$request("/AppletWords/CreateCourseExam", data.msg) .$request("/AppletWords/CreateCourseExam", data.msg)
.then((res) => { .then((res) => {
data.loading = false
data.reviewGroupList = res.Data.reviewGroupList; data.reviewGroupList = res.Data.reviewGroupList;
data.prepGroupList = res.Data.prepGroupList; data.prepGroupList = res.Data.prepGroupList;
if (data.reviewGroupList.length === 0 && data.reviewGroupList.length == 0) {
data.nodata = true
}
}); });
}, },
changeSwiper(val) { changeSwiper(val) {
......
<template> <template>
<view class="word"> <view class="word">
<van-skeleton title row="10" v-if="StudyList.length===0&&ReviewList.length===0"/> <van-skeleton title row="10" v-if="loading" />
<swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="current" v-else> <van-empty description="暂无数据" v-if="nodata"/>
<swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="current" v-if="!loading&&!nodata">
<swiper-item v-for="(item,index) in StudyList" :key="index" class="swiper-item"> <swiper-item v-for="(item,index) in StudyList" :key="index" class="swiper-item">
<Pronunciation :item="item" :cur="index+1" :total="StudyList.length"></Pronunciation> <Pronunciation :item="item" :cur="index+1" :total="StudyList.length"></Pronunciation>
</swiper-item> </swiper-item>
...@@ -51,11 +52,15 @@ ...@@ -51,11 +52,15 @@
StudyNum: 0, //学习总单词数量 StudyNum: 0, //学习总单词数量
StudyType: 1, //1-预习,2-复习 StudyType: 1, //1-预习,2-复习
}, },
loading: false,
nodata: false,
}) })
let methods = { let methods = {
getData() { getData() {
data.loading = true
proxy.$request('/AppletWords/GetStudyWords', data.msg).then(res => { proxy.$request('/AppletWords/GetStudyWords', data.msg).then(res => {
data.loading = false
data.StudyList = res.Data.StudyList data.StudyList = res.Data.StudyList
data.ReviewList = res.Data.ReviewList; data.ReviewList = res.Data.ReviewList;
const total = data.StudyList.length + data.ReviewList.length; const total = data.StudyList.length + data.ReviewList.length;
...@@ -67,6 +72,9 @@ ...@@ -67,6 +72,9 @@
data.current = total - 1 data.current = total - 1
} }
} }
if (data.StudyList.length === 0 && data.ReviewList.length == 0) {
data.nodata = true
}
}) })
}, },
swiperChange(val) { swiperChange(val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment