yiming
2024-04-29 4496721cd3af3c68ed4d55218d3e83ea0664c57e
bug3
13个文件已修改
242 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/tree/index.js 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.wxml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.wxss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxss 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -61,7 +61,8 @@
    selectAll: [],
    shoppingCart: true,
    stop: false,
    cart: true
    cart: true,
    canExecute: true
  },
  ready() {},
@@ -134,13 +135,25 @@
    // 跳转音视频播放器
    goPlayer(e) {
      // 检查登录状态
      const token = wx.getStorageSync(app.config.tokenKey);
      if (token) {
        const item = e.currentTarget.dataset.item;
        const parent = e.currentTarget.dataset.parent;
        const parentProductLinkPath = parent ? parent.productLinkPath : wx.getStorageSync('teachResourcesPath')
        const parentName = parent ? parent.name : '教学资源'
        let url;
        if (this.properties.isShowCheck && this.resourceIsBuy(item)) {
          return false;
        }
@@ -187,8 +200,26 @@
          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}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`,
        });
        console.log(item, '7899');
        if (item.selectType == "document" || item.selectType == "pdf") {
        // || item.selectType == "pdf"
        if (item.selectType == "pdf") {
          console.log(item, '79825');
          const fileLink = item.file ? item.file : item.freeFile
          console.log(fileLink);
          wx.navigateTo({
            url: "/packageBookService/pages/components/webView/index?md5=" +
              fileLink +
              "&fileName=" +
              item.name +
              "&fileType=" +
              item.selectType + "&bookBuy=true"
          });
        }
        if (item.selectType == "document") {
          // freeFile
          if (item.selectType == "document") {
@@ -228,67 +259,31 @@
              util.hideLoadingWithErrorTips();
            },
          });
        }
<<<<<<< Updated upstream
=======
        // 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();
        //     },
        //   });
        // }
>>>>>>> Stashed changes
        if (item.selectType == "webpage") {
          this.setData({
            webpageSrc: item.jsek_link,
          });
          console.log(this.data.webpageSrc, "webpageSrc");
        }
      }
    },
packageBookService/pages/bookServices/detail/index.js
@@ -2024,7 +2024,9 @@
        this.data.bookBuy +
        "&bookId=" +
        this.data.bookDetail.id,
    });
    debugger
  },
  //样书申请
packageBookService/pages/bookServices/list/index.js
@@ -272,6 +272,7 @@
        "secondList.options": options,
      });
      const second = [this.data.secondCode];
      console.log(second);
      this.setData({
        "secondList.value": second,
      });
packageDomain/pages/resourceDetails/document/index.js
@@ -1,4 +1,5 @@
// pages/resourceDetails/document/index.js
import Toast from 'tdesign-miniprogram/toast/index';
const app = getApp()
Page({
@@ -6,6 +7,11 @@
   * 页面的初始数据
   */
  data: {
    visible: false,
    showIndex: false,
    closeBtn: false,
    deleteBtn: false,
    images: [],
    webpageSrc: '',
    navBarHeight: '',
    barHeight: '',
@@ -283,6 +289,7 @@
        showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile,
      })
      console.log(this.data.showData, 'showData');
    }
    // 下载文件zip
    if (item.selectType == 'zip') {
@@ -324,10 +331,58 @@
    naturalResources.forEach(function (item) {
      // console.log(item);
    });
  }
  },
  onClick() {
    this.setData({
      images: [
        this.data.showData,
        // 'https://tdesign.gtimg.com/mobile/demos/swiper2.png',
      ],
      showIndex: true,
      visible: true,
    });
  },
  onChange(e) {
    const {
      index
    } = e.detail;
    console.log('change', index);
  },
  onDelete(e) {
    const {
      index
    } = e.detail;
    Toast({
      context: this,
      selector: '#t-toast',
      message: `删除第${index + 1}个`,
    });
  },
  onClose(e) {
    const {
      trigger
    } = e.detail;
    console.log(trigger);
    this.setData({
      visible: false,
    });
  },
  //预览图片,放大预览
  preview(event) {
    console.log(event.currentTarget.dataset.src)
    let currentUrl = event.currentTarget.dataset.src
    wx.previewImage({
      current: currentUrl, // 当前显示图片的http链接
      // urls: this.data.showData // 需要预览的图片http链接列表
    })
  },
})
packageDomain/pages/resourceDetails/document/index.json
@@ -3,6 +3,8 @@
  "usingComponents": {
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-button": "tdesign-miniprogram/button/button",
    "t-image": "tdesign-miniprogram/image/image"
    "t-image": "tdesign-miniprogram/image/image",
    "t-toast": "tdesign-miniprogram/toast/toast",
    "t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer"
  }
}
packageDomain/pages/resourceDetails/document/index.wxml
@@ -11,9 +11,9 @@
<view class="titleNameBox" wx:if="{{selectType != 'webpage'}}">
  {{titleName}}
</view>
<!-- bind:tap="onClick" -->
<view class="pictureBox" wx:if="{{selectType == 'picture'}}">
  <image src="{{showData}}" mode="aspectFit" />
  <image src="{{showData}}" mode="aspectFit" data-src="{{showData}}" bindtap="preview" />
</view>
<view wx:if="{{selectType == 'zip'}}">
@@ -44,3 +44,9 @@
<web-view wx:if="{{selectType == 'webpage'}}" src="{{webpageSrc}}"></web-view>
<!-- <button bind:tap="handleTap">点位</button> -->
<!-- <t-button theme="primary" size="large" variant="outline" block>基础图片预览</t-button> -->
<t-toast id="t-toast" />
<t-image-viewer usingCustomNavbar deleteBtn="{{deleteBtn}}" closeBtn="{{closeBtn}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer>
packageDomain/pages/resourceDetails/document/index.wxss
@@ -45,7 +45,7 @@
}
.titleNameBox {
  height: 77rpx;
  min-height: 77rpx;
  background: #FFFFFF;
  box-shadow: 0rpx 9rpx 9rpx 2rpx rgba(0, 0, 0, 0.06);
  padding: 20rpx 50rpx;
@@ -60,9 +60,11 @@
  display: flex;
  justify-content: center;
  margin-top: 160rpx;
  width: 100%;
  height: 100%;
}
.pictureBox image {
  /* width: 520rpx;
  height: 800rpx; */
  width: 100%;
  height: 100%;
}
packageDomain/pages/resourceDetails/myVideo/index.wxml
@@ -12,7 +12,8 @@
  <!-- 视频  -->
  <view class="videoBox" wx:if="{{videoChange}}">
    <!-- autoplay='false' 是否自动播放 -->
    <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video>
    <!-- <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> -->
    <video src="{{showData}}"></video>
  </view>
pages/bibliographyList/index.js
@@ -217,6 +217,7 @@
        },
        SysType: 'CmsItem'
      }).then(res => {
        console.log(res);
        res.datas.forEach(item => {
          item.determine = true
        })
@@ -313,6 +314,7 @@
      const item = event.currentTarget.dataset.item
      console.log(item);
      if (item.fileType == "pdf") {
        wx.navigateTo({
          url: "/packageBookService/pages/components/webView/index?md5=" +
            item.freeFile +
@@ -323,9 +325,9 @@
          // "&freePage=" +
          // this.data.fileInfo.freePage +
          // +
          // "&bookId=" +
          // this.data.bookDetail.id,
            +
            "&bookId=" +
            item.id,
        });
      } else {
        Toast({
@@ -375,7 +377,7 @@
        }
      } else if (this.data.tabValue == 1) {
      } else if (this.data.tabValue == 2) {
        if (this.data.teacherList.length < this.data.teacherTotal) {
          this.setData({
@@ -394,10 +396,12 @@
          }, 100)
        }
        console.log(2);
      } else if (this.data.tabValue == 2) {
        if (this.data.vocationalList.length < this.data.vocationalTotal && this.data.vocationalList.length > 9) {
      } else if (this.data.tabValue == 1) {
        console.log(this.data.vocationalList.length);
        console.log(this.data.vocationalTotal);
        if (this.data.vocationalList.length < this.data.vocationalTotal) {
          this.setData({
            isMore: true,
            start: this.data.start + 1
pages/bibliographyList/index.wxml
@@ -28,10 +28,14 @@
    </view>
    <t-tabs class="contentBox" defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel">
      <t-tab-panel label="高等教育({{higherTotal}})" value="0">
        <view wx:if="{{higherList.length <= 0}}" class="noDataBox">
          <t-empty icon="folder-open" description="暂无数据" />
        </view>
        <view wx:else class="outsideHigherBox">
          <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index">
            <view class="outsideHigherImageBox">
              <view class="higherImageBox">
@@ -51,6 +55,10 @@
          <text wx:if="{{isMore == false}}">没有更多了</text>
        </view>
      </t-tab-panel>
      <t-tab-panel label="职业教育({{vocationalTotal}})" value="1">
        <view wx:if="{{vocationalList.length <= 0}}" class="noDataBox">
@@ -60,7 +68,7 @@
        <view wx:else class="outsideHigherBox">
          <view class="higherBox" wx:for="{{vocationalList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="downloadData" data-item="{{item}}">
          <view class="higherBox" wx:for="{{vocationalList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}">
            <view class="outsideHigherImageBox">
              <view class="higherImageBox">
                <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" />
@@ -87,7 +95,7 @@
          <t-empty icon="folder-open" description="暂无数据" />
        </view>
        <view wx:else class="outsideHigherBox">
          <view class="higherBox" wx:for="{{teacherList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="downloadData">
          <view class="higherBox" wx:for="{{teacherList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}">
            <view class="outsideHigherImageBox">
              <view class="higherImageBox">
                <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" />
pages/bibliographyList/index.wxss
@@ -30,7 +30,7 @@
  /* box-shadow: 10rpx 10rpx 10rpx 10rpx rgba(0, 0, 0, 0.08); */
  box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08);
  margin: 30rpx 15rpx;
  background-color: #fff;
  /* background-color: #fff; */
  margin-bottom: 0rpx ;
}
@@ -135,7 +135,8 @@
  color: #999;
  height: 80rpx;
  font-size: 28rpx;
  --td-loading-color: #ff6c00
  --td-loading-color: #ff6c00;
  margin-top: 80rpx;
}
.loadinBox {
@@ -236,7 +237,7 @@
  background-position: 100% 100%; */
  background-image: url(https://jsek.bnuic.com/home/image/click-icon.png);
  background-position: 85% center;
  background-size: 30% 50%;
  background-size: 20% 50%;
  /* 将背景图片位置设置为靠右 */
}
@@ -245,5 +246,10 @@
}
page {
  background: #F2F3F8;
  background: #F2F3F8 !important;
}
.scrollViewBox {
  height: calc(100vh - 326rpx);
  /* width: calc(100vw - 60rpx); */
}
pages/bookExhibitionList/index.js
@@ -52,7 +52,7 @@
      ],
    },
    multipleSelect: {
      // value: [],
      value: [],
      options: [],
    },
    navBarHeight: '',
@@ -105,7 +105,7 @@
    // setTimeout(function () {
    //   that.data.name = "测试watch变化了"
    // }, 500)
    // console.log(11111);
    console.log(11111);
  },
  watch: {
    name: function (newVal, oldVal) {
@@ -444,7 +444,11 @@
      value
    } = event.detail;
    // 确认操作的处理逻辑
    this.data.keynoteValue = value
    // this.data.keynoteValue = value
    this.setData({
      keynoteValue: value,
    })
    this.bookExhibitionGet()
  },
pages/bookExhibitionList/index.wxml
@@ -37,7 +37,7 @@
          <!-- disabled="{{keynoteDisabled}}" -->
          <t-dropdown-item label=" 重点项目" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset">
          <t-dropdown-item label=" 重点项目" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" value="{{multipleSelect.value}}">
          </t-dropdown-item>
          <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" />
        </t-dropdown-menu>