Commit 135fc38d authored by 罗超's avatar 罗超

2

parent 96b0080f
...@@ -65,16 +65,8 @@ ...@@ -65,16 +65,8 @@
setup(props) { setup(props) {
const methods = { const methods = {
play() { play() {
innerAudioContext.src=props.item.FileUrl innerAudioContext.src=`https://fanyi.baidu.com/gettts?lan=jp&text=${encodeURIComponent(props.item.WordContent)}&spd=3&source=web`
innerAudioContext.play() innerAudioContext.play()
// innerAudioContext.src =
// decodeURIComponent('http%3A%2F%2Fimgfile.oytour.com%2FEduSystem%2FTest%2FUpload%2FAttachment%2F20210413060328967.mp3')
// if(innerAudioContext.pause){
// }else{
// innerAudioContext.pause()
// }
// console.log(innerAudioContext)
} }
} }
return { return {
...@@ -168,4 +160,4 @@ ...@@ -168,4 +160,4 @@
color: #B8B8B8; color: #B8B8B8;
text-align: center; text-align: center;
} }
</style> </style>
\ No newline at end of file
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</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">
{{item.Name}} <text>{{item.Name}}</text>
</view> </view>
<view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img"> <view class="gardenCon" v-for="(item1,index1) in item.List" :key="index1" id="img">
<image :src="item1.Img" mode="aspectFill" <image :src="item1.Img" mode="aspectFill"
...@@ -524,6 +524,7 @@ ...@@ -524,6 +524,7 @@
font-weight: 800; font-weight: 800;
color: #111111; color: #111111;
margin-bottom: 35rpx; margin-bottom: 35rpx;
display: flex;
} }
.gardenCon { .gardenCon {
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<view class="studyCompleta"> <view class="studyCompleta">
<view class="stuComTop"> <view class="stuComTop">
<view style="margin-left:20rpx;flex-shrink: 0;"> <view style="margin-left:20rpx;flex-shrink: 0;">
<van-icon name="arrow-left" color="#FFF" @click="back" /> <van-icon name="arrow-left" color="#FFF" @click="goIndex" />
</view> </view>
<view style="width:100%;text-align: center;">学习小结</view> <view style="width:100%;text-align: center;">学习小结</view>
</view> </view>
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
let methods = { let methods = {
back() { back() {
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/index' url: '/pages/word/word'
}) })
}, },
goIndex(){ goIndex(){
......
<template> <template>
<view class="word"> <view class="word">
<swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="85"> <swiper class="swiper" next-margin="60rpx" @change="swiperChange" :current="current">
<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>
<swiper-item v-for="(item,index) in ReviewList" :key="index" class="swiper-item" > <swiper-item v-for="(item,index) in ReviewList" :key="index" class="swiper-item">
<Pronunciation :item="item" :cur="index+1" :total="ReviewList.length" :type="1"></Pronunciation> <Pronunciation :item="item" :cur="index+1" :total="ReviewList.length" :type="1"></Pronunciation>
</swiper-item> </swiper-item>
<swiper-item></swiper-item>
</swiper> </swiper>
</view> </view>
</template> </template>
...@@ -29,30 +30,48 @@ ...@@ -29,30 +30,48 @@
Pronunciation Pronunciation
}, },
setup(props) { setup(props) {
let {proxy} = getCurrentInstance(); let {
proxy
} = getCurrentInstance();
let data = reactive({ let data = reactive({
test: [1,2,3], test: [1, 2, 3],
msg:{ msg: {
ChapterId:0, ChapterId: 0,
CourseId:0, CourseId: 0,
PrevChapterId:0, PrevChapterId: 0,
}, },
StudyList:[], StudyList: [],
ReviewList:[], ReviewList: [],
current: 0,
readMsg: {
Id: 0,
ClassId: 1,
CourseId: 1,
Stu_Account_Id: 1,
ChapterId: 1,
StudyNum: 1
}
}) })
let methods = { let methods = {
getData(){ getData() {
proxy.$request('/AppletWords/GetStudyWords',data.msg).then(res=>{ proxy.$request('/AppletWords/GetStudyWords', data.msg).then(res => {
data.StudyList=res.Data.StudyList data.StudyList = res.Data.StudyList
data.ReviewList=res.Data.ReviewList data.ReviewList = res.Data.ReviewList
}) })
}, },
swiperChange(val){ swiperChange(val) {
const total=data.StudyList.length+data.ReviewList.length
if(val.detail.current+1==total&&total>0){ const total = data.StudyList.length + data.ReviewList.length + 1
console.log(val,1111111111111111111) if (val.detail.current + 1 == total && total > 1) {
uni.navigateTo({
url: "/pages/word/studyComplete"
})
} }
},
completeRead() {
proxy.$request('/AppletWords/SetStuWordsPrep', )
} }
} }
onMounted(() => { onMounted(() => {
...@@ -67,10 +86,14 @@ ...@@ -67,10 +86,14 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '新的标题' title: '新的标题'
}); });
this.msg.ChapterId=options.ChapterId this.msg.ChapterId = options.ChapterId
this.msg.CourseId=options.CourseId this.msg.CourseId = options.CourseId
this.msg.PrevChapterId=options.PrevChapterId this.msg.PrevChapterId = options.PrevChapterId
this.readMsg.CourseId=options.CourseId
this.readMsg.ChapterId=options.ChapterId
this.getData() this.getData()
const userInfo=uni.getStorageSync('userinfo');
this.readMsg.Stu_Account_Id=userInfo.AccountId
}, },
} }
</script> </script>
...@@ -80,13 +103,15 @@ ...@@ -80,13 +103,15 @@
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
.word .swiper{
.word .swiper {
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
.word .swiper-item{
.word .swiper-item {
min-height: 100vh; min-height: 100vh;
background-color: #F5F5F5; background-color: #F5F5F5;
/* padding-left: 55rpx; */ /* padding-left: 55rpx; */
} }
</style> </style>
\ No newline at end of file
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