yiming
2024-04-29 9cc35aa83764cb91436750db66e9868c99c1de90
标题bug1
4个文件已修改
103 ■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/tree/index.js 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -184,9 +184,14 @@
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}`,
        });
        console.log(item, '7899');
        if (item.selectType == "document" || item.selectType == "pdf") {
          // freeFile
          if (item.selectType == "document") {
            item.selectType = "pptx"
          }
          console.log(item);
          const fileLink = item.file ?
            app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file : app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.freeFile
@@ -196,6 +201,7 @@
          // 单次下载允许的最大文件为 200MB
          wx.downloadFile({
            url: fileLink,
            // filePath: wx.env.USER_DATA_PATH + `/${item.name}.${item.selectType}`,
            filePath: wx.env.USER_DATA_PATH + `/${item.name}.${item.selectType}`,
            success: function (res) {
              console.log(res, "wx.downloadFile success res");
@@ -220,80 +226,6 @@
            },
          });
        }
        // if (item.selectType == "document" || item.selectType == "pdf") {
        //   const fileLink = app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file;
        //   let filePath = wx.env.USER_DATA_PATH + '/' + item.name
        //   console.log(filePath, 'filePath');
        //   //提示加载中
        //   util.showLoading();
        //   // 单次下载允许的最大文件为 200MB
        //   wx.downloadFile({
        //     url: fileLink,
        //     success: function (res) {
        //       if (res.statusCode != 200) {
        //         util.hideLoadingWithErrorTips();
        //         return false;
        //       }
        //       var Path = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
        //       wx.saveFile({
        //         tempFilePath: Path,
        //         success: function (res) {
        //           var savedFilePath = res.savedFilePath;
        //           // 将文件保存为 item.name
        //           wx.saveFile({
        //             tempFilePath: savedFilePath,
        //             filePath: wx.env.USER_DATA_PATH + '/' + item.name,
        //             success: function (res) {
        //               wx.openDocument({
        //                 filePath: res.savedFilePath,
        //                 showMenu: true,
        //                 success: function (res) {
        //                   util.hideLoading();
        //                 },
        //               });
        //             },
        //             fail: function (err) {
        //               util.hideLoadingWithErrorTips();
        //             }
        //           });
        //         },
        //         fail: function (err) {
        //           util.hideLoadingWithErrorTips();
        //         }
        //       });
        //     },
        //     fail: function (err) {
        //       util.hideLoadingWithErrorTips();
        //     },
        //   });
        // }
packageBookService/pages/bookServices/detail/index.js
@@ -855,6 +855,7 @@
        SysType: 'CmsFolder',
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        learnSelectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
packageDomain/pages/resourceDetails/myAudio/index.js
@@ -268,6 +268,7 @@
        jsek_resourceBrief: [],
        jsek_link: [],
        jsek_questionBank: [],
        learnSelectType: [],
        learnSelectType: []
      },
      pading: {
pages/bookExhibitionList/index.js
@@ -87,9 +87,7 @@
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.bookExhibitionGet()
    this.keyProjectsGet(this.data.newPrice)
    // this.setData({
    //   'product.value': '*',
    // });
@@ -102,12 +100,12 @@
    })
    watch.setWatcher(this);
    let that = this;
    setTimeout(function () {
      that.data.name = "测试watch变化了"
    }, 500)
    // watch.setWatcher(this);
    // let that = this;
    // setTimeout(function () {
    //   that.data.name = "测试watch变化了"
    // }, 500)
    // console.log(11111);
  },
  watch: {
    name: function (newVal, oldVal) {
@@ -129,12 +127,8 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.bookExhibitionGet()
    this.keyProjectsGet(this.data.newPrice)
  },
  /**
@@ -434,6 +428,7 @@
      this.bookExhibitionGet(newValue)
    }
    this.onLoad()
  },
  // 重点项目