From 04c7b0163caeae4ab1c5da62e301fa993101cfad Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 31 三月 2025 10:40:45 +0800 Subject: [PATCH] bug修改 --- packageDomain/pages/resourceDetails/myVideo/index.js | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index fc8426c..3d65fe1 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -438,7 +438,6 @@ showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), titleName: items.name }) - debugger this.aliVod(file, this.data.showData) } else { this.setData({ @@ -865,17 +864,21 @@ }, // 鍒ゆ柇褰撳墠鐐瑰嚮鐨勬暟鎹槸鍚﹁喘涔� cmsItemIsBuy(item) { - // 1.this.data.buyIdList 涓婃槸鍚︽湁 cmsItem鐨刲inkpath閲岀殑id - const linkData = item.productLinkInfo.find(citem => citem.LinkType == 'Link' && citem.CmsItemId == item.id) - let linkids = [] - try { - linkids = linkData.LinkPath.split('\\') - } catch (error) {} - if (!this.data.buyIdList.length) return false - const flag = linkids.some(citem => { - return this.data.buyIdList.includes(Number(citem)) - }) - console.log(linkids, flag); + let flag = false + // 涔颁簡 + if (this.data.buyList.length) { + if (this.data.buyList.some(citem => item.productLinkPath.includes(citem.productLinkPath))) + flag = true + } else { + // 娌′拱涓旀棤閿�鍞柟寮� + if (!item.saleMethod.length) { + flag = true + } else { + // 娌′拱涓旈攢鍞柟寮忚繃鏈�//娌′拱锛岄攢鍞柟寮忎环鏍间负0 + const itemSaleMethod = item.saleMethod.find(citem => citem.SaleType == 'Normal') + if (new Date().getTime() > new Date(itemSaleMethod.EndDate).getTime() || itemSaleMethod.Price == 0) flag = true + } + } return flag } }) \ No newline at end of file -- Gitblit v1.9.1