yiming
2024-03-13 f9d4b09377c5471e1202be2fef2c89de27b6654d
feat(撒): 的

地方

BREAKING CHANGE: 二万人
33个文件已修改
4个文件已添加
2226 ■■■■ 已修改文件
.vscode/settings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/aboutUs/index.js 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/aboutUs/index.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/aboutUs/index.wxml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/aboutUs/index.wxss 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxss 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/detail/components/note/note.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/paymentPage/index.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.wxml 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/document/index.js 205 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/document/index.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/document/index.wxml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/document/index.wxss 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.js 671 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.json 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.wxml 138 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myAudio/index.wxss 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.js 314 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.wxml 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/resourceDetails/myVideo/index.wxss 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/images/bookExhibitionList/zhuantitaolun.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/document/zip.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/document/zip200px.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/document/zip200px@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/settings.json
@@ -32,7 +32,7 @@
  },
  "editor.tabSize": 2,
  "[wxml]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
    "editor.defaultFormatter": "wechat.miniprogram.wxml-language-features"
  },
  "[css]": {
    "editor.defaultFormatter": "HookyQR.beautify"
pages/aboutUs/index.js
@@ -15,6 +15,9 @@
    interval: 5000,//轮播图参数
    navigation: { type: 'dots' },//轮播图参数
    bannerList: [], //轮播图列表
    navBarHeight: '',
    barHeight: '',
    types: '',
  },
  /**
@@ -22,36 +25,22 @@
   */
  onLoad(options) {
    this.getBanner()
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
      types: options.types
    })
    console.log(this.data.types);
    // this.getBanner()
    this.getAboutText()
    // drawQrcode({
    //   width: 200, // 必须,二维码宽度,与canvas的width保持一致
    //   height: 200, // 必须,二维码高度,与canvas的height保持一致
    //   canvasId: 'myQrcode',
    //   background: '#ffffff', //    非必须,二维码背景颜色,默认值白色
    //   foreground: '#000', // 非必须,二维码前景色,默认值黑色     '#000000'
    //   // ctx: wx.createCanvasContext('myQrcode'), // 非必须,绘图上下文,可通过 wx.createCanvasContext('canvasId') 获取,v1.0.0+版本支持
    //   text: '13216549865',  // 必须,二维码内容
    //   // v1.0.0+版本支持在二维码上绘制图片
    //   image: {
    //     // imageResource: '../../images/icon.png', // 指定二维码小图标
    //     dx: 70,
    //     dy: 70,
    //     dWidth: 60,
    //     dHeight: 60
    //   }
    // })
  },
  /**
@@ -102,17 +91,15 @@
  onShareAppMessage() {
  },
  //轮播图
  getBanner() {
    app.MG.resource.getItem({
      path: 'jsek_banner\\jsek_aboutUsBanner',
      paging: { start: 0, size: 9 },
      fields: {
        jsek_link: []
      }
    }).then(res => {
      this.setData({
        bannerList: res.datas[0].icon,
        swiperList: res.datas[0].icon
@@ -120,9 +107,12 @@
      console.log(this.data.bannerList, 789);
    })
  },
  //文字  jsek_aboutUs 关于我们
  //jsek_contactUs  联系我们
  getAboutText() {
    app.MG.resource.getItem({
      path: 'jsek_aboutUs',
      path: this.data.types,
      fields: {
        content: []
      },
@@ -138,5 +128,8 @@
    })
  },
  goBack() {
    wx.navigateBack()
  }
})
pages/aboutUs/index.json
@@ -2,6 +2,8 @@
  "component": true,
  "usingComponents": {
    "t-swiper": "tdesign-miniprogram/swiper/swiper",
    "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav"
  }
    "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav",
    "t-icon": "tdesign-miniprogram/icon/icon"
  },
  "navigationStyle": "custom"
}
pages/aboutUs/index.wxml
@@ -1,30 +1,19 @@
<!--pages/aboutUs/index.wxml-->
<!-- <text>关于我们</text> -->
<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 wx:if="{{types == 'jsek_aboutUs'}}" class="navbar-title">关于我们</view>
  <view wx:else class="navbar-title">联系我们</view>
</view>
<!-- 二维码展示 -->
<!-- <view class="">
    <canvas style="width: 200px; height: 200px;margin:0 auto" canvas-id="myQrcode"></canvas>
</view> -->
<!-- <view class="swiper-wrap">
  <t-swiper list="{{bannerList}}" current="{{current}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" />
</view> -->
<view class="aboutUs">
  <!-- <view class="imageBox">
    <image src="{{swiperList}}" alt="" />
  </view> -->
  <view class="aboutText">
    <rich-text nodes="{{aboutText}}"></rich-text>
  </view>
pages/aboutUs/index.wxss
@@ -1,4 +1,25 @@
/* pages/aboutUs/index.wxss */
.nacigationBar {
  background-color: #fff;
  display: flex;
  align-items: center;
}
.navbar-title {
  white-space: nowrap;
  /* overflow: hidden; */
  text-overflow: ellipsis;
  color: #0F1214;
  margin-bottom: 5rpx;
  font-weight: bold;
  font-size: 36rpx;
  color: #0F1214;
}
image {
  width: 100%;
  height: 100%;
@@ -12,7 +33,6 @@
.aboutUs {
  margin: 30rpx;
}
.aboutText {
pages/bibliographyList/index.js
@@ -26,13 +26,12 @@
      this.vocationalGet()
      this.teacherGet()
      //获取系统信息,状态栏高度为sysInfo['statusBarHeight'];
      let sysInfo = wx.getSystemInfoSync();
      let menu = wx.getMenuButtonBoundingClientRect(); //胶囊信息
      let navBarHeight = (menu.top - sysInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
      const systInfo = wx.getSystemInfoSync();
      const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
      const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
      this.setData({
        BarHeight: sysInfo.statusBarHeight, navBarHeight: navBarHeight
        navBarHeight: navBarHeight,
        barHeight: systInfo.statusBarHeight,
      })
@@ -264,6 +263,8 @@
    },
    goBack() {
      wx.navigateBack();
    },
  })
pages/bibliographyList/index.json
@@ -3,7 +3,8 @@
  "usingComponents": {
    "t-tabs": "tdesign-miniprogram/tabs/tabs",
    "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
    "t-search": "tdesign-miniprogram/search/search"
    "t-search": "tdesign-miniprogram/search/search",
    "t-icon": "tdesign-miniprogram/icon/icon"
  },
  "navigationStyle": "custom"
}
pages/bibliographyList/index.wxml
@@ -1,9 +1,17 @@
<!--pages/bibliographyList/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>
<view class="example-search">
  <t-search model:value="{{value}}" placeholder="请输入书目名称" bind:submit="onSearchSubmit" />
