Browse Source

录音地址

seimin 11 months ago
parent
commit
a318fdac1a
1 changed files with 14 additions and 14 deletions
  1. 14 14
      components/IncidentAttachment.vue

+ 14 - 14
components/IncidentAttachment.vue

@@ -25,32 +25,32 @@
25
   import { onLoad } from '@dcloudio/uni-app'
25
   import { onLoad } from '@dcloudio/uni-app'
26
   import { useLoginUserStore } from '@/stores/loginUser'
26
   import { useLoginUserStore } from '@/stores/loginUser'
27
   import { api_wechatRequesterIncident, api_callrecord } from "@/http/api.js"
27
   import { api_wechatRequesterIncident, api_callrecord } from "@/http/api.js"
28
-  
28
+
29
   const emit = defineEmits(['cancelEmit', 'knowEmit']);
29
   const emit = defineEmits(['cancelEmit', 'knowEmit']);
30
   const { incidentData } = defineProps({
30
   const { incidentData } = defineProps({
31
     incidentData: Object,
31
     incidentData: Object,
32
   });
32
   });
33
   const loginUserStore = useLoginUserStore();
33
   const loginUserStore = useLoginUserStore();
34
-  
34
+
35
   // 页面数据
35
   // 页面数据
36
   const pageData = reactive({
36
   const pageData = reactive({
37
     repairImgList: [],//报修图片
37
     repairImgList: [],//报修图片
38
     audioSrc: '',//音频
38
     audioSrc: '',//音频
39
   });
39
   });
40
-  
40
+
41
   const audio = ref(null);
41
   const audio = ref(null);
42
-  
42
+
43
   // 取消
43
   // 取消
44
   function cancel(){
44
   function cancel(){
45
     emit('cancelEmit')
45
     emit('cancelEmit')
46
   }
46
   }
47
-  
47
+
48
   // 确认
48
   // 确认
49
   function know(){
49
   function know(){
50
     audio.value && audio.value.audioDestroy()
50
     audio.value && audio.value.audioDestroy()
51
     emit('knowEmit');
51
     emit('knowEmit');
52
   }
52
   }
53
-  
53
+
54
   // 预览图片
54
   // 预览图片
55
   function previewImg(index){
55
   function previewImg(index){
56
     uni.previewImage({
56
     uni.previewImage({
@@ -67,7 +67,7 @@
67
       }
67
       }
68
     });
68
     });
69
   }
69
   }
70
-  
70
+
71
   // 获取报修图片
71
   // 获取报修图片
72
   function getRepairImgs() {
72
   function getRepairImgs() {
73
     uni.showLoading({
73
     uni.showLoading({
@@ -83,7 +83,7 @@
83
         pageData.repairImgList = res.data;
83
         pageData.repairImgList = res.data;
84
       });
84
       });
85
   }
85
   }
86
-  
86
+
87
   // 获取通话音频
87
   // 获取通话音频
88
   function getCallrecord() {
88
   function getCallrecord() {
89
     uni.showLoading({
89
     uni.showLoading({
@@ -100,7 +100,7 @@
100
         if(res.status == 200){
100
         if(res.status == 200){
101
           res.list = res.list || [];
101
           res.list = res.list || [];
102
           if(res.list.length){
102
           if(res.list.length){
103
-            pageData.audioSrc = location.protocol + "//" + location.hostname + res.list[0].recordingFileName;
103
+            pageData.audioSrc = location.origin + res.list[0].recordingFileName;
104
           }else{
104
           }else{
105
             pageData.audioSrc = '';
105
             pageData.audioSrc = '';
106
           }
106
           }
@@ -112,7 +112,7 @@
112
         }
112
         }
113
       });
113
       });
114
   }
114
   }
115
-  
115
+
116
   onLoad((option) => {
116
   onLoad((option) => {
117
     incidentData.reqAttachment && getRepairImgs();
117
     incidentData.reqAttachment && getRepairImgs();
118
     incidentData.callID && getCallrecord();
118
     incidentData.callID && getCallrecord();
@@ -138,14 +138,14 @@
138
   width: 690rpx;
138
   width: 690rpx;
139
   background-color: #fff;
139
   background-color: #fff;
140
   border-radius: 10rpx;
140
   border-radius: 10rpx;
141
-  
141
+
142
   .container_head{
142
   .container_head{
143
     padding: 55rpx;
143
     padding: 55rpx;
144
     font-size: 32rpx;
144
     font-size: 32rpx;
145
     color: #333;
145
     color: #333;
146
     text-align: center;
146
     text-align: center;
147
   }
147
   }
148
-  
148
+
149
   .container_form{
149
   .container_form{
150
     padding: 0 55rpx;
150
     padding: 0 55rpx;
151
     .repairImgList{
151
     .repairImgList{
@@ -159,12 +159,12 @@
159
         height: 186rpx;
159
         height: 186rpx;
160
       }
160
       }
161
     }
161
     }
162
-    
162
+
163
     .audio{
163
     .audio{
164
       margin-bottom: 45rpx;
164
       margin-bottom: 45rpx;
165
     }
165
     }
166
   }
166
   }
167
-  
167
+
168
   .container_foot{
168
   .container_foot{
169
     .foot_btns{
169
     .foot_btns{
170
       display: flex;
170
       display: flex;