JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_2月结束

This commit is contained in:
田岩
2026-02-28 20:01:30 +08:00
parent 8051f6f80e
commit 0ed00cdecb
+20 -9
View File
@@ -8,9 +8,12 @@
@touchmove="handleMove"
@touchend="loosenButton"
v-if="!keyboardIsShow"
:throttleTime="0"
:hoverStartTime="0"
:hoverStayTime="100"
:customStyle="{ height: '92rpx' }"
>
按住说话
{{buttonText}}
</uv-button>
<uv-input
v-if="keyboardIsShow"
@@ -48,11 +51,12 @@
@click.stop="showKeyboard"
></image>
</view>
<uni-popup ref="popupRef" class="popup">
<uv-overlay ref="popupRef" class="popup" :show="show" :duration="400" >
<view class="overlay-box">
<view class="circle-bg-box">
<view class="tips-box">松开发送</view>
</view>
<!-- 取消按钮 -->
<view class="btns-box">
<image
class="btn-box btn-box-1"
@@ -85,7 +89,7 @@
</view>
<view class="fl1"></view>
</view>
</uni-popup>
</uv-overlay>
</view>
</template>
@@ -101,8 +105,8 @@
import { startAudioRecord, stopAudioRecord,preRequestRecordPermission } from '@/uni_modules/ty-recording';
import { ProtocolCodec, MessageType, ControlCommand, ControlCode } from '@/pages/sparring/js/ProtocolCodec';
import permissionApi from '@/common/permission';
const buttonText = computed(() => show.value?'松手发送':'按住说话');
const show = ref(false)
const emit = defineEmits(['submit']);
const ws = ref(null);
const status = ref<StatusType>('voice');
@@ -166,6 +170,11 @@
let startTime = 0;
// 开启语音
const startRecord = async (obj: { touches: any[]; }) => {
// popupRef.value.open();
console.log('打开');
show.value = true
return
try {
const state = await permissionApi.judgeIosPermission('record');
if(state === 'not determined') { // 苹果专用
@@ -182,7 +191,6 @@
popupRef.value.open();
startAudioRecord({
onFrame: (pcmData: any) => {
console.log('pcmData', pcmData);
// console.log('pcmData', pcmData.length);
// ws.value.send({
// data: ProtocolCodec.pack(MessageType.AUDIO_DATA, pcmData)
@@ -237,12 +245,13 @@
};
// 关掉遮罩层
const closePopup = () => {
show.value = false
return
nextTick(() => {
allText.value = '';
tempText.value = '';
popupRef.value.close();
});
ws.value &&
ws.value.close({
code: 1000,
@@ -260,6 +269,9 @@
};
// 松开按钮
const loosenButton = () => {
// popupRef.value.close();
show.value = false
return
// 判断一下位置,03的时候是转文字不能关闭
if (isOutStatus.value === '03') {
// 03转文字
@@ -286,13 +298,12 @@
stopAudioRecord();
};
onMounted(async () => {});
onHide(() => {
// closePopup();
console.log('onHide');
});
const activeNum = ref(1);
const clearinputText = (text = '') => {