闫增涛
2024-03-28 72edc07a7fe714316d318708710c150f7d247bbc
图书分类、列表、详情页bug修改
16个文件已修改
440 ■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/testResource/testResource.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxss 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 186 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxss 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.wxml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.wxml 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/images/bookService/assort/book-img.png 补丁 | 查看 | 原始文档 | blame | 历史
static/images/default-book-img.png 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/testResource/testResource.js
@@ -127,6 +127,15 @@
      wx.navigateTo({
        url: `/packageBookService/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&answerTitle=${item.name}&answerType=${'mock'}&uuid=${item.id}&mockid=${mockid}`,
      })
    },
    // 购买组卷
    buyMock() {
      var myEventDetail = {}
      var myEventOption = {
        bubbles: true,
        composed: true
      }
      this.triggerEvent('buyMock', myEventDetail, myEventOption)
    }
  }
})
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxml
@@ -80,7 +80,10 @@
<!-- 组卷列表 -->
<view class="mock-data" wx:if="{{radioItem == 'mock'}}">
  <view wx:if="{{mockData.mockList.length}}">
    <view class="mack-num">已组卷{{mockData.mockList.length}}次</view>
    <view class="mack-num">
      <text>已组卷{{mockData.mockList.length}}次</text>
      <t-button class="buy-mock-btn" bind:tap="buyMock">购买组卷</t-button>
    </view>
    <view class="mock-list">
      <view
        class="mock-list-box"
packageBookService/pages/bookServices/detail/components/testResource/testResource.wxss
@@ -161,10 +161,15 @@
  height: 100rpx;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #333;
  font-size: 28rpx;
}
.mack-num button {
  margin: 0;
}
.mock-list-box {
  padding: 32rpx;
  background-color: #F9F9F9;
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -8,7 +8,7 @@
      value="{{item.id}}"
    >
      <view slot="header" class="header-title">
        <view>
        <view class="title-checkBox">
          <t-checkbox
            icon="rectangle"
            checked="{{item.checked}}"
@@ -169,7 +169,6 @@
          buyIds="{{buyIds}}"
          openTeachids="{{openTeachids}}"
          openLearnids="{{openLearnids}}"
        ></tree>
      </view>
      <!-- 暂无数据 -->
packageBookService/pages/bookServices/detail/components/tree/index.wxss
@@ -11,7 +11,9 @@
  align-items: center;
  --td-checkbox-vertical-padding: 0
}
.title-checkBox {
  display: flex;
}
.t-class {
  background-color: #F7F7F7;
}
packageBookService/pages/bookServices/detail/index.js
@@ -1454,14 +1454,12 @@
    if (this.data.tabValue == 'brief' && !this.data.bookBuy) {
      this.buyBook()
    }
    // else if (this.data.tabValue == 'jsek_cloudLearning') {
    //   const tree = this.selectComponent('#tree')
    //   tree.onCloudShoppingCart()
    // } else if (this.data.tabValue == 'questionBank') {
    //   this.buyMock()
    // } else {
    //   console.log(this.data.tabValue);
    // }
    else if (this.data.tabValue == 'jsek_cloudLearning') {
      const tree = this.selectComponent('#tree')
      tree.onCloudShoppingCart()
    } else {
      console.log(this.data.tabValue);
    }
  },
  goRead() {
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">
        <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">
            <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,16 +120,40 @@
            <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>
@@ -156,7 +219,12 @@
              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>
@@ -168,8 +236,22 @@
          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="暂无数据" />
@@ -182,7 +264,12 @@
          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}}"
              bind:buyMock="buyMock"
            ></test-resource>
          </view>
          <view wx:if="{{noResources}}" class="noData">
            <t-empty icon="folder-open" description="暂无数据" />
@@ -200,13 +287,29 @@
    </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>
@@ -214,20 +317,37 @@
  <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 == '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"
      >加入购物车</view
    >
    <view class="buy 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>
