闫增涛
2024-04-10 8cbdee91e04162812b29134397a0c311759d0b77
优化答题器暂无数据显示
7个文件已修改
333 ■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 290 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.wxml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss
@@ -96,31 +96,17 @@
.card {
  position: relative;
  margin: 32rpx;
  border-radius: 12rpx;
  overflow: hidden;
  box-sizing: border-box;
  border: 3rpx solid #ff6c00;
  --td-radio-content-color: #0F1214;
}
.card--active {
  border-color: #ff6c00;
  --td-radio-bg-color: #ff6c00;
  --td-radio-content-color: #fff;
}
/* .card--active::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  border: 14px solid #0052d9;
  border-bottom-color: transparent;
  border-right-color: transparent;
} */
.card__icon {
  color: #fff;
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -131,16 +131,7 @@
    goPlayer(e) {
      // 检查登录状态
      const token = wx.getStorageSync(app.config.tokenKey);
      if (!token) {
        loginInfo(app, (data) => {
          // 如果不是第一次登录,会执行回调
          if (data) {
            // 登录成功,自动记录token和用户信息,并返回true
          } else {
            // 出现错误,返回false
          }
        });
      } else {
      if (token) {
        const item = e.currentTarget.dataset.item;
        const parent = e.currentTarget.dataset.parent;
        let url;
@@ -168,7 +159,7 @@
          });
        }
        wx.navigateTo({
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`,
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}`,
        });
        if (item.selectType == "document" || item.selectType == "pdf") {
          const fileLink =
packageBookService/pages/bookServices/detail/index.wxml
@@ -4,30 +4,55 @@
  <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
    <view>
      <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" />
      <t-icon
        name="chevron-left"
        size="30"
        data-name="{{item}}"
        bind:click="goBack"
      />
    </view>
    <view class="navbar-title">{{options.name}}</view>
  </view>
  <t-toast id="t-toast" />
  <scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom">
  <scroll-view
    scroll-y="{{true}}"
    class="book"
    bindscrolltolower="onReachBottom"
  >
    <!-- 图书详情 -->
    <view class="book-box">
      <view class="book-detail" id="book-detail">
        <view class="detail-left">
          <view class="book-img">
            <image loading="" src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" 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>
@@ -49,15 +74,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>
      <!-- 销售信息 -->
@@ -66,12 +100,17 @@
          <!-- 电子书售价 -->
          <view class="electron-price" wx:if="{{bookDetail.price}}">
            <view>
              <image src="/static/images/bookService/detail/electon-price.png" />
              <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>
@@ -81,25 +120,67 @@
            <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>
    <movable-area class="movable-area">
      <view class="book-resource">
        <t-tabs value="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class">
          <t-tab-panel label="图书简介" icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}" 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">
        <t-tabs
          value="{{tabValue}}"
          bind:change="onTabsChange"
          t-class="custom-tabs"
          t-class-content="custom-panel"
          class="tab-class"
        >
          <t-tab-panel
            label="图书简介"
            icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}"
            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"
            >
              <t-empty icon="folder-open" description="暂无数据" />
            </view>
          </t-tab-panel>
@@ -110,43 +191,124 @@
          style="{{tabPanelstyle}}"
        >
        </t-tab-panel> -->
          <t-tab-panel label="教学资源" icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}">
            <view wx:if="{{!loading && teach.length && !noResources && applyState}}">
              <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource>
              <tree id="teach-tree" openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach" bind:handleTree="handleTree" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}"></tree>
          <t-tab-panel
            label="教学资源"
            icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}"
            value="jsek_teachingResources"
            class="{{loading ? 'loading': ''}}"
          >
            <view
              wx:if="{{!loading && teach.length && !noResources && applyState}}"
            >
              <teach-resource
                applyState="{{applyState}}"
                rejectCause="{{rejectCause}}"
                deadline="{{deadline}}"
                bind:applyResource="applyResource"
                applyResourceLoading="{{applyResourceLoading}}"
              ></teach-resource>
              <tree
                id="teach-tree"
                openIds="{{openTeachids}}"
                bookInfo="{{bookDetail}}"
                treeList="{{teach}}"
                tab="{{tabValue}}"
                applyState="{{applyState}}"
                bind:downloadTeach="downloadTeach"
                bind:handleTree="handleTree"
                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="云学习" icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" value="jsek_cloudLearning" style="{{tabPanelstyle}}">
          <t-tab-panel
            label="云学习"
            icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}"
            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}}" isshowDrawBtn="{{isshowDrawBtn}}"></learn-resource>
              <learn-resource
                bind:getFreeResource="getFreeResource"
                bind:allAddShoppiingCar="allAddShoppiingCar"
                id="learn-resource"
                buyResourceData="{{buyResourceData}}"
                bookId="{{bookDetail.id}}"
                isshowDrawBtn="{{isshowDrawBtn}}"
              ></learn-resource>
              <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree>
              <tree
                id="tree"
                openIds="{{openLearnids}}"
                bookInfo="{{bookDetail}}"
                tab="{{tabValue}}"
                treeList="{{learn}}"
                buyIds="{{buyIdList}}"
                openLearnids="{{openLearnids}}"
                bind:updateShoppingCartHidden="updateShoppingCartHidden"
                bind:updateCloudLearning="updateCloudLearning"
              ></tree>
            </view>
            <view wx:if="{{noResources}}" class="noData">
              <t-empty icon="folder-open" description="暂无数据" />
            </view>
          </t-tab-panel>
          <t-tab-panel label="云测试" icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}" value="questionBank" style="{{tabPanelstyle}}">
          <t-tab-panel
            label="云测试"
            icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}"
            value="questionBank"
            style="{{tabPanelstyle}}"
          >
            <view wx:if="{{!loading}}">
              <test-resource id="test-resource" list="{{test}}" bookInfo="{{bookDetail}}" mockData="{{mockData}}" bind:buyMock="buyMock"></test-resource>
              <test-resource
                id="test-resource"
                list="{{test}}"
                bookInfo="{{bookDetail}}"
                mockData="{{mockData}}"
                bind:buyMock="buyMock"
              ></test-resource>
            </view>
          </t-tab-panel>
          <t-tab-panel label="云笔记" icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}" value="jsek_note" style="{{tabPanelstyle}}">
          <t-tab-panel
            label="云笔记"
            icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}"
            value="jsek_note"
            style="{{tabPanelstyle}}"
          >
            <note bookInfo="{{bookDetail}}" id="note" class="note-list"></note>
          </t-tab-panel>
          <t-tab-panel label="相关图书" icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}" value="related_books" style="{{tabPanelstyle}}">
            <related-books relatedBookData="{{relatedBookData}}" relatedBookLoading="{{relatedBookLoading}}" noRelatedBookData="{{noRelatedBookData}}" bind:goBookDetails="goBookDetails"></related-books>
          <t-tab-panel
            label="相关图书"
            icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}"
            value="related_books"
            style="{{tabPanelstyle}}"
          >
            <related-books
              relatedBookData="{{relatedBookData}}"
              relatedBookLoading="{{relatedBookLoading}}"
              noRelatedBookData="{{noRelatedBookData}}"
              bind:goBookDetails="goBookDetails"
            ></related-books>
          </t-tab-panel>
        </t-tabs>
      </view>
      <movable-view class="movable-view" :x="{{x}}" :y="{{y}}" direction="all">
        <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>
