From 3f62d09217740b02d45bad3e6791916a9f11695c Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期四, 11 七月 2024 16:00:54 +0800 Subject: [PATCH] sudu --- packageDomain/pages/resourceDetails/myVideo/index.js | 65 ++++++++++++++++---------------- 1 files changed, 32 insertions(+), 33 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index c0a4b32..d08e26d 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -81,14 +81,13 @@ formPath: options.formPath, flag: false }) - console.log(this.data.storeInfo, 13) if (options.parentName !== "鏁欏璧勬簮" && options.parentName !== "浜戝涔�") { this.setData({ parentName: options.parentName, }) } this.resourceDetailsData() - this.getNoteList() + }, /** @@ -174,12 +173,13 @@ }, onTabsChange(event) { - + console.log(event, 234) + let tabValue = event.detail.value + if (tabValue == '1') { + this.getNoteList() + } }, - onTabsClick(event) { - - }, handleChange(e) { this.setData({ activeValues: e.detail.value, @@ -208,7 +208,8 @@ }, resourceDetailsData() { this.setData({ - // videoLoaidng: true + videoLoaidng: true, + loading: true }) let query = { storeInfo: this.data.storeInfo, @@ -236,37 +237,35 @@ } } app.MG.store.getProductDetail(query).then(res => { - console.log(this.data.productLinkPath, 345) res.datas.cmsDatas[0].datas.forEach((item) => { if (item.selectType === "video" || item.learnSelectType === "video") { this.data.threeLeveData.push(item) this.setData({ threeLeveData: this.data.threeLeveData }) - this.data.threeLeveData.forEach((items, index) => { // 淇敼姝ゅ娣诲姞index鍙傛暟 - if (this.data.productLinkPath == items.productLinkPath) { - if (this.data.formPath === "jsek_cloudLearning") { - let file - items.protectedFile ? file = items.protectedFile : file = items.freeFile - this.setData({ - showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), - titleName: items.name - }) - console.log(this.data.showData, 11) - } else { - this.setData({ - showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, - titleName: items.name - }) - } - let selectedIndex = index; // 瀛樺偍閫変腑椤圭殑绱㈠紩 - this.setData({ - selectedId: selectedIndex // 璁剧疆閫変腑椤圭殑绱㈠紩 - }); - } - }); } }) + this.data.threeLeveData.forEach((items, index) => { // 淇敼姝ゅ娣诲姞index鍙傛暟 + if (this.data.productLinkPath == items.productLinkPath) { + if (this.data.formPath === "jsek_cloudLearning") { + let file + items.protectedFile || item.file ? file = items.protectedFile || item.file : file = items.freeFile + this.setData({ + showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), + titleName: items.name + }) + } else { + this.setData({ + showData: items.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.freeFile, + titleName: items.name + }) + } + let selectedIndex = index; // 瀛樺偍閫変腑椤圭殑绱㈠紩 + this.setData({ + selectedId: selectedIndex // 璁剧疆閫変腑椤圭殑绱㈠紩 + }); + } + }); this.setData({ loading: false, hidden: false @@ -415,9 +414,9 @@ }, // 鑾峰彇绗旇鍒楄〃 async getNoteList() { - // this.setData({ - // loading: true - // }) + this.setData({ + loading: true + }) let topicId await app.MG.ugc .getProductUserSubmitTopic({ -- Gitblit v1.9.1