111
QYF-GitLab1
2025-01-03 2ee8ddb1ecac7df4198e54e08ec7f22daf4b07c0
packageBookService/pages/bookServices/detail/index.wxml
@@ -1,26 +1,10 @@
<!--pages/bookServices/detail/index.wxml-->
<import src="index.skeleton.wxml" />
<template is="skeleton" wx:if="{{pageLoading}}" />
<!-- pageLoading -->
<!--导航区域 -->
<suggest-dialog class="suggest-dialog" showIndex="{{showIndex}}" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest-dialog>
<!-- <popup showIndex="{{showIndex}}"></popup> -->
<view class="page-bookService" wx:if="{{!pageLoading}}">
  <!-- <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;">
    <view>
      <t-icon
        name="chevron-left"
        size="30"
        data-name="{{item}}"
        bind:click="goBack"
      />
    </view>
    <view class="navbar-title" style="width: 100%">
      <text>{{options.name}}</text>
    </view>
  </view> -->
  <t-toast id="t-toast" />
  <movable-area class="movable-area">
    <scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom">
@@ -43,7 +27,11 @@
                <view>
                  <image loading="" src="/static/images/bookService/detail/suggest.png" />
                </view>
                <view class="use-title">我要建议</view>
                <view class="use-title">建议</view>
              </view>
              <view class="suggest" bindtap="editPhone">
                <t-icon class="editIcon" style="color: rgb(194, 194, 194);" name="calendar-edit" size="40rpx" />
                <view class="use-title">联系</view>
              </view>
            </view>
          </view>
@@ -110,12 +98,12 @@
      </view>
      <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-empty icon="folder-open" description="暂无数据" />
          <t-tab-panel label="图书信息" icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}" value="brief" style="{{tabPanelstyle}}">
            <book-brief content="{{bookDetail.content}}" catalogue="{{bookDetail.catalogue}}" authorIntroduction="{{bookDetail.authorIntroduction}}" wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"></book-brief>
            <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction && !loading}}" class="noData">
              <!-- <t-empty icon="folder-open" description="暂无数据" /> -->
              <empty />
            </view>
          </t-tab-panel>
          <!-- <t-tab-panel
@@ -126,36 +114,30 @@
        >
        </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}}" isShoppingCart="isShoppingCart" bind:updateCloudLearning="updateCloudLearning"></tree>
            <view wx:if="{{!loading  && applyState}}">
              <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" md5List="{{md5List}}" applyResourceLoading="{{applyResourceLoading}}" bind:uploadFile="uploadFile"></teach-resource>
              <tree id="teach-tree" openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" deadline="{{deadline}}" bind:downloadTeach="downloadTeach" bind:handleTree="handleTree" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}" isShoppingCart="isShoppingCart" bind:updateCloudLearning="updateCloudLearning"></tree>
            </view>
            <!-- <t-loading
              theme="circular"
              size="60rpx"
              class="loading"
              loading="{{loading }}"
            /> -->
            <view wx:if="{{loading}}" style="width: 100%; height: min-content">
              <t-skeleton row-col="{{rowCol}}" theme="paragraph" animation="gradient" loading="{{loading}}"></t-skeleton>
            </view>
            <view wx:if="{{noResources}}" class="noData">
              <t-empty icon="folder-open" description="暂无数据" />
            <view wx:if="{{noResources && !loading}}" class="noData">
              <empty />
            </view>
          </t-tab-panel>
          <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}}"   successOrderNumber="{{successOrderNumber}}" ></learn-resource>
              <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}" isshowDrawBtn="{{isshowDrawBtn}}" successOrderNumber="{{successOrderNumber}}" isGoBuyResource="{{isGoBuyResource}}" isShowBuyCloundMenu="{{isShowBuyCloundMenu}}" isShowBuyCloundBtn="{{isShowBuyCloundBtn}}" bind:buyCloudLearnClass="buyCloudLearnClass" learnTaskData="{{learnTaskData}}"></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}}" learnList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" cloundMenuIsBuy="{{cloundMenuIsBuy}}" learnMenu="{{learnMenu}}" isCloundHaveSaleMethod="{{isCloundHaveSaleMethod}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning" bind:getCloundIsBuy="getCloundIsBuy"></tree>
            </view>
            <view wx:if="{{noResources}}" class="noData">
              <t-empty icon="folder-open" description="暂无数据" />
            <view wx:if="{{noResources && !loading}}" class="noData">
              <empty />
            </view>
          </t-tab-panel>
          <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}}" bankSaleData="{{bankSaleData}}" isBuyBank="{{isBuyBank}}" isShoppingBank="{{isShoppingBank}}" bookInfo="{{bookDetail}}" openIds="{{openLearnids}}" mockData="{{mockData}}" tab="{{tabValue}}" storeInfo="{{options.storeInfo}}" jslx="{{jslx}}" bind:buyMock="buyMock" bind:buyBank="buyBank" bind:handleShoppingBank="handleShoppingBank"></test-resource>
            </view>
          </t-tab-panel>
          <t-tab-panel label="云笔记" icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}" value="jsek_note" style="{{tabPanelstyle}}">