</view>
</view>
packageBookService/pages/bookServices/examination/examination.js
@@ -277,7 +277,6 @@
        item.userAnswer = radioChecked
        item.isUserAnswer = this.isHaveAnswer(radioChecked)
        if ((item.questionType == 'singleChoice' || item.questionType == 'judge') && (this.data.answerType == 'collectQuestion' || this.data.answerType == 'errorQuestion') && !item.isComplete) {
          debugger
          let index = this.data.currentIndex - 1 >= 0 ? this.data.currentIndex - 1 : 0
          this.handleQuestion(index)
        }
@@ -760,6 +759,18 @@
                index++
              }
            }
          }
          // 题干富文本处理
          if (questionObj.stemStyle == 'RichText') {
            // questionObj.option.txt = ''
            questionObj.stem.stemTxt = questionObj.stem.stemTxt.replace(/\<img/gi, '<img class="stem-rich-img"').replace(/\<p/gi, '<p class="stem-rich-p"')
          }
          // 选项富文本处理
          if (questionObj.optionStyle == 'RichText' && (questionObj.questionType == 'singleChoice' || questionObj.questionType == 'judge' || questionObj.questionType == 'multipleChoice')) {
            questionObj.option.forEach(item => {
              if (item.txt) item.txt = item.txt.replace(/\<img/gi, '<img class="option-rich-img"').replace(/\<p/gi, '<p class="stem-rich-p"')
            })
          }
          // 获取图片
          if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') {
@@ -1536,6 +1547,17 @@
              }
            }
          }
          // 题干富文本处理
          if (questionObj.stemStyle == 'RichText') {
            // questionObj.option.txt = ''
            questionObj.stem.stemTxt = questionObj.stem.stemTxt.replace(/\<img/gi, '<img class="stem-rich-img"')
          }
          // 选项富文本处理
          if (questionObj.optionStyle == 'RichText' && (questionObj.questionType == 'singleChoice' || questionObj.questionType == 'judge' || questionObj.questionType == 'multipleChoice')) {
            questionObj.option.forEach(item => {
              if (item.txt) item.txt = item.txt.replace(/\<img/gi, '<img class="option-rich-img"')
            })
          }
          // 获取图片
          if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') {
            questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150)
@@ -1706,5 +1728,30 @@
        })
        console.log('模考答题数据已记录')
      })
  },
  // 富文本处理
  formatRichText(html) {
    console.log(html);
    let newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {
      match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');
      match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
      match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
      return match;
    });
    newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {
      match = match
        .replace(/<p>/gi, '<p class="p_class">')
        .replace(/width:[^;]+;/gi, 'max-width:100%;')
        .replace(/width:[^;]+;/gi, 'max-width:100%;');
      return match;
    });
    newContent = newContent.replace(/<br[^>]*\/>/gi, "");
    newContent = newContent.replace(/<a>/gi, '<a class="p_class "');
    newContent = newContent.replace(/<li>/gi, '<li class="p_class "');
    newContent = newContent.replace(/\<p/gi, '<p class="p_class "');
    newContent = newContent.replace(/\<span/gi, '<span class="p_class "');
    newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;margin-top:0;margin-bottom:0;"');
    return newContent;
  }
})
packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -50,7 +50,10 @@
          wx:elif="{{item.stemStyle == 'RichText'}} "
          class="title-RichText"
        >
          <rich-text nodes="{{item.stem.stemTxt}}"></rich-text>
          <rich-text
            nodes="{{item.stem.stemTxt}}"
            style="height: 100%"
          ></rich-text>
        </view>
        <!-- 填空题 -->
        <view wx:if="{{item.questionType == 'completion'}}">
@@ -128,9 +131,15 @@
                  <t-image src="{{contentItem.img}}" />
                </view>
                <!-- 富文本 -->
                <view wx:if="{{item.optionStyle == 'RichText'}}">
                <view
                  wx:if="{{item.optionStyle == 'RichText'}}"
                  class="judge-rich-box"
                >
                  <text>{{contentItem.value}}、</text>
                  <rich-text nodes="{{contentItem.txt}}"></rich-text>
                  <rich-text
                    nodes="{{  contentItem.txt}}"
                    style="display: flex; align-items: center; width: 100%"
                  ></rich-text>
                </view>
                <text
                  wx:if="{{submitStatus && (item.answer == contentItem.value && item.answer == item.userAnswer)}}"
