Commit 72610769 authored by 罗超's avatar 罗超

2

parent 95d22c35
......@@ -119,6 +119,8 @@
provide
} from "vue";
import Explain from './explain.vue'
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = false;
export default {
components: {
Explain
......@@ -151,15 +153,18 @@
let data = reactive({
current: '', //用户选择
isShowExplain: false,
})
let methods = {
choice(x) {
data.current = x.Name;
if (data.current !== props.item.Answer) {
methods.play('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/false.mp3')
setTimeout(() => {
data.isShowExplain = true
}, 800)
} else {
methods.play('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/true.mp3')
setTimeout(() => {
emit('next',1)
}, 500)
......@@ -168,6 +173,10 @@
todo() {
emit('next')
data.isShowExplain = false
},
play(url) {
innerAudioContext.src =url
innerAudioContext.play()
}
}
onMounted(() => {
......
......@@ -99,6 +99,8 @@
import {ref,reactive,toRefs,toRef,getCurrentInstance,watch,computed,onMounted,provide} from "vue";
import mypone from './myp-one.vue'
import Explain from './explain.vue'
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = false;
export default {
components: {
mypone,
......@@ -146,11 +148,13 @@
}
if(data.test==props.item.Answer||props.item.Answer.indexOf(data.test)>-1){
data.type=1
methods.play('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/true.mp3')
setTimeout(()=>{
emit('next',1)
},500)
}else{
data.type=2
methods.play('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/audio/false.mp3')
setTimeout(()=>{
data.isShowExplain=true
},500)
......@@ -162,6 +166,10 @@
todo(){
emit('next')
data.isShowExplain = false
},
play(url) {
innerAudioContext.src =url
innerAudioContext.play()
}
}
onMounted(()=>{
......
......@@ -63,7 +63,8 @@
<view class="wordDuration" style="visibility: hidden;">
预计用时10分钟
</view>
<view class="wordBtn"
<view class="wordBtn" v-if="(pageData.Words.NextWord==0||!pageData.Words.NextWord)&&(pageData.Words.ReviewWord==0||!pageData.Words.ReviewWord)"> 暂无新词</view>
<view class="wordBtn" v-else
@click="jumpPage(`/pages/word/word?CourseId=${pageData.Words.CourseId||0}&&ChapterId=${pageData.Words.NextCourseNo||0}&&ReviewChapterId=${pageData.Words.ReviewCourseNo||0}&&ClassId=${pageData.Words.ClassId||0}`)">
开始学习
</view>
......
This diff is collapsed.
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