</view>
</view>
pages/bibliographyList/index.wxss
@@ -6,6 +6,22 @@
.custom-panel {
  height: 120px;
} */
.nacigationBar {
  background-color: #fff;
  display: flex;
  align-items: center;
}
.navbar-title {
  white-space: nowrap;
  /* overflow: hidden; */
  text-overflow: ellipsis;
  color: #0F1214;
  font-size: 40rpx;
  font-weight: bold;
  margin-bottom: 5rpx;
}
.higherBox {
  width: 220rpx;
@@ -65,7 +81,7 @@
.example-search {
  background-color: #fff;
  padding: 16rpx 32rpx;
  /* padding: 16rpx 32rpx; */
}
pages/bookExhibitionList/index.wxml
@@ -34,7 +34,8 @@
<view class="assembleContent">
  <view class="titleBox">
    <view class="frameBox"></view> <text class="titleTextBox"> 线上书展</text>
    <view class="frameBox"></view>
     <image class="titleTextBox" src="/static/images/bookExhibitionList/zhuantitaolun.png" mode="aspectFit"/>
  </view>
  <view class="outside">
pages/bookExhibitionList/index.wxss
@@ -93,13 +93,14 @@
.titleBox {
  display: flex;
  align-items: center;
  margin: 10px;
  margin-left: 0;
  padding-top: 30rpx;
}
.frameBox {
  width: 13rpx;
  width: 7rpx;
  height: 54rpx;
  background: #FF6C00;
  border-radius: 0rpx 9rpx 9rpx 0rpx;
@@ -107,10 +108,13 @@
}
.titleTextBox {
  font-size: 20px;
  font-weight: bolder;
  margin-left: 10px;
  font-family: JDLangZhengTi, JDLangZhengTi;
  margin-left: 5px;
  width: 150rpx;
  height: 37rpx;
}
.classification {
pages/bookServices/detail/components/note/note.js
@@ -62,6 +62,7 @@
      })
    },
    openDialog() {
      console.log(this.properties.bookInfo.name);
      this.setData({
        submitTitle: this.properties.bookInfo.name,
        showNoteDialog: true
@@ -138,6 +139,7 @@
      // this.setData({
      //   loading: true
      // })
      console.log(this.properties.bookInfo.id, 'this.properties.bookInfo.id');
      let topicId
      await app.MG.ugc
        .getProductUserSubmitTopic({
pages/cart/index.wxml
@@ -12,7 +12,7 @@
            <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" />
          </view>
          <view class="left-image">
            <image src="{{item.imgUrl}}" class="imageStyle" mode="" />
            <image src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" />
          </view>
        </view>
      </t-cell>
pages/cart/paymentPage/index.wxml
@@ -36,7 +36,7 @@
  <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="" />
      <image src="{{item.paymentIcon }}" mode="aspectFit" />
      <view class="cartListContent">
        <view class="cartListDetails">{{item.orderSaleMethod.product.name}}</view>
        <view class="textBox">图书服务-电子书</view>
pages/cart/paymentPage/index.wxss
@@ -25,7 +25,7 @@
}
.shoppingCartList {
  height: 1000rpx;
  min-height: 150rpx;
  background: #FFFFFF;
  border-radius: 20px;
  margin: 30rpx 0;
pages/home/home.js
@@ -4,6 +4,7 @@
const app = getApp()
Page({
  data: {
    searchVal: '',
    isWhite: false,
    backUrl: null,
    userInfo: {},
@@ -513,6 +514,16 @@
      isWhite: e.scrollTop > 50 ? true : false
    })
  },
  onRetrievalPage() {
    console.log(this.data.searchVal);
    wx.navigateTo({
      url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal
    })
  }
});
pages/home/home.wxml
@@ -9,7 +9,7 @@
    <image src="/static/images/home/home-bg@2x.png" mode="heightFix" class="image" />
  </view>
  <view class="search">
    <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请输入关键词/书名/ISBN/作者" leftIcon="">
    <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请输入关键词/书名/ISBN/作者" leftIcon=""  bind:submit="onRetrievalPage" model:value="{{searchVal}}">
      <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" />
    </t-search>
  </view>
pages/personalCenter/index.js
@@ -67,13 +67,13 @@
  {
    title: '关于我们',
    icon: '/static/images/personal/about.png',
    url: '',
    url: '/pages/aboutUs/index?types=jsek_aboutUs',
    type: 'aboutUs',
  },
  {
    title: '联系我们',
    icon: '/static/images/personal/contact.png',
    url: '',
    url: '/pages/aboutUs/index?types=jsek_contactUs',
    type: 'contact',
  }
];
@@ -205,5 +205,9 @@
      isWhite: e.scrollTop > 50 ? true : false
    })
  },
  //跳转关于我们和联系我们
  onAboutUS() {
    console.log(111);
  }
})
pages/personalCenter/index.wxml
pages/resourceDetails/document/index.js
@@ -1,18 +1,50 @@
// pages/resourceDetails/document/index.js
const app = getApp()
Page({
  /**
   * 页面的初始数据
   */
  data: {
    webpageSrc: '',
    navBarHeight: '',
    barHeight: '',
    activeId: '',
    bookId: '',
    bookName: '',
    cmsId: '',
    parentName: '',
    parentProductLinkPath: '',
    productLinkPath: '',
    showData: '',
    titleName: '',
    selectType: '',
    zipData: '',
    naturalResources: [],
    titleName: '',
    pdfDatA: [],
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
      activeId: options.activeId,
      bookId: options.bookId,
      bookName: options.bookName,
      cmsId: options.cmsId,
      parentName: options.parentName,
      parentProductLinkPath: options.parentProductLinkPath,
      productLinkPath: options.productLinkPath
    })
    this.resourceDetailsData()
  },
  /**
@@ -62,5 +94,174 @@
   */
  onShareAppMessage() {
  },
  goBack() {
    wx.navigateBack()
  },
  resourceDetailsData() {
    let query = {
      path: '*',
      queryType: '*',
      productId: this.data.bookId,
      cmsPath: this.data.parentProductLinkPath,
      itemFields: {
        SysType: 'CmsFolder',
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
        resourcesClassification: [],
        isDownload: [],
        jsek_resourceBrief: [],
        jsek_link: [],
        jsek_questionBank: [],
        learnSelectType: []
      },
      pading: {
        start: 0,
        size: 999
  }
    }
    app.MG.store.getProductDetail(query).then((res) => {
      console.log(res);
      res.datas.cmsDatas[0].datas.forEach((item) => {
        //刚刚进来的时候
        if (this.data.productLinkPath == item.productLinkPath) {
          this.handleTeachData(item)
          this.setData({
            titleName: item.name,
            selectType: item.selectType
          })
        }
      })
    })
  },
  //zpi文件下载
  onDownloadButton() {
    const item = this.data.zipData;
    if (!item || !item.file) {
      wx.showToast({
        title: '文件信息缺失',
        icon: 'none'
      });
      return;
    }
    const downloadUrl = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file;
    wx.showLoading({
      title: '正在下载...',
    });
    wx.downloadFile({
      url: downloadUrl,
      success(res) {
        if (res.statusCode === 200) {
          // 下载成功,可以在这里进行一些操作,例如预览、保存等
          // 这里以保存文件到系统为例
          wx.saveFile({
            tempFilePath: res.tempFilePath,
            success(saveRes) {
              wx.hideLoading();
              wx.showToast({
                title: '保存成功',
              });
              // 获取保存后的文件路径
              const savedFilePath = saveRes.savedFilePath;
              // 可以在这里进行后续操作,例如打开文件
              wx.openDocument({
                filePath: savedFilePath,
                success: function () {
                  console.log('打开文档成功')
                },
                fail: function (error) {
                  console.error('打开文档失败', error);
                }
              });
            },
            fail() {
              wx.hideLoading();
              wx.showToast({
                title: '保存失败',
                icon: 'none'
              });
            }
          });
        } else {
          wx.hideLoading();
          wx.showToast({
            title: '下载失败',
            icon: 'none'
          });
        }
      },
      fail() {
        wx.hideLoading();
        wx.showToast({
          title: '下载失败',
          icon: 'none'
        });
      }
    });
  },
  //刚进来的时候调用
  handleTeachData(item) {
    //图片
    if (item.selectType == 'picture') {
      this.setData({
        showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file,
      })
    }
    // 下载文件zip
    if (item.selectType == 'zip') {
      this.setData({
        zipData: item
      })
    }
    //网页
    if (item.selectType == 'webpage') {
      this.setData({
        webpageSrc: item.jsek_link
      })
    }
    //文档等
    if (item.selectType == 'pdf' || item.selectType == 'document') {
      app.MG.file.getPdfInfo({ md5: item.file }).then((res) => {
        if (res && res.totalPages) {
          for (let i = 0; i < res.totalPages; i++) {
            const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + item.file + '&index=' + (i + 1) + '&dpi=300'
            this.data.naturalResources.push(src)
            // console.log(this.data.naturalResources, ' this.data.naturalResources');
          }
        }
      })
    }
  },
  handleTap: function () {
    const naturalResources = this.data.naturalResources;
    naturalResources.forEach(function (item) {
      // console.log(item);
    });
  }
})
pages/resourceDetails/document/index.json
@@ -1,3 +1,9 @@
{
  "usingComponents": {}
  "component": true,
  "usingComponents": {
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-button": "tdesign-miniprogram/button/button",
    "t-image": "tdesign-miniprogram/image/image"
  },
  "navigationStyle": "custom"
}
pages/resourceDetails/document/index.wxml
@@ -1,6 +1,49 @@
<!--pages/resourceDetails/document/index.wxml-->
<text>pages/resourceDetails/document/index.wxml</text>
<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="titleNameBox" wx:if="{{selectType != 'webpage'}}">
  {{titleName}}
