From aff8d054df4a638f399dc8f15d98c19b9c9aa785 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 29 四月 2025 10:11:25 +0800 Subject: [PATCH] 扫码视频播放 --- packagePersonal/pages/myCollection/index.js | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packagePersonal/pages/myCollection/index.js b/packagePersonal/pages/myCollection/index.js index fb1a765..ad65241 100644 --- a/packagePersonal/pages/myCollection/index.js +++ b/packagePersonal/pages/myCollection/index.js @@ -7,8 +7,7 @@ data: { active: 0, activeName: "FavoriteBookCity", - tabList: [ - { + tabList: [{ label: '鍥句功', key: 0, linkType: 'FavoriteBookCity', @@ -17,6 +16,11 @@ label: '璇剧▼', key: 1, linkType: 'Favoriteclass', + }, + { + label: '鏁板瓧鏁欐潗', + key: 2, + linkType: 'FavoriteTextBooks', } ], list: [], @@ -36,10 +40,11 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - console.log(options); + // this.getDataList(false); + }, + onShow() { this.getDataList(false); }, - /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 */ @@ -48,7 +53,6 @@ }, tabBookClick(item) { - console.log(item, 1) let that = this; let info = this.data.tabList[item.detail.value] that.setData({ @@ -92,6 +96,7 @@ }) } else { this.setData({ + list: [], skeletonLoding: false, loading: false }) @@ -176,9 +181,19 @@ }) }, goBookDetails(e) { - const { book } = e.currentTarget.dataset; + const { + book + } = e.currentTarget.dataset; + let url = '' + if (this.data.activeName == 'FavoriteBookCity') { + url = `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}` + } else if (this.data.activeName == 'Favoriteclass') { + url = `/pages/digitalCourses/digitalCoursesDetails/index?id=${book.id}` + } else if (this.data.activeName == 'FavoriteTextBooks') { + url = `/pages/digitalTextbooks/digitalTextbooksDetails/index?id=${book.id}` + } wx.navigateTo({ - url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, + url: url, }); }, -- Gitblit v1.9.1