|
|
@@ -58,12 +58,13 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- taskId: 1,
|
|
|
+ taskId: null,
|
|
|
form: [],
|
|
|
historyList: [],
|
|
|
audioContext: null,
|
|
|
currentAudioId: null, // 当前播放的音频ID
|
|
|
isAudioPlaying: false, // 音频是否正在播放
|
|
|
+ checkType:''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -74,7 +75,7 @@
|
|
|
});
|
|
|
},
|
|
|
getLive() {
|
|
|
- this.$http.get("/merchant/localTsCustomerServiceDict/list?taskId=" + this.taskId + '&source=' + '1').then(
|
|
|
+ this.$http.get("/merchant/localTsCustomerServiceDict/list?taskId=" + this.taskId + '&source=' + this.checkType).then(
|
|
|
res => {
|
|
|
if (res.data.code == 200) {
|
|
|
this.form = res.data.result
|
|
|
@@ -100,7 +101,6 @@
|
|
|
}
|
|
|
})
|
|
|
this.form = list
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -177,25 +177,21 @@
|
|
|
if (!this.audioContext) return;
|
|
|
|
|
|
this.audioContext.onPlay(() => {
|
|
|
- console.log('开始播放');
|
|
|
this.isAudioPlaying = true;
|
|
|
this.updateAudioStatus(this.currentAudioId, true);
|
|
|
});
|
|
|
|
|
|
this.audioContext.onPause(() => {
|
|
|
- console.log('暂停播放');
|
|
|
this.isAudioPlaying = false;
|
|
|
this.updateAudioStatus(this.currentAudioId, false);
|
|
|
});
|
|
|
|
|
|
this.audioContext.onStop(() => {
|
|
|
- console.log('停止播放');
|
|
|
this.isAudioPlaying = false;
|
|
|
this.updateAudioStatus(this.currentAudioId, false);
|
|
|
});
|
|
|
|
|
|
this.audioContext.onEnded(() => {
|
|
|
- console.log('播放结束');
|
|
|
this.isAudioPlaying = false;
|
|
|
this.updateAudioStatus(this.currentAudioId, false);
|
|
|
this.cleanupAudio();
|
|
|
@@ -239,7 +235,7 @@
|
|
|
taskId: this.taskId
|
|
|
}
|
|
|
this.$http.post('/merchant/localTsCustomerServiceTaskMsg/queryList', data).then((res) => {
|
|
|
- console.log(res.data.result)
|
|
|
+
|
|
|
this.historyList = res.data.result
|
|
|
this.historyList.forEach(item => {
|
|
|
if (item.recordUrl) {
|
|
|
@@ -251,9 +247,6 @@
|
|
|
})
|
|
|
},
|
|
|
},
|
|
|
- onLoad(options) {
|
|
|
- this.taskId = options.taskId
|
|
|
- },
|
|
|
beforeDestroy() {
|
|
|
if (this.audioContext) {
|
|
|
this.audioContext.stop();
|
|
|
@@ -262,9 +255,14 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ this.taskId = options.taskId
|
|
|
+ this.checkType = options.checkType
|
|
|
this.getLive()
|
|
|
this.getHistroyList()
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
</script>
|