闫增涛
2024-03-26 90f83bf13fd0d6b97897deadc4a9e6a204b530aa
图书详情页、答题器bug修改
14个文件已修改
651 ■■■■ 已修改文件
.vscode/settings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/teachResource/index.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/teachResource/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 253 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxml 274 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxss 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.wxss 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.wxss 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vscode/settings.json
@@ -32,7 +32,7 @@
  },
  "editor.tabSize": 2,
  "[wxml]": {
    "editor.defaultFormatter": "wechat.miniprogram.wxml-language-features"
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[css]": {
    "editor.defaultFormatter": "HookyQR.beautify"
packageBookService/pages/bookServices/detail/components/teachResource/index.js
@@ -11,6 +11,10 @@
    applyResourceLoading: {
      type: Boolean,
      value: false,
    },
    deadline: {
      type: String,
      value: ''
    }
  },
  data: {
@@ -19,8 +23,7 @@
  },
  methods: {
    applyResource() {
      debugger
      var myEventDetail = {} // detail对象,提供给事件监听函数
      var myEventDetail = {}
      var myEventOption = {
        bubbles: true,
        composed: true,
packageBookService/pages/bookServices/detail/components/teachResource/index.wxml
@@ -19,7 +19,7 @@
  </view>
  <view class="btn-box">
    <t-button wx:if="{{applyState == 'Reject'}}" bind:tap="checkCause" style="height: 50rpx;" class="rejectBtn" bind:tap="showDialog">查看原因</t-button>
    <t-button wx:if="{{applyState == 'none' || applyState == 'Reject'}}" theme="primary" bind:tap="applyResource" class="applyBtn" style="height: 50rpx;" loading="{{applyResourceLoading}}">申请</t-button>
    <t-button wx:if="{{applyState == 'none' || applyState == 'Reject'}}" theme="primary" bind:tap="applyResource" class="applyBtn" style="height: 50rpx;">申请</t-button>
  </view>
</view>
<!-- 未通过原因 -->
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml
@@ -21,7 +21,7 @@
        </t-radio>
      </view>
      <view class="card {{radioItem == 'mock' ? 'card--active' : ''}}">
        <t-radio value="mock" icon="none" borderless style="height: 74rpx">
        <t-radio value="mock" icon="none" borderless style="height: 80rpx">
          <view class="radio-content" slot="content">
            <image
              src="{{ radioItem == 'mock' ? '/static/images/bookService/detail/checkpaper.png' : '/static/images/bookService/detail/zujuan.png'}}"
@@ -41,9 +41,9 @@
      bind:tap="goMycollect"
      data-answerType="errorQuestion"
    >
      <view slot="content">
      <view slot="content" class="btn-content">
        <image src="/static/images/bookService/detail/cuoti.png"></image>
        我的错题
        <text>我的错题</text>
      </view>
    </t-button>
    <t-button
@@ -54,9 +54,9 @@
      bind:tap="goMycollect"
      data-answerType="collectQuestion"
    >
      <view slot="content">
      <view slot="content" class="btn-content">
        <image src="/static/images/bookService/detail/wodeshoucang.png"></image>
        我的收藏
        <text> 我的收藏</text>
      </view>
    </t-button>
  </view>
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss
@@ -41,8 +41,13 @@
  border-bottom: 1px solid #EFF0F1;
}
.btn-content {
  display: flex;
  align-items: center;
}
.top-btn image {
  margin-top: 20rpx;
  margin-right: 4rpx;
  width: 36rpx;
  height: 36rpx;
}
@@ -118,7 +123,7 @@
/* 横向布局 */
.horizontal-box {
  width: 350rpx;
  width: 338rpx;
  display: flex;
  align-items: center;
  margin: 32rpx;
@@ -145,10 +150,6 @@
  justify-content: center;
  width: 100%;
  height: 68rpx;
}
.radio-content image {
  margin: 0 10rpx 10rpx 0;
}
.mock-data {
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -68,42 +68,42 @@
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}"
                    wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}"
                    src="/static/images/bookService/detail/video.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{citem.selectType == 'pdf'}}"
                    wx:elif="{{citem.selectType == 'pdf'}}"
                    src="/static/images/bookService/detail/pdf.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{citem.selectType == 'webpage'}}"
                    wx:elif="{{citem.selectType == 'webpage'}}"
                    src="/static/images/bookService/detail/net.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{citem.selectType == 'picture'}}"
                    wx:elif="{{citem.selectType == 'picture'}}"
                    src="/static/images/bookService/detail/picture.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{citem.selectType == 'zip'}}"
                    wx:elif="{{citem.selectType == 'zip'}}"
                    src="/static/images/bookService/detail/zip.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}"
                    wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}"
                    src="/static/images/bookService/detail/word.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}"
                    wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}"
                    src="/static/images/bookService/detail/excel.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}"
                    wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}"
                    src="/static/images/bookService/detail/PPT.png"
                    mode="aspectFill"
                  />
