接口对接

This commit is contained in:
yanghang
2025-06-30 08:26:29 +08:00
parent 973c99bc85
commit 7833c0f1a5
2 changed files with 3 additions and 6 deletions
-1
View File
@@ -96,7 +96,6 @@ export function downloadVoiceFile(url) {
if (token)
header['summary'] = token
let baseUrl = get_base_url();
let _params = new FormData()
return new Promise((resolve, reject) => {
uni.downloadFile({
url: `${baseUrl}${url}`,
+3 -5
View File
@@ -171,7 +171,7 @@ const nextStep = () => {
console.log(111)
if( socketTask && socketTask.readyState === 1){
sendMessage({
"commond" : 'open',
"commond" : 'OPEN',
"body" : {
crsId: crsId.value,
teacherNo: choiceTeacher.value
@@ -305,6 +305,8 @@ onShow(()=>{
})
onHide(()=>{
closeWebSocket()
teacherVoiceObj.stop()
teacherVoiceObj.src = ''
})
// onUnmounted(()=>{
// closeWebSocket()
@@ -342,11 +344,7 @@ const hideOverlayTalking = (obj) => {
// #endif
if(!isOut.value){
console.log('发送')
// let formData = new FormData()
// formData.append('voice',)
console.log(audioPath.value)
setTimeout(()=>{
uploadVoiceFile(audioPath.value,{}).then(res=>{
console.log(JSON.parse(res.data))
}).catch(err=>{