@@ -165,8 +147,6 @@
            <related-books relatedBookData="{{relatedBookData}}" relatedBookLoading="{{relatedBookLoading}}" noRelatedBookData="{{noRelatedBookData}}" bind:goBookDetails="goBookDetails"></related-books>
          </t-tab-panel>
        </t-tabs>
      </view>
    </scroll-view>
    <movable-view class="movable-view" :x="{{x}}" :y="{{y}}" direction="all">
@@ -178,6 +158,13 @@
      </view>
    </movable-view>
  </movable-area>
  <!-- 联系编辑弹窗 -->
  <t-dialog visible="{{editDialog}}" close-btn>
    <view slot="content" class="editContent">
      <view class="editText">图书编辑:{{bookDetail.bookEditor}}</view>
      <view class="editText">联系方式:{{bookDetail.contactInformation}}</view>
    </view>
  </t-dialog>
  <!-- 我要建议弹窗 -->
  <suggest class="suggest-component" id="suggest-component" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest>
  <!-- 教学资源下载提示弹窗 -->
@@ -196,20 +183,92 @@
      </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 || applicationState == 'overdue'}}">
      <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="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 class="buy read" bind:tap="goRead" wx:if="{{bookBuy || applicationState == 'Normal'}}">立即查看</view>
  </view>
</view>
<view wx:if="{{dialogBox}}">
  <view class="popup-box" bindtap="closeDialog"></view>
  <view class="info-center">
    <view>
      <view class="row-info">
        <view class="body">
          <view class="dialog-title">文件上传</view>
          <view style="width: 100%; height: 2rpx; background-color: #f4f4f4"></view>
          <view class="from-item">
            <view class="label"> <text class="icon">*</text>资源名称: </view>
            <view class="item-content">
              <view class="inputBox1">
                <t-input placeholder="输入资源名称" borderless value="{{resourceInfo.resourceName}}" bindchange="onNameInput" />
              </view>
            </view>
          </view>
          <view class="from-item">
            <view class="label"> <text class="icon">*</text>资源类型: </view>
            <view class="item-content">
              <!-- <view class="inputBox1">
                <t-input placeholder="输入资源类型" borderless value="{{resourceInfo.fileType}}" bindchange="onFileTypeInput" />
              </view> -->
              <t-cell class="mb-16" title="" arrow hover note="{{resourceInfo.fileType}}" bind:click="onResourcePicker" />
              <t-picker visible="{{resourceVisible}}" value="{{resourceValue}}" data-key="resource" title="选择资源类型" cancelBtn="取消" confirmBtn="确认" usingCustomNavbar bindchange="onPickerChange" bindcancel="onPickerCancel">
                <t-picker-item options="{{fileTypeList}}" />
              </t-picker>
            </view>
          </view>
          <view class="from-item">
            <view class="label">文件描述:</view>
            <view class="item-content">
              <view class="inputBox1">
                <t-textarea placeholder="请输入文件描述" value="{{resourceInfo.description}}" disableDefaultPadding="{{true}}" autosize="{{true}}" maxlength="300" indicator bind:change="textareaChange" />
              </view>
            </view>
          </view>
          <view class="from-item">
            <view class="label"> <text class="icon">*</text>上传文件: </view>
            <view class="item-content">
              <t-button size="small" class="right-btn" bind:tap="uploadPicture" wx:if="{{isShowUp}}">点击上传</t-button>
              <view wx:if="{{!isShowUp && fileList.length > 0}}" class="fileList">
                <text class="fileName">{{fileList[0].name}}</text>
                <image src="/static/images/bookService/detail/deleteHover.png" class="deleteBtn" data-md5="{{fileList[0].md5}}" bind:tap="handleRemove" />
              </view>
            </view>
            <view class="tip">注:文件大小不得超过50MB</view>
          </view>
          <view class="from-item">
            <view class="protocolBox">
              <t-checkbox label="同意" icon="rectangle" checked="{{resourceInfo.agree}}" bind:change="onChange" />
              <text class="wait" bind:tap="getAgreement">《授权同意书》</text>
            </view>
          </view>
        </view>
        <view class="row-btn">
          <view class="left-btn" bindtap="closeDialog">取消</view>
          <view class="right-btn" bindtap="confirmM">确认</view>
        </view>
      </view>
    </view>
  </view>
</view>
<view class="popupBox">
  <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center">
    <view class="block">
      <view class="protocol">
        <rich-text space="emsp" nodes="{{protocolTxt}}" class="content" />
      </view>
      <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseProtocol" />
    </view>
  </t-popup>
</view>
<!-- <view class="loading" wx:if="{{pageLoading}}">
  <t-loading loading="{{pageLoading}}" size="40"></t-loading>
</view> -->