packageBookService/pages/bookServices/detail/index.js
@@ -53,7 +53,6 @@
      mockList: [] // 用户组卷提交信息
    },
    flag: true,
    applyResourceLoading: false,
    noResources: false,
    selectedIds: "",//商品或子商品销售方式
    bookBuy: false, //商品或子商品是否购买
@@ -180,7 +179,7 @@
  // 格式化日期
  formatDate(dateString) {
    if (!dateString) {
      return 'Invalid date';
      return '';
    }
    const match = dateString.match(/^(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/);
    if (!match) {
@@ -281,9 +280,12 @@
      });
      this.getSubTtem();
      // 获取图书分类
      const iconType = JSON.parse(res.datas.bookClassification)[0][0];
      const classType = JSON.parse(res.datas.bookClassification)[0][1];
      const className = await this.getBookClass(iconType, classType)
      let className = ''
      if (Array.isArray(res.datas.bookClassification) && res.datas.bookClassification.length) {
        const iconType = JSON.parse(res.datas.bookClassification)[0][0];
        const classType = JSON.parse(res.datas.bookClassification)[0][1];
        className = await this.getBookClass(iconType, classType)
      }
      // 获取组卷销售id
      if (res.datas.saleMethod && res.datas.saleMethod.length) {
        res.datas.saleMethod.forEach((item) => {
@@ -905,14 +907,12 @@
        })
      }
    })
    this.setData({
      applyResourceLoading: false
    })
    wx.hideLoading()
  },
  // 申请教学资源
  applyResource() {
    this.setData({
      applyResourceLoading: true
    wx.showLoading({
      title: '加载中',
    })
    // let role = userStore.userInfo ? userStore.userInfo.role : null
    // if (role) {
@@ -1306,7 +1306,6 @@
        keys: [this.data.bookId]
      })
      .then((res) => {
        console.log(JSON.parse(res[0].value));
        if (res && res.length) {
          const mock = JSON.parse(res[0].value)
          mock.forEach(item => {
packageBookService/pages/bookServices/detail/index.wxml
@@ -3,7 +3,12 @@
<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>
@@ -14,19 +19,35 @@
    <view class="book-detail">
      <view class="detail-left">
        <view class="book-img">
          <image loading="" src="{{bookDetail.icon}}" mode="aspectFill" aria-label="{{bookDetail.name}}" />
          <image
            loading=""
            src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}"
            mode="aspectFill"
            aria-label="{{bookDetail.name}}"
          />
        </view>
        <view class="book-use">
          <view class="collect" bind:tap="setCollect">
            <view>
              <image loading="" src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}" />
              <image loading="" src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}" />
              <image
                loading=""
                src="/static/images/bookService/detail/collect.png"
                wx:if="{{!bookDetail.isFavourite}}"
              />
              <image
                loading=""
                src="/static/images/bookService/detail/collecting.png"
                wx:if="{{bookDetail.isFavourite}}"
              />
            </view>
            <view class="use-title">收藏</view>
          </view>
          <view class="suggest" bind:tap="suggestBtn">
            <view>
              <image loading="" src="/static/images/bookService/detail/suggest.png" />
              <image
                loading=""
                src="/static/images/bookService/detail/suggest.png"
              />
            </view>
            <view class="use-title">我要建议</view>
          </view>
@@ -48,15 +69,24 @@
            <view class="li-content">{{bookDetail.isbn}}</view>
          </view>
          <view class="message-li">
            <view class="li-title" wx:if="{{bookDetail.publicationDate}}">出版时间:</view>
            <view class="li-title" wx:if="{{bookDetail.publicationDate}}"
              >出版时间:</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>
        </view>
        <image src="/static/images/bookService/detail/square.png" class="right-background" />
        <image
          src="/static/images/bookService/detail/square.png"
          class="right-background"
        />
      </view>
    </view>
    <!-- 销售信息 -->
@@ -68,63 +98,158 @@
            <image src="/static/images/bookService/detail/electon-price.png" />
          </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="price-text"
              >{{bookDetail.price == '0.00' ? '免费' : '¥'+
              bookDetail.price}}</view
            >
            <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}"
              >¥{{bookDetail.oldPrice}}
            </view>
          </view>
          <view> </view>
        </view>
        <!-- 纸质书售价 -->
        <view class="paper-price">
        <view class="paper-price" wx:if="{{bookDetail.paperPrice}}">
          <view>
            <image src="/static/images/bookService/detail/paper-price.png" />
          </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">
        <image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.JDLink}}" data-type="jd" />
        <image class="tmall-image" src="/static/images/bookService/detail/tmall.png" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" wx:if="{{bookDetail.tmallLink}}" />
        <image src="/static/images/bookService/detail/dangdang.png" bind:tap="goShop" data-link="{{bookDetail.dangdangLink}}" wx:if="{{bookDetail.dangdangLink}}" />
        <image src="/static/images/bookService/detail/weidian.png" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}" />
        <image
          src="/static/images/bookService/detail/jd.png"
          wx:if="{{bookDetail.JDLink}}"
          bind:tap="goShop"
          data-link="{{bookDetail.JDLink}}"
          data-type="jd"
        />
        <image
          class="tmall-image"
          src="/static/images/bookService/detail/tmall.png"
          bind:tap="goShop"
          data-link="{{bookDetail.tmallLink}}"
          wx:if="{{bookDetail.tmallLink}}"
        />
        <image
          src="/static/images/bookService/detail/dangdang.png"
          bind:tap="goShop"
          data-link="{{bookDetail.dangdangLink}}"
          wx:if="{{bookDetail.dangdangLink}}"
        />
        <image
          src="/static/images/bookService/detail/weidian.png"
          bind:tap="goShop"
          data-link="{{bookDetail.weidianLink}}"
          wx:if="{{bookDetail.weidianLink}}"
        />
      </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}}" wx:if="{{bookDetail.content && bookDetail.authorIntroduction}}"></book-brief>
        <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" class="noData">
        <book-brief
          content="{{bookDetail.content}}"
          authorIntroduction="{{bookDetail.authorIntroduction}}"
          wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"
        ></book-brief>
        <view
          wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}"
          class="noData"
        >
          <t-empty icon="folder-open" description="暂无数据" />
        </view>
      </t-tab-panel>
      <t-tab-panel label="电子书" value="jsek_eBook" style="{{tabPanelstyle}}">
        <epub-view fileInfo="{{fileInfo}}" id="eBook" class="webView"></epub-view>
        <epub-view
          fileInfo="{{fileInfo}}"
          id="eBook"
          class="webView"
        ></epub-view>
      </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 && !noResources}}">
          <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource>
          <tree openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}"></tree>
          <teach-resource
            applyState="{{applyState}}"
            rejectCause="{{rejectCause}}"
            deadline="{{deadline}}"
            bind:applyResource="applyResource"
            applyResourceLoading="{{applyResourceLoading}}"
          ></teach-resource>
          <tree
            openIds="{{openTeachids}}"
            bookInfo="{{bookDetail}}"
            treeList="{{teach}}"
            tab="{{tabValue}}"
            applyState="{{applyState}}"
            bind:downloadTeach="downloadTeach"
            openTeachids="{{openTeachids}}"
            wx:if="{{teach.length}}"
          ></tree>
        </view>
        <t-loading theme="circular" size="60rpx" class="loading" loading="{{loading}}" />
        <t-loading
          theme="circular"
          size="60rpx"
          class="loading"
          loading="{{loading}}"
        />
        <view wx:if="{{noResources}}" class="noData">
          <t-empty icon="folder-open" description="暂无数据" />
        </view>
      </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" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}"></learn-resource>
          <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}"></tree>
          <learn-resource
            bind:getFreeResource="getFreeResource"
            bind:allAddShoppiingCar="allAddShoppiingCar"
            id="learn-resource"
            buyResourceData="{{buyResourceData}}"
            bookId="{{bookDetail.id}}"
          ></learn-resource>
          <tree
            id="tree"
            openIds="{{openLearnids}}"
            bookInfo="{{bookDetail}}"
            tab="{{tabValue}}"
            treeList="{{learn}}"
            buyIds="{{buyIdList}}"
            openLearnids="{{openLearnids}}"
          ></tree>
        </view>
        <view wx:if="{{noResources}}" class="noData">
          <t-empty icon="folder-open" description="暂无数据" />
        </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}}" mockData="{{mockData}}"></test-resource>
          <test-resource
            list="{{test}}"
            bookInfo="{{bookDetail}}"
            mockData="{{mockData}}"
          ></test-resource>
        </view>
        <view wx:if="{{noResources}}" class="noData">
          <t-empty icon="folder-open" description="暂无数据" />
