yiming
2024-04-16 cb15c57d0ff984f5a100cf25d560fb0a69c00984
packagePersonal/pages/myOrder/index.js
@@ -80,7 +80,6 @@
  getDataList(isReachBottom) {
    var searchArr = [];
    console.log(this.data.searchText, "earch")
    if (this.data.searchText != undefined && this.data.searchText != "") {
      searchArr.push({
        compareType: "Contains",
@@ -157,7 +156,6 @@
          })
        } else {
          this.setData({
            list: [],
            skeletonLoding: false,
            loading: false
          })
@@ -173,14 +171,23 @@
    })
    this.getDataList(false);
  },
  goBookDetails(e) {
  async goBookDetails(e) {
    const {
      book,
      remarks
    } = e.currentTarget.dataset;
    let id = remarks != null && JSON.stringify(remarks).slice(1, -1) == 'object' && JSON.parse(remarks).pId ? JSON.parse(remarks).pId : book.orderSaleMethod.product.id;
    let parentData = null;
    let bookId = book.orderSaleMethod.product.id;
    if (remarks == null) {
      parentData = await app.MG.store.getProductBySaleMethod({
        'saleMethodId': book.orderSaleMethod.id
      })
      bookId = parentData.parentProduct[parentData.parentProduct.length - 1].id;
    } else if (remarks != null && JSON.parse(remarks).pId) {
      bookId = JSON.parse(remarks).pId
    }
    wx.navigateTo({
      url: `/packageBookService/pages/bookServices/detail/index?id=${id}&name=${book.name}`,
      url: `/packageBookService/pages/bookServices/detail/index?id=${bookId}&name=${book.name}`,
    });
  },