From a9c680d3fcde05afbbca0bb03f95e75027608b22 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期六, 07 九月 2024 15:47:59 +0800 Subject: [PATCH] btn --- packageDomain/pages/resourceDetails/myVideo/index.js | 34 ++++++++++++++++++++++++++-------- 1 files changed, 26 insertions(+), 8 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index 24c52d0..94d8d8d 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -1,6 +1,8 @@ // pages/resourceDetails/index.js const app = getApp() - +import { + loginInfo +} from '../../../../assets/js/login'; Page({ /** @@ -88,8 +90,18 @@ parentName: options.parentName, }) } - this.resourceDetailsData() - + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) { + this.resourceDetailsData() + } else { + this.resourceDetailsData() + } + }) + } else { + this.resourceDetailsData() + } }, /** @@ -307,13 +319,19 @@ aliVod(md5, currentVideo) { let query = { md5: md5, - appRefCode: config.appRefCode + appRefCode: app.config.appRefCode } - MG.file.getAliVod(query).then((res) => { + app.MG.file.getAliVod(query).then((res) => { if (res) { - this.setData({ - showDataVod: res, - }) + if (res && res.data == '') { + this.setData({ + showDataVod: currentVideo, + }) + } else { + this.setData({ + showDataVod: res, + }) + } } else if (currentVideo) { this.setData({ showDataVod: currentVideo, -- Gitblit v1.9.1