会话存档
This commit is contained in:
@@ -113,7 +113,7 @@ export default {
|
||||
areaId: this.areaId,
|
||||
toUserName: this.currentTabs == 1 ? this.keyword : '',
|
||||
roomName: this.currentTabs == 1 ? '' : this.keyword,
|
||||
departId: this.deptUserList[0].id
|
||||
departmentId: this.deptUserList[0].id
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
|
||||
@@ -56,10 +56,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
{name: '全部'},
|
||||
{name: '图片'},
|
||||
{name: '语音'},
|
||||
{name: '文本'}
|
||||
{name: '全部', value: ''},
|
||||
{name: '文本', value: 'text'},
|
||||
{name: '图片', value: 'image'},
|
||||
{name: '语音', value: 'voice'},
|
||||
],
|
||||
currentTabs: 0,
|
||||
barStyle: {
|
||||
@@ -140,20 +140,22 @@ export default {
|
||||
toUserId: this.toUserId,
|
||||
roomId: this.roomId,
|
||||
type: this.type,
|
||||
content: this.keyword
|
||||
content: this.keyword,
|
||||
startTime: this.dateList.length ? this.dateList[0] : '',
|
||||
endTime: this.dateList.length ? '' : this.dateList[1]
|
||||
}
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
res.data.records.map((item) => {
|
||||
if(item.msgType == 'voice'){
|
||||
//amr对象不能共用,所以要为每条语音消息初始化一个amr对象
|
||||
var amr = new BenzAMRRecoder();
|
||||
amr.initWithUrl(`请求的amr地址`).then(() => {
|
||||
item.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长
|
||||
});
|
||||
item.amr = amr; //将初始化好的amr赋值到当前消息对象data中
|
||||
}
|
||||
})
|
||||
// res.data.records.map((item) => {
|
||||
// if(item.msgType == 'voice'){
|
||||
// //amr对象不能共用,所以要为每条语音消息初始化一个amr对象
|
||||
// var amr = new BenzAMRRecoder();
|
||||
// amr.initWithUrl(`请求的amr地址`).then(() => {
|
||||
// item.amrTime = Math.ceil(amr.getDuration()); //获取音频总时长
|
||||
// });
|
||||
// item.amr = amr; //将初始化好的amr赋值到当前消息对象data中
|
||||
// }
|
||||
// })
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records]: res.data.records
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user