</view>
<view class="pictureBox" wx:if="{{selectType == 'picture'}}">
  <image src="{{showData}}" mode="" />
</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">
        下载
      </view>
    </t-button>
  </view>
</view>
<view wx:if="{{selectType == 'pdf' ||  selectType == 'document'}}">
  <view wx:for="{{naturalResources}}" wx:key="index" wx:for-item="item" wx:for-index="index">
    <image src="{{item}}" alt="" style="min-height: 550px;"></image>
    <view class="divider">第 {{index + 1}} 页</view>
  </view>
</view>
<web-view wx:if="{{selectType == 'webpage'}}" src="{{webpageSrc}}"></web-view>
<!-- <button bind:tap="handleTap">点位</button> -->
pages/resourceDetails/document/index.wxss
@@ -1 +1,76 @@
/* pages/resourceDetails/document/index.wxss */
.nacigationBar {
  background-color: #fff;
  display: flex;
  align-items: center;
}
.navbar-title {
  white-space: nowrap;
  /* overflow: hidden; */
  text-overflow: ellipsis;
  color: #0F1214;
  font-size: 40rpx;
  font-weight: bold;
  margin-bottom: 5rpx;
}
.button-example {
  margin: 0 70rpx;
  background-color: #ff6c00;
  display: flex;
  justify-content: center;
}
.button-example .text {
  background-color: #ff6c00;
}
.t-button--default {
  background-color: #ff6c00 !important;
}
.t-button {
  --td-button-default-border-color: #ff6c00 !important;
}
.zipImageBox {
  display: flex;
  justify-content: center;
}
.divider {
  text-align: center;
  margin: 20px 0;
}
.titleNameBox {
  height: 77rpx;
  background: #FFFFFF;
  box-shadow: 0rpx 9rpx 9rpx 2rpx rgba(0, 0, 0, 0.06);
  padding: 20rpx 50rpx;
  margin-bottom: 100rpx;
  font-family: PingFang SC, PingFang SC;
  font-weight: 400;
  font-size: 29rpx;
  color: #333333;
}
.pictureBox {
  display: flex;
  justify-content: center;
}
.pictureBox image {
  width: 520rpx;
  height: 800rpx;
}
image {
  width: 750rpx;
  height: 1200rpx;
}
pages/resourceDetails/myAudio/index.js
@@ -1,52 +1,673 @@
// audio.js
// pages/resourceDetails/index.js
const app = getApp()
const myAudio = wx.createInnerAudioContext();
Page({
  /**
   * 页面的初始数据
   */
  data: {
    poster: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000',
    name: '此时此刻',
    author: '许巍',
    src: 'http://182.92.203.7:3001/file/api/ApiDownload?md5=aa72e586dd93b7c2633bee6320bc6c76',
    noteList: [],
    navBarHeight: '',
    barHeight: '',
    flag: true, // 输入框是否显示
    tabPanelstyle: 'display:flex;justify-content:center;align-items:center;',
    activeValues: [0],
    dialogKey: false,
    style: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;',
    activeId: '',
    bookId: '',
    bookName: '',
    cmsId: '',
    parentName: '',
    parentProductLinkPath: '',
    productLinkPath: '',
    threeLeveData: [],
    showData: '',
    src: '',
    selectedId: null,
    topicId: '',
    titleName: '',
    submitTitle: "",
    inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx',
    textvalue: '',
    style: 'height: 248rpx',
    submitType: "new", //  新建 or 编辑
    noteId: '',
    myAudioDuration: '',  // 视频时间
    myAudioCurrent: '',   // 当前播放进度
    isplay: false, //是否默认播放,
    selectId: '',
    speed: 1.0,
  },
  audio: null,
  // 格式化笔记时间
  convertTimestamp(timestamp) {
    const isoDate = new Date(timestamp)
    const year = isoDate.getFullYear()
    const month = String(isoDate.getMonth() + 1).padStart(2, '0')
    const day = String(isoDate.getDate()).padStart(2, '0')
    const hours = String(isoDate.getHours()).padStart(2, '0')
    const minutes = String(isoDate.getMinutes()).padStart(2, '0')
    const seconds = String(isoDate.getSeconds()).padStart(2, '0')
    const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
    return formattedDate
  },
  // 时间格式化
  format(t) {
    let time = Math.floor(t / 60) >= 10 ? Math.floor(t / 60) : '0' + Math.floor(t / 60);
    t = time + ':' + ((t % 60) / 100).toFixed(2).slice(-2);
    return t;
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    // console.log(options, 'options');
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
      activeId: options.activeId,
      bookId: options.bookId,
      bookName: options.bookName,
      cmsId: options.cmsId,
      parentName: options.parentName,
      parentProductLinkPath: options.parentProductLinkPath,
      productLinkPath: options.productLinkPath
    })
  },
  onReady: function (e) {
    // 使用 wx.createAudioContext 获取 audio 上下文 context
    this.audioCtx = wx.createAudioContext('myAudio')
    this.resourceDetailsData()
    this.getNoteList()
  },
  audioPlay: function () {
    this.audioCtx.play()
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {
  },
  audioPause: function () {
    this.audioCtx.pause()
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
  },
  audio14: function () {
    this.audioCtx.seek(14)
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
  },
  audioStart: function () {
    this.audioCtx.seek(0)
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
  },
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  },
  onTabsChange(event) {
  },
  onTabsClick(event) {
  }, handleChange(e) {
    this.setData({
      activeValues: e.detail.value,
    });
  },
  onTakeNotes() {
  },
  showDialog(e) {
    this.setData({
      submitTitle: this.data.bookName,
      dialogKey: true,
      // textvalue: ''
    });
  },
  closeDialog() {
    this.setData({
      dialogKey: false
    });
  },
  goBack() {
    wx.navigateBack()
    wx.navigateBack();
  },
  resourceDetailsData() {
  MusicStart: function (e) {
    var progress = parseInt((e.detail.currentTime / e.detail.duration) * 100)
    var that = this
    that.setData({
      progress: progress
    let query = {
      path: '*',
      queryType: '*',
      productId: this.data.bookId,
      cmsPath: this.data.parentProductLinkPath,
      itemFields: {
        SysType: 'CmsFolder',
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
        resourcesClassification: [],
        isDownload: [],
        jsek_resourceBrief: [],
        jsek_link: [],
        jsek_questionBank: [],
        learnSelectType: []
      },
      pading: {
        start: 0,
        size: 999
      }
    }
    app.MG.store.getProductDetail(query).then(res => {
      res.datas.cmsDatas[0].datas.forEach((item, index) => {
        if (item.selectType === "audio") {
          this.data.threeLeveData.push(item)
          this.setData({
            threeLeveData: this.data.threeLeveData
    })
    console.log('音乐播放进度为' + progress + '%')
          if (this.data.productLinkPath == item.productLinkPath) {
            console.log(item.id, 'index');
            this.setData({
              showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file,
              titleName: item.name
            })
            this.pubulicPlayFun()
            // this.setData({
            //   selectedId: index
            // })
          }
        }
      })
      this.data.threeLeveData.forEach((item) => {
        // console.log(item.name);
      })
    })
  },
  onVideo(e) {
    const item = e.currentTarget.dataset.item
    if (this.data.showData != '') {
      this.setData({
        showData: ''
      })
    }
    this.setData({
      selectedId: e.currentTarget.dataset.index,
    })
    this.setData({
      titleName: item.name,
      selectId: item.id
    })
    if (item.selectType == "audio") {
      this.setData({
        showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file
      })
      this.pubulicPlayFun()
    }
  },
  getProductUserSubmitTopicGet() {
    app.MG.ugc.getProductUserSubmitTopic({
      productId: this.data.bookId,
      appRefCode: app.config.appRefCode
    }).then((res) => {
      // console.log(res);
      this.setData({
        topicId: res.id
      })
    })
  },
  newTopicMessageGet() {
    let query = {
      topicIdOrRefCode: topicId + '',
      name: titleText.value,
      content: form.value.noteContent,
      type: 'note',
      cmsTypeRefCode: '',
      newDataListRequest: []
    }
    app.MG.ugc.newTopicMessage(query).then(res => {
      // console.log(res);
    })
  },
  // 标题改变
  changeTitle(e) {
    // console.log(e.currentTarget.dataset.value);
    this.setData({
      flag: e.currentTarget.dataset.value
    })
  },
  // 标题输入框值
  inputChange(e) {
    this.setData({
      titleName: e.detail.value
    })
  },
  confirmSuggest() {
    if (!this.data.textvalue) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记内容',
      })
    } else if (!this.data.titleName) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记标题',
      })
    }
    if (this.data.submitType == 'new') {
      this.makeNote()
    } else if (this.data.submitType == 'edit') {
      this.updateNote()
    }
    // console.log(this.data.textvalue);
    // console.log(this.data.titleName);
    this.setData({
      dialogKey: false
    });
  },
  onTextarea() {
    // console.log(this.data.textvalue);
  },
  textareaChange(e) {
    this.setData({
      textvalue: e.detail.value
    })
  },
  // 获取笔记列表
  async getNoteList() {
    // this.setData({
    //   loading: true
    // })
    let topicId
    await app.MG.ugc
      .getProductUserSubmitTopic({
        productId: this.data.bookId,
        appRefCode: app.config.appRefCode
      })
      .then((res) => {
        if (res) {
          topicId = res.id
        } else {
          return wx.showToast({
            icon: "error",
            title: '查询失败',
          })
        }
      })
    // loadings.value.bookResource = true
    let query = {
      start: 0,
      size: 999,
      messageType: 'note',
      sort: {
        type: 'Desc',
        field: 'CreateDate'
      },
      appRefCode: app.config.appRefCode,
      topicIdOrRefCode: topicId + ''
    }
    await app.MG.ugc.getTopicMessageList(query).then((res) => {
      // notePage.value.total = res.totalSize
      res.datas.forEach((item) => {
        // item.compliceHover = false
        // item.deleteHover = false
        item.createDate = this.convertTimestamp(item.createDate)
      })
      this.setData({
        "pageCount.total": res.totalSize,
        noteList: res.datas,
        loading: false
      })
      // console.log('笔记列表', res.datas);
    })
  },
  // 编辑按钮
  editNote(e) {
    const note = e.currentTarget.dataset.note
    this.setData({
      submitType: "edit",
      textvalue: note.content,
      submitTitle: note.name,
      noteId: note.id
    })
    this.showDialog()
  },
  // 删除笔记
  deleteNote(e) {
    const id = e.currentTarget.dataset.id
    const messageIds = []
    messageIds.push(id)
    wx.showModal({
      title: '提示',
      content: '确认删除该笔记吗?',//editable如果为true,这就是输入框的内容
      editable: false,//是否显示输入框
      placeholderText: '请输入内容吧',//输入框的默认内容
      success: (res) => {
        if (res.confirm) {
          app.MG.ugc
            .delTopicMessage({ messageIds })
            .then((res) => {
              wx.showToast({
                title: '删除成功',
              })
              // if ((notePage.value.total % 3) - 1 == 0) {
              //   notePage.value.page -= 1
              // }
              this.getNoteList()
            })
        } else if (res.cancel) {
          // console.log('用户点击取消')
        }
      }
    })
  },
  // 新建笔记接口
  async makeNote() {
    const token = wx.getStorageSync('jsek-token')
    if (!token) {
      return wx.getUserProfile({
        desc: '用户登录',
        success: (res) => {
          // console.log(res);
        }
      })
    }
    let topicId
    await app.MG.ugc
      .getProductUserSubmitTopic({
        productId: this.data.bookId,
        appRefCode: app.config.appRefCode
      })
      .then((res) => {
        if (res) {
          topicId = res.id
        } else {
          return wx.showToast({
            icon: 'error',
            title: '新建失败',
          })
        }
      })
    let query = {
      topicIdOrRefCode: topicId + '',
      name: this.data.submitTitle,
      content: this.data.textvalue,
      type: 'note',
      cmsTypeRefCode: '',
      newDataListRequest: []
    }
    await app.MG.ugc.newTopicMessage(query).then((res) => {
      wx.showToast({
        title: '新建成功',
      })
      this.closeDialog()
      this.getNoteList()
    })
  },
  // 编辑笔记接口
  updateNote() {
    const token = wx.getStorageSync('jsek-token')
    if (!token) {
      return wx.getUserProfile({
        desc: '用户登录',
        success: (res) => {
          // console.log(res);
        }
      })
    }
    if (!this.data.submitTitle) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记标题',
      })
    } else if (!this.data.textvalue) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记内容',
      })
    }
    let query = {
      id: this.data.noteId,
      name: this.data.submitTitle,
      description: 'string',
      icon: 'string',
      type: 'note',
      content: this.data.textvalue,
      newDataRequests: [],
      updateDataRequests: []
    }
    app.MG.ugc.updateTopicMessage(query).then((res) => {
      wx.showToast({
        title: '编辑成功',
      })
      this.closeDialog()
      this.getNoteList()
    })
    this.setData({
      submitType: "new"
    })
  },
  // 播放公共代码
  pubulicPlayFun() {
    myAudio.src = this.data.showData
    console.log(myAudio.src);
    // 在onCanplay里获取并设置音频时长和播放进度
    myAudio.onCanplay(() => {
      myAudio.duration; //必须写,不然获取不到。。。
      setTimeout(() => {
        console.log(myAudio.duration);
        this.setData({
          myAudioDuration: this.format(myAudio.duration),
          myAudioCurrent: this.format(myAudio.currentTime)
        });
      }, 1000);
    });
    // 播放完成处理,按钮变一下
    myAudio.onEnded((res) => {
      this.setData({
        isplay: false
      })
    });
    //进度条变化
    myAudio.onTimeUpdate(() => {
      this.setData({
        myAudioPos: myAudio.currentTime / myAudio.duration * 100,
        myAudioCurrent: this.format(myAudio.currentTime)
      });
    })
  },
  //播放
  play() {
    console.log(22222);
    myAudio.startTime = this.data.myAudioCurrent; //考虑到进度条被拖动,不一定从00:00:00开始
    myAudio.play();
    this.setData({
      isplay: true
    });
  },
  // 停止
  stop() {
    console.log(11111);
    myAudio.pause();
    this.setData({
      isplay: false
    });
  },
  adsfhaewlf() {
    myAudio.pause();
    this.setData({
      isplay: false
    });
  },
  //右切换
  onLeftSwitch() {
    this.setData({
      speed: 1.0,
      myAudioCurrent: 0
    })
    const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId)
    if (this.data.threeLeveData[index - 1]) {
      this.changeItem(this.data.threeLeveData[index - 1])
      this.setData({
        selectedId: index - 1,
      })
    } else {
      console.log('已经是第一首了');
    }
  },
  //右切换
  onRightSwitch() {
    this.setData({
      speed: 1.0,
      myAudioCurrent: 0
    })
    console.log('右切换');
    const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId)
    if (this.data.threeLeveData[index + 1]) {
      this.changeItem(this.data.threeLeveData[index + 1])
      this.setData({
        selectedId: index + 1,
      })
    } else {
      console.log('已经是最后一首了');
    }
  },
  changeItem(item) {
    console.log(item);
    if (this.data.showData != '') {
      this.setData({
        showData: ''
      })
    }
    this.setData({
      titleName: item.name,
      selectId: item.id
    })
    if (item.selectType == "audio") {
      this.setData({
        showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file
      })
      this.pubulicPlayFun()
    }
  },
  // 播放倍速
  onSpeed() {
    let c = this.data.speed;
    c += 0.5;
    if (c <= 2) {
      this.setData({
        speed: c,
      })
    } else {
      c = 0.5;
      this.setData({
        speed: c,
      })
    }
    setTimeout(() => {
      myAudio.startTime = this.data.myAudioDuration  //开始时间
      myAudio.playbackRate = this.data.speed; //  播放速率
    }, 200);
  },
  handleChange(e) {
    console.log(e.detail.value);
  },
  // 拖动进度条,到指定位置
  hanle_slider_change(e) {
    const position = e.detail.value;
    var currentTime = position / 100 * myAudio.duration;
    myAudio.seek(currentTime);
    this.setData({
      myAudioPos: position,
      myAudioCurrent: this.format(currentTime)
    })
  }
})
pages/resourceDetails/myAudio/index.json
@@ -1,6 +1,19 @@
{
  "component": true,
  "usingComponents": {
    "t-icon": "tdesign-miniprogram/icon/icon"
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-tabs": "tdesign-miniprogram/tabs/tabs",
    "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
    "t-collapse": "tdesign-miniprogram/collapse/collapse",
    "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel",
    "t-button": "tdesign-miniprogram/button/button",
    "t-dialog": "tdesign-miniprogram/dialog/dialog",
    "t-input": "tdesign-miniprogram/input/input",
    "t-image": "tdesign-miniprogram/image/image",
    "t-textarea": "tdesign-miniprogram/textarea/textarea",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-popup": "tdesign-miniprogram/popup/popup",
    "t-slider": "tdesign-miniprogram/slider/slider"
  },
  "navigationStyle": "custom"
}
pages/resourceDetails/myAudio/index.wxml
@@ -3,37 +3,135 @@
  <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>