@@ -154,37 +316,73 @@
    </movable-area>
  </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="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="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy}}">
    <view
      class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}"
      bind:tap="goRead"
      wx:if="{{!bookBuy}}"
    >
      <view>
        <t-image src="/static/images/bookService/detail/shidu.png"></t-image>
      </view>
      <view class="btn-text">试读</view>
    </view>
    <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">加入购物车</view>
    <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">立即购买</view>
    <view class="buy receiveColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}">免费领取</view>
    <view
      class="shopCar shopCarColor"
      bind:tap="addBookShopcCar"
      wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}"
      >加入购物车</view
    >
    <view
      class="buy buyColor"
      bind:tap="buyBtn"
      wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}"
      >立即购买</view
    >
    <view
      class="buy receiveColor"
      bind:tap="buyBtn"
      wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}"
      >免费领取</view
    >
    <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">立即查看</view>
  </view>
</view>
<view class="loading" wx:if="{{pageLoading}}">
  <t-loading loading="{{pageLoading}}" size="40"></t-loading>
</view>
</view>
packageBookService/pages/bookServices/examination/examination.js
@@ -30,6 +30,7 @@
    total: 0, // 题目总数
    cardList: [], // 提交项,
    questionDataList: [], // 显示题目列表
    noData: false,
    mockid: 0,
    uuid: 0,
    mockData: {
@@ -46,6 +47,7 @@
    sliderValue: 0, // 字体滑块
    startTime: "", //进入页面当前时间
    pauseTime: 0, //暂停时间
  },
  /**
@@ -724,6 +726,7 @@
  async getQuestionList(oldData) {
    // 清空正确题数记录
    this.setData({
      noData: false,
      cardList: [],
      correctNum: 0,
    });
@@ -763,6 +766,9 @@
        },
      };
      await app.MG.store.getProductDetail(query).then((res) => {
        if (!res.datas.cmsDatas[0].datas.length) return this.setData({
          noData: true
        })
        this.setData({
          total: res.datas.cmsDatas[0].datas.length,
        });
@@ -1194,6 +1200,7 @@
        } else {
          this.setData({
            loading: false,
            noData: true
          });
          wx.showModal({
            title: "提示",
@@ -1433,7 +1440,8 @@
          this.getErrorDataList();
        } else {
          this.setData({
            loading: true,
            loading: false,
            noData: true
          });
          wx.showModal({
            title: "提示",
packageBookService/pages/bookServices/examination/examination.wxml
@@ -51,6 +51,7 @@
    currentIndex="{{currentIndex}}"
    questionList="{{questionDataList}}"
    submitStatus="{{submitStatus}}"
    noData="{{noData}}"
    bind:onChangeRadio="onChangeRadio"
    bind:onChangeInput="onChangeInput"
    bind:changeSwiper="changeSwiper"
packageBookService/pages/bookServices/examination/questionList/index.js
@@ -26,6 +26,9 @@
    },
    sliderValue: {
      type: Number,
    },
    noData:{
      type:Boolean,
    }
  },
  observers: {
packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -364,7 +364,7 @@
        </view>
      </view>
    </swiper-item>
    <swiper-item wx:if="{{!questionList.length}}">
    <swiper-item wx:if="{{noData}}">
      <view class="noData">
        <t-empty icon="folder-open" description="暂无数据" />
      </view>