yiming
2024-03-15 7231b5929a66bb1ec3b832be85f5e3f6ce40ad9f
feat: 十大

范德萨

BREAKING CHANGE: 第三方
1个文件已删除
31个文件已修改
3个文件已添加
1084 ■■■■■ 已修改文件
pages/bibliographyList/index.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionDetails/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionDetails/index.wxss 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/components/tree/components/util.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/components/tree/index.js 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/components/tree/index.wxml 161 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/index.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/index.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/index.wxml 189 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxss 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.wxml 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.wxss 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/document/index.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/document/index.wxss 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.wxml 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.wxss 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.wxss 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/images/bibliographyList/square.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/bibliographyList/square@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
static/video/sea.mp4 补丁 | 查看 | 原始文档 | blame | 历史
style/theme.wxss 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.js
@@ -15,7 +15,8 @@
      teacherTotal: 0,
      value: '',
      BarHeight: '',
      navBarHeight: ''
      navBarHeight: '',
    },
    /**
@@ -226,9 +227,9 @@
      console.log(111);
      const item = event.currentTarget.dataset.item;
      // console.log(item.datas.freeFile.Value);
      const URL = 'http://182.92.203.7:3001/file/api/ApiDownload?md5=' + item.datas.freeFile.Value
      const URL = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.datas.freeFile.Value
      item.determine = false
      console.log(URL, 'URL');
      setTimeout(() => {
        if (URL) {
          item.determine = true
pages/bibliographyList/index.wxml
@@ -14,7 +14,6 @@
</view>
<!--状态栏高度 -->
<!-- <view style="width: 100%; height:{{BarHeight}}px;"></view>
<view style="width: 70%; height:{{navBarHeight}}px;">
pages/bibliographyList/index.wxss
@@ -110,4 +110,13 @@
  box-sizing: border-box;
  line-height: 75rpx;
  height: 75rpx;
}
.t-tabs__item--active {
  color: #FF6C00 !important;
}
.t-tabs__track {
  background-color: #FF6C00 !important;
}
pages/bookExhibitionDetails/index.wxml
@@ -18,7 +18,7 @@
<image class="partingBox" src="/static/images/bookExhibitionDetails/Parting.png" mode="" />
<image class="partingBox" src="/static/images/bookExhibitionDetails/Parting.png" mode="aspectFill" />
<image class="bannerBox" src="{{bookImage}}" mode="" />
pages/bookExhibitionDetails/index.wxss
@@ -16,15 +16,33 @@
  font-size: 40rpx;
  font-weight: bold;
  margin-bottom: 5rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.titleBox {
  height: 60rpx;
  font-weight: 800;
  font-size: 45rpx;
  display: flex;
  justify-content: center;
  padding: 0 30rpx;
  /* text-indent: 6%; */
  /* overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1; */
  margin: 0 130rpx;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.informationBox {
pages/bookExhibitionList/index.js
@@ -29,7 +29,6 @@
      options: [
        {
          value: '*',
          label: '总分类',
        },
        {
@@ -50,7 +49,9 @@
          price: 'jsek_teacherEducation',
          label: '教师教育',
        },
      ],
    },
    multipleSelect: {
      value: [],
@@ -169,6 +170,8 @@
      });
      this.bookExhibitionGet(); // 调用方法加载更多数据
      console.log(1111);
    }
  },
@@ -199,6 +202,7 @@
      queryType: '*',
      fields: {
        jsek_link: [],
        subtitle: [],
        'bookClassification*': this.data.keynoteValue || [],
        ...searchObj
      },
