会话存档

This commit is contained in:
liuye
2023-06-08 09:54:53 +08:00
parent 6f2713af4a
commit 87b606dc0e
2 changed files with 5 additions and 57 deletions

View File

@@ -50,7 +50,6 @@
<script>
import {mapState} from "vuex";
import BenzAMRRecoder from 'benz-amr-recorder';
export default {
name: "conversationDetail",
data() {
@@ -131,18 +130,17 @@ export default {
},
getList() {
if(this.current > this.pages) return
var msgTypeList = ['','image', 'voice', 'text']
this.$http.post(`/app/appsessionarchiveinfo/listByUser`, null, {
params: {
current: this.current,
size: 10,
msgType: msgTypeList[this.currentTabs],
msgType: this.tabList[this.currentTabs].value,
toUserId: this.toUserId,
roomId: this.roomId,
type: this.type,
content: this.keyword,
startTime: this.dateList.length ? this.dateList[0] : '',
endTime: this.dateList.length ? '' : this.dateList[1]
endTime: this.dateList.length ? this.dateList[1] : ''
}
}).then(res=> {
if(res?.data) {
@@ -167,56 +165,6 @@ export default {
current: img
})
},
openRecord (row) {
// this.amrPlayStatus = false
// this.$nextTick(() => {
// this.amrPlay = new BenzAMRRecoder()
// this.amrPlay.onPlay(() => {
// this.amrPlayStatus = true
// })
// this.amrPlay.onStop(() => {
// this.amrPlayStatus = false
// })
// this.amrPlay.onPause(() => {
// this.amrPlayStatus = false
// })
// this.amrPlay.onResume(() => {
// this.amrPlayStatus = true
// })
// this.amrPlay.initWithUrl(row.sdkFileUrl).then(() => {
// console.info('armPlay:', this.amrPlay)
// this.amrPlay.play()
// })
// })
//amr.isPlaying()音频播放状态正在播放为true否则为false
if (row.amr.isPlaying()) {
row.amr.pause(); //暂停
} else {
row.amr.play(); //播放
}
},
handleClose () {
if (this.amrPlay) {
this.amrPlay.stop()
}
},
pauseAmrPlay () {
if (this.amrPlay) {
this.amrPlay.pause()
}
},
resumeAmrPlay () {
if (this.amrPlay) {
if (this.amrPlay.isPaused()) {
this.amrPlay.resume()
} else if (!this.amrPlay.isPlaying()) {
this.amrPlay.play()
}
}
},
},
onReachBottom() {
this.current ++