zhongshujie
14 小时以前 e2bf73079051769b7b7cdc9627fc32ce64226144
量表修改
7个文件已修改
117 ■■■■ 已修改文件
assets/js/middleGround/api/file.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testTree/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/psychologyAnswer/psychologyAnswer.js 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/middleGround/api/file.js
@@ -92,6 +92,14 @@
      method: 'post',
      data
    })
  },
  // 检查CmsItem 权限
  checkCmsItem(data) {
    return request({
      url: '/file/api/ApiCheckCmsItemAccessRights',
      method: 'post',
      data
    })
  }
}
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: "加载中",
      });
@@ -130,10 +130,11 @@
      wx.hideLoading();
      if (value.refCode == "psychology") {
        const listName = value.name
        const listId = value.id
        wx.navigateTo({
          url: `/packageBookService/pages/psychologyAnswer/psychologyAnswer?listName=${
            listName
        }`
        }&listId=${listId}`
        })
      } else {
        wx.navigateTo({
packageBookService/pages/bookServices/detail/components/testTree/index.js
@@ -33,6 +33,7 @@
        openIds: e.detail.value,
      });
    },
    goTest(e) {
      const value = e.currentTarget.dataset;
      var myEventDetail = {
packageBookService/pages/bookServices/detail/index.js
@@ -1230,7 +1230,7 @@
              });
            }
            if (data.length > 0) {
              console.log('data', data);
              console.log('data01', data);
              let list = []
              that.getTreeList(data, list, query.cmsPath)
              list = that.ensureTreeConsistency(list)
packageBookService/pages/psychologyAnswer/psychologyAnswer.js
@@ -9,6 +9,7 @@
   * 页面的初始数据
   */
  data: {
    isBuy: false, // 是否需要购买
    questuionName: "", //试卷名称
    dataList: "",
    barHeight: "",
@@ -37,28 +38,70 @@
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const questuionName = options.listName
    this.setData({
      questuionName: questuionName
    })
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight =
      (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.init();
    // 在此进行是否购买的查询
    const questionId = options.listId;
    const query = {
      "cmsItemId": Number(questionId)
    };
    app.MG.file.checkCmsItem(query)
      .then((res) => {
        const isBuys = res;
        this.setData({
          isBuy: isBuys
        });
        if (!isBuys) {
          wx.showModal({
            icon: 'error',
            title: '温馨提示',
            content: '请购买题库,即将返回首页',
            confirmText: '确定',
            showCancel: false, // 关闭取消按钮
            success: function (res) {
              if (res.confirm) {
                wx.switchTab({
                  url: '/pages/home/home', // 替换为你的首页路径
                });
              }
            }
          });
          return; // 直接返回,避免执行后续代码
        }
        // 其他逻辑
        const questuionName = options.listName;
        this.setData({
          questionName: questuionName
        });
        const systInfo = wx.getSystemInfoSync();
        const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
        const navBarHeight =
          (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
        const token = wx.getStorageSync(app.config.tokenKey);
        if (!token) {
          loginInfo(app, (data) => {
            if (data) {
              this.init();
            } else {
              this.init();
            }
          });
        } else {
          this.init();
        }
      })
    } else {
      this.init()
    }
      .catch((err) => {
        console.error('检查题库失败:', err);
        wx.showToast({
          icon: 'error',
          title: '加载失败,请重试'
        });
      });
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -458,12 +458,18 @@
          }
        });
      } else {
        wx.showToast({
          icon: 'none',
          title: '请先返回资源所在图书详情购买视频资源',
        })
        wx.navigateTo({
          url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=${this.data.formPath}`,
        wx.showModal({
          title: '温馨提示',
          content: '请先返回资源所在图书详情购买视频资源',
          confirmText: '确定',
          showCancel: false, // 关闭取消按钮
          success: function (res) {
            if (res.confirm) {
              wx.navigateTo({
                url: `/packageBookService/pages/bookServices/detail/index?id=${this.data.bookDetail.id}&name=${this.data.bookDetail.name}&tabValue=${this.data.formPath}`,
              });
            }
          }
        });
      }
      this.setData({
project.config.json
@@ -136,6 +136,6 @@
    "include": []
  },
  "appid": "wx7f362fe7cb6e0d1f",
  "libVersion": "3.6.3",
  "libVersion": "3.8.10",
  "projectname": "jsek-applet"
}