@@ -208,7 +212,10 @@
      //   width: 100
      // },
    }).then(res => {
      res.datas.forEach((item) => {
        item.subtitleName = item.subtitle + item.name
      })
      console.log(res, 'item');
      this.data.total = res.total
      //  list.push(res.datas)
@@ -217,7 +224,7 @@
      this.setData({
        bookExhibitionList: list
      })
      //取消
      wx.hideLoading()
      // console.log(this.data.bookExhibitionList, '数据');
pages/bookExhibitionList/index.wxml
@@ -35,14 +35,14 @@
<view class="assembleContent">
  <view class="titleBox">
    <view class="frameBox"></view>
     <image class="titleTextBox" src="/static/images/bookExhibitionList/zhuantitaolun.png" mode="aspectFit"/>
    <image class="titleTextBox" src="/static/images/bookExhibitionList/zhuantitaolun.png" mode="aspectFit" />
  </view>
  <view class="outside">
    <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}">
      <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" />
      <image wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" />
      <view class="textBox" title="{{item.name}}"> <text>{{item.name}}</text></view>
      <view class="textBox" title="{{item.subtitleName}}"> <text>{{item.subtitleName}}</text></view>
    </view>
  </view>
pages/bookServices/detail/components/tree/components/util.js
New file
@@ -0,0 +1,27 @@
/* 加载动画相关 */
const showLoading = (tips = '加载中...') => {
  wx.showNavigationBarLoading()
  wx.showLoading({
    title: tips,
  })
}
const hideLoading = () => {
  wx.hideLoading()
  wx.hideNavigationBarLoading()
}
const hideLoadingWithErrorTips = (err = '加载失败...') => {
  hideLoading()
  wx.showToast({
    title: err,
    icon: 'error',
    duration: 2000
  })
}
module.exports = {
  showLoading: showLoading,
  hideLoading: hideLoading,
  hideLoadingWithErrorTips: hideLoadingWithErrorTips,
}
pages/bookServices/detail/components/tree/index.js
@@ -1,5 +1,6 @@
import Message from 'tdesign-miniprogram/message/message';
const util = require('./components/util') // 引入封装过的加载提示
const app = getApp()
Component({
  properties: {
@@ -33,11 +34,14 @@
    }
  },
  data: {
    activeValues: [0]
    activeValues: [0],
    webpageSrc: ''
  },
  onShow() {
  },
  methods: {
    // 节点展开
    handleChange(e) {
@@ -83,17 +87,69 @@
      //   "pages/resourceDetails/myAudio/index",
      // "pages/resourceDetails/myVideo/index",
      // "pages/resourceDetails/document/index",
      let url
      if (item.selectType == 'video') {
        url = '/pages/resourceDetails/myVideo/index'
      } else if (item.selectType == 'audio') {
        url = '/pages/resourceDetails/myAudio/index'
      } else {
      } else if (item.selectType == 'picture' || item.selectType == 'zip') {
        url = '/pages/resourceDetails/document/index'
      }
      // else {
      //
      // }
      wx.navigateTo({
        url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`,
      })
      if (item.selectType == 'document' || item.selectType == 'pdf') {
        const fileLink = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file
        console.log(fileLink, 'fileLink');
        //提示加载中
        util.showLoading()
        // 单次下载允许的最大文件为 200MB
        wx.downloadFile({
          url: fileLink, // 地址已打码,自己换个其他的地址("https://www.xxxxx.com/file/测试通知.pdf")
          success: function (res) {
            console.log(res, "wx.downloadFile success res")
            if (res.statusCode != 200) {
              util.hideLoadingWithErrorTips()
              return false
            }
            var Path = res.tempFilePath //返回的文件临时地址,用于后面打开本地预览所用
            wx.openDocument({
              filePath: Path,
              showMenu: true,
              success: function (res) {
                console.log('打开成功');
                util.hideLoading()
              }
            })
          },
          fail: function (err) {
            console.log(err, "wx.downloadFile fail err");
            util.hideLoadingWithErrorTips()
          }
        })
      }
      if (item.selectType == 'webpage') {
        console.log(11);
        this.setData({
          webpageSrc: item.jsek_link
        })
        console.log(this.data.webpageSrc, 'webpageSrc');
      }
    },
    // 拿到所有项
    getAllChildren(id) {
@@ -116,6 +172,7 @@
          result.push(...item.children);
        }
      }
      console.log(this.properties.treeList);
      this.properties.treeList.forEach(item => {
        findChildren(item);
      });
@@ -180,6 +237,7 @@
    // 章节勾选
    checkResourceTitle(e) {
      const item = e.currentTarget.dataset.item
      console.log(item, 'item');
      let list = this.flattenTree([item])
      let ids = []
      list.forEach(item => {
@@ -188,5 +246,8 @@
      const tab = this.findAndUpdateItemsByIds([item], ids)
      console.log(ids, tab);
    }
  },
  onCloudShoppingCart() {
    console.log(this.properties.treeList);
  }
})
pages/bookServices/detail/components/tree/index.wxml
@@ -1,168 +1,59 @@
<view class="tree">
  <t-collapse default-value="{{activeValues}}" bind:change="handleChange">
    <t-collapse-panel
      wx:for="{{treeList}}"
      wx:for-item="item"
      wx:for-index="index"
      wx:key="id"
      value="{{index}}"
      expandIcon
    >
    <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{index}}" expandIcon>
      <view slot="header" class="header-title">
        <view wx:if="{{tab == 'jsek_cloudLearning'}}">
          <t-checkbox
            icon="rectangle"
            checked="{{item.checked}}"
            data-item="{{item}}"
            bind:change="checkResourceTitle"
          />
          <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" bind:change="checkResourceTitle" />
        </view>
        <text>{{item.name}}</text>
      </view>
      <view
        class="list"
        wx:for="{{item.children}}"
        wx:for-item="citem"
        wx:for-index="cindex"
        wx:key="cindex"
      >
      <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex">
        <!-- // 判断 无子项 且为商品item 直接显示 -->
        <view
          class="listItems"
          wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}"
        >
          <view
            class="itemsInfo"
            wx:if="{{citem.name}}"
            data-item="{{citem}}"
            data-index="{{cindex}}"
          >
            <view
              class="contentBox"
              bind:tap="goPlayer"
              data-item="{{citem}}"
              data-parent="{{item}}"
            >
        <view class="listItems" wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}">
          <view class="itemsInfo" wx:if="{{citem.name}}" data-item="{{citem}}" data-index="{{cindex}}">
            <view class="contentBox" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}">
              <!-- 教学资源 云学习 图标 -->
              <view
                class="box-image"
                style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"
              >
              <view class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}">
                <view class="checkBox" wx:if="{{tab == 'jsek_cloudLearning'}}">
                  <t-checkbox
                    icon="rectangle"
                    checked="{{citem.checked}}"
                    disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}"
                    catch:change="checkResource"
                    data-item="{{citem}}"
                  />
                  <!-- checked="{{citem.checked}}"  -->
                  <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" catch:change="checkResource" data-item="{{citem}}" />
                </view>
                <!-- 教学资源图标 -->
                <view class="teach-icon">
                  <t-image
                    wx:if="{{citem.selectType == 'audio'}}"
                    src="/static/images/bookService/detail/audioIcon.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{citem.selectType == 'video'}}"
                    src="/static/images/bookService/detail/video.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{citem.selectType == 'pdf'}}"
                    src="/static/images/bookService/detail/pdf.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{citem.selectType == 'webpage'}}"
                    src="/static/images/bookService/detail/net.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{citem.selectType == 'picture'}}"
                    src="/static/images/bookService/detail/picture.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{citem.selectType == 'zip'}}"
                    src="/static/images/bookService/detail/zip.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}"
                    src="/static/images/bookService/detail/word.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}"
                    src="/static/images/bookService/detail/excel.png"
                    mode="aspectFill"
                  />
                  <t-image
                    wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}"
                    src="/static/images/bookService/detail/PPT.png"
                    mode="aspectFill"
                  />
                  <t-image wx:if="{{citem.selectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" />
                  <t-image wx:if="{{citem.selectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" />
                  <t-image wx:if="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" />
                  <t-image wx:if="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" />
                  <t-image wx:if="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" />
                  <t-image wx:if="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" />
                  <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" />
                  <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" />
                  <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" />
                </view>
                <!-- 云学习图标 -->
                <view> </view>
                <!-- 名称 -->
                <text
                  class="name"
                  style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}"
                  >{{citem.name}}</text
                >
                <text class="name" style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}">{{citem.name}}</text>
              </view>
              <!-- 教学资源类型 -->
              <view class="teachClass"> {{citem.resourceClass}} </view>
              <view
                class="teach-btn"
                wx:if="{{tab == 'jsek_teachingResources'}}"
              >
              <view class="teach-btn" wx:if="{{tab == 'jsek_teachingResources'}}">
                <!--  下载按钮 -->
                <t-image
                  src="/static/images/bookService/detail/download-icon.png"
                  width="16"
                  height="16"
                  class="download"
                  data-value="{{citem}}"
                  catchtap="downloadTeach"
                ></t-image>
                <t-image src="/static/images/bookService/detail/download-icon.png" width="16" height="16" class="download" data-value="{{citem}}" catchtap="downloadTeach"></t-image>
              </view>
              <view wx:if="{{tab == 'jsek_cloudLearning'}}">
                <!-- 云学习试看图标 -->
                <t-image
                  src="/static/images/bookService/detail/shikan.png"
                  class="testSee"
                  wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"
                ></t-image>
                <t-image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></t-image>
                <!-- 云学习加入购物车图标 -->
                <t-image
                  src="/static/images/bookService/detail/cart.png"
                  wx:if="{{citem.isShopCar}}"
                  class="shopCar"
                ></t-image>
                <t-image src="/static/images/bookService/detail/cart.png" wx:if="{{citem.isShopCar}}" class="shopCar" bind:tap="onCloudShoppingCart"></t-image>
                <!-- 云学习购买图标 -->
                <t-image
                  src="/static/images/bookService/detail/need-buy.png"
                  class="need-buy"
                  wx:if="{{citem.isbuy }}"
                ></t-image>
                <t-image bind:tap="onCloudShoppingCart" src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></t-image>
              </view>
            </view>
          </view>
        </view>
        <!-- // 判断 不是商品 有子项 递归组件 -->
        <tree
          wx:else
          bookInfo="{{bookInfo}}"
          treeList="{{[citem]}}"
          itemId="{{itemId}}"
          tab="{{tab}}"
          openTeachids="{{openTeachids}}"
          openLearnids="{{openLearnids}}"
        ></tree>
        <tree wx:else bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}"></tree>
      </view>
      <view class="listItems" wx:if="{{children.length <= 0 && !loading}}">
        暂无数据
@@ -173,3 +64,5 @@
    </t-collapse-panel>
  </t-collapse>
</view>
<web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view>
pages/bookServices/detail/index.js
@@ -1,5 +1,6 @@
// pages/bookServices/detail/index.js
import Message from 'tdesign-miniprogram/message/index.js';
import Toast from 'tdesign-miniprogram/toast/index';
const app = getApp();
Page({
  /**
@@ -41,6 +42,7 @@
    loading: false,
    isShowTeachDownload: false,  // 提示PC下载弹窗状态
    confirmBtn: { content: '我知道了', variant: 'base' },
  },
  resetTree: function (e) {
@@ -380,6 +382,8 @@
                item.checked = false
              })
              const list = await this.getAllResource(res.datas.cmsDatas[0].datas)
              console.log(list, 'list');
              this.setData({
                teach: list,
                loading: false
@@ -507,18 +511,89 @@
  },
  // 图书添加购物车
  addBookShopcCar() {
  async addBookShopcCar() {
    const shoppingCartGetId = []
    let query = {
      start: 0,
      size: 999,
      filterList: [],
      searchList: []
    }
    const res = await app.MG.store.getShoppingCartProductList(query)
    res.datas.forEach((item) => {
      shoppingCartGetId.push(item.saleMethod.id)
    })
    console.log(shoppingCartGetId, 'shoppingCartGetId');
    console.log(this.data.bookDetail.defaultSaleMethodId, 'this.data.bookDetail.defaultSaleMethodId');
    const determine = shoppingCartGetId.some((item) => item == this.data.bookDetail.defaultSaleMethodId)
    console.log(determine);
    if (!determine) {
      let query = {
        requests: [
          {
            saleMethodId: this.data.bookDetail.defaultSaleMethodId,
            storeEventId: null,
            agentCode: '电子书'
          }
        ]
      }
      const addRes = app.MG.store.addShoppingCart(query)
      this.showSuccessToast()
    } else {
      Toast({
        context: this,
        selector: '#t-toast',
        message: '已添加',
        theme: 'success',
        direction: 'column',
      });
    }
  },
  showSuccessToast() {
    Toast({
      context: this,
      selector: '#t-toast',
      message: '添加成功',
      theme: 'success',
      direction: 'column',
    });
  },
  async buyBook() {
    let bookOrdersId = ''
    let query = {
      remarks: '电子书',
      requests: [
        {
          saleMethodId: this.data.bookDetail.defaultSaleMethodId,
          storeEventId: null,
          agentCode: '电子书'
          count: 1
        }
      ]
    }
    const addRes = app.MG.store.addShoppingCart(query)
    // 发起订单初始化请求并等待结果
    const res = await app.MG.store.initOrder(query)
    // 获取订单号并赋值给 orderNumber.value
    bookOrdersId = res.orderNumber
    console.log(bookOrdersId);
    // 检查订单号是否存在
    if (bookOrdersId) {
      const url = '/pages/cart/paymentPage/index?orderNumber=' + bookOrdersId
      wx.navigateTo({
        url
      })
    } else {
      console.log(222);
    }
  },
  // 获取教学资源下载是否申请通过
  getApplyInfo(id) {
    // 获取当前时间
@@ -908,7 +983,7 @@
    if (initOrderRes.orderNumber) {
      // bookService: orderNumber.value,  少传这个 ,暂时不知道有什么用
      wx.navigateTo({
        url: `/pages/cart/paymentPage/index?&bookId=${this.data.bookDetail.id}&bookName=${this.data.bookDetail.name}&orderNum=${initOrderRes.orderNumber}`,
        url: `/pages/cart/paymentPage/index?&bookId=${this.data.bookDetail.id}&bookName=${this.data.bookDetail.name}&orderNumber=${initOrderRes.orderNumber}`,
      })
    } else {
      // 订单号不存在,显示警告消息
pages/bookServices/detail/index.json
@@ -1,4 +1,5 @@
{
  "component": true,
  "usingComponents": {
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-image": "tdesign-miniprogram/image/image",
@@ -14,7 +15,8 @@
    "tree": "/pages/bookServices/detail/components/tree/index",
    "suggest": "/pages/bookServices/detail/components/suggest/suggest",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-dialog": "tdesign-miniprogram/dialog/dialog"
    "t-dialog": "tdesign-miniprogram/dialog/dialog",
    "t-toast": "tdesign-miniprogram/toast/toast"
  },
  "navigationStyle": "custom",
  "onReachBottomDistance": 200
pages/bookServices/detail/index.wxml
@@ -3,48 +3,30 @@
<view style="width: 100%; height: {{barHeight}}px; "></view>
<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
  <view>
    <t-icon
      name="chevron-left"
      size="30"
      data-name="{{item}}"
      bind:click="goBack"
    />
    <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
  </view>
  <view class="navbar-title">{{options.name}}</view>
</view>
<t-toast id="t-toast" />
<scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom">
  <!-- 图书详情 -->
  <view class="book-box">
    <view class="book-detail">
      <view class="detail-left">
        <view class="book-img">
          <t-image
            src="{{bookDetail.icon}}"
            mode="aspectFill"
            width="120"
            height="170"
            aria-label="{{bookDetail.name}}"
          />
          <t-image src="{{bookDetail.icon}}" mode="aspectFill" width="120" height="170" aria-label="{{bookDetail.name}}" />
        </view>
        <view class="book-use">
          <view class="collect" bind:tap="setCollect">
            <view>
              <t-image
                src="/static/images/bookService/detail/collect.png"
                wx:if="{{!bookDetail.isFavourite}}"
              ></t-image>
              <t-image
                src="/static/images/bookService/detail/collecting.png"
                wx:if="{{bookDetail.isFavourite}}"
              ></t-image>
              <t-image src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}"></t-image>
              <t-image src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}"></t-image>
            </view>
            <view class="use-title">收藏</view>
          </view>
          <view class="suggest" bind:tap="suggestBtn">
            <view>
              <t-image
                src="/static/images/bookService/detail/suggest.png"
              ></t-image>
              <t-image src="/static/images/bookService/detail/suggest.png"></t-image>
            </view>
            <view class="use-title">我要建议</view>
          </view>
@@ -69,11 +51,7 @@
            <view class="li-title">出版时间:</view>
            <view class="li-content">{{bookDetail.publicationDate}}</view>
          </view>
          <view
            class="message-li"
            wx:if="{{bookDetail.class}}"
            style="height: 80rpx"
          >
          <view class="message-li" wx:if="{{bookDetail.class}}" style="height: 80rpx">
            <view class="li-title">图书分类:</view>
            <view class="class-name showTow">{{bookDetail.class}}</view>
          </view>
@@ -86,16 +64,11 @@
        <!-- 电子书售价 -->
        <view class="electron-price">
          <view>
            <t-image
              src="/static/images/bookService/detail/electon-price.png"
            ></t-image>
            <t-image src="/static/images/bookService/detail/electon-price.png"></t-image>
          </view>
          <view class="price">
            <view class="price-text"
              >¥{{bookDetail.price == '0.00' ? '免费' :bookDetail.price}}</view
            >
            <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}"
              >¥{{bookDetail.oldPrice}} <view class="line"></view>
            <view class="price-text">¥{{bookDetail.price == '0.00' ? '免费' :bookDetail.price}}</view>
            <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}">¥{{bookDetail.oldPrice}} <view class="line"></view>
            </view>
          </view>
          <view> </view>
@@ -103,131 +76,49 @@
        <!-- 纸质书售价 -->
        <view class="paper-price">
          <view>
            <t-image
              src="/static/images/bookService/detail/paper-price.png"
            ></t-image>
            <t-image src="/static/images/bookService/detail/paper-price.png"></t-image>
          </view>
          <view class="price"
            >¥{{bookDetail.paperPrice == '0.00' ? '免费' :
            bookDetail.paperPrice}}</view
          >
          <view class="price">¥{{bookDetail.paperPrice == '0.00' ? '免费' :
            bookDetail.paperPrice}}</view>
        </view>
      </view>
      <!-- 网店 -->
      <view class="book-web">
        <t-image
          src="/static/images/bookService/detail/jd.png"
          wx:if="{{bookDetail.JDLink}}"
          bind:tap="goShop"
          data-link="{{bookDetail.tmallLink}}"
          data-type="jd"
        ></t-image>
        <t-image
          src="/static/images/bookService/detail/tmall.png"
          width="32"
          height="22"
          bind:tap="goShop"
          data-link="{{bookDetail.tmallLink}}"
          wx:if="{{bookDetail.tmallLink}}"
        ></t-image>
        <t-image
          src="/static/images/bookService/detail/dangdang.png"
          bind:tap="goShop"
          data-link="{{bookDetail.dangdangLink}}"
          wx:if="{{bookDetail.dangdangLink}}"
        ></t-image>
        <t-image
          src="/static/images/bookService/detail/jd.png"
          bind:tap="goShop"
          data-link="{{bookDetail.weidianLink}}"
          wx:if="{{bookDetail.weidianLink}}"
        ></t-image>
        <t-image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" data-type="jd"></t-image>
        <t-image src="/static/images/bookService/detail/tmall.png" width="32" height="22" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" wx:if="{{bookDetail.tmallLink}}"></t-image>
        <t-image src="/static/images/bookService/detail/dangdang.png" bind:tap="goShop" data-link="{{bookDetail.dangdangLink}}" wx:if="{{bookDetail.dangdangLink}}"></t-image>
        <t-image src="/static/images/bookService/detail/jd.png" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}"></t-image>
      </view>
    </view>
  </view>
  <view class="book-resource">
    <t-tabs
      defaultValue="{{tabValue}}"
      bind:change="onTabsChange"
      t-class="custom-tabs"
      t-class-content="custom-panel"
      class="tab-class"
    >
    <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class">
      <t-tab-panel label="图书简介" value="brief" style="{{tabPanelstyle}}">
        <book-brief
          content="{{bookDetail.content}}"
          authorIntroduction="{{bookDetail.authorIntroduction}}"
        ></book-brief>
        <book-brief content="{{bookDetail.content}}" authorIntroduction="{{bookDetail.authorIntroduction}}"></book-brief>
      </t-tab-panel>
      <t-tab-panel label="电子书" value="1" style="{{tabPanelstyle}}">
        电子书
      </t-tab-panel>
      <t-tab-panel
        label="教学资源"
        value="jsek_teachingResources"
        class="{{loading ? 'loading': ''}}"
      >
      <t-tab-panel label="教学资源" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}">
        <view wx:if="{{!loading && teach.length}}">
          <teach-resource
            applyState="{{applyState}}"
            rejectCause="{{rejectCause}}"
            bind:applyResource="applyResource"
          ></teach-resource>
          <tree
            bookInfo="{{bookDetail}}"
            treeList="{{teach}}"
            tab="{{tabValue}}"
            applyState="{{applyState}}"
            bind:downloadTeach="downloadTeach"
            openTeachids="{{openTeachids}}"
          ></tree>
          <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" bind:applyResource="applyResource"></teach-resource>
          <tree bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach" openTeachids="{{openTeachids}}"></tree>
        </view>
        <t-loading
          theme="circular"
          size="60rpx"
          class="loading"
          loading="{{loading}}"
        />
        <t-loading theme="circular" size="60rpx" class="loading" loading="{{loading}}" />
      </t-tab-panel>
      <t-tab-panel
        label="云学习"
        value="jsek_cloudLearning"
        style="{{tabPanelstyle}}"
      >
      <t-tab-panel label="云学习" value="jsek_cloudLearning" style="{{tabPanelstyle}}">
        <view wx:if="{{!loading && learn.length}}">
          <learn-resource
            bind:getFreeResource="getFreeResource"
            bind:allAddShoppiingCar="allAddShoppiingCar"
            id="learn-resource"
          ></learn-resource>
          <tree
            bookInfo="{{bookDetail}}"
            tab="{{tabValue}}"
            treeList="{{learn}}"
            buyIds="{{buyIdList}}"
            openLearnids="{{openLearnids}}"
          ></tree>
          <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource"></learn-resource>
          <tree bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}"></tree>
        </view>
      </t-tab-panel>
      <t-tab-panel
        label="云测试"
        value="questionBank"
        style="{{tabPanelstyle}}"
      >
      <t-tab-panel label="云测试" value="questionBank" style="{{tabPanelstyle}}">
        <view wx:if="{{!loading && test.length}}">
          <test-resource
            list="{{test}}"
            bookInfo="{{bookDetail}}"
          ></test-resource>
          <test-resource list="{{test}}" bookInfo="{{bookDetail}}"></test-resource>
        </view>
      </t-tab-panel>
      <t-tab-panel label="云笔记" value="jesk_note" style="{{tabPanelstyle}}">
        <note
          bookInfo="{{bookDetail}}"
          id="note"
          class="note-list"
          bind:changeLoaidng="changeLoaidng"
        ></note>
        <note bookInfo="{{bookDetail}}" id="note" class="note-list" bind:changeLoaidng="changeLoaidng"></note>
      </t-tab-panel>
    </t-tabs>
  </view>
@@ -241,29 +132,15 @@
    </view>
    <view class="bottom-btn">
      <view>
        <t-image
          src="/static/images/bookService/detail/paper-book.png"
        ></t-image>
        <t-image src="/static/images/bookService/detail/paper-book.png"></t-image>
      </view>
      <view class="btn-text">纸质样书申请</view>
    </view>
    <view class="shopCar" bind:tap="addBookShopcCar">加入购物车</view>
    <view class="buy">立即购买</view>
    <view class="buy" bind:tap="buyBook">立即购买</view>
  </view>
</scroll-view>
<!-- 我要建议弹窗 -->
<suggest
  class="suggest-component"
  id="suggest-component"
  bookIcon="{{bookDetail.icon}}"
  bookName="{{bookDetail.name}}"
></suggest>
<suggest class="suggest-component" id="suggest-component" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest>
<!-- 教学资源下载提示弹窗 -->
<t-dialog
class="teachDownloadDialog"
  visible="{{isShowTeachDownload}}"
  title="提示"
  content="请前往PC端下载"
  confirm-btn="{{ confirmBtn }}"
  bind:confirm="closeTeachDownload"
/>
<t-dialog class="teachDownloadDialog" visible="{{isShowTeachDownload}}" title="提示" content="请前往PC端下载" confirm-btn="{{ confirmBtn }}" bind:confirm="closeTeachDownload" />
pages/cart/index.js
@@ -1,6 +1,7 @@
const app = getApp();
// import { getPublicImage } from '@/assets/js/middleGround/tool.js'
import { getPublicImage } from '../../assets/js/middleGround/tool';
import Toast from 'tdesign-miniprogram/toast/index';
Page({
  data: {
@@ -9,7 +10,8 @@
    checkAll: false,
    checkedList: [],
    selectedCount: 0,
    totalPrice: 0.00
    totalPrice: 0.00,
    type: ''
  },
  onLoad(options) {
@@ -39,6 +41,12 @@
    app.MG.store.getShoppingCartProductList(query).then(res => {
      res.datas.forEach(item => {
        item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160');
        console.log(item);
        console.log(item.saleMethod.type, 'item.saleMethod.type')
        this.setData({
          type: item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'
        })
      });
      this.setData({
@@ -101,19 +109,30 @@
    const selectedItems = this.data.shoppingCartData.filter(item => item.checked);
    console.log(selectedItems, 789);
    // console.log(selectedItems, 789);
    const selectedIds = selectedItems.map(item => item.id);
    console.log('选中的商品 id:', selectedIds);
    if (selectedIds.length) {
      app.MG.store.shoppingCartCreateOrder({ linkIds: selectedIds }).then(res => {
        console.log(res.orderNumber, 456);
        const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber
        wx.navigateTo({
          url
        });
    app.MG.store.shoppingCartCreateOrder({ linkIds: selectedIds }).then(res => {
      console.log(res.orderNumber, 456);
      const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber
      wx.navigateTo({
        url
      })
    } else {
      Toast({
        context: this,
        selector: '#t-toast',
        message: '请选择商品',
        theme: 'warning',
        direction: 'column',
      });
    }
    })
  }
pages/cart/index.json
@@ -4,6 +4,8 @@
    "t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
    "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell",
    "t-cell": "tdesign-miniprogram/cell/cell",
    "t-button": "tdesign-miniprogram/button/button"
    "t-button": "tdesign-miniprogram/button/button",
    "t-toast": "tdesign-miniprogram/toast/toast",
    "t-empty": "tdesign-miniprogram/empty/empty"
  }
}
pages/cart/index.wxml
@@ -1,12 +1,31 @@
<view class="outsideContentBox">
  <!-- <checkbox-group bindchange="HandelItemChange"> -->
  <view wx:if="{{!shoppingCartData}}" class="noDataBox">
    <t-empty icon="folder-open" description="暂无数据" font-size="80" />
  </view>
  <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index">
    <!-- <view class="contentBox"> -->
    <!-- <view class="contentCheckbox">
          <checkbox value="{{item.id}}" checked="{{item.checked}}"></checkbox>
        </view> -->
    <view class="itemWarp">
      <t-cell bordered="{{false}}" title="{{item.productMonWithLinkDto.product.name}}" description="¥{{item.saleMethod.price}}">
      <t-cell bordered="{{false}}">
        <view slot="title" class="titleBox">
          <view class="labelBox">
            <view class="eBook" wx:if="{{type == 'product'}}">电子书</view>
            <view wx:if="{{type == 'item'}}" class="cloudLearning">云学习</view>
          </view>
          <view class="boosName">
            {{item.productMonWithLinkDto.product.name}}
          </view>
        </view>
        <view slot="description" class="descriptionBox" wx:if="{{item.saleMethod.price != 0}}"> ¥{{item.saleMethod.price}}</view>
        <view wx:else slot="description" class="descriptionBox"> 立即领取</view>
        <view slot="left-icon" class="left-icon">
          <view class="contentCheckbox">
            <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" />
@@ -35,4 +54,6 @@
      <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage">去结算({{selectedCount}})</t-button>
    </view>
  </view>
</view>
</view>
<t-toast id="t-toast" />
pages/cart/index.wxss
@@ -56,25 +56,24 @@
.settlementBox {
  /* width: 100%; */
  width: 80%;
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
}
.totalPrice {
  flex: 1;
  /* margin: 0 50rpx; */
}
.buttonBox {
  /* margin: 0 30rpx; */
  margin-left: 140rpx;
  margin-right: 80rpx;
}
.tButtonBox {
  background-color: #FF6C00;
  /* background-color: #FF6C00; */
  width: 200rpx;
  height: 80rpx;
}
@@ -166,4 +165,75 @@
.imageStyle {
  width: 100%;
  height: 100%;
}
.t-checkbox {
  --td-checkbox-icon-checked-color: #FF6C00;
}
.t-checkbox--block {
  padding: 0 !important;
}
.t-button--default {
  background-color: #FF6C00 !important;
}
.noDataBox {
  width: 100%;
  margin-top: 200rpx;
  display: flex;
  justify-content: center;
  align-items: center;
}
page {
  background: #F2F3F8;
}
.titleBox {
  display: flex;
  flex-direction: row;
  margin: 15rpx;
}
.descriptionBox {
  margin: 15rpx;
}
.labelBox {
  width: 125rpx;
  height: 38rpx;
  font-size: 22rpx;
  color: #FFFFFF;
  font-family: PingFang SC, PingFang SC;
  margin-right: 30rpx;
  border-radius: 0px 0px 0px 5px;
}
.eBook {
  width: 100%;
  height: 100%;
  background: #FF6C00;
  text-align: center;
  line-height: 38rpx;
}
.cloudLearning {
  width: 100%;
  height: 100%;
  background: #5F92FD;
  text-align: center;
  line-height: 38rpx;
}
.boosName {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
pages/cart/paymentPage/index.wxml
@@ -1,68 +1,82 @@
<!--pages/cart/paymentPage/index.wxml-->
<view style="width: 100%; height: {{barHeight}}px; "></view>
<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
  <view>
    <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
<!-- 头部 -->
<view class="titleBox">
  <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
    <view>
      <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
    </view>
    <view class="navbar-title">提交订单</view>
  </view>
  <view class="navbar-title">提交订单</view>
</view>
<view class="content">
<view class="paymentPageBox">
  <!--
  <t-button t-class="wrapper" theme="primary" size="large" variant="outline" data-key="showCloseBtn" bind:tap="showDialog" block>
    带关闭按钮
  </t-button> -->
  <t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog">
    <view slot="content" class="slotContent">
      <view class="myQrcodeBox">
        <canvas style="width: 200px; height: 200px;margin:0 auto" canvas-id="myQrcode"></canvas>
        <view class="myQrcodeTextBox">微信扫码支付</view>
  <view class="content">
    <t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog">
      <view slot="content" class="slotContent">
        <view class="myQrcodeBox">
          <canvas style="width: 200px; height: 200px;margin:0 auto" canvas-id="myQrcode"></canvas>
          <view class="myQrcodeTextBox">微信扫码支付</view>
        </view>
      </view>
    </t-dialog>
    <view class="shoppingCartList">
      <view class="cartList" wx:for="{{productList}}" wx:key="index" wx:for-item="item" wx:for-index="index">
        <view class="imageBox">
          <image src="{{item.paymentIcon }}" mode="aspectFit" />
        </view>
        <view class="cartListContent">
          <view class="cartListDetails">{{item.orderSaleMethod.product.name}}</view>
          <view class="textBox">图书服务-电子书</view>
          <view class="priceBox">¥{{item.payPrice}}</view>
        </view>
      </view>
    </view>
  </t-dialog>
  <view class="shoppingCartList">
    <view class="cartList" wx:for="{{productList}}" wx:key="index" wx:for-item="item" wx:for-index="index">
      <image src="{{item.paymentIcon }}" mode="aspectFit" />
      <view class="cartListContent">
        <view class="cartListDetails">{{item.orderSaleMethod.product.name}}</view>
        <view class="textBox">图书服务-电子书</view>
        <view class="priceBox">¥{{item.payPrice}}</view>
    <view class="priceBreakdown">
      <view class="priceBreakdownContent">价格明细</view>
      <view class="amountMoney">
        <view>商品金额</view>
        <view>¥{{payPrice}}</view>
      </view>
      <view class="amount">
        <view>合计:¥{{payPrice}}</view>
      </view>
    </view>
  </view>
  <view class="priceBreakdown">
    <view class="priceBreakdownContent">价格明细</view>
    <view class="amountMoney">
      <view>商品金额</view>
      <view>¥{{payPrice}}</view>
    </view>
    <view class="amount">
      <view>合计:¥{{payPrice}}</view>
    </view>
  </view>
  <view class="interval"></view>
  <!-- <view class="interval"></view> -->
  <view class="paymentBox">
    <view class="residue">待支付:<text class="residueTextBox">¥{{payPrice}}</text></view>
@@ -70,5 +84,4 @@
      <t-button class="buttonBox" shape="round" bind:tap="confirmOrderGet">微信支付</t-button>
    </view>
  </view>
</view>
pages/cart/paymentPage/index.wxss
@@ -18,10 +18,12 @@
.content {
  width: 100%;
  height: 1250rpx;
  background-color: #F2F3F8;
  padding: 40rpx 0;
  padding-top: 1rpx;
  margin-top: 110rpx;
}
.shoppingCartList {
@@ -31,10 +33,15 @@
  margin: 30rpx 0;
}
image {
.imageBox {
  width: 150rpx;
  height: 210rpx;
  margin: 30rpx;
}
image {
  width: 100%;
  height: 100%;
}
.cartListContent {
@@ -74,10 +81,10 @@
}
.priceBreakdown {
  height: 280rpx;
  height: 250rpx;
  background: #fff;
  padding: 30rpx;
  margin-bottom: 120rpx;
}
.priceBreakdownContent {
@@ -117,6 +124,10 @@
  justify-content: space-between;
  padding: 30rpx;
  align-items: center;
  background-color: #fff;
  width: 100%;
  position: fixed;
  bottom: 0;
}
.residue {
@@ -132,6 +143,7 @@
.buttonBox {
  background-color: #FF6C00;
  border: #fff;
  margin-right: 80rpx;
}
.myQrcodeBox {
@@ -141,4 +153,19 @@
.myQrcodeTextBox {
  text-align: center;
  margin: 30rpx 0;
}
.paymentPageBox {}
page {
  background-color: #F2F3F8;
  position: relative;
}
.titleBox {
  background-color: #fff;
  position: fixed;
  top: 0;
  width: 100%;
}
pages/resourceDetails/document/index.wxml
@@ -13,13 +13,15 @@
<view class="pictureBox" wx:if="{{selectType == 'picture'}}">
  <image src="{{showData}}" mode="" />
  <image src="{{showData}}" mode="aspectFit" />
</view>
<view wx:if="{{selectType == 'zip'}}">
  <view class="zipImageBox">
    <image src="/static/images/document/zip200px.png" mode="aspectFill " />
  </view>
  <view class="button-example">
    <t-button size="large" bind:tap="onDownloadButton">
      <view class="text">
@@ -43,7 +45,4 @@
<web-view wx:if="{{selectType == 'webpage'}}" src="{{webpageSrc}}"></web-view>
<!-- <button bind:tap="handleTap">点位</button> -->
<!-- <button bind:tap="handleTap">点位</button> -->
pages/resourceDetails/document/index.wxss
@@ -3,7 +3,6 @@
  background-color: #fff;
  display: flex;
  align-items: center;
}
.navbar-title {
@@ -18,7 +17,6 @@
.button-example {
  margin: 0 70rpx;
  background-color: #ff6c00;
  display: flex;
  justify-content: center;
@@ -26,7 +24,6 @@
.button-example .text {
  background-color: #ff6c00;
}
.t-button--default {
@@ -62,15 +59,9 @@
.pictureBox {
  display: flex;
  justify-content: center;
}
.pictureBox image {
  width: 520rpx;
  height: 800rpx;
}
image {
  width: 750rpx;
  height: 1200rpx;
  /* width: 520rpx;
  height: 800rpx; */
}
pages/resourceDetails/myAudio/index.js
@@ -580,7 +580,7 @@
  onLeftSwitch() {
    this.setData({
      speed: 1.0,
      myAudioCurrent: 0
      myAudioCurrent: '00:00'
    })
    const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId)
    if (this.data.threeLeveData[index - 1]) {
@@ -599,7 +599,7 @@
  onRightSwitch() {
    this.setData({
      speed: 1.0,
      myAudioCurrent: 0
      myAudioCurrent: '00:00'
    })
    console.log('右切换');
    const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId)
@@ -655,9 +655,7 @@
      myAudio.playbackRate = this.data.speed; //  播放速率
    }, 200);
  },
  handleChange(e) {
    console.log(e.detail.value);
  },
  // 拖动进度条,到指定位置
  hanle_slider_change(e) {
    const position = e.detail.value;
pages/resourceDetails/myAudio/index.wxml
@@ -3,7 +3,7 @@
  <view>
    <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
  </view>
  <view class="navbar-title">资源详情-视频</view>
  <view class="navbar-title">资源详情-音频</view>
</view>
@@ -14,40 +14,47 @@
    <image src="/static/images/resourceDetailsMyAudio/cd.png" alt="" />
  </view>
  <slider class="mp-slider-bar" block-size="16" value="{{myAudioPos}}" bindchange="hanle_slider_change"></slider>
  <!-- 视频播放的按钮 -->
  <view class="functionBox">
  <view class="bigFunctionBox">
    <slider activeColor='#FF6C00' class="mp-slider-bar" block-size="16" value="{{myAudioPos}}" bindchange="hanle_slider_change"></slider>
    <view class="functionBox">
    <!-- 左切换 -->
    <view class="leftSwitchBox  color" bind:tap="onLeftSwitch">
      <t-icon name="previous" size="24" />
    </view>
    <!-- 暂停播放 -->
    <view class="audioIconBox color">
      <view wx:if="{{!isplay}}" bind:tap='play'>
        <t-icon name="play-circle-stroke" size="24" />
      <!-- 左切换 -->
      <view class="leftSwitchBox  color" bind:tap="onLeftSwitch">
        <t-icon name="previous" size="24" />
      </view>
      <view wx:else bind:tap="stop">
        <t-icon name="pause-circle-stroke" size="24" />
      <!-- 暂停播放 -->
      <view class="audioIconBox color">
        <view wx:if="{{!isplay}}" bind:tap='play'>
          <t-icon name="play-circle-stroke" size="24" />
        </view>
        <view wx:else bind:tap="stop">
          <t-icon name="pause-circle-stroke" size="24" />
        </view>
      </view>
    </view>
    <!-- 右切换 -->
    <view class="rightSwitchBox color" bind:tap="onRightSwitch">
      <t-icon name="next" size="24" />
    </view>
      <!-- 右切换 -->
      <view class="rightSwitchBox color" bind:tap="onRightSwitch">
        <t-icon name="next" size="24" />
      </view>
    <view class="current-time color">{{myAudioCurrent}} </view>
    <view class="color" style="margin: 0 10rpx;">/</view>
    <view class="duration-time color"> {{myAudioDuration}} </view>
      <!-- 时间 -->
      <view class="current-time color">{{myAudioCurrent}} </view>
      <view class="color" style="margin: 0 10rpx;">/</view>
      <view class="duration-time color"> {{myAudioDuration}} </view>
    <view class="publicBtn color" style="margin-left:100rpx ;" bind:tap="onSpeed">
      <view class="publicBtn color" style="margin-left:100rpx ;" bind:tap="onSpeed">
      <text class="publicText">{{"x "+speed}}</text>
        <text class="publicText">{{"x "+speed}}</text>
      </view>
    </view>
  </view>
</view>
<!-- 标题 -->
pages/resourceDetails/myAudio/index.wxss
@@ -3,12 +3,10 @@
  background-color: #fff;
  display: flex;
  align-items: center;
}
.navbar-title {
  white-space: nowrap;
  /* overflow: hidden; */
  text-overflow: ellipsis;
  color: #0F1214;
  font-size: 40rpx;
@@ -31,7 +29,6 @@
}
.contentBox .custom-tabs {
  /* margin-bottom: 32rpx; */
  width: 400rpx;
}
@@ -43,9 +40,7 @@
.custom-panel {
  /* height: 120px; */
  width: 750rpx;
  /* height: 200rpx; */
}
@@ -56,7 +51,6 @@
  right: 0;
  width: 350rpx;
  border-bottom: 1px solid #f4f4f4;
}
.takeNotes image {
@@ -76,7 +70,6 @@
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.iconBox {
@@ -110,7 +103,6 @@
.input-example {
  --td-input-vertical-padding: 24rpx;
  background-color: #fff;
  padding: 32rpx 32rpx 16rpx;
}
@@ -124,15 +116,9 @@
.buttonBox {
  display: flex;
  /* justify-content: flex-end; */
  justify-content: center;
}
/* .inputBox {
  height: 500rpx;
} */
.detailsName {
  margin: 30rpx;
@@ -140,7 +126,6 @@
  height: 60rpx;
  display: flex;
  align-items: center;
  padding-left: 20rpx;
  background-color: #FFF6F0
}
@@ -212,13 +197,6 @@
  padding-bottom: 16rpx;
}
.dialogIconBox {
  /* width: 500rpx;
  height: 300rpx;
  color: #000;
  background-color: ccc; */
}
.popup {
  padding: 40rpx;
  width: 600rpx;
@@ -257,7 +235,6 @@
  margin-bottom: 20rpx;
  max-height: 600rpx;
  text-align: justify;
  /* padding-bottom: 200rpx; */
}
.note-bottom {
@@ -293,9 +270,6 @@
.audioBackground {
  flex: 1;
  background-size: 100% 110%;
  /* background-repeat: no-repeat;
  background-position: center center; */
  background-color: #f9f9f9;
  display: flex;
  justify-content: center;
@@ -305,22 +279,16 @@
.audioBackground image {
  width: 270rpx;
  height: 280rpx;
}
.functionBox {
  height: 96rpx;
  background: #000000;
  opacity: 0.6;
  display: flex;
  align-items: center;
}
.functionBox .audioIconBox {}
.functionBox .color {
  color: #fff;
}
.rightSwitchBox {
@@ -329,4 +297,23 @@
.leftSwitchBox {
  margin: 0 30rpx;
}
.bigFunctionBox {
  background: #000000;
  opacity: 0.6;
}
.mp-slider-bar {
  margin: 0 18rpx;
  margin-top: 10rpx;
}
.t-tabs__item--active {
  color: #FF6C00 !important;
}
.t-tabs__track {
  background-color: #FF6C00 !important;
}
pages/resourceDetails/myVideo/index.js
@@ -65,7 +65,8 @@
      cmsId: options.cmsId,
      parentName: options.parentName,
      parentProductLinkPath: options.parentProductLinkPath,
      productLinkPath: options.productLinkPath
      productLinkPath: options.productLinkPath,
      flag: false
    })
    this.resourceDetailsData()
@@ -126,7 +127,8 @@
  onTabsClick(event) {
  }, handleChange(e) {
  },
  handleChange(e) {
    this.setData({
      activeValues: e.detail.value,
    });
@@ -148,15 +150,15 @@
  closeDialog() {
    this.setData({
      dialogKey: false
      dialogKey: false,
      textvalue: '',
      flag: false
    });
  },
  goBack() {
    wx.navigateBack();
  },
  resourceDetailsData() {
    let query = {
      path: '*',
      queryType: '*',
@@ -189,13 +191,15 @@
          this.setData({
            threeLeveData: this.data.threeLeveData
          })
          if (this.data.productLinkPath == item.productLinkPath) {
            this.setData({
              showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file,
              titleName: item.name
            })
          }
        }
        if (this.data.productLinkPath == item.productLinkPath) {
          this.setData({
            showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file,
            titleName: item.name
          })
        }
      })
      this.data.threeLeveData.forEach((item) => {
@@ -258,7 +262,6 @@
    console.log(e.currentTarget.dataset.value);
    this.setData({
      flag: e.currentTarget.dataset.value
    })
  },
  // 标题输入框值
pages/resourceDetails/myVideo/index.wxml
@@ -9,12 +9,10 @@
<view class="videoBox">
  <!-- autoplay='false' 是否自动播放 -->
  <video src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video>
</view>
<!-- 标题 -->
<view class="titleBox">{{titleName}}</view>
<view class="contentBox">
  <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel">
    <!-- 资源列表 -->
@@ -22,12 +20,9 @@
      <view class="wrapper">
        <t-collapse value="{{activeValues}}" bind:change="handleChange">
          <t-collapse-panel header="{{parentName}}" value="{{0}}" expandIcon>
            <view class="detailsName" wx:for="{{threeLeveData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="onVideo" data-item="{{item}}" data-index="{{index}}">
              <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}">{{item.name}}</view>
            </view>
          </t-collapse-panel>
        </t-collapse>
      </view>
pages/resourceDetails/myVideo/index.wxss
@@ -287,4 +287,13 @@
  width: 30rpx;
  height: 30rpx;
  margin: 0 15rpx;
}
.t-tabs__item--active {
  color: #FF6C00 !important;
}
.t-tabs__track {
  background-color: #FF6C00 !important;
}
pages/retrievalPage/index.js
@@ -431,6 +431,11 @@
        fields
      })
      datas5.forEach((items) => {
        items.subtitleName = items.subtitle + items.name
      })
      console.log(datas5, 'sadasd');
      this.setData({
        biblioClassificationData: datas5,
        biblioClassificationTotal: data5.totalCount
pages/retrievalPage/index.wxml
@@ -22,7 +22,7 @@
    <view class="bookDataBox">
      <view  class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook">
      <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook">
        <view class="imageBox">
          <image src="{{item.icon}}" mode="aspectFill" />
        </view>
@@ -153,7 +153,7 @@
      <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}">
        <image class="bookFairImage" wx:if="{{item.icon}}" src="{{item.icon}}" mode="" />
        <image class="bookFairImage" wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" />
        <view class="textBox" title="{{item.name}}"> <text>{{item.name}}</text></view>
        <view class="textBox" title="{{item.name}}"> <text>{{item.subtitleName}}</text></view>
      </view>
    </view>
pages/retrievalPage/index.wxss
@@ -131,17 +131,14 @@
}
.body-info .name {
  font-size: 32rpx;
  height: 88rpx;
  color: #333333;
  font-weight: bold;
  line-height: 44rpx;
  display: -webkit-box;
  margin-bottom: 10rpx;
  font-size: 25rpx;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  margin-bottom: 10rpx;
}
.body-info .time {
@@ -176,7 +173,8 @@
.listBox1 .listItemBox {
  height: 220rpx;
  margin-bottom: 30rpx;
  margin-bottom: 20rpx;
  padding: 30rpx;
}
.listBox1 .specialSubject-img {
@@ -286,4 +284,13 @@
  color: #333333;
  padding: 15rpx;
  margin-bottom: 10rpx;
}
.t-tabs__item--active {
  color: #FF6C00 !important;
}
.t-tabs__track {
  background-color: #FF6C00 !important;
}
project.config.json
@@ -48,7 +48,7 @@
  },
  "compileType": "miniprogram",
  "libVersion": "2.23.1",
  "appid": "wx5461028c83fea0b3",
  "appid": "wx7f362fe7cb6e0d1f",
  "projectname": "tdesign-miniprogram-starter-retail",
  "simulatorType": "wechat",
  "simulatorPluginLibVersion": {},
static/images/bibliographyList/square.png
static/images/bibliographyList/square@2x.png
static/video/sea.mp4
Binary files differ
style/theme.wxss
@@ -22,13 +22,13 @@
  --td-button-font-weight: 500;
  --td-button-medium-font-size: 32rpx;
  --td-button-default-color: #fff;
  --td-button-default-bg-color: #fa4126;
  --td-button-default-border-color: #fa4126;
  --td-button-default-bg-color: #FF6C00;
  --td-button-default-border-color: #FF6C00;
  --td-button-default-disabled-color: #fff;
  --td-button-default-disabled-bg: #cccccc;
  --td-button-default-disabled-border-color: #cccccc;
  --td-button-default-active-bg-color: #fa4126;
  --td-button-default-active-border-color: #fa4126;
  --td-button-default-active-bg-color: #FF6C00;
  --td-button-default-active-border-color: #FF6C00;
}
.t-textarea {