@@ -199,7 +208,10 @@
              <!-- 富文本 -->
              <view wx:if="{{item.optionStyle == 'RichText'}}">
                <text>{{contentItem.value}}、</text>
                <rich-text nodes="{{contentItem.txt}}"></rich-text>
                <rich-text
                  nodes="{{contentItem.txt}}"
                  class="multipleChoice"
                ></rich-text>
              </view>
            </t-checkbox>
          </view>
packageBookService/pages/bookServices/examination/questionList/index.wxss
@@ -197,4 +197,38 @@
  display: flex;
  justify-content: center;
  align-items: center;
}
.multipleChoice img {
  width: 40rpx !important;
}
/* .judge-rich-image {
  max-height: 300rpx !important;
} */
.stem-rich-img {
  max-width: 300rpx !important;
  height: auto;
  object-fit: contain;
}
.option-rich-img {
  max-width: 180rpx !important;
  height: auto;
  object-fit: contain;
}
.stem-rich-p {
  display: block;
}
.judge-rich-box {
  display: flex;
}
.t-checkbox {
  display: flex;
  align-items: center;
}
packageBookService/pages/bookServices/list/index.js
@@ -55,7 +55,6 @@
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options)
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
packageBookService/pages/bookServices/list/index.wxml
@@ -9,7 +9,6 @@
<view class="bookServices-list">
  <view class="list-header">
    <!-- <scroll-view scroll-x="{{true}}" class="header-scroll"> -->
    <view class="header-scroll">
      <t-dropdown-menu style="width: 1000rpx">
        <t-dropdown-item options="{{stairList.options}}" value="{{stairList.value}}" bindchange="onChangeStair" />
@@ -18,7 +17,6 @@
        <t-dropdown-item label="新形态教材" options="{{newTextBook.options}}" optionsColumns="2" multiple defaultValue="{{newTextBook.value}}" bind:confirm="changeNewText" bind:reset="resetNewText" />
      </t-dropdown-menu>
    </view>
    <!-- </scroll-view> -->
    <view class="header-sort" bind:tap="sortClick">
      <text class="sort-name">排序</text>
      <!-- <view class="sort-icon"> -->
pages/bookServices/assort/index.wxml
@@ -2,8 +2,21 @@
<view class="page-header">
  <!-- 搜索框 -->
  <view class="search">
    <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请输入关键词/书名/ISBN/作者" leftIcon="" bind:submit="navToSearchPage" placeholder-style="{{placeholderstyle}}">
      <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" />
    <t-search
      t-class-input="t-search__input"
      t-class-input-container="t-search__input-container"
      placeholder="请输入关键词/书名/ISBN/作者"
      leftIcon=""
      bind:submit="navToSearchPage"
      placeholder-style="{{placeholderstyle}}"
    >
      <t-icon
        slot="left-icon"
        prefix="wr"
        name="search"
        size="40rpx"
        color="#bbb"
      />
    </t-search>
  </view>
</view>
@@ -12,7 +25,13 @@
  <view class="side-bar-wrapper" wx:if="{{!loading}}">
    <view class="tab-left">
      <t-side-bar value="{{assortCheck.code}}" bind:change="changeAssort">
        <t-side-bar-item wx:for="{{assortList}}" wx:key="id" value="{{item.refCode}}" label="{{item.name}}" badge-props="{{item.badgeProps}}" />
        <t-side-bar-item
          wx:for="{{assortList}}"
          wx:key="id"
          value="{{item.refCode}}"
          label="{{item.name}}"
          badge-props="{{item.badgeProps}}"
        />
      </t-side-bar>
    </view>
    <view class="page-right">
