yiming
2024-04-29 c476915fdcb57387459ce6da1b43a502f4168628
标题
4个文件已修改
30 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/tree/index.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -187,6 +187,7 @@
        if (item.selectType == "document" || item.selectType == "pdf") {
          // freeFile
          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
          console.log(fileLink, "fileLink");
@@ -195,6 +196,7 @@
          // 单次下载允许的最大文件为 200MB
          wx.downloadFile({
            url: fileLink,
            filePath: wx.env.USER_DATA_PATH + `/${item.name}.${item.selectType}`,
            success: function (res) {
              console.log(res, "wx.downloadFile success res");
              if (res.statusCode != 200) {
@@ -202,8 +204,9 @@
                return false;
              }
              var Path = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
              let data = res.filePath;
              wx.openDocument({
                filePath: Path,
                filePath: data,
                showMenu: true,
                success: function (res) {
                  console.log("打开成功");
pages/bookExhibitionList/index.js
@@ -87,7 +87,9 @@
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.bookExhibitionGet()
    this.keyProjectsGet(this.data.newPrice)
    // this.setData({
    //   'product.value': '*',
    // });
@@ -100,12 +102,12 @@
    })
    // watch.setWatcher(this);
    // let that = this;
    // setTimeout(function () {
    //   that.data.name = "测试watch变化了"
    // }, 5000)
    //
    watch.setWatcher(this);
    let that = this;
    setTimeout(function () {
      that.data.name = "测试watch变化了"
    }, 500)
  },
  watch: {
    name: function (newVal, oldVal) {
pages/cart/index.js
@@ -11,6 +11,7 @@
Page({
  data: {
    price: '',
    loading: true,
    hidden: true,
    swipeOpened: false,
@@ -88,9 +89,11 @@
        totalSize: res.totalSize
      })
      res.datas.forEach(item => {
        this.setData({
          bookId: res.id,
          bookName: res.name
          bookName: res.name,
          price: item.saleMethod.price.toFixed(2),
        })
        item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160');
        // this.setData({
pages/cart/index.wxml
@@ -36,7 +36,7 @@
                <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view>
              </view>
              <view wx:if="{{item.saleMethod.price != 0}}">
                ¥{{item.saleMethod.price}}
                ¥{{price}}
              </view>
              <view wx:else class="descriptionBox"> 立即领取</view>
            </view>
@@ -72,7 +72,9 @@
    <view class="settlementBox">
      <view class="totalPrice">总价:<text class="totalPriceText">¥{{totalPrice}}</text></view>
      <view class="buttonBox">
        <t-button  class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage"> <view >去结算({{selectedCount}})</view> </t-button>
        <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage">
          <view>去结算({{selectedCount}})</view>
        </t-button>
      </view>
    </view>
  </view>