| | |
| | | label: '课程', |
| | | key: 1, |
| | | linkType: 'Favoriteclass', |
| | | }, |
| | | { |
| | | label: '数字教材', |
| | | key: 2, |
| | | linkType: 'FavoriteTextBooks', |
| | | } |
| | | ], |
| | | list: [], |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | // this.getDataList(false); |
| | | }, |
| | | onShow() { |
| | | this.getDataList(false); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | |
| | | 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, |
| | | }); |
| | | }, |
| | | |