<view class="audioBox">
  <view class="">
    <image class="imageFront" src="/static/images/resourceDetailsMyAudio/cd.png" mode="aspectFit" />
    <image class=" imageAfter" src="/static/images/resourceDetailsMyAudio/video-bg.png" mode="aspectFit" />
<view class="audioPlayerBox">
  <view class="audioBackground" style="background-image: url('/static/images/resourceDetailsMyAudio/video-bg.png');">
    <image src="/static/images/resourceDetailsMyAudio/cd.png" alt="" />
  </view>
  <view class="controlBox">
    <image src="/static/images/resourceDetailsMyAudio/shangyizhang.png" mode="" />
    <image bindtap="audioPlay" src="/static/images/resourceDetailsMyAudio/zanting.png" mode="" />
    <image bindtap="audioPause" src="/static/images/resourceDetailsMyAudio/xiayizhang.png" mode="" />
  <slider class="mp-slider-bar" block-size="16" value="{{myAudioPos}}" bindchange="hanle_slider_change"></slider>
  <!-- 视频播放的按钮 -->
  <view class="functionBox">
    <image src="/static/images/resourceDetailsMyAudio/Full screen.png" mode="" />
    <!-- <view class="free-MusicProgress">
      <view style="width:{{progress}}%;"></view>
    </view> -->
    <!-- 左切换 -->
    <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>
      <view wx:else bind:tap="stop">
        <t-icon name="pause-circle-stroke" size="24" />
      </view>
    </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="publicBtn color" style="margin-left:100rpx ;" bind:tap="onSpeed">
      <text class="publicText">{{"x "+speed}}</text>
    </view>
  </view>
