From e982b33d50e0fbfe0882695b6dea2fa704a207b7 Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 5 Jan 2024 16:09:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=8A=A9=E6=89=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppResidentAssistant.vue | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/project/biaopin/AppResidentAssistant/AppResidentAssistant.vue b/src/project/biaopin/AppResidentAssistant/AppResidentAssistant.vue index 8a97501..f58d312 100644 --- a/src/project/biaopin/AppResidentAssistant/AppResidentAssistant.vue +++ b/src/project/biaopin/AppResidentAssistant/AppResidentAssistant.vue @@ -21,7 +21,7 @@ -

{{item.content}}

+

{{item.content || ''}}

@@ -69,21 +69,14 @@ export default { isStart: false, content: '', isFlag: false, - voiceUrl: 'http://test87ftp.cunwuyun.cn/20240104/tmp_b07b802b794a05a3d887c2fbe0af67d9642eff6d78e75f4e-20240104102324.mp3', - voiceId: 'bd1f18e183e544ad9bc1c90203321545', + voiceUrl: '', + voiceId: '', messageList: [ - { - sdkFileUrl: 'http://test87ftp.cunwuyun.cn/20240104/tmp_c37efa0c4f079bd10b32a52ee7565d35087d82a49d33be69-20240104151440.m4a', - content: '123456', - userType: 0, - isPlay: false - }, - { - sdkFileUrl: 'http://test87ftp.cunwuyun.cn/20240104/tmp_c37efa0c4f079bd10b32a52ee7565d35087d82a49d33be69-20240104151440.m4a', - content: '123456', - userType: 1, - isPlay: false - } + // { + // userType: 0, + // sdkFileUrl: 'http://test87ftp.cunwuyun.cn/20240104/output.mp3', + // isPlay: false + // } ], current: 1, pages: 2 @@ -94,9 +87,10 @@ export default { }, onLoad() { recorderManager.onStop((res)=> { + console.log(res) this.upLoad(res.tempFilePath) }); - // this.getHistoryList() + this.getHistoryList() }, onPullDownRefresh() { if(this.current > this.pages) { @@ -123,7 +117,7 @@ export default { const options = { duration: 60000, sampleRate: 16000, - format: 'm4a' + format: 'PCM' } recorderManager.start(options); @@ -202,7 +196,7 @@ export default { this.$loading() this.$instance.post(`/app/appaigccopilotinfo/list?current=${this.current}&size=10`).then(res => { if(res.code == 0 && res.data.records.length) { - res.data.records((item) => { + res.data.records.map((item) => { if(item.sdkFileUrl) { item.isPlay = false } @@ -218,7 +212,6 @@ export default { this.pages = res.data.pages this.$hideLoading() } - }) }, play(src, index) {