From 109c5106f13dc7600e217c5a51f78ccf61dd526b Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 17 三月 2025 15:12:06 +0800 Subject: [PATCH] img --- packageDomain/pages/resourceDetails/myVideo/index.js | 57 ++++++++++++++++++++++++++++++++------------------------- 1 files changed, 32 insertions(+), 25 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index b69445c..24190cd 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -440,6 +440,7 @@ titleName: items.name }) this.aliVod(file, this.data.showData) + } else { this.setData({ showData: items.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.freeFile, @@ -479,9 +480,9 @@ // showData: '', titleName: item.name }) + if (item.selectType == "video" || item.learnSelectType === "video") { if (this.data.formPath === "jsek_cloudLearning") { - let file = item.protectedFile || item.file ? file = item.protectedFile || item.file : file = item.freeFile this.setData({ @@ -498,37 +499,43 @@ }, aliVod(md5, currentVideo) { - let query = { - md5: md5, - appRefCode: app.config.appRefCode - } - - app.MG.file.getAliVod(query).then((res) => { - if (res) { - if (res && res.data == '') { + if (md5) { + let query = { + md5: md5, + appRefCode: app.config.appRefCode + } + app.MG.file.getAliVod(query).then((res) => { + if (res) { + if (res && res.data == '') { + this.setData({ + showDataVod: currentVideo, + videoLoading: false, + }) + } else { + this.setData({ + showDataVod: res, + videoLoading: false, + }) + } + this.setData({}) + } else if (currentVideo) { this.setData({ showDataVod: currentVideo, videoLoading: false, }) } else { - this.setData({ - showDataVod: res, - videoLoading: false, + return wx.showToast({ + icon: 'error', + title: '鏃犳硶鑾峰彇瑙嗛璧勬簮', }) } - this.setData({}) - } else if (currentVideo) { - this.setData({ - showDataVod: currentVideo, - videoLoading: false, - }) - } else { - return wx.showToast({ - icon: 'error', - title: '鏃犳硶鑾峰彇瑙嗛璧勬簮', - }) - } - }) + }) + } else { + return wx.showToast({ + icon: 'error', + title: '鏆傛棤瑙嗛璧勬簮', + }) + } }, timeUpdate(e) { -- Gitblit v1.9.1