diff --git a/.env.development b/.env.development index 6e7704c3..1af6108b 100644 --- a/.env.development +++ b/.env.development @@ -4,10 +4,10 @@ ENV = '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: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' diff --git a/src/components/touch-btn/touch-btn.ts b/src/components/touch-btn/touch-btn.ts index f778640e..b3a1d661 100644 --- a/src/components/touch-btn/touch-btn.ts +++ b/src/components/touch-btn/touch-btn.ts @@ -7,8 +7,9 @@ const IsAndEnv = getPhoneEnvBool('AND') // const url = '/traapp/voiceTransSocket/open'; // 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(); +// 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'; const windowInfo = uni.getWindowInfo(); // 安全区域信息 const safeArea = windowInfo.safeArea; @@ -25,6 +26,7 @@ export const horizontalSplitX = safeArea.right / 2; * @returns {Promise} 成功时返回WS实例,失败时reject错误信息 */ export const initWebSocket = (wsUrl : string) : Promise => { + console.log('wsUrl', wsUrl); return new Promise((resolve, reject) => { // 1. 创建WS连接 const ws = uni.connectSocket({ @@ -45,7 +47,7 @@ export const initWebSocket = (wsUrl : string) : Promise => { // 4. 监听连接错误(出错时reject) const onErrorHandler = (err) => { - console.log('WS连接错误', err); + console.log('WS连接错误', err, wsUrl); // reject返回错误信息 reject(new Error(`WS连接错误:${err.errMsg || err.message}`)); }; diff --git a/src/components/touch-btn/touch-btn.vue b/src/components/touch-btn/touch-btn.vue index 938eae05..cfd17f89 100644 --- a/src/components/touch-btn/touch-btn.vue +++ b/src/components/touch-btn/touch-btn.vue @@ -92,8 +92,7 @@ const status = ref('default'); const voice_to_text_status = ref('init'); const popupRef = ref(null); - // 'uploadVoice' - // const emit = defineEmits(['submitVoice', 'submitAnswer', 'startRecord', 'sendLoading']); + const props = defineProps({ // mode控制功能模式 mode: { diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index 4d2ac6dd..0cedda1a 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -111,12 +111,12 @@ - - + @@ -146,7 +146,7 @@ import { setupKeyboardHeightListener } from '@/common/common'; - import TouchBtn from '@/pages/course/components/touchBtn.vue'; + // import TouchBtn from '@/pages/course/components/touchBtn.vue'; import TalkingItem from './components/talking-item.vue'; import PreviewVue from './components/preview.vue'; import {