diff --git a/.env.development b/.env.development index f620d0e7..eed6c970 100644 --- a/.env.development +++ b/.env.development @@ -2,11 +2,10 @@ ENV = 'development' # 'development' -#VITE_APP_BASE_API_Url = 'https://aits.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:7002' - +#VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7002' # DEV #VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' diff --git a/src/components/touch-btn/style/popup.scss b/src/components/touch-btn/style/popup.scss index 1e65e767..3b8e2314 100644 --- a/src/components/touch-btn/style/popup.scss +++ b/src/components/touch-btn/style/popup.scss @@ -243,6 +243,16 @@ .gif-box { display: none; } + .textarea { + visibility: visible; + pointer-events: none; + user-select: none; + } + } + &.is-translate.success .textarea { + visibility: visible; + pointer-events: auto; + user-select: auto; } &::after { content: ''; @@ -262,7 +272,11 @@ &.success::after { left: 78% !important; } - + + // 输入框默认并不可见 + .textarea { + visibility: hidden; + } &.failed,&.networkError { width: 506rpx; height: 114rpx; @@ -275,17 +289,14 @@ .error-tip-div { display: flex !important; visibility: visible; // 激活后可见 - // animation: fadeIn 0.4s ease-out 0.1s forwards; } .textarea { - visibility: hidden; // 初始不可见且不占交互位置 - } - } - &.init{ - .textarea { - visibility: hidden; // 初始不可见且不占交互位置 + visibility: hidden; } } + + + } .talk-dialog { width: 100%; diff --git a/src/components/touch-btn/touch-btn.ts b/src/components/touch-btn/touch-btn.ts index 2bda168d..86b73420 100644 --- a/src/components/touch-btn/touch-btn.ts +++ b/src/components/touch-btn/touch-btn.ts @@ -8,8 +8,8 @@ const IsAndEnv = getPhoneEnvBool('AND') // const url = '/traapp/asrAiModelSocket/open'; const url = '/traapp/asrAiModelSocket/open'; const _baseUrl = get_base_url(url).split('http').join('ws'); -export const wsUrl = _baseUrl + url + '?summary=' + getToken(); -// export const wsUrl = 'wss://ty_chat_test.home.tymas.cn:8000/ws/audio'; +// export const wsUrl = _baseUrl + url + '?summary=' + getToken(); +export const wsUrl = 'ws://10.10.10.8:8000/ws/asr'; const windowInfo = uni.getWindowInfo(); // 安全区域信息 const safeArea = windowInfo.safeArea; diff --git a/src/components/touch-btn/touch-btn.types.ts b/src/components/touch-btn/touch-btn.types.ts index 4f1940b3..280bc31b 100644 --- a/src/components/touch-btn/touch-btn.types.ts +++ b/src/components/touch-btn/touch-btn.types.ts @@ -9,6 +9,7 @@ */ export type StatusType = 'default' | 'voice_recording' | 'text_input' | 'voice_to_text' | 'voice_send_ing' | 'send_over'; + /** * 语音转文字的子状态(仅当主状态为 voice_to_text 时生效) */ @@ -20,6 +21,7 @@ export type VoiceToTextSubStatus = | 'failed' // 转换失败(网络/识别错误等) | 'networkError'; // 转换失败(网络错误等) +export type WorkModeType = 'both' | 'text-only' | 'voice-only' ; /** 错误码枚举 - 直接映射提示文本 */ export enum ErrorCode { diff --git a/src/components/touch-btn/touch-btn.vue b/src/components/touch-btn/touch-btn.vue index cd4b4857..597ab9c0 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="false" + :adjustPosition="props.adjustPosition" placeholderStyle="color:#999999;font-size:26rpx" placeholder="请输入文字" :disabled="props.isDisabled" @@ -110,7 +110,7 @@