zhongshujie
5 小时以前 c0ff00c32bca4077b140d0d69b2863851ae31273
优化
2个文件已修改
26 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/testResource/testResource.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/psychologyAnswer/psychologyAnswer.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.js
@@ -82,10 +82,10 @@
          },
        });
      }
      // if (!this.data.isBuyBank) return wx.showToast({
      //   icon: 'error',
      //   title: '请先购买题库',
      // })
      if (!this.data.isBuyBank) return wx.showToast({
        icon: 'error',
        title: '请先购买题库',
      })
      wx.showLoading({
        title: "加载中",
      });
@@ -131,10 +131,12 @@
      if (value.refCode == "psychology") {
        const listName = value.name
        const listId = value.id
        const bookId = this.data.bookInfo.id
        const bookName = this.data.bookInfo.name
        const formPath = this.data.tab
        wx.navigateTo({
          url: `/packageBookService/pages/psychologyAnswer/psychologyAnswer?listName=${
            listName
        }&listId=${listId}`
            listName}&listId=${listId}&bookId=${bookId}&bookName=${bookName}&formPath=${formPath}`
        })
      } else {
        wx.navigateTo({
packageBookService/pages/psychologyAnswer/psychologyAnswer.js
@@ -40,10 +40,12 @@
  onLoad(options) {
    // 在此进行是否购买的查询
    const questionId = options.listId;
    const bookId = options.bookId
    const bookName = options.bookName
    const formPath = options.formPath
    const query = {
      "cmsItemId": Number(questionId)
    };
    app.MG.file.checkCmsItem(query)
      .then((res) => {
        const isBuys = res;
@@ -54,14 +56,14 @@
          wx.showModal({
            icon: 'error',
            title: '温馨提示',
            content: '请购买题库,即将返回首页',
            content: '请购买题库,即将返回购买页',
            confirmText: '确定',
            showCancel: false, // 关闭取消按钮
            success: function (res) {
              if (res.confirm) {
                wx.switchTab({
                  url: '/pages/home/home', // 替换为你的首页路径
                });
                wx.navigateTo({
                  url: '/packageBookService/pages/bookServices/detail/index?id=' + bookId + '&name=' + bookName + '&tabValue=' + formPath,
                })
              }
            }
          });