修改课程详情页bug

This commit is contained in:
田岩
2025-09-01 16:45:37 +08:00
parent 4789c1d563
commit 4c2859405e
8 changed files with 54 additions and 33 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
# VITE_APP_BASE_H5_API_Url = 'http://25.64.16.130:9602'
# 线上
VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
#VITE_APP_BASE_H5_API_Url = 'https://aitstest.jlbank.com.cn:7002'
VITE_APP_BASE_H5_API_Url = 'http://25.18.122.65:7001'
#VITE_APP_BASE_H5_API_Url = 'http://25.18.122.116:7001'
+8
View File
@@ -126,6 +126,14 @@
const audioStore = useAudioStore();
const { dataInfo } = toRefs(props);
const status = computed(() => props.status);
watch(
() => props.status,
(val) => {
if (val === '') {
textShow.value = false;
}
}
);
const emit = defineEmits(['changePlay', 'buutton_click']);
// 中间显示的文字
+24 -22
View File
@@ -1,11 +1,10 @@
<template>
<view class="talk-btns">
<view class="touch-btn" @click="disabled_click">
<view class="touch-btn" @click="disabled_click">
<uv-button
:disabled="props.isDisabled"
class="touch-btn"
@touchstart="startRecord"
@touchend="stopRecord"
@touchend="stopRecord(false)"
@touchmove="handleMove"
v-if="!keyboardIsShow"
:customStyle="{ height: '92rpx' }"
@@ -135,7 +134,7 @@
const startTimer = ref(null); // 延迟启动的定时器ID
const startFlag = ref(1);
const startRecord = (obj) => {
if(props.isDisabled) return;
if (props.isDisabled) return;
// 开始录音
console.log('开始录音', recordingStatus.value);
if (recordingStatus.value !== 'not_started') return;
@@ -144,33 +143,34 @@
console.log('延迟开始');
recordingStatus.value = 'preparing';
popupRef.value.open();
recorderManager.start({duration:6000});
recorderManager.start({ duration: 120000 });
startTime = Date.now();
setInterval(() => {
const endTime = Date.now();
const recordDuration = (endTime - startTime) / 1000;
console.log('当前录音时间1', recordDuration);
})
}, 1000);
}, 80);
};
// 结束录音
const stopRecord = () => {
if(props.isDisabled) return;
const stopRecord = (status = false) => {
if (props.isDisabled) return;
console.log('结束录音嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻');
if (startTimer.value) {
clearTimeout(startTimer.value);
startTimer.value = null;
}
const endTime = Date.now();
const times = Math.max(500 - endTime + startTime, 0);
setTimeout(() => {
console.log('延迟数据', times);
if (status) {
nextTick(() => {
popupRef.value.close();
recorderManager.stop();
});
}, times);
} else {
const endTime = Date.now();
const times = Math.max(500 - endTime + startTime, 0);
setTimeout(() => {
console.log('延迟数据', times);
nextTick(() => {
popupRef.value.close();
recorderManager.stop();
});
}, times);
}
nextTick(() => (recordingStatus.value = 'not_started'));
};
@@ -187,6 +187,8 @@
nextTick(() => common.msg('说话时间太短,没有听清!'));
return;
}
stopRecord(true); // 在去主动执行一次关闭
console.log('录音结束,时长:', recordDuration, '秒');
emit('submit', 'voice', res.tempFilePath);
});
@@ -196,9 +198,9 @@
if (recordingStatus.value !== 'preparing') {
stopRecord();
}
startTime = Date.now();
recordingStatus.value = 'in_recording';
});
// #endif
+10 -4
View File
@@ -157,10 +157,16 @@
};
const getData = async () => {
const { body } = await getCourseDetailApi({
crsId: crsId.value
});
form.value = body;
common.loading()
try{
const { body } = await getCourseDetailApi({
crsId: crsId.value
});
form.value = body;
} catch(e) {
}
common.hideLoading()
};
const toStudyPrgh = (info) => {
common.navigateTo(
@@ -22,7 +22,7 @@
height="124"
count
:maxlength="100"
placeholder="请输入反馈内容..."
placeholder="补充详细问题"
:adjustPosition="false"
v-model="feedbackInfo.text"
></uv-textarea>
@@ -82,10 +82,10 @@
const submit_feedback_fun = (value) => {
// 首先判断反馈类型是否
if (feedbackInfo.type.length === 0) {
return common.msg('请选择你要反馈的类型');
return common.msg('请选择类型');
}
if (feedbackInfo.text.trim() === '') {
return common.msg('请输入你要反馈的反馈内容');
return common.msg('请补充详细问题');
}
common.loading('提交反馈信息');
const startTime = Date.now();
+6 -1
View File
@@ -240,6 +240,8 @@
// 点击答题卡按钮
const click_sheet_item = (index) => {
questionNumber.value = index;
popupRef.value.close()
};
const subject_click = (type, params) => {
@@ -450,7 +452,10 @@
console.log('error', res);
})
.finally(() => {
common.hideLoading().body;
common.hideLoading();
if(strs === '倒计时结束自动交卷') {
hand_in_paper(strs)
}
});
};
</script>
+2 -1
View File
@@ -674,12 +674,13 @@
common.redirectTo('/pages/mascot/mascot_select_list');
return
}
loadData()
})
const previewRef = ref()
const previewFileRef = ref()
const showPreview = ref(false)
onMounted(() => {
loadData()
// previewFileRef.value.open({
// fileId: '0006e7f7-a332-4c81-9802-ac4e2d971c71'
// })
-1
View File
@@ -125,7 +125,6 @@
// 下面语音组件的禁用状态判断
const touchIsDisabled = computed(() => {
console.log('下面语音组件的禁用状态判断', topic.value?.es_status !== '' && topic.value?.es_status !== undefined);
return topic.value?.es_status !== '' && topic.value?.es_status !== undefined;
});