diff --git a/src/views/model/downloadVideo.vue b/src/views/model/downloadVideo.vue index cc9ef2b..04bc43c 100644 --- a/src/views/model/downloadVideo.vue +++ b/src/views/model/downloadVideo.vue @@ -69,12 +69,19 @@ export default { try { const res = await doGetVideoDetialById(id); console.log(res, "视频详情"); - this.coverUrl = res.data.coverURL; - this.videoUrl = res.data.videoUrl; - this.open(); + if (res.data.success) { + this.coverUrl = res.data.coverURL; + this.videoUrl = res.data.videoUrl; + this.open(); + } else { + this.videoUrl = this.$route.query.videoUrl; + this.open(); + } } catch (error) { console.log(error, "error"); - Toast.fail(error.message); + // Toast.fail(error.message); + this.videoUrl = this.$route.query.videoUrl; + this.open(); } },