接口对接
This commit is contained in:
@@ -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}`,
|
||||
|
||||
@@ -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=>{
|
||||
|
||||
Reference in New Issue
Block a user