@@ -139,31 +264,77 @@
  <view class="box-bottom">
    <view class="bottom-btn" bind:tap="appplyElectronicBook">
      <view>
        <t-image loading="" src="/static/images/bookService/detail/ebook.png"></t-image>
        <t-image
          loading=""
          src="/static/images/bookService/detail/ebook.png"
        ></t-image>
      </view>
      <view class="btn-text">电子样书申请</view>
    </view>
    <view class="bottom-btn" bind:tap="appplyPaperBook">
      <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 {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" bind:tap="addBookShopcCar" wx:if="{{tabValue != 'jsek_eBook'}}">加入购物车</view>
    <view class="buy  {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" bind:tap="buyBtn" wx:if="{{tabValue != 'jsek_eBook'}}">立即购买</view>
    <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}">加入购物车</view>
    <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}">立即购买</view>
    <view class="read buyColor" bind:tap="goRead" wx:if="{{tabValue == 'jsek_eBook' && bookBuy}}">立即查看</view>
    <view
      class="shopCar {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}"
      bind:tap="addBookShopcCar"
      wx:if="{{tabValue != 'jsek_eBook'}}"
      >加入购物车</view
    >
    <view
      class="buy  {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}"
      bind:tap="buyBtn"
      wx:if="{{tabValue != 'jsek_eBook'}}"
      >立即购买</view
    >
    <view
      class="shopCar shopCarColor"
      bind:tap="addBookShopcCar"
      wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}"
      >加入购物车</view
    >
    <view
      class="buy buyColor"
      bind:tap="buyBtn"
      wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}"
      >立即购买</view
    >
    <view
      class="read buyColor"
      bind:tap="goRead"
      wx:if="{{tabValue == 'jsek_eBook' && bookBuy}}"
      >立即查看</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"
