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