Lita-Tako před 4 měsíci
rodič
revize
02967f94eb

+ 2 - 2
src/components/video/Live.vue

@@ -280,8 +280,8 @@
280 280
 		console.log('选择摄像头', camera)
281 281
 		const { cameraIndexCode } = camera
282 282
 		getPreview({ cameraIndexCode, protocol: 'WS' }).then((resp) => {
283
-			if (!resp || !resp.data || !resp.data.url) return message.error('无法获取视频地址')
284
-			const url = resp.data.url
283
+			if (!resp || !resp.url) return message.error('无法获取视频地址')
284
+			const url = resp.url
285 285
 			const exists = Object.values(videoMap).findIndex((u) => u.url === url)
286 286
 			if (exists >= 0) {
287 287
 				return message.warning(`该视频已经在 ${exists + 1} 窗口播放`)

+ 2 - 2
src/components/video/Replay.vue

@@ -181,8 +181,8 @@
181 181
 		}
182 182
 		const { cameraIndexCode } = camera
183 183
 		getPlaybackVideo({ cameraIndexCode }).then((resp) => {
184
-			if (!resp || !resp.data || !resp.data.url) return message.error('无法获取视频地址')
185
-			const url = resp.data.url
184
+			if (!resp || !resp.url) return message.error('无法获取视频地址')
185
+			const url = resp.url
186 186
 			if (url) {
187 187
 				const [realUrl, params] = url.split('?')
188 188
 				const [startTime, endTime] = date.value