litian
2024-06-28 75a9abca4f4cf0ebe579705abc369489cfe20e7c
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
          })
@@ -167,7 +172,7 @@
                icon: 'success',
                duration: 1000,
              })
              this.getDataList(false)
              that.getDataList(false)
            });
        } else if (res.cancel) {
          console.log('用户点击了取消')
@@ -176,7 +181,9 @@
    })
  },
  goBookDetails(e) {
    const { book } = e.currentTarget.dataset;
    const {
      book
    } = e.currentTarget.dataset;
    wx.navigateTo({
      url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`,
    });