/>
<view class="applyBox" bindtap="goApply">
  <view class="box">
    <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" />
    <t-image
      src="/static/images/home/yangshuForm1.png"
      mode="heightFix"
      class="img"
    />
    <view class="num" wx:if="{{num > 0}}">{{num}}</view>
  </view>
</view>
</view>
packageBookService/pages/bookServices/examination/examination.js
@@ -362,10 +362,12 @@
  },
  // 提交逻辑
  submitPaper() {
    // 关闭退出页面监听
    wx.disableAlertBeforeUnload()
    this.setData({
      submitStatus: true
      submitStatus: true,
      loading: true
    })
    const child = this.selectComponent('#question-options')
    if (this.data.answerType == 'option' || this.data.answerType == 'errorQuestion' || this.data.answerType == 'mock') {
@@ -423,7 +425,9 @@
      })
      child.openTestReportDialog()
    }
    this.setData({
      loading: false
    })
  },
  // 初始化函数
  async init() {
packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -1,122 +1,55 @@
<!--pages/bookServices/examination/questionList/index.wxml-->
<view
  class="question-list"
  style="background-color:{{isNight ? '#222' : '#fff'}}"
>
<view class="question-list" style="background-color:{{isNight ? '#222' : '#fff'}}">
  <!-- 题型title -->
  <view
    class="question-title"
    wx:if="{{questionList[showIndex].type}}"
    style="background-color:{{isNight ? '#222' : '#fff'}}"
  >
    <text class="title-name">{{questionList[showIndex].type}}</text
    ><text class="title-score" style="color: {{isNight ? '#fff' : '#000'}};"
      >(每题{{questionList[showIndex].score}}分)</text
    >
  <view class="question-title" wx:if="{{questionList[showIndex].type}}" style="background-color:{{isNight ? '#222' : '#fff'}}">
    <text class="title-name">{{questionList[showIndex].type}}</text><text class="title-score" style="color: {{isNight ? '#fff' : '#000'}};">(每题{{questionList[showIndex].score}}分)</text>
  </view>
  <!-- 题目列表 -->
  <swiper class="swiper" bind:change="changeSwiper" current="{{currentIndex}}">
    <swiper-item wx:for="{{questionList}}" wx:key="id">
    <swiper-item wx:for="{{questionList}}" wx:key="id" style="overflow-y: auto;">
      <!-- 题干 -->
      <view
        class="question-stem title-score"
        style="color: {{isNight ? '#fff' : '#000'}}; font-size: {{sliderValue || 32}}rpx;"
      >
      <view class="question-stem title-score" style="color: {{isNight ? '#fff' : '#000'}}; font-size: {{sliderValue || 32}}rpx;">
        <!-- 题号 -->
        <text>{{item.number}}.</text>
        <!-- 仅文字 -->
        <view
          wx:if="{{item.stemStyle == 'Txt' && item.questionType != 'completion'}}"
          >{{item.stem.stemTxt}}</view
        >
        <view wx:if="{{item.stemStyle == 'Txt' && item.questionType != 'completion'}}">{{item.stem.stemTxt}}</view>
        <!-- 仅图片 -->
        <view wx:elif="{{item.stemStyle == 'Image'}}">
          <t-image src="{{item.stem.stemImage}}" />
        </view>
        <!-- 图片加文字 -->
        <view
          wx:elif="{{item.stemStyle == 'TxtAndImage'}}"
          class="title-TxtAndImage"
        >
        <view wx:elif="{{item.stemStyle == 'TxtAndImage'}}" class="title-TxtAndImage">
          <text>{{item.stem.stemTxt}}</text>
          <t-image src="{{item.stem.stemImage}}" />
        </view>
        <!-- 富文本 -->
        <view
          wx:elif="{{item.stemStyle == 'RichText'}} "
          class="title-RichText"
        >
        <view wx:elif="{{item.stemStyle == 'RichText'}} " class="title-RichText">
          <rich-text nodes="{{item.stem.stemTxt}}"></rich-text>
        </view>
        <!-- 填空题 -->
        <view wx:if="{{item.questionType == 'completion'}}">
          <view
            class="completion-box"
            wx:for="{{item.stem}}"
            wx:for-item="inputItem"
            wx:for-index="inputIndex"
            wx:key="inputIndex"
          >
            <t-input
              disabled="{{item.isComplete}}"
              bind:change="onChangeInput"
              data-value="{{item.option}}"
              data-id="{{item.id}}"
              data-index="{{inputItem.num}}"
              class="title-input"
              style="border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;background-color:{{isNight ? '#000' : '#fff'}}; "
              placeholder-style="{{placeholderstyle}}"
              wx:if="{{inputItem.data == 'input'}}"
              placeholder="请输入文字"
              value="{{item.userAnswer[inputItem.num]}}"
            ></t-input>
          <view class="completion-box" wx:for="{{item.stem}}" wx:for-item="inputItem" wx:for-index="inputIndex" wx:key="inputIndex">
            <t-input disabled="{{item.isComplete}}" bind:change="onChangeInput" data-value="{{item.option}}" data-id="{{item.id}}" data-index="{{inputItem.num}}" class="title-input" style="border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;background-color:{{isNight ? '#000' : '#fff'}}; " placeholder-style="{{placeholderstyle}}" wx:if="{{inputItem.data == 'input'}}" placeholder="请输入文字" value="{{item.userAnswer[inputItem.num]}}"></t-input>
            <text wx:else>{{inputItem}}</text>
          </view>
        </view>
      </view>
      <!-- 答题区域 -->
      <view class="question-answer">
      <view class="question-answer {{item.questionType == 'shortAnswer' ? 'textarea-center' : ''}}">
        <!-- 单选题 -->
        <t-radio-group
          wx:if="{{item.questionType == 'singleChoice' || item.questionType == 'judge'}}"
          defaultValue="{{item.userAnswer}}"
          disabled="{{item.isComplete}}"
          bind:change="onChangeRadio"
          class="radio-group"
          data-value="{{item.option}}"
          data-id="{{item.id}}"
        >
          <view
            wx:for="{{item.option}}"
            wx:for-item="contentItem"
            wx:for-index="contentIndex"
            wx:key="contentIndex"
          >
            <t-radio
              value="{{contentItem.value}}"
              icon="none"
              placement="right"
              borderless
              style="background-color: {{isNight ? '#222' : '#fff'}}"
            >
              <view
                style="font-size: {{sliderValue || 32}}rpx;"
                class="radio-item {{(answerType == 'option' || answerType == 'mock' ) && !submitStatus && item.userAnswer == contentItem.value ? 'radio-active' : isNight ? 'night' :''}} {{ (item.answer == contentItem.value && item.answer == item.userAnswer &&  submitStatus) ? 'radio-correct' :  (item.userAnswer == contentItem.value && item.userAnswer != item.answer && submitStatus) ?'radio-error' :'' }}"
              >
        <t-radio-group wx:if="{{item.questionType == 'singleChoice' || item.questionType == 'judge'}}" defaultValue="{{item.userAnswer}}" disabled="{{item.isComplete}}" bind:change="onChangeRadio" class="radio-group" data-value="{{item.option}}" data-id="{{item.id}}">
          <view wx:for="{{item.option}}" wx:for-item="contentItem" wx:for-index="contentIndex" wx:key="contentIndex">
            <t-radio value="{{contentItem.value}}" icon="none" placement="right" borderless style="background-color: {{isNight ? '#222' : '#fff'}}">
              <view style="font-size: {{sliderValue || 32}}rpx;" class="radio-item {{(answerType == 'option' || answerType == 'mock' ) && !submitStatus && item.userAnswer == contentItem.value ? 'radio-active' : isNight ? 'night' :''}} {{ (item.answer == contentItem.value && item.answer == item.userAnswer &&  submitStatus) ? 'radio-correct' :  (item.userAnswer == contentItem.value && item.userAnswer != item.answer && submitStatus) ?'radio-error' :'' }}">
                <!-- 仅文字 -->
                <text wx:if="{{item.optionStyle == 'Txt'}}"
                  >{{contentItem.value}}、{{contentItem.txt}}</text
                >
                <text wx:if="{{item.optionStyle == 'Txt'}}">{{contentItem.value}}、{{contentItem.txt}}</text>
                <!-- 仅图片 -->
                <view wx:if="{{item.optionStyle == 'Image'}}" class="fl-center">
                  <text>{{contentItem.value}}、</text>
                  <t-image src="{{contentItem.img}}" />
                </view>
                <!-- 文字加图片 -->
                <view
                  wx:if="{{item.optionStyle == 'TxtAndImage'}}"
                  class="fl-center"
                >
                <view wx:if="{{item.optionStyle == 'TxtAndImage'}}" class="fl-center">
                  <text>{{contentItem.value}}、</text>
                  <text>{{contentItem.txt}}</text>
                  <t-image src="{{contentItem.img}}" />
@@ -126,57 +59,25 @@
                  <text>{{contentItem.value}}、</text>
                  <rich-text nodes="{{contentItem.txt}}"></rich-text>
                </view>
                <text
                  wx:if="{{submitStatus && (item.answer == contentItem.value && item.answer == item.userAnswer)}}"
                  >对</text
                >
                <text
                  wx:if="{{ submitStatus && (item.userAnswer == contentItem.value && item.userAnswer != item.answer)}}"
                  >错</text
                >
                <text wx:if="{{submitStatus && (item.answer == contentItem.value && item.answer == item.userAnswer)}}">对</text>
                <text wx:if="{{ submitStatus && (item.userAnswer == contentItem.value && item.userAnswer != item.answer)}}">错</text>
              </view>
            </t-radio>
          </view>
        </t-radio-group>
        <!-- 多选题 -->
        <t-checkbox-group
          disabled="{{item.isComplete}}"
          class="checkbox-group"
          wx:elif="{{item.questionType == 'multipleChoice'}}"
          t-class="box"
          borderless
          bind:change="onChangeRadio"
          data-value="{{item.option}}"
          data-id="{{item.id}}"
          defaultValue="{{item.userAnswer}}"
        >
          <view
            wx:for="{{item.option}}"
            wx:for-item="contentItem"
            wx:for-index="contentIndex"
            wx:key="contentIndex"
          >
            <t-checkbox
              block="{{false}}"
              value="{{contentItem.value}}"
              style="background-color:{{isNight ? '#000' :'#fff'}}; "
            >
        <t-checkbox-group disabled="{{item.isComplete}}" class="checkbox-group" wx:elif="{{item.questionType == 'multipleChoice'}}" t-class="box" borderless bind:change="onChangeRadio" data-value="{{item.option}}" data-id="{{item.id}}" defaultValue="{{item.userAnswer}}">
          <view wx:for="{{item.option}}" wx:for-item="contentItem" wx:for-index="contentIndex" wx:key="contentIndex">
            <t-checkbox block="{{false}}" value="{{contentItem.value}}" style="background-color:{{isNight ? '#000' :'#fff'}}; ">
              <!-- 仅文字 -->
              <text
                wx:if="{{item.optionStyle == 'Txt'}}"
                style="color:{{ isNight  ? '#fff' : '#000'}}"
                >{{contentItem.value}}、{{contentItem.txt}}</text
              >
              <text wx:if="{{item.optionStyle == 'Txt'}}" style="color:{{ isNight  ? '#fff' : '#000'}}">{{contentItem.value}}、{{contentItem.txt}}</text>
              <!-- 仅图片 -->
              <view wx:if="{{item.optionStyle == 'Image'}}" class="fl-center">
                <text>{{contentItem.value}}、</text>
                <t-image src="{{contentItem.img}}" />
              </view>
              <!-- 文字加图片 -->
              <view
                wx:if="{{item.optionStyle == 'TxtAndImage'}}"
                class="fl-center"
              >
              <view wx:if="{{item.optionStyle == 'TxtAndImage'}}" class="fl-center">
                <text>{{contentItem.value}}、</text>
                <text>{{contentItem.txt}}</text>
                <t-image src="{{contentItem.img}}" />
@@ -190,126 +91,41 @@
          </view>
        </t-checkbox-group>
        <!-- 简答 翻译 -->
        <t-textarea
          disabled="{{item.isComplete}}"
          value="{{item.userAnswer}}"
          bind:change="onChangeRadio"
          data-value="{{item.option}}"
          data-id="{{item.id}}"
          class="option-textarea"
          wx:elif="{{item.questionType == 'shortAnswer'}}"
          t-class="external-class"
          placeholder="请输入文字"
          bordered
          maxlength="500"
          disableDefaultPadding="{{true}}"
          indicator
          style="background-color:{{isNight ? '#000' : '#fff'}}; "
        />
        <t-textarea disabled="{{item.isComplete}}" value="{{item.userAnswer}}" bind:change="onChangeRadio" data-value="{{item.option}}" data-id="{{item.id}}" class="option-textarea" wx:elif="{{item.questionType == 'shortAnswer'}}" t-class="external-class" placeholder="请输入文字" bordered maxlength="500" disableDefaultPadding="{{true}}" indicator style="background-color:{{isNight ? '#000' : '#fff'}}; " />
      </view>
      <!-- 单选、多选解析 -->
      <view
        class="analysis"
        wx:if="{{item.isComplete && (item.questionType == 'singleChoice' || item.questionType == 'judge' || item.questionType == 'multipleChoice')}}"
      >
      <view class="analysis" wx:if="{{item.isComplete && (item.questionType == 'singleChoice' || item.questionType == 'judge' || item.questionType == 'multipleChoice')}}">
        <view class="analysis-answer">
          <view
            class="answer-correct answer-center"
            style="font-size: {{sliderValue || 32}}rpx;"
          >
          <view class="answer-correct answer-center" style="font-size: {{sliderValue || 32}}rpx;">
            <text class="analysis-title-box">正确答案:</text>
            <rich-text
              nodes="{{item.answer}}"
              style="font-size: {{sliderValue || 40}}rpx;"
            ></rich-text>
            <rich-text nodes="{{item.answer}}" style="font-size: {{sliderValue || 40}}rpx;"></rich-text>
          </view>
          <view
            class="answer-center marginL {{item.isRight ? 'answer-correct' : 'answer-error'}}"
            wx:if="{{item.questionType !== 'shortAnswer'}}"
          >
            <text
              class="analysis-title-box"
              style="font-size: {{sliderValue || 32}}rpx;"
              >您的答案:</text
            ><text
              class="answer-text"
              style="font-size: {{sliderValue || 40}}rpx;"
              >{{item.userAnswer}}</text
            >
          <view class="answer-center marginL {{item.isRight ? 'answer-correct' : 'answer-error'}}" wx:if="{{item.questionType !== 'shortAnswer'}}">
            <text class="analysis-title-box" style="font-size: {{sliderValue || 32}}rpx;">您的答案:</text><text class="answer-text" style="font-size: {{sliderValue || 40}}rpx;">{{item.userAnswer}}</text>
          </view>
        </view>
        <view
          class="analysis-text"
          wx:if="{{item.analysisCon}}"
          style="color: {{isNight ? '#fff' : '#000'}};"
        >
          <text style="font-size: {{sliderValue || 32}}rpx;">答案解析:</text
          ><rich-text
            style="font-size: {{sliderValue || 32}}rpx;"
            nodes="{{item.analysisCon}}"
            class="analysis-content"
          ></rich-text>
        <view class="analysis-text" wx:if="{{item.analysisCon}}" style="color: {{isNight ? '#fff' : '#000'}};">
          <text style="font-size: {{sliderValue || 32}}rpx;">答案解析:</text>
          <rich-text style="font-size: {{sliderValue || 32}}rpx;" nodes="{{item.analysisCon}}" class="analysis-content"></rich-text>
        </view>
      </view>
      <!-- 填空、简答解析 -->
      <view
        class="analysis"
        wx:if="{{(item.questionType == 'shortAnswer' || item.questionType == 'completion') && item.isComplete}}"
      >
        <view
          style="display: {{item.questionType == 'completion' ? 'flex' : 'block'}}"
        >
          <text
            wx:if="{{item.questionType == 'completion'}}"
            class="short-answer-fz answer-correct"
            style="font-size:{{sliderValue || 32}}rpx;"
            >正确答案:</text
          >
          <text
            wx:if="{{item.questionType == 'shortAnswer'}}"
            class="short-answer-fz"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
          >
      <view class="analysis" wx:if="{{(item.questionType == 'shortAnswer' || item.questionType == 'completion') && item.isComplete}}">
        <view style="display: {{item.questionType == 'completion' ? 'flex' : 'block'}}">
          <text wx:if="{{item.questionType == 'completion'}}" class="short-answer-fz answer-correct" style="font-size:{{sliderValue || 32}}rpx;">正确答案:</text>
          <text wx:if="{{item.questionType == 'shortAnswer'}}" class="short-answer-fz" style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;">
            参考答案:
          </text>
          <rich-text
            wx:if="{{item.questionType == 'shortAnswer'}}"
            nodes="{{item.answer}}"
            style="font-size:{{sliderValue || 28}}rpx; color:{{item.questionType == 'completion' ? '#1FBC1F' : isNight ? '#fff' : '#000'}}"
          ></rich-text>
          <view
            wx:if="{{item.questionType == 'completion'}}"
            style="font-size:{{sliderValue || 28}}rpx;"
            class="short-answer-fz answer-correct"
            >{{item.answer}}</view
          >
          <rich-text wx:if="{{item.questionType == 'shortAnswer'}}" nodes="{{item.answer}}" style="font-size:{{sliderValue || 28}}rpx; color:{{item.questionType == 'completion' ? '#1FBC1F' : isNight ? '#fff' : '#000'}}"></rich-text>
          <view wx:if="{{item.questionType == 'completion'}}" style="font-size:{{sliderValue || 28}}rpx;" class="short-answer-fz answer-correct">{{item.answer}}</view>
        </view>
        <view
          wx:if="{{item.questionType == 'completion'}}"
          class="short-answer-mr"
          style="display: {{item.questionType == 'completion' ? 'flex' : 'block'}}"
        >
          <text
            class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}"
            style="font-size:{{sliderValue || 28}}rpx;"
            >您的答案:</text
          >
          <view
            class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
            >{{item.userAnswer}}</view
          >
        <view wx:if="{{item.questionType == 'completion'}}" class="short-answer-mr" style="display: {{item.questionType == 'completion' ? 'flex' : 'block'}}">
          <text class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}" style="font-size:{{sliderValue || 28}}rpx;">您的答案:</text>
          <view class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}" style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;">{{item.userAnswer}}</view>
        </view>
        <view class="short-answer-mr">
          <text
            class="short-answer-fz;"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
            >答案解析:</text
          >
          <rich-text
            nodes="{{item.analysisCon}}"
            style="font-size:{{sliderValue || 28}}rpx;;color:{{isNight ? '#fff' : '#000'}}"
          ></rich-text>
          <text class="short-answer-fz;" style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;">答案解析:</text>
          <rich-text nodes="{{item.analysisCon}}" style="font-size:{{sliderValue || 28}}rpx;;color:{{isNight ? '#fff' : '#000'}}"></rich-text>
        </view>
      </view>
    </swiper-item>