</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">
    <!-- 资源列表 -->
    <t-tab-panel label="资源列表" value="0" style="{{tabPanelstyle}}" style="width: 750rpx;">
      <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>
    </t-tab-panel>
    <!-- 笔记展示 -->
    <t-tab-panel label="笔记" value="1" style="{{tabPanelstyle}}">
      <view class="wrapper">
        <t-collapse value="{{activeValues}}" bind:change="handleChange">
          <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}">
            <view slot="header" class="collapse-header">
              <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image>
              <view class="header-name">{{item.name}}</view>
            </view>
            <view>
              <view class="note-content">{{item.content}}</view>
              <view class="note-bottom">
                <view class="note-time">{{item.createDate}}</view>
                <view class="bottom-btn">
                  <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image>
                  <view></view>
                  <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image>
                </view>
              </view>
            </view>
          </t-collapse-panel>
        </t-collapse>
      </view>
    </t-tab-panel>
  </t-tabs>
  <!-- 记笔记 -->
  <view class="takeNotes" data-key="showCloseBtn" bind:tap="showDialog">
    <view class="takeNotesLining">
      <image src="/static/images/resourceDetails/jibijii.png" mode="" /> 记笔记
    </view>
  </view>
  </view>
<!-- 记笔记弹窗 -->
<t-popup visible="{{dialogKey}}" bind:visible-change="onVisibleChange" placement="center">
  <view class="popup">
    <view slot="title">
      <view class="title-text" wx:if="{{!flag}}">
        <text class="note-title">{{titleName}}</text>
        <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image>
</view>
<audio wx:if="{{false}}" bindtimeupdate="MusicStart" poster="{{poster}}" name="{{name}}" author="{{author}}" src="{{src}}" id="myAudio" controls loop>
      <view wx:else>
        <t-input value="{{titleName}}" style="{{inputStyle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" maxlength="{{50}}" bind:change="inputChange"></t-input>
      </view>
    </view>
