fix; bug
This commit is contained in:
@@ -59,8 +59,9 @@ const navigateBack = (delta = 1, fun = () => {}) => {
|
||||
}
|
||||
|
||||
//关闭当前页面,跳转到应用内的某个页面。
|
||||
const redirectTo = url => uni.redirectTo({
|
||||
url: url
|
||||
const redirectTo = (url, obj = {}) => uni.redirectTo({
|
||||
url: url,
|
||||
...obj
|
||||
});
|
||||
|
||||
// 时间转换时间戳
|
||||
|
||||
@@ -317,9 +317,11 @@ const audioCacheObj = computed(() => storageStore.audioObj)
|
||||
// 重播
|
||||
const restartPlay = () => {
|
||||
if(itemVoice.value){
|
||||
emit('changePlay', '')
|
||||
emit('changePlay', unref(dataInfo)?.id)
|
||||
setTimeout(()=>{
|
||||
talkVoiceObj.value.src = itemVoice.value
|
||||
talkVoiceObj.value.seek(0)
|
||||
talkVoiceObj.value.play()
|
||||
},100)
|
||||
}else{
|
||||
|
||||
@@ -112,6 +112,7 @@ const showOverlayTalking = (obj) => {
|
||||
}
|
||||
}
|
||||
const hideOverlayTalking = (obj) => {
|
||||
if(!showTalkingModel.value) return
|
||||
showTalkingModel.value = false
|
||||
//#ifdef APP-PLUS
|
||||
stopRecord()
|
||||
|
||||
+20
-17
@@ -21,7 +21,8 @@
|
||||
<view class="right-name">{{item.teacherName}}</view>
|
||||
<view class="right-desc">描述:{{item.voiceDesc || '--'}}</view>
|
||||
<view class="audio-box">
|
||||
<view :class="['talking-gif', activeVoiceTeachNo === item.teacherNo ? 'is-play':'']"></view>
|
||||
<view :class="['talking-gif', activeVoiceTeachNo === item.teacherNo && !loadingTeacherVoice ? 'is-play':'']"></view>
|
||||
<CommonLoading color="#06f" v-show="activeVoiceTeachNo === item.teacherNo && loadingTeacherVoice" style="float: left;"/>
|
||||
<view class="play-btn" @click="playTeacherVoice(item)">
|
||||
<image class="icon" v-if="activeVoiceTeachNo !== item.teacherNo" src="@/static/images/course/play-blue.png" style="width: 100%;height: 100%;"></image>
|
||||
<image class="icon" v-else src="@/static/images/course/stop-blue.png" style="width: 100%;height: 100%;"></image>
|
||||
@@ -243,6 +244,7 @@ teacherVoiceObj.onEnded(()=>{
|
||||
activeVoiceTeachNo.value = ''
|
||||
teacherVoiceObj.src = ''
|
||||
})
|
||||
const loadingTeacherVoice = ref(false)
|
||||
const playTeacherVoice = (item) =>{
|
||||
teacherVoiceObj.stop()
|
||||
teacherVoiceObj.src = ''
|
||||
@@ -253,12 +255,15 @@ const playTeacherVoice = (item) =>{
|
||||
teacherVoiceObj.src = item.voicePath
|
||||
teacherVoiceObj.play()
|
||||
}else{
|
||||
loadingTeacherVoice.value = true
|
||||
storageStore.getStorageById('audio', item.teacherNo, (url)=>{
|
||||
if(url){
|
||||
teacherVoiceObj.src = _cache
|
||||
teacherVoiceObj.src = url
|
||||
teacherVoiceObj.play()
|
||||
loadingTeacherVoice.value = false
|
||||
}else{
|
||||
downloadVoiceFile('/trastudy/traStdyInfo/trialListening?teachNo='+item.teacherNo).then(res=>{
|
||||
loadingTeacherVoice.value = false
|
||||
item.voicePath = res.tempFilePath
|
||||
teacherVoiceObj.src = item.voicePath
|
||||
teacherVoiceObj.play()
|
||||
@@ -675,17 +680,6 @@ const withdrawNow = (data) => {
|
||||
const loadingQstLogId = ref('')
|
||||
// 完成
|
||||
const finishQuestionNow = (data) => {
|
||||
let _id1 = new Date().getTime() + 'id'
|
||||
talkingList.value.push({
|
||||
id: _id1,
|
||||
talkingContent: '完成',
|
||||
userInfo: {...choiceTeacherInfo.value},
|
||||
type: 0
|
||||
})
|
||||
// waitMakeEvaluateApi({
|
||||
// qstLogId: data.qstLogId
|
||||
// })
|
||||
|
||||
textChartApi({
|
||||
processType: 'ANSER-OVER',
|
||||
requestBody: JSON.stringify({
|
||||
@@ -694,6 +688,18 @@ const finishQuestionNow = (data) => {
|
||||
})
|
||||
.then(res=> {
|
||||
// common.msg('完成成功,开始获取评分维度数据!')
|
||||
let _state = res.body.chatBody.processStat
|
||||
if(_state = 'ER'){
|
||||
common.msg('提交答案失败!')
|
||||
return
|
||||
}
|
||||
let _id1 = new Date().getTime() + 'id'
|
||||
talkingList.value.push({
|
||||
id: _id1,
|
||||
talkingContent: '完成',
|
||||
userInfo: {...choiceTeacherInfo.value},
|
||||
type: 0
|
||||
})
|
||||
loadingQstLogId.value = res.body.chatBody.qstLogId
|
||||
qstLogId.value = loadingQstLogId.value
|
||||
let _id = new Date().getTime() + 'id'
|
||||
@@ -711,10 +717,6 @@ const finishQuestionNow = (data) => {
|
||||
// 查询问题回答评分
|
||||
const getQuestionEvalateRequest = (id, data) => {
|
||||
if(loadingQstLogId.value){
|
||||
// queryQuestionEvalateApi({
|
||||
// qstLogId:loadingQstLogId.value
|
||||
// })
|
||||
|
||||
textChartApi({
|
||||
processType: 'ANSER-RESULT',
|
||||
requestBody: JSON.stringify({
|
||||
@@ -957,6 +959,7 @@ const chooseRateNow = (item) => {
|
||||
.talking-gif{
|
||||
width: 140rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 20rpx;
|
||||
// background-color: #ccc;
|
||||
background: url(@/static/images/course/voice-gray.png) no-repeat;
|
||||
background-size: 100%;
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<image class="icon" src="@/static/images/index/navigation_course.png"></image>
|
||||
<view class="title">课程中心</view>
|
||||
</view>
|
||||
<view class="item" @click="common.navigateTo('/pages/index/dialog')">
|
||||
<view class="item" @click="common.navigateTo('/pages/index/dialog',{ animationType: 'slide-in-bottom'})">
|
||||
<image class="icon" src="@/static/images/index/navigation_question_answering.png"></image>
|
||||
<view class="title">AI问答</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user