From 8f3c61c740322c6a9eb5314a05e43016a5f2191c Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期日, 13 七月 2025 18:17:41 +0800 Subject: [PATCH] 资源扫码 --- packageBookService/pages/bookServices/detail/components/tree/index.js | 36 +++++++++++++++++++++++++++++------- 1 files changed, 29 insertions(+), 7 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index d7151ef..2456492 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -59,6 +59,12 @@ }, isCloundHaveSaleMethod: { type: Boolean + }, + activeId: { + type: String + }, + source: { + type: String } }, data: { @@ -71,7 +77,27 @@ canExecute: true, purchaseList: [] }, - ready() {}, + ready() { + var query = this.createSelectorQuery() + const that = this + try { + if (this.data.activeId) + setTimeout(() => { + query.select('.cms-' + this.data.activeId).boundingClientRect(function (res) { + if (res && res.top > 0) { + var myEventDetail = { + top: res.top + }; + var myEventOption = { + bubbles: true, + composed: true, + }; + that.triggerEvent("handleScrollTop", myEventDetail, myEventOption); + } + }).exec() + }, 500) + } catch (err) {} + }, onLoad() {}, observers: { treeList: function (newValue) { @@ -85,7 +111,6 @@ const flag = list.findIndex((item) => item.checked == true); }, }, - methods: { handleList(tree) { for (let index = 0; index < tree.length; index++) { @@ -255,7 +280,8 @@ url = "/packageDomain/pages/resourceDetails/document/index"; } wx.navigateTo({ - url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`, + // url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`, + url: '/packageDomain/pages/resourceDetails/myVideo/index?formPath=jsek_cloudLearning&parentName=mingxing&cmsId=161796&productLinkPath=161796\\161798\\165396\\162299&activeId=162299&parentProductLinkPath=161798\\165396&source=qrcode&bookName=&bookId=7129' }); } const token = wx.getStorageSync(app.config.tokenKey); @@ -267,7 +293,6 @@ goPlayerFun() } }, - // 鎷垮埌鎵�鏈夐」 getAllChildren(id) { let result = []; @@ -312,7 +337,6 @@ }); return result; }, - // 鍙樹负true findAndUpdateItemsByIds(tree, ids, state) { function findAndUpdate(node) { @@ -330,7 +354,6 @@ } return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 }, - // 鍏ㄩ�� checkAll() { wx.showLoading() @@ -367,7 +390,6 @@ this.triggerEvent("changeCheckAll", myEventDetail, myEventOption); wx.hideLoading() }, - // 绔犺妭鍕鹃�� checkResourceTitle(e) { wx.showLoading() -- Gitblit v1.9.1