在家开发了btn按钮样式2
This commit is contained in:
+2
-2
@@ -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'
|
||||
|
||||
@@ -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<UniApp.SocketTask>} 成功时返回WS实例,失败时reject错误信息
|
||||
*/
|
||||
export const initWebSocket = (wsUrl : string) : Promise<UniApp.SocketTask> => {
|
||||
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<UniApp.SocketTask> => {
|
||||
|
||||
// 4. 监听连接错误(出错时reject)
|
||||
const onErrorHandler = (err) => {
|
||||
console.log('WS连接错误', err);
|
||||
console.log('WS连接错误', err, wsUrl);
|
||||
// reject返回错误信息
|
||||
reject(new Error(`WS连接错误:${err.errMsg || err.message}`));
|
||||
};
|
||||
|
||||
@@ -92,8 +92,7 @@
|
||||
const status = ref<StatusType>('default');
|
||||
const voice_to_text_status = ref<VoiceToTextSubStatus>('init');
|
||||
const popupRef = ref(null);
|
||||
// 'uploadVoice'
|
||||
// const emit = defineEmits(['submitVoice', 'submitAnswer', 'startRecord', 'sendLoading']);
|
||||
|
||||
const props = defineProps({
|
||||
// mode控制功能模式
|
||||
mode: {
|
||||
|
||||
@@ -111,12 +111,12 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<TouchBtn class="talk-btns" @uploadVoice="uploadRecordNow" @submitAnswer="submitAnswerNow"
|
||||
@startRecord="startRecordCallback" :loadingText="sendLoadingText" :isLoading="!answerIsOver"
|
||||
:adjustPosition="true" :isDisabled="isHistory" />
|
||||
<!-- <touch-btn @uploadVoice="uploadRecordNow" @submitAnswer="submitAnswerNow"
|
||||
<!-- <TouchBtn class="talk-btns" @uploadVoice="uploadRecordNow" @submitAnswer="submitAnswerNow"
|
||||
@startRecord="startRecordCallback" :loadingText="sendLoadingText" :isLoading="!answerIsOver"
|
||||
:adjustPosition="true" :isDisabled="isHistory" /> -->
|
||||
<touch-btn @uploadVoice="uploadRecordNow" @submitAnswer="submitAnswerNow"
|
||||
@startRecord="startRecordCallback" :loadingText="sendLoadingText" :isLoading="!answerIsOver"
|
||||
:adjustPosition="true" :isDisabled="isHistory" />
|
||||
|
||||
<History ref="historyRef" @showDetail="showHistoryDetail"></History>
|
||||
<PreviewVue ref="previewRef" />
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user