闫增涛
2024-04-03 5bb338fc7ce81dcec7a46f33b88966e8de0aab10
packageBookService/pages/bookServices/detail/index.wxml
@@ -1,6 +1,6 @@
<!--pages/bookServices/detail/index.wxml-->
<!--导航区域 -->
<view class="page-bookService">
<view class="page-bookService" wx:if="{{!pageLoading}}">
  <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
    <view>
@@ -12,7 +12,7 @@
  <scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom">
    <!-- 图书详情 -->
    <view class="book-box">
      <view class="book-detail">
      <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}}" />
@@ -64,7 +64,7 @@
      <view class="book-sale">
        <view class="book-price">
          <!-- 电子书售价 -->
          <view class="electron-price">
          <view class="electron-price" wx:if="{{bookDetail.price}}">
            <view>
              <image src="/static/images/bookService/detail/electon-price.png" />
            </view>
@@ -95,28 +95,10 @@
      </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-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>
@@ -127,74 +109,35 @@
          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 }}" />
          <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}}"></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}}"></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}}"
        >
          <view wx:if="{{!loading && test.length}}">
            <test-resource list="{{test}}" bookInfo="{{bookDetail}}" mockData="{{mockData}}"></test-resource>
          </view>
          <view wx:if="{{noResources}}" class="noData">
            <t-empty icon="folder-open" description="暂无数据" />
        <t-tab-panel label="云测试" icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}" value="questionBank" style="{{tabPanelstyle}}">
          <view wx:if="{{!loading}}">
            <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>
      </t-tabs>
    </view>
@@ -224,10 +167,19 @@
      </view>
      <view class="btn-text">纸质样书申请</view>
    </view>
    <view class="bottom-btn tryRead" 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 {{((tabValue == 'brief' && bookBuy) || tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" bind:tap="addBookShopcCar">加入购物车</view>
    <view class="buy  {{((tabValue == 'brief' && bookBuy) ||tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" bind:tap="buyBtn">立即购买</view>
    <view class="buy shopCarColor" bind:tap="goRead" wx:if="{{tabValue == 'brief' && bookBuy}}">立即查看</view>
    <view class="buy shopCarColor" bind:tap="goRead" wx:if="{{tabValue == 'brief' && !bookBuy}}">在线试读</view>
    <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy}}">加入购物车</view>
    <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy}}">立即购买</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>