diff --git a/.env.development b/.env.development
index 612cd003..93437482 100644
--- a/.env.development
+++ b/.env.development
@@ -2,25 +2,11 @@
ENV = 'development'
# 'development'
-
-
-
#VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
-# VITE_APP_BASE_API_Url = 'https://aits.jlbank.com.cn:7001'
-
-
-#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001'
-
-VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002'
-# VITE_APP_BASE_API_Url = 'http://192.168.247.200'
-
-# VITE_APP_BASE_API_Url = 'http://aitscdn.jlbank.com.cn:7001'
-
-# dev
# DEV
#VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001'
diff --git a/src/common/common.js b/src/common/common.js
index 73107d3d..d9ec4948 100644
--- a/src/common/common.js
+++ b/src/common/common.js
@@ -335,17 +335,17 @@ export function setupKeyboardHeightListener(updateCallback) {
const handleKeyboardHeightChange = (res) => {
// 获取系统信息
const systemInfo = uni.getSystemInfoSync();
- console.log('systemInfo', systemInfo);
+ // console.log('systemInfo', systemInfo);
// 计算安全区域底部高度
const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
- console.log('计算安全区域底部高度', safeAreaBottomHeight);
+ // console.log('计算安全区域底部高度', safeAreaBottomHeight);
let keyboardHeight = res.height;
- console.log('软键盘高度', keyboardHeight);
+ // console.log('软键盘高度', keyboardHeight);
// 仅在iOS端补偿安全区域高度
if (systemInfo.platform === 'ios') {
keyboardHeight = Math.max(0, keyboardHeight); // 避免负数
}
- console.log('keyboardHeight', keyboardHeight);
+ // console.log('keyboardHeight', keyboardHeight);
// 通过回调函数更新外部的响应式变量
updateCallback(keyboardHeight);
};
diff --git a/src/components/touch-btn/style/popup.scss b/src/components/touch-btn/style/popup.scss
index 94b35bc4..1e65e767 100644
--- a/src/components/touch-btn/style/popup.scss
+++ b/src/components/touch-btn/style/popup.scss
@@ -51,7 +51,7 @@
position: absolute;
width: 100%;
bottom: 0;
- &.voice_to_text {
+ &.voice_to_text,&.send_over {
.btn-box-1 {
animation: moveLeftOut 0.3s ease-out forwards;
}
@@ -139,7 +139,7 @@
bottom: 0;
opacity: 0;
visibility: hidden; // 初始不可见且不占交互位置
- &.voice_to_text {
+ &.voice_to_text,&.send_over {
display: flex !important;
visibility: visible; // 激活后可见
animation: fadeIn 0.4s ease-out 0.1s forwards;
@@ -194,15 +194,19 @@
display: none;
}
}
- &.init > .send-btn > .send-btn-loading {
- display: block !important;
+ &.init > .send-btn {
pointer-events: none;
cursor: not-allowed;
+ .send-btn-loading {
+ display: block !important;
+ pointer-events: none;
+ cursor: not-allowed;
+ }
}
&.success > .send-btn > .send-btn-text {
display: block !important;
}
- &.failed .send-btn {
+ &.failed .send-btn,&.networkError .send-btn {
pointer-events: none;
cursor: not-allowed;
background-color: rgb(80, 80, 80);
@@ -259,7 +263,7 @@
left: 78% !important;
}
- &.failed {
+ &.failed,&.networkError {
width: 506rpx;
height: 114rpx;
min-height: 114rpx;
@@ -274,7 +278,11 @@
// animation: fadeIn 0.4s ease-out 0.1s forwards;
}
.textarea {
- // display: none;
+ visibility: hidden; // 初始不可见且不占交互位置
+ }
+ }
+ &.init{
+ .textarea {
visibility: hidden; // 初始不可见且不占交互位置
}
}
diff --git a/src/components/touch-btn/touch-btn.types.ts b/src/components/touch-btn/touch-btn.types.ts
index 71878349..4f1940b3 100644
--- a/src/components/touch-btn/touch-btn.types.ts
+++ b/src/components/touch-btn/touch-btn.types.ts
@@ -5,8 +5,9 @@
* - 'voice_recording' : 录音中状态(语音录制面板展开,正在录音)
* - 'text_input' : 文字输入中状态(文字输入面板展开,用户正在输入)
* - 'voice_to_text' : 语音转文字状态(独立的语音转文字页面/面板展开)
+ * - 'send_over' : 发送完成
*/
-export type StatusType = 'default' | 'voice_recording' | 'text_input' | 'voice_to_text' | 'voice_send_ing';
+export type StatusType = 'default' | 'voice_recording' | 'text_input' | 'voice_to_text' | 'voice_send_ing' | 'send_over';
/**
* 语音转文字的子状态(仅当主状态为 voice_to_text 时生效)
@@ -16,7 +17,8 @@ export type VoiceToTextSubStatus =
| 'init' // 初始化(刚进入语音转文字页面)
// | 'loading' // 转换中(正在处理语音→文字)
| 'success' // 转换完成(成功得到文字结果)
- | 'failed'; // 转换失败(网络/识别错误等)
+ | 'failed' // 转换失败(网络/识别错误等)
+ | 'networkError'; // 转换失败(网络错误等)
/** 错误码枚举 - 直接映射提示文本 */
@@ -33,6 +35,7 @@ export interface ShowErrorTipOptions {
delayTime?: number;
}
+type ChangeBtnCallback = () => void;
/**
* 触摸按钮组件的自定义事件类型定义
@@ -48,9 +51,9 @@ export type TouchBtnEmits = {
/**
* 提交文字答案(用户确认识别结果/手动编辑后触发)
* @param answerText - 最终提交的文字答案内容
- * @param isManualEdit - 是否手动编辑过识别结果(true=手动修改,false=纯语音识别)
+ * @param changeBtn - 按钮状态变更的回调函数
*/
- submitAnswer: [answerText: string, isManualEdit: boolean];
+ submitAnswer: [answerText: string, changeBtn: ChangeBtnCallback];
/**
* 开始录音(用户点击录音按钮时触发)
* @param recordParams - 录音初始化参数(可选,默认使用组件内置配置)
diff --git a/src/components/touch-btn/touch-btn.vue b/src/components/touch-btn/touch-btn.vue
index 22fae1b3..3d10a444 100644
--- a/src/components/touch-btn/touch-btn.vue
+++ b/src/components/touch-btn/touch-btn.vue
@@ -19,7 +19,7 @@
ref="inputRef"
v-model="inputText"
:maxlength="props.maxlength"
- :adjustPosition="true"
+ :adjustPosition="false"
placeholderStyle="color:#999999;font-size:26rpx"
placeholder="请输入文字"
:disabled="props.isDisabled"
@@ -27,7 +27,7 @@
/>
-
+