@@ -20,27 +39,73 @@
      <view class="side-bar-content" wx:if="{{!listLoding}}">
        <!-- 一级分类 -->
        <view class="tab-top">
          <scroll-view scroll-x="{{true}}" class="myScroll" show-scrollbar="{{false}}">
            <view wx:for="{{startList}}" wx:key="id" class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" bind:tap="tabClick" data-tabData="{{item}}">{{item.name}}</view>
          <scroll-view
            scroll-x="{{true}}"
            class="myScroll"
            show-scrollbar="{{false}}"
          >
            <view
              wx:for="{{startList}}"
              wx:key="id"
              class="row {{startCheck.id == item.id ? 'tab-active' : ''}}"
              bind:tap="tabClick"
              data-tabData="{{item}}"
              >{{item.name}}</view
            >
          </scroll-view>
        </view>
        <!-- 内容 -->
        <scroll-view scroll-y="{{true}}" class="class-list" scroll-into-view="{{ 'list' + startCheck.id}}">
        <scroll-view
          scroll-y="{{true}}"
          class="class-list"
          scroll-into-view="{{ 'list' + startCheck.id}}"
        >
          <view wx:if="{{listLoading}}">
            <t-loading theme="spinner" size="400rpx" loading="{{listLoading}}"></t-loading>
            <t-loading
              theme="spinner"
              size="400rpx"
              loading="{{listLoading}}"
            ></t-loading>
          </view>
          <view wx:for="{{startList}}" wx:for-item="item" wx:key="id" id="{{ 'list' + item.id}}" class="class-box" wx:if="{{!listLoading}}">
          <view
            wx:for="{{startList}}"
            wx:for-item="item"
            wx:key="id"
            id="{{ 'list' + item.id}}"
            class="class-box"
            wx:if="{{!listLoading}}"
          >
            <view class="class-name">{{item.name}}</view>
            <view class="class-content">
              <view wx:for="{{item.children}}" wx:for-item="citem" wx:key="id" class="book-box" bind:tap="goPageList" data-stair="{{citem}}" data-tabData="{{item}}" wx:if="{{item.children.length}}">
              <view
                wx:for="{{item.children}}"
                wx:for-item="citem"
                wx:key="id"
                class="book-box"
                bind:tap="goPageList"
                data-stair="{{citem}}"
                data-tabData="{{item}}"
                wx:if="{{item.children.length}}"
              >
                <view class="assort-img">
                  <image src="{{citem.icon ? citem.icon : '/static/images/bookService/assort/book-img.png'}}" mode="widthFix" />
                  <image
                    src="{{citem.icon ? citem.icon : '/static/images/default-book-img.png'}}"
                    mode="widthFix"
                  />
                </view>
                <view class="classify">{{citem.name}}</view>
              </view>
              <view wx:if="{{!item.children.length}}" class="book-box" bind:tap="goPageList" data-tabData="{{item}}">
              <view
                wx:if="{{!item.children.length}}"
                class="book-box"
                bind:tap="goPageList"
                data-tabData="{{item}}"
              >
                <view class="assort-img">
                  <image src="{{item.icon ? item.icon : '/static/images/bookService/assort/book-img.png'}}" mode="widthFix"></image>
                  <image
                    src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}"
                    mode="widthFix"
                  ></image>
                </view>
                <text class="classify">全部</text>
              </view>
@@ -51,11 +116,23 @@
      </view>
      <!-- loading -->
      <view class="loading-box" wx:if="{{listLoding}}">
        <t-loading theme="circular" size="60rpx" class="wrapper" loading="{{listLoding}}" wx:if="{{listLoding}}" />
        <t-loading
          theme="circular"
          size="60rpx"
          class="wrapper"
          loading="{{listLoding}}"
          wx:if="{{listLoding}}"
        />
      </view>
    </view>
  </view>
  <view class="loading-box" wx:if="{{loading}}">
    <t-loading theme="circular" size="60rpx" class="wrapper" loading="{{loading}}" wx:if="{{loading}}" />
    <t-loading
      theme="circular"
      size="60rpx"
      class="wrapper"
      loading="{{loading}}"
      wx:if="{{loading}}"
    />
  </view>
</view>
</view>
pages/bookServices/assort/index.wxss
@@ -68,6 +68,7 @@
  width: 100%;
  height: 108rpx;
  white-space: nowrap;
  overflow-x: auto;
}
.myScroll .row {
static/images/bookService/assort/book-img.png

static/images/default-book-img.png