|
@@ -24,7 +24,7 @@
|
24
|
24
|
import { defineEmits, ref, reactive, defineProps } from 'vue'
|
25
|
25
|
import { onLoad } from '@dcloudio/uni-app'
|
26
|
26
|
import { useLoginUserStore } from '@/stores/loginUser'
|
27
|
|
- import { api_wechatRequesterIncident, api_callrecord } from "@/http/api.js"
|
|
27
|
+ import { api_wechatRequesterIncident, api_callrecord, api_getRecordCall } from "@/http/api.js"
|
28
|
28
|
|
29
|
29
|
const emit = defineEmits(['cancelEmit', 'knowEmit']);
|
30
|
30
|
const { incidentData } = defineProps({
|
|
@@ -93,24 +93,29 @@
|
93
|
93
|
let postData = {
|
94
|
94
|
idx: 0,
|
95
|
95
|
sum: 1,
|
96
|
|
- callrecord: {callAccept: incidentData.callID},
|
|
96
|
+ callAccept:incidentData.callID
|
|
97
|
+ // callrecord: {callAccept: incidentData.callID},
|
97
|
98
|
};
|
98
|
|
- api_callrecord(postData).then((res) => {
|
99
|
|
- uni.hideLoading();
|
100
|
|
- if(res.status == 200){
|
101
|
|
- res.list = res.list || [];
|
102
|
|
- if(res.list.length){
|
103
|
|
- pageData.audioSrc = location.origin + res.list[0].recordingFileName;
|
104
|
|
- }else{
|
105
|
|
- pageData.audioSrc = '';
|
106
|
|
- }
|
107
|
|
- }else{
|
108
|
|
- uni.showToast({
|
109
|
|
- icon: 'none',
|
110
|
|
- title: res.msg || '请求数据失败!'
|
111
|
|
- });
|
112
|
|
- }
|
113
|
|
- });
|
|
99
|
+ api_callrecord(postData).then((res0) => {
|
|
100
|
+ if(res0.status==200){
|
|
101
|
+ api_getRecordCall({
|
|
102
|
+ path:res0.list[0].path,
|
|
103
|
+ hosId:loginUserStore.loginUser.user.currentHospital.id
|
|
104
|
+ }).then((res)=>{
|
|
105
|
+ uni.hideLoading();
|
|
106
|
+ if(res.state == 200){
|
|
107
|
+ // res.list = res.list || [];
|
|
108
|
+ pageData.audioSrc = location.origin + res.relativePath;
|
|
109
|
+ }else{
|
|
110
|
+ uni.showToast({
|
|
111
|
+ icon: 'none',
|
|
112
|
+ title: res.error || '请求数据失败!'
|
|
113
|
+ });
|
|
114
|
+ }
|
|
115
|
+ })
|
|
116
|
+ }
|
|
117
|
+
|
|
118
|
+ });
|
114
|
119
|
}
|
115
|
120
|
|
116
|
121
|
onLoad((option) => {
|