</audio>
<!-- <button type="primary" >播放</button>
<button type="primary">暂停</button>
<button type="primary" bindtap="audio14">设置当前播放时间为14秒</button>
<button type="primary" bindtap="audioStart">回到开头</button> -->
    <view slot='content'>
      <view class="textarea-example">
        <text class="textarea-example__label">内容:</text>
        <t-textarea value="{{textvalue}}" t-class="external-class" placeholder="请输入文字" bordered maxlength="500" disableDefaultPadding="{{true}}" indicator style="{{inputStyle}}" bind:change="textareaChange" />
      </view>
      <view class="submit-btn">
        <t-button theme="primary" size="large" block bind:tap="confirmSuggest">提交</t-button>
      </view>
    </view>
  </view>
  <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" />
</t-popup>
pages/resourceDetails/myAudio/index.wxss
@@ -1,4 +1,4 @@
/* pages/resourceDetails/myAudio/index.wxss */
/* pages/resourceDetails/index.wxss */
.nacigationBar {
  background-color: #fff;
  display: flex;
@@ -16,51 +16,317 @@
  margin-bottom: 5rpx;
}
.audioBox {
  width: 100%;
  height: 350rpx;
.titleBox {
  margin: 30rpx;
  border-bottom: 1px #f4f4f4 solid;
  padding-bottom: 20rpx;
  font-weight: bold;
}
.imageFront {
  width: 300rpx;
  height: 300rpx;
  position: absolute;
  top: 150rpx;
  left: 250rpx;
.contentBox {
  position: relative;
}
.imageAfter {
  width: 100%;
.contentBox .custom-tabs {
  /* margin-bottom: 32rpx; */
  width: 400rpx;
}
.controlBox {
.t-tabs__content {
  width: 750rpx !important;
  overflow: auto !important;
}
.custom-panel {
  /* height: 120px; */
  width: 750rpx;
  /* height: 200rpx; */
}
.contentBox .takeNotes {
  position: absolute;
  top: 5rpx;
  right: 0;
  width: 350rpx;
  border-bottom: 1px solid #f4f4f4;
}
.takeNotes image {
  width: 30rpx;
  height: 30rpx;
  margin-top: 10rpx;
  margin-right: 10rpx;
}
.takeNotesLining {
  margin: 25rpx;
  display: flex;
  justify-content: flex-end;
}
.operateBox {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.iconBox {
  display: flex;
}
.iconBox image {
  width: 26rpx;
  height: 26rpx;
  margin: 0 10rpx;
}
.t-dialog__content {
  padding: 0 !important;
}
.titleImageBox {
  width: 40rpx;
  height: 40rpx;
  margin-left: 20rpx;
}
.dialogTitleBox {
  margin: 30rpx;
  border-bottom: 1px #f4f4f4 solid;
  padding-bottom: 20rpx;
  font-weight: bold;
  display: flex;
  align-items: center;
}
.input-example {
  --td-input-vertical-padding: 24rpx;
  background-color: #fff;
  padding: 32rpx 32rpx 16rpx;
}
.input-example__label {
  color: rgba(0, 0, 0, 0.9);
  font-size: 24rpx;
  line-height: 40rpx;
  margin: 0 8rpx 16rpx;
}
.buttonBox {
  display: flex;
  /* justify-content: flex-end; */
  justify-content: center;
}
/* .inputBox {
  height: 500rpx;
} */
.detailsName {
  margin: 30rpx;
  width: 90%;
  height: 60rpx;
  display: flex;
  align-items: center;
  padding-left: 20rpx;
  background-color: #FFF6F0
}
.detailsName:hover {
  background-color: #fff0e6;
  width: 90%;
  height: 60rpx;
  color: #ff6c00;
}
.audioBox {
  width: 750rpx;
  height: 200rpx;
}
.title-text {
  display: flex;
  align-items: center;
}
.note-title {
  width: 80%;
  height: 84rpx;
  line-height: 84rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 10rpx;
  margin-left: 20rpx;
}
.edit-icon {
  margin-left: 10rpx;
  width: 30rpx;
  height: 30rpx;
}
.submit-btn {
  padding: 40rpx;
  --td-button-border-radius: 60rpx;
  --td-button-primary-bg-color: #ff6c00;
  --td-button-primary-border-color: #ff6c00;
  --td-button-primary-active-bg-color: #ff984d;
  --td-button-primary-active-border-color: #ff984d;
}
.edit-icon {
  margin-left: 10rpx;
  width: 30rpx;
  height: 30rpx;
}
.textarea-example {
  padding: 32rpx 32rpx 48rpx;
  background-color: #fff;
}
.external-class {
  padding-top: 24rpx !important;
  padding-bottom: 24rpx !important;
}
.textarea-example__label {
  display: block;
  color: rgba(0, 0, 0, 0.9);
  font-size: 24rpx;
  line-height: 40rpx;
  padding-bottom: 16rpx;
}
.dialogIconBox {
  /* width: 500rpx;
  height: 300rpx;
  color: #000;
  background-color: ccc; */
}
.popup {
  padding: 40rpx;
  width: 600rpx;
}
.close-btn {
  position: absolute;
  left: 50%;
  margin-left: -32rpx;
  bottom: calc(-1 * (48rpx + 64rpx));
}
.collapse-header {
  display: flex;
}
.collapse-header .header-name {
  font-size: 32rpx;
  width: 500rpx;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-icon {
  width: 44rpx;
  height: 48rpx;
  margin-right: 20rpx;
}
.note-content {
  height: min-content;
  font-size: 28rpx;
  color: #949494;
  margin-bottom: 20rpx;
  max-height: 600rpx;
  text-align: justify;
  /* padding-bottom: 200rpx; */
}
.note-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.note-time {
  color: #D9D9D9;
}
.bottom-btn {
  height: 40rpx;
  display: flex;
  align-items: center;
}
.complice,
.delete {
  width: 30rpx;
  height: 30rpx;
  margin: 0 15rpx;
}
.audioPlayerBox {
  width: 100%;
  height: 460rpx;
  display: flex;
  flex-direction: column;
}
.audioBackground {
  flex: 1;
  background-size: 100% 110%;
  /* background-repeat: no-repeat;
  background-position: center center; */
  background-color: #f9f9f9;
  display: flex;
  justify-content: center;
  align-items: center;
}
.audioBackground image {
  width: 270rpx;
  height: 280rpx;
}
.functionBox {
  height: 96rpx;
  background: #000000;
  border-radius: 0rpx 0rpx 0rpx 0rpx;
  opacity: 0.6;
  position: relative;
  display: flex;
  align-items: center;
}
.controlBox image {
  width: 45rpx;
  height: 45rpx;
  margin: 20rpx 35rpx;
.functionBox .audioIconBox {}
.functionBox .color {
  color: #fff;
}
audio {
  position: relative;
.rightSwitchBox {
  margin: 0 30rpx;
}
.free-MusicProgress {
  position: absolute;
  width: 78%;
  left: 21.7%;
  bottom: 1px;
  background: #C3C3C3;
}
.free-MusicProgress>view {
  background: #48c23d;
  height: 5px;
.leftSwitchBox {
  margin: 0 30rpx;
}
pages/resourceDetails/myVideo/index.js
@@ -7,12 +7,13 @@
   * 页面的初始数据
   */
  data: {
    noteList: [],
    navBarHeight: '',
    barHeight: '',
    flag: true, // 输入框是否显示
    tabPanelstyle: 'display:flex;justify-content:center;align-items:center;',
    activeValues: [0],
    dialogKey: true,
    dialogKey: false,
    style: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;',
    activeId: '',
    bookId: '',
@@ -25,18 +26,36 @@
    showData: '',
    src: '',
    selectedId: null,
    topicId: ''
    topicId: '',
    titleName: '',
    submitTitle: "",
    inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx',
    textvalue: '',
    style: 'height: 248rpx',
    submitType: "new", //  新建 or 编辑
    noteId: '',
  },
  // 格式化笔记时间
  convertTimestamp(timestamp) {
    const isoDate = new Date(timestamp)
    const year = isoDate.getFullYear()
    const month = String(isoDate.getMonth() + 1).padStart(2, '0')
    const day = String(isoDate.getDate()).padStart(2, '0')
    const hours = String(isoDate.getHours()).padStart(2, '0')
    const minutes = String(isoDate.getMinutes()).padStart(2, '0')
    const seconds = String(isoDate.getSeconds()).padStart(2, '0')
    const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
    return formattedDate
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(this.data.dialogKey, 'dialogKey');
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    console.log(options, 'options');
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
@@ -48,8 +67,9 @@
      parentProductLinkPath: options.parentProductLinkPath,
      productLinkPath: options.productLinkPath
    })
    console.log(this.data.parentProductLinkPath, 'parentProductLinkPath');
    this.resourceDetailsData()
    this.getNoteList()
  },
  /**
@@ -115,8 +135,14 @@
  },
  showDialog(e) {
    const { key } = e.currentTarget.dataset;
    this.setData({ [key]: true, dialogKey: key });
    this.setData({
      submitTitle: this.data.bookName,
      dialogKey: true,
      // textvalue: ''
    });
  },
  closeDialog() {
@@ -157,47 +183,44 @@
    }
    app.MG.store.getProductDetail(query).then(res => {
      console.log(res, 'res');
      const list = []
      res.datas.cmsDatas[0].datas.forEach((item) => {
        if (item.selectType === "video") {
        this.data.threeLeveData.push(item)
        list.push(item)
        this.setData({
          threeLeveData: list
        })
        if (this.data.productLinkPath == item.productLinkPath) {
          console.log(item, 'item');
          this.setData({
            showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file
            threeLeveData: this.data.threeLeveData
          })
        }
        // console.log(this.data.threeLeveData, 'threeLeveData');
        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) => {
        console.log(item.name);
      })
    })
  },
  onVideo(e) {
    if (this.data.showData != '') {
      this.setData({
        showData: ''
      })
    }
    this.setData({
      selectedId: e.currentTarget.dataset.index,
    })
    // console.log(e);
    const item = e.currentTarget.dataset.item
    // console.log(item);
    this.setData({
      titleName: item.name
    })
    if (item.selectType == "video") {
      console.log(item.file);
      this.setData({
        showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file
      })
      console.log(this.data.showData);
    } else {
      console.log(app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file);
    }
  },
@@ -229,15 +252,230 @@
      console.log(res);
    })
  },
  // currentTarget
  onConfirm() {
    console.log(1111);
  // 标题改变
  changeTitle(e) {
    console.log(e.currentTarget.dataset.value);
    this.setData({
      flag: e.currentTarget.dataset.value
    })
  },
  onCancellation() {
    console.log(222);
  // 标题输入框值
  inputChange(e) {
    this.setData({
      titleName: e.detail.value
    })
  },
    this.data.dialogKey = false
  confirmSuggest() {
    if (!this.data.textvalue) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记内容',
      })
    } else if (!this.data.titleName) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记标题',
      })
  }
    if (this.data.submitType == 'new') {
      this.makeNote()
    } else if (this.data.submitType == 'edit') {
      this.updateNote()
    }
    console.log(this.data.textvalue);
    console.log(this.data.titleName);
    this.setData({
      dialogKey: false
    });
  },
  onTextarea() {
    console.log(this.data.textvalue);
  },
  textareaChange(e) {
    this.setData({
      textvalue: e.detail.value
    })
  },
  // 获取笔记列表
  async getNoteList() {
    // this.setData({
    //   loading: true
    // })
    let topicId
    await app.MG.ugc
      .getProductUserSubmitTopic({
        productId: this.data.bookId,
        appRefCode: app.config.appRefCode
      })
      .then((res) => {
        if (res) {
          topicId = res.id
        } else {
          return wx.showToast({
            icon: "error",
            title: '查询失败',
          })
        }
      })
    // loadings.value.bookResource = true
    let query = {
      start: 0,
      size: 999,
      messageType: 'note',
      sort: {
        type: 'Desc',
        field: 'CreateDate'
      },
      appRefCode: app.config.appRefCode,
      topicIdOrRefCode: topicId + ''
    }
    await app.MG.ugc.getTopicMessageList(query).then((res) => {
      // notePage.value.total = res.totalSize
      res.datas.forEach((item) => {
        // item.compliceHover = false
        // item.deleteHover = false
        item.createDate = this.convertTimestamp(item.createDate)
      })
      this.setData({
        "pageCount.total": res.totalSize,
        noteList: res.datas,
        loading: false
      })
      console.log('笔记列表', res.datas);
    })
  },
  // 编辑按钮
  editNote(e) {
    const note = e.currentTarget.dataset.note
    this.setData({
      submitType: "edit",
      textvalue: note.content,
      submitTitle: note.name,
      noteId: note.id
    })
    this.showDialog()
  },
  // 删除笔记
  deleteNote(e) {
    const id = e.currentTarget.dataset.id
    const messageIds = []
    messageIds.push(id)
    wx.showModal({
      title: '提示',
      content: '确认删除该笔记吗?',//editable如果为true,这就是输入框的内容
      editable: false,//是否显示输入框
      placeholderText: '请输入内容吧',//输入框的默认内容
      success: (res) => {
        if (res.confirm) {
          app.MG.ugc
            .delTopicMessage({ messageIds })
            .then((res) => {
              wx.showToast({
                title: '删除成功',
              })
              // if ((notePage.value.total % 3) - 1 == 0) {
              //   notePage.value.page -= 1
              // }
              this.getNoteList()
            })
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })
  },
  // 新建笔记接口
  async makeNote() {
    const token = wx.getStorageSync('jsek-token')
    if (!token) {
      return wx.getUserProfile({
        desc: '用户登录',
        success: (res) => {
          console.log(res);
        }
      })
    }
    let topicId
    await app.MG.ugc
      .getProductUserSubmitTopic({
        productId: this.data.bookId,
        appRefCode: app.config.appRefCode
      })
      .then((res) => {
        if (res) {
          topicId = res.id
        } else {
          return wx.showToast({
            icon: 'error',
            title: '新建失败',
          })
        }
      })
    let query = {
      topicIdOrRefCode: topicId + '',
      name: this.data.submitTitle,
      content: this.data.textvalue,
      type: 'note',
      cmsTypeRefCode: '',
      newDataListRequest: []
    }
    await app.MG.ugc.newTopicMessage(query).then((res) => {
      wx.showToast({
        title: '新建成功',
      })
      this.closeDialog()
      this.getNoteList()
    })
  },
  // 编辑笔记接口
  updateNote() {
    const token = wx.getStorageSync('jsek-token')
    if (!token) {
      return wx.getUserProfile({
        desc: '用户登录',
        success: (res) => {
          console.log(res);
        }
      })
    }
    if (!this.data.submitTitle) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记标题',
      })
    } else if (!this.data.textvalue) {
      return wx.showToast({
        icon: 'error',
        title: '请填写笔记内容',
      })
    }
    let query = {
      id: this.data.noteId,
      name: this.data.submitTitle,
      description: 'string',
      icon: 'string',
      type: 'note',
      content: this.data.textvalue,
      newDataRequests: [],
      updateDataRequests: []
    }
    app.MG.ugc.updateTopicMessage(query).then((res) => {
      wx.showToast({
        title: '编辑成功',
      })
      this.closeDialog()
      this.getNoteList()
    })
    this.setData({
      submitType: "new"
    })
  },
})
pages/resourceDetails/myVideo/index.json
@@ -8,7 +8,11 @@
    "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel",
    "t-button": "tdesign-miniprogram/button/button",
    "t-dialog": "tdesign-miniprogram/dialog/dialog",
    "t-input": "tdesign-miniprogram/input/input"
    "t-input": "tdesign-miniprogram/input/input",
    "t-image": "tdesign-miniprogram/image/image",
    "t-textarea": "tdesign-miniprogram/textarea/textarea",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-popup": "tdesign-miniprogram/popup/popup"
  },
  "navigationStyle": "custom"
}
pages/resourceDetails/myVideo/index.wxml
@@ -5,14 +5,15 @@
  </view>
  <view class="navbar-title">资源详情-视频</view>
</view>
<!-- 视频 等 -->
<!-- 视频  -->
<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">基础教育研究背景总体设计</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">
@@ -33,15 +34,23 @@
    </t-tab-panel>
    <!-- 笔记展示 -->
    <t-tab-panel label="笔记" value="1" style="{{tabPanelstyle}}">
      <view class="wrapper">
        <t-collapse value="{{activeValues}}" bind:change="handleChange">
          <t-collapse-panel header="第1第1课时 课程视频" value="{{0}}" expandIcon>
            <view> 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容</view>
            <view class="operateBox">
              <view>2023-08-29</view>
              <view class="iconBox">
                <image src="/static/images/resourceDetails/jibijiicon2.png" mode="" />
                <image src="/static/images/resourceDetails/jibijiicon3.png" mode="" />
          <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}">
            <view slot="header" class="collapse-header">
              <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image>
              <view class="header-name">{{item.name}}</view>
            </view>
            <view>
              <view class="note-content">{{item.content}}</view>
              <view class="note-bottom">
                <view class="note-time">{{item.createDate}}</view>
                <view class="bottom-btn">
                  <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image>
                  <view></view>
                  <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image>
                </view>
              </view>
            </view>
          </t-collapse-panel>
@@ -60,20 +69,35 @@
<!-- 记笔记弹窗 -->
<t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog">
  <view slot='title' class="dialogTitleBox">一、道德与品德的关系-有试看
    <image class="titleImageBox" src="/static/images/resourceDetails/edit.png" alt="" />
<t-popup visible="{{dialogKey}}" bind:visible-change="onVisibleChange" placement="center">
  <view class="popup">
    <view slot="title">
      <view class="title-text" wx:if="{{!flag}}">
        <text class="note-title">{{titleName}}</text>
        <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image>
  </view>
      <view wx:else>
        <t-input value="{{titleName}}" style="{{inputStyle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" maxlength="{{50}}" bind:change="inputChange"></t-input>
      </view>
    </view>
  <view slot='content'>
    <view class="input-example">
      <view class="input-example__label"> 内容 </view>
      <t-input class="inputBox" placeholder="请输入文字" borderless="{{true}}" style="{{style}}" />
      <view class="textarea-example">
        <text class="textarea-example__label">内容:</text>
        <t-textarea value="{{textvalue}}" t-class="external-class" placeholder="请输入文字" bordered maxlength="500" disableDefaultPadding="{{true}}" indicator style="{{inputStyle}}" bind:change="textareaChange" />
    </view>
    <view class="buttonBox">
      <view>
        <t-button bind:tap="onCancellation" style="margin: 20rpx 30rpx;" variant="outline" size="extra-small">取消</t-button>
        <t-button bind:tap="onConfirm" style="margin: 20rpx 30rpx;" theme="primary" size="extra-small">确认</t-button>
      <view class="submit-btn">
        <t-button theme="primary" size="large" block bind:tap="confirmSuggest">提交</t-button>
      </view>
    </view>
  </view>
</t-dialog>
  <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" />
</t-popup>
pages/resourceDetails/myVideo/index.wxss
@@ -130,7 +130,8 @@
.buttonBox {
  display: flex;
  justify-content: flex-end;
  /* justify-content: flex-end; */
  justify-content: center;
}
@@ -145,8 +146,9 @@
  height: 60rpx;
  display: flex;
  align-items: center;
  background: #F4F4F4;
  padding-left: 20rpx;
  background-color: #FFF6F0
}
.detailsName:hover {
@@ -160,3 +162,129 @@
  width: 750rpx;
  height: 200rpx;
}
.title-text {
  display: flex;
  align-items: center;
}
.note-title {
  width: 80%;
  height: 84rpx;
  line-height: 84rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 10rpx;
  margin-left: 20rpx;
}
.edit-icon {
  margin-left: 10rpx;
  width: 30rpx;
  height: 30rpx;
}
.submit-btn {
  padding: 40rpx;
  --td-button-border-radius: 60rpx;
  --td-button-primary-bg-color: #ff6c00;
  --td-button-primary-border-color: #ff6c00;
  --td-button-primary-active-bg-color: #ff984d;
  --td-button-primary-active-border-color: #ff984d;
}
.edit-icon {
  margin-left: 10rpx;
  width: 30rpx;
  height: 30rpx;
}
.textarea-example {
  padding: 32rpx 32rpx 48rpx;
  background-color: #fff;
}
.external-class {
  padding-top: 24rpx !important;
  padding-bottom: 24rpx !important;
}
.textarea-example__label {
  display: block;
  color: rgba(0, 0, 0, 0.9);
  font-size: 24rpx;
  line-height: 40rpx;
  padding-bottom: 16rpx;
}
.dialogIconBox {
  /* width: 500rpx;
  height: 300rpx;
  color: #000;
  background-color: ccc; */
}
.popup {
  padding: 40rpx;
  width: 600rpx;
}
.close-btn {
  position: absolute;
  left: 50%;
  margin-left: -32rpx;
  bottom: calc(-1 * (48rpx + 64rpx));
}
.collapse-header {
  display: flex;
}
.collapse-header .header-name {
  font-size: 32rpx;
  width: 500rpx;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-icon {
  width: 44rpx;
  height: 48rpx;
  margin-right: 20rpx;
}
.note-content {
  height: min-content;
  font-size: 28rpx;
  color: #949494;
  margin-bottom: 20rpx;
  max-height: 600rpx;
  text-align: justify;
  /* padding-bottom: 200rpx; */
}
.note-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.note-time {
  color: #D9D9D9;
}
.bottom-btn {
  height: 40rpx;
  display: flex;
  align-items: center;
}
.complice,
.delete {
  width: 30rpx;
  height: 30rpx;
  margin: 0 15rpx;
}
pages/retrievalPage/index.js
@@ -38,7 +38,7 @@
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
      searchVal: options.searchVal
    })
@@ -517,6 +517,15 @@
    console.log(this.data.searchVal);
    this.retrievalPageGet()
    this.bibliographyGet()
  },
  onBook(e) {
    console.log(e.currentTarget.dataset.item);
    const item = e.currentTarget.dataset.item
    wx.navigateTo({
      url: '/pages/bookServices/detail/index?id=' + item.id + '&name' + item.name
    })
  }
})
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">
      <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>
static/images/bookExhibitionList/zhuantitaolun.png
static/images/document/zip.png
static/images/document/zip200px.png
static/images/document/zip200px@2x.png