搜索页等
This commit is contained in:
@@ -29,12 +29,10 @@
|
||||
style="width: 100%; height: 100%"
|
||||
></image>
|
||||
</view>
|
||||
<view class="text-btn" @click.stop="translateVoice()">文</view>
|
||||
<view class="text-btn" v-if="!textShow" @click.stop="translateVoice()">文</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="btns-cont-button-text" @click.stop="buutton_click('again')">重答</view>
|
||||
<view class="btns-cont-button-text" @click.stop="buutton_click('complete')">完成</view>
|
||||
|
||||
<!-- <view class="icon text-btn" v-if="type === 1" @click.stop="translateVoice(dataInfo)">文</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 01纯文字 -->
|
||||
@@ -45,20 +43,6 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="btns-cont">
|
||||
<!-- <view class="play-btn">
|
||||
<image
|
||||
class="icon"
|
||||
@click="playVoice"
|
||||
src="@/static/images/course/play-blue.png"
|
||||
style="width: 100%; height: 100%"
|
||||
></image>
|
||||
<image
|
||||
class="icon"
|
||||
@click.stop="pauseVoice"
|
||||
src="@/static/images/course/stop-blue.png"
|
||||
style="width: 100%; height: 100%"
|
||||
></image>
|
||||
</view> -->
|
||||
<view class="fl1"></view>
|
||||
<view class="btns-cont-button-text" @click.stop="buutton_click('again')">重答</view>
|
||||
<view class="btns-cont-button-text" @click.stop="buutton_click('complete')">完成</view>
|
||||
@@ -100,6 +84,10 @@
|
||||
status: {
|
||||
default: '',
|
||||
type: String
|
||||
},
|
||||
isPreview: { // 是否是预览语音
|
||||
default: false,
|
||||
type: Boolean
|
||||
}
|
||||
});
|
||||
|
||||
@@ -151,9 +139,10 @@
|
||||
console.log('点击播放');
|
||||
audioStore.playAudio();
|
||||
};
|
||||
let unsubscribe = () =>{};
|
||||
onMounted(() => {
|
||||
// 2. 监听 Store 中 isPlaying 的变化,实时同步
|
||||
const unsubscribe = audioStore.$subscribe((mutation, state) => {
|
||||
unsubscribe = audioStore.$subscribe((mutation, state) => {
|
||||
isPlaying.value = state.isPlaying;
|
||||
});
|
||||
// 注册播放完成回调
|
||||
@@ -185,6 +174,7 @@
|
||||
audioStore.stopAudio();
|
||||
// 2. 移除当前组件注册的回调(避免内存泄漏)
|
||||
audioStore.removeCallbacks();
|
||||
|
||||
unsubscribe();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<view class="mark_and_feedback_div" v-if="['examination', 'practice'].includes(props.mode)">
|
||||
<image
|
||||
v-if="props.mode === 'examination'"
|
||||
:src="markIcon(props.item.mark ? '#0066FF' : '#ABABAB')"
|
||||
:src="markIcon(props.item.mark ? '#e8b531' : '#ABABAB')"
|
||||
class="img"
|
||||
@click="mark_click()"
|
||||
></image>
|
||||
@@ -32,8 +32,9 @@
|
||||
<questionVue
|
||||
:status="subject_data.es_status"
|
||||
:dataInfo="props.item?.my_answer"
|
||||
:isPreview="props.isPreview"
|
||||
:activeVoiceId="subject_data.qnsId"
|
||||
@buutton_click="questionBuuttonClick"
|
||||
@buutton_click="questionButtonClick"
|
||||
></questionVue>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -212,8 +213,8 @@
|
||||
set: (val) => {}
|
||||
});
|
||||
|
||||
// 按钮
|
||||
const questionBuuttonClick = (type, submitObj) => {
|
||||
// 语音播放组件小按钮
|
||||
const questionButtonClick = (type, submitObj) => {
|
||||
console.log('type', type, submitObj);
|
||||
// 判断点击的是什么
|
||||
if (type === 'complete') {
|
||||
@@ -224,7 +225,7 @@
|
||||
emit('subject_click', type, {
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
qnsId: props.item.qnsId,
|
||||
answer: item_answer.value,
|
||||
answer: submitObj,
|
||||
answerItems: []
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,12 +1,26 @@
|
||||
<template>
|
||||
<view style="width: 100%;" class="flex-c-c">
|
||||
<image src="@/static/images/common/default_img.png" mode="aspectFit" style="width:400rpx"></image>
|
||||
<view style="width: 100%;" class="no-data">
|
||||
<view class="flex-c-c">
|
||||
<image src="@/static/images/common/default_img.png" mode="aspectFit" style="width:400rpx"></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<slot ></slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.no-data{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.text{
|
||||
|
||||
color: #666666;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user