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

2

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