@@ -317,4 +133,4 @@
      <text>没有更多了。。。</text>
    </swiper-item>
  </swiper>
</view>
</view>
packageBookService/pages/bookServices/examination/questionList/index.wxss
@@ -1,8 +1,9 @@
/* pages/bookServices/examination/questionList/index.wxss */
.question-list {
  width: 95%;
  height: 84%;
  height: 85%;
  padding: 20rpx;
  background-color: #ffffff;
  border-radius: 20rpx;
  margin-top: 20rpx;
@@ -153,7 +154,6 @@
.analysis-title-box {
  display: inline-block;
  /* width: 160rpx; */
  white-space: nowrap;
}
@@ -176,4 +176,9 @@
.short-answer-mr {
  margin-top:
    40rpx;
}
.textarea-center {
  display: flex;
  justify-content: center;
}
packageBookService/pages/bookServices/list/index.wxml
@@ -22,7 +22,7 @@
<view class="bookServices-list">
  <view class="list-header">
    <scroll-view scroll-x="{{true}}" class="header-scroll">
      <t-dropdown-menu style="width: 800rpx">
      <t-dropdown-menu style="width: 1000rpx">
        <t-dropdown-item
          options="{{stairList.options}}"
          value="{{stairList.value}}"
packageBookService/pages/bookServices/list/index.wxss
@@ -14,6 +14,27 @@
  display: flex;
}
.list-header .t-button--primary {
  border-radius: 50rpx !important;
  background: #FF6C00 !important;
  border: none;
}
.list-header .t-button--light {
  background: #fff !important;
  border-radius: 50rpx !important;
  color: #545C63 !important;
  border: 2rpx solid #979797 !important;
}
.t-dropdown-menu__item--active,
.t-radio__icon--checked,
.t-checkbox__icon--checked,
.t-radio__title--checked,
.t-checkbox__title--checked {
  color: #FF6C00 !important;
}
.header-sort {
  position: relative;
  background-color: #fff;
pages/bookServices/assort/index.wxss
@@ -25,9 +25,10 @@
}
.page-container {
  padding: 120rpx 0 20rpx 0;
  padding-top: 120rpx;
  padding-bottom: constant(safe-area-inset-bottom);
  width: 100%;
  height: 90%;
  height: 100%;
}
.side-bar-wrapper {
@@ -65,7 +66,7 @@
.myScroll {
  /* 盒子的样式 */
  width: 100%;
  height: 98rpx;
  height: 108rpx;
  white-space: nowrap;
}
@@ -95,8 +96,9 @@
.class-box {
  background-color: #fff;
  margin-bottom: 20rpx;
  padding: 10rpx 12rpx;
  padding: 10rpx 0rpx;
  border-radius: 12rpx;
  box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08);
}
@@ -109,8 +111,7 @@
.class-content {
  display: flex;
  flex-wrap: wrap;
  /* padding: 5rpx 20rpx 30rpx 30rpx; */
  padding: 30rpx;
  padding: 30rpx 0;
}
.book-box {