闫增涛
2024-03-26 5ca38e4ef60e35f08e87d6569b72c25433c311ca
packageBookService/pages/bookServices/detail/components/testResource/testResource.js
@@ -42,6 +42,9 @@
          }
        })
      }
      wx.showLoading({
        title: '加载中',
      })
      // 获取章节下是否有题目
      let idPathList = []
      let query = {
@@ -55,6 +58,7 @@
        }
      }
      if (value.childrenFolderCount == 0) {
        wx.hideLoading()
        return wx.showToast({
          icon: "error",
          title: '暂无数据',
@@ -70,16 +74,7 @@
          })
        })
      }
      // query: {
      //   title: bookData.value.test,
      //   bookId: route.query.bookId,
      //   productLinkPath: data.productLinkPath,
      //   answerTitle: data.name,
      //   answerType: 'option',
      //   rootCmsItemId: bookData.value.rootCmsItemId,
      //   idPathList: JSON.stringify(idPathList)
      // }
      wx.hideLoading()
      wx.navigateTo({
        url: `/packageBookService/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&productLinkPath=${value.productLinkPath}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&idPathList=${JSON.stringify(idPathList)}&answerTitle=${value.name}&answerType=${'option'}`,
      })
@@ -106,6 +101,9 @@
      })
    },
    async getMockId() {
      wx.showLoading({
        title: '加载中'
      })
      let id
      let query = {
        start: 0,
@@ -124,6 +122,7 @@
      //   return logIn()
      // }
      const mockid = await this.getMockId()
      wx.hideLoading()
      const item = e.currentTarget.dataset.item
      wx.navigateTo({
        url: `/packageBookService/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&answerTitle=${item.name}&answerType=${'mock'}&uuid=${item.id}&mockid=${mockid}`,