litian
2024-04-09 dc1b48bb46e5715a5a55ee2c0f60175b849a6b3b
问题修改
10个文件已修改
613 ■■■■■ 已修改文件
assets/js/config.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 97 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxss 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.js 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.wxml 119 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.js 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.js 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.wxml 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.wxss 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/config.js
@@ -1,7 +1,7 @@
export const requestCtx = "http://182.92.203.7:3001"; // 请求地址
export const appId = 27;
// export const requestCtx = "https://jsek.bnuic.com"; // 请求地址
// export const appId = 3;
// export const requestCtx = "http://182.92.203.7:3001"; // 请求地址
// export const appId = 27;
export const requestCtx = "https://jsek.bnuic.com"; // 请求地址
export const appId = 3;
// export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/";
export const epubUrl = "https://jsek.bnuic.com/epubReadMobile/#/";
export const pdfUrl = "http://182.92.203.7:3007/pdfRead/";
packageBookService/pages/bookServices/detail/index.wxml
@@ -94,66 +94,69 @@
        </view>
      </view>
    </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="暂无数据" />
          </view>
        </t-tab-panel>
        <!-- <t-tab-panel
    <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-empty icon="folder-open" description="暂无数据" />
            </view>
          </t-tab-panel>
          <!-- <t-tab-panel
          label="电子书"
          icon="{{tabValue == 'jsek_eBook' ? eBookClickIcon : eBookIcon}}"
          value="jsek_eBook"
          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>
          </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}}">
          <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>
          <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}}">
            <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>
            <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}}">
            <view wx:if="{{!loading}}">
              <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}}">
            <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>
      <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" />
            <view class="num" wx:if="{{num > 0}}">{{num}}</view>
          </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-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}}">
          <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>
        </view>
      </movable-view>
    </movable-area>
  </scroll-view>
  <!-- 我要建议弹窗 -->
  <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" />
  <view class="applyBox" bindtap="goApply">
    <view class="box">
      <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" />
      <view class="num" wx:if="{{num > 0}}">{{num}}</view>
    </view>
  </view>
  <!-- 购买按钮 -->
  <view class="box-bottom">
    <view class="bottom-btn" bind:tap="appplyElectronicBook">
packageBookService/pages/bookServices/detail/index.wxss
@@ -336,6 +336,18 @@
  height: 100%;
}
.movable-area {
  width: 100%;
  height: 100%;
}
.movable-view {
  width: 184rpx;
  height: 184rpx;
  top: 400rpx;
  left: 520rpx;
}
.applyBox {
  width: 184rpx;
  height: 184rpx;
packageBookService/pages/bookServices/list/index.js
@@ -1,5 +1,7 @@
const app = getApp();
import { loginInfo } from "../../../../assets/js/login";
import {
  loginInfo
} from "../../../../assets/js/login";
Page({
  /**
   * 页面的初始数据
@@ -22,12 +24,7 @@
    bookList: [],
    stairList: {
      value: "",
      options: [
        {
          value: "",
          label: "一级",
        },
      ],
      options: [],
    },
    secondList: {
      value: [],
@@ -40,8 +37,7 @@
    },
    sortList: {
      value: "default",
      options: [
        {
      options: [{
          value: "default",
          label: "默认排序",
        },
@@ -127,13 +123,11 @@
    if (options.secondCode) {
      this.setData({
        secondCode: options.secondCode,
        pathList: [
          {
            Path: options.secondCode,
            Type: "*",
            StoreRefCode: app.config.goodsStore,
          },
        ],
        pathList: [{
          Path: options.secondCode,
          Type: "*",
          StoreRefCode: app.config.goodsStore,
        }, ],
      });
    }
    // 获取二级分类
@@ -228,12 +222,10 @@
      },
    };
    app.MG.store.getStoreChannelList(query).then(async (res) => {
      const options = [
        {
          value: "",
          label: "一级",
        },
      ];
      const options = [{
        value: "",
        label: "一级分类",
      }, ];
      for (let index = 0; index < res.datas.length; index++) {
        const item = res.datas[index];
        options.push({
@@ -426,12 +418,10 @@
    }
    const query = {
      ...pathObj,
      filterList: [
        {
          value: "Normal",
          field: "state",
        },
      ],
      filterList: [{
        value: "Normal",
        field: "state",
      }, ],
      sort,
      paging: {
        start: 0,
@@ -471,9 +461,9 @@
  },
  // 一级分类切换
  onChangeStair(e) {
    const path = e.detail.value.length
      ? `${this.data.assortCheck.code}\\${e.detail.value}`
      : this.data.assortCheck.code;
    const path = e.detail.value.length ?
      `${this.data.assortCheck.code}\\${e.detail.value}` :
      this.data.assortCheck.code;
    console.log(this.data.path);
    this.setData({
@@ -603,7 +593,9 @@
  },
  // 跳转图书详情
  goDetail(e) {
    const { book } = e.currentTarget.dataset;
    const {
      book
    } = e.currentTarget.dataset;
    wx.navigateTo({
      url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`,
    });
@@ -626,4 +618,4 @@
      showDropdown: false,
    });
  },
});
});
packageBookService/pages/bookServices/list/index.wxml
@@ -3,71 +3,20 @@
  <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>
    <t-search
      model:value="{{searchValue}}"
      shape="round"
      placeholder="请输入关键词/书名/ISBN/作者"
      class="navBar-search"
      style="width: 464rpx"
      bind:submit="searchBook"
    />
    <t-search model:value="{{searchValue}}" shape="round" placeholder="请输入关键词/书名/ISBN/作者" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" />
  </view>
  <view class="bookServices-list">
    <view class="list-header">
      <view class="header-scroll">
        <t-dropdown-menu style="width: 1200rpx">
          <t-dropdown-item
            disabled="{{disabledStair}}"
            optionsColumns="2"
            options="{{stairList.options}}"
            value="{{stairList.value}}"
            bindchange="onChangeStair"
          />
          <t-dropdown-item
            disabled="{{disabledSecondList}}"
            label="二级"
            bind:open="openDropdown"
            bind:close="closeDropdown"
            options="{{secondList.options}}"
            optionsColumns="2"
            multiple
            value="{{secondList.value}}"
            bind:confirm="onConfirmSecond"
            bind:change="onChangeSecond"
          />
          <t-dropdown-item
            label="重点项目"
            disabled="{{disabledProject}}"
            options="{{majorProjectList.options}}"
            optionsColumns="2"
            multiple
            defaultValue="{{majorProjectList.value}}"
            bind:confirm="changeMajorProject"
            bind:reset="resetMajorProject"
          />
          <t-dropdown-item
            label="新形态教材"
            disabled="{{disabledNewForms}}"
            options="{{newTextBook.options}}"
            optionsColumns="2"
            multiple
            defaultValue="{{newTextBook.value}}"
            bind:confirm="changeNewText"
            bind:reset="resetNewText"
          />
          <t-dropdown-item
            options="{{sortList.options}}"
            value="{{sortList.value}}"
            bindchange="onSortChange"
          />
          <t-dropdown-item disabled="{{disabledStair}}" optionsColumns="2" options="{{stairList.options}}" value="{{stairList.value}}" bindchange="onChangeStair" />
          <t-dropdown-item disabled="{{disabledSecondList}}" label="二级" bind:open="openDropdown" bind:close="closeDropdown" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" />
          <t-dropdown-item label="重点项目" disabled="{{disabledProject}}" options="{{majorProjectList.options}}" optionsColumns="2" multiple defaultValue="{{majorProjectList.value}}" bind:confirm="changeMajorProject" bind:reset="resetMajorProject" />
          <t-dropdown-item label="新形态教材" disabled="{{disabledNewForms}}" options="{{newTextBook.options}}" optionsColumns="2" multiple defaultValue="{{newTextBook.value}}" bind:confirm="changeNewText" bind:reset="resetNewText" />
          <t-dropdown-item options="{{sortList.options}}" value="{{sortList.value}}" bindchange="onSortChange" />
        </t-dropdown-menu>
      </view>
      <!-- <view class="header-sort">
@@ -76,28 +25,10 @@
        </t-dropdown-menu>
      </view> -->
    </view>
    <scroll-view
      scroll-y="{{true}}"
      scroll-into-view="{{backTop}}"
      refresher-enabled="{{true}}"
      lower-threshold="{{200}}"
      refresher-threshold="{{80}}"
      refresher-default-style="none"
      refresher-triggered="{{triggered}}"
      bindrefresherrefresh="onPullDownRefresh"
      bindrefresherpulling="{{refresh.onPulling}}"
      class="list-container"
      bindrefresherrefresh="onPullDownRefresh"
      bindscrolltolower="onReachBottom"
    >
    <scroll-view scroll-y="{{true}}" scroll-into-view="{{backTop}}" refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherrefresh="onPullDownRefresh" bindrefresherpulling="{{refresh.onPulling}}" class="list-container" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
      <view slot="refresher" class="refresh-container">
        <view class="loading">
          <t-loading
            theme="circular"
            size="40rpx"
            text="正在刷新..."
            class="wrapper"
          />
          <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
        </view>
      </view>
      <view class="assort-title" id="assort-title">
@@ -106,19 +37,9 @@
      </view>
      <view class="page-content">
        <view class="book-list" wx:if="{{!loaidng}}">
          <view
            class="book-box"
            wx:for="{{bookList}}"
            wx:key="id"
            bind:tap="goDetail"
            data-book="{{item}}"
          >
          <view class="book-box" wx:for="{{bookList}}" wx:key="id" bind:tap="goDetail" data-book="{{item}}">
            <view class="book-img">
              <image
                src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}"
                aria-label="{item.name{}}"
                mode="aspectFit"
              />
              <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" aria-label="{item.name{}}" mode="aspectFit" />
            </view>
            <view class="book-name book-color">{{ item.name}}</view>
            <view class="book-author book-color">{{item.author}}</view>
@@ -129,25 +50,13 @@
        </view>
        <!-- loading -->
        <view class="loading-box" wx:if="{{loaidng}}">
          <t-loading
            theme="circular"
            size="60rpx"
            class="wrapper"
            loading="{{loaidng}}"
            wx:if="{{loaidng}}"
          />
          <t-loading theme="circular" size="60rpx" class="wrapper" loading="{{loaidng}}" wx:if="{{loaidng}}" />
        </view>
      </view>
      <view class="bottom-box" wx:if="{{bookList.length}}">
        <t-loading
          theme="circular"
          size="40rpx"
          class="wrapper"
          wx:if="{{isMore == true}}"
          loading="{{isMore}}"
        />
        <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" loading="{{isMore}}" />
        <text wx:if="{{isMore == false}}">没有更多了</text>
      </view>
    </scroll-view>
  </view>
</page-meta>
</page-meta>
packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -34,17 +34,21 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    let that = this;
    that.setData({
      bookList: []
    })
    if (wx.getStorageSync(app.config.userInfoKey)) {
      this.setData({
      that.setData({
        userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      })
      if (this.data.userInfo.role == 'Teacher') {
        this.setData({
          'teacherInfo.schoolName': JSON.parse(this.data.userInfo.data).schoolName,
          'teacherInfo.courseName': JSON.parse(this.data.userInfo.data).courseName,
          'contactInfo.fullName': JSON.parse(this.data.userInfo.data).fullName,
          'contactInfo.phone': JSON.parse(this.data.userInfo.data).phone,
          'contactInfo.detailedAddress': JSON.parse(this.data.userInfo.data).detailedAddress,
      if (that.data.userInfo.role == 'Teacher') {
        that.setData({
          'teacherInfo.schoolName': JSON.parse(that.data.userInfo.data).schoolName,
          'teacherInfo.courseName': JSON.parse(that.data.userInfo.data).courseName,
          'contactInfo.fullName': JSON.parse(that.data.userInfo.data).fullName,
          'contactInfo.phone': JSON.parse(that.data.userInfo.data).phone,
          'contactInfo.detailedAddress': JSON.parse(that.data.userInfo.data).detailedAddress,
        })
      } else {
        wx.showModal({
@@ -60,19 +64,19 @@
        })
      }
      if (wx.getStorageSync("paperBookList")) {
        this.setData({
          paperBookList: wx.getStorageSync("paperBookList"),
          bookList: wx.getStorageSync("paperBookList")
        that.setData({
          paperBookList: JSON.parse(wx.getStorageSync("paperBookList")),
          bookList: JSON.parse(wx.getStorageSync("paperBookList"))
        })
      }
      if (wx.getStorageSync("electronicBookList")) {
        this.setData({
          electronicBookList: wx.getStorageSync("electronicBookList")
        that.setData({
          electronicBookList: JSON.parse(wx.getStorageSync("electronicBookList"))
        })
      }
      this.getSelectBookCount();
      this.getSelectPaperBookCount();
      this.getPaperType();
      that.getSelectBookCount();
      that.getSelectPaperBookCount();
      that.getPaperType();
    }
  },
packageDomain/pages/sampleBookList/index.js
@@ -14,7 +14,6 @@
    userInfo: null,
    path: '*',
    pathList: [],
    bookList: [],
    //高级分类
    iconList: {
@@ -24,20 +23,13 @@
    //一级分类
    stairList: {
      value: '',
      options: [],
      options: [{
        value: "",
        label: "一级分类",
      }],
    },
    //二级分类
    secondList: {
      value: [],
      options: [],
    },
    //重点项目
    majorProjectList: {
      value: [],
      options: [],
    },
    //新形态教材
    newTextBook: {
      value: [],
      options: [],
    },
@@ -46,7 +38,6 @@
      name: '',
      code: '',
    },
    stairCode: '', // 一级分类选中项
    secondCode: '', // 二级分类选中项
    sort: '', // 排序
@@ -91,28 +82,31 @@
    paperBookCount: 0, //纸质书剩余次数
    ebookCount: 0, //电子书剩余次数
    num: 0,
    x: 280,
    y: 300,
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    let that = this;
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    this.setData({
    that.setData({
      barHeight: systInfo.statusBarHeight,
      navBarHeight: navBarHeight,
    });
    // 搜索赋值
    if (options && options.searchValue) {
      this.setData({
      that.setData({
        searchValue: options.searchValue,
      });
    }
    // 高级分类赋值
    if (options && options.assortCode) {
      this.setData({
      that.setData({
        assortCheck: {
          name: options.assorName,
          code: options.assortCode,
@@ -120,13 +114,13 @@
        },
      });
    }
    if (this.data.assortCheck.code) {
    if (that.data.assortCheck.code) {
      // 获取一级分类
      this.getStairList(this.data.assortCheck.code);
      ththatis.getStairList(that.data.assortCheck.code);
    }
    // 一级分类和path赋值
    if (options && options.assortCode && options.stairCode) {
      this.setData({
      that.setData({
        'stairList.value': options.stairCode,
        stairCode: options.stairCode,
        path: `${options.assortCode}\\${options.stairCode}`,
@@ -134,7 +128,7 @@
    }
    // 二级分类赋值
    if (options && options.secondCode) {
      this.setData({
      that.setData({
        secondCode: options.secondCode,
        pathList: [{
          Path: options.secondCode,
@@ -143,30 +137,26 @@
        }],
      })
    }
    this.getIconTypeList();
    // 获取重点项目
    this.getProjectList('bookClassification');
    //新形态教材
    this.getProjectList('newFormsTextbooks');
    that.getIconTypeList();
    // 检查登录状态
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.setData({
          that.setData({
            userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
          })
          this.getAlreadyPBookList()
          this.getAlreadyEBookList()
          that.getAlreadyPBookList()
          that.getAlreadyEBookList()
          // 获取申请次数
          this.getSelectPaperBookCount()
          this.getSelectBookCount()
          that.getSelectPaperBookCount()
          that.getSelectBookCount()
        }
      })
    } else {
      this.setData({
      that.setData({
        userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      })
@@ -184,32 +174,33 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    this.setData({
    let that = this;
    that.setData({
      page: 1,
      paperBookList: [],
      electronicBookList: []
    })
    this.getAlreadyPBookList()
    this.getAlreadyEBookList()
    that.getAlreadyPBookList()
    that.getAlreadyEBookList()
    // 获取申请次数
    this.getSelectPaperBookCount()
    this.getSelectBookCount()
    that.getSelectPaperBookCount()
    that.getSelectBookCount()
    if (wx.getStorageSync("paperBookList") || wx.getStorageSync("electronicBookList")) {
      if (wx.getStorageSync("paperBookList")) {
        this.setData({
          paperBookList: wx.getStorageSync("paperBookList"),
        that.setData({
          paperBookList: JSON.parse(wx.getStorageSync("paperBookList")),
        })
      }
      if (wx.getStorageSync("electronicBookList")) {
        this.setData({
          electronicBookList: wx.getStorageSync("electronicBookList"),
        that.setData({
          electronicBookList: JSON.parse(wx.getStorageSync("electronicBookList")),
        })
      }
      this.setData({
        num: this.data.paperBookList.length + this.data.electronicBookList.length
      that.setData({
        num: Number(that.data.paperBookList.length) + Number(that.data.electronicBookList.length)
      })
    }
    this.getBookList(false);
    that.getBookList(false);
  },
  goBack() {
    wx.navigateBack();
@@ -260,7 +251,10 @@
      }
    }
    app.MG.store.getStoreChannelList(query).then((res) => {
      let list = [];
      let list = [{
        value: "",
        label: "总分类",
      }];
      if (res.datas.length > 0)(
        res.datas.forEach((item) => {
          item.value = item.refCode;
@@ -276,7 +270,7 @@
      )
      this.setData({
        'iconList.options': list,
        'iconList.value': this.data.assortCode,
        'iconList.value': this.data.assortCheck.code,
      });
    })
  },
@@ -296,7 +290,10 @@
      },
    };
    app.MG.store.getStoreChannelList(query).then(async (res) => {
      let options = [];
      let options = [{
        value: "",
        label: "一级分类",
      }];
      if (res.datas.length > 0) {
        for (let index = 0; index < res.datas.length; index++) {
          let item = res.datas[index];
@@ -347,50 +344,7 @@
      })
    });
  },
  // 获取重点项目
  getProjectList(type) {
    const options = [];
    const arr = [];
    let array = [];
    const query = {
      refCodes: [type],
    };
    app.MG.store.getProductTypeField(query).then((res) => {
      array = JSON.parse(res[0].config).option;
      for (let index = 0; index < array.length; index++) {
        const element = array[index];
        if (element.child) {
          for (let index = 0; index < element.child.length; index++) {
            const item = element.child[index];
            arr.push(item);
          }
        }
      }
      if (type == 'bookClassification') {
        for (let index = 0; index < arr.length; index++) {
          const element = arr[index];
          options.push({
            value: element.value,
            label: element.name,
          });
        }
        this.setData({
          'majorProjectList.options': options,
        });
      } else if (type == 'newFormsTextbooks') {
        for (let index = 0; index < arr.length; index++) {
          const element = arr[index];
          options.push({
            value: element.value,
            label: element.name,
          });
        }
        this.setData({
          'newTextBook.options': options,
        });
      }
    });
  },
  // 获取图书列表
  getBookList(isReachBottom) {
    let that = this;
@@ -916,13 +870,13 @@
      this.setData({
        electronicBookList: eList,
      })
      wx.setStorageSync("electronicBookList", eList);
      wx.setStorageSync("electronicBookList", JSON.stringify(eList));
    } else {
      pList.push(itemAttr)
      this.setData({
        paperBookList: pList,
      })
      wx.setStorageSync("paperBookList", pList);
      wx.setStorageSync("paperBookList", JSON.stringify(pList));
    }
    this.setData({
      num: this.data.num + 1
packageDomain/pages/sampleBookList/index.wxml
@@ -13,8 +13,8 @@
        <!-- <scroll-view scroll-x scroll-with-animation='true' class="srcolbox"> -->
        <view class="srcolbox">
          <t-dropdown-menu>
            <t-dropdown-item label="总分类" options="{{iconList.options}}" value="{{iconList.value}}" optionsColumns="2" bindchange="onChangeIcon" />
            <t-dropdown-item label="一级" options="{{stairList.options}}" value="{{stairList.value}}" optionsColumns="2" bindchange="onChangeStair" disabled="{{assortCheck.code == '' || stairList.options.length == 0}}" />
            <t-dropdown-item options="{{iconList.options}}" value="{{iconList.value}}" optionsColumns="2" bindchange="onChangeIcon" />
            <t-dropdown-item options="{{stairList.options}}" value="{{stairList.value}}" optionsColumns="2" bindchange="onChangeStair" disabled="{{assortCheck.code == '' || stairList.options.length == 0}}" />
            <t-dropdown-item label=" 二级" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" bind:reset="onResetSecond" disabled="{{stairCode == '' || assortCheck.code == '' || secondList.options.length == 0}}" />
            <t-dropdown-item options="{{sortList.options}}" value="{{sortList.value}}" bindchange="onSortChange" />
          </t-dropdown-menu>
@@ -32,52 +32,57 @@
  </view>
  <view class="bookServices-list">
    <view class="list-body">
      <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
        <view slot="refresher" class="refresh-container">
          <view class="loading">
            <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
          </view>
        </view>
        <view class="title">
          <view class="line"></view>
          <view class="icon">
            <image src="/static/images/home/yangshuliebiao.png" mode="aspectFit" class="iconImage" />
          </view>
        </view>
        <view class="book-list" wx:if="{{bookList.length > 0 && !skeletonLoding}}">
          <view class="book-box" wx:for="{{bookList}}" wx:key="id">
            <view class="book-img" bind:tap="goDetail" data-book="{{item}}">
              <t-image src="{{item.icon}}" width="105" height="145" aria-label="{{item.name}}" wx:if="{{item.icon}}" />
              <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.name}}" wx:else />
            </view>
            <view class="book-name book-color" bind:tap="goDetail" data-book="{{item}}">{{ item.name}}</view>
            <view class="book-author book-color">{{item.author}}</view>
            <view class="checkbox">
              <t-checkbox label="纸质样书" icon="rectangle" borderless='true' checked="{{item.paperChecked}}" disabled="{{item.paperDisabled || item.isApplyBook == '1' || item.isApplyBook == '2'}}" data-book="{{item}}" bind:change="onChangePaper" />
              <t-checkbox label="电子样书" icon="rectangle" borderless='true' class="eBook" checked="{{item.electronChecked}}" disabled="{{item.electronDisabled || item.isApplyBook=='1' || item.isApplyBook=='3' }}" data-book="{{item}}" bind:change="onChangeElectron" />
      <movable-area class="movable-area">
        <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom">
          <view slot="refresher" class="refresh-container">
            <view class="loading">
              <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" />
            </view>
          </view>
        </view>
        <view wx:if="{{bookList.length == 0 && !skeletonLoding}}" class="empyt">
          <t-empty icon="folder-open" description="暂无数据" />
        </view>
        <view class="bottom-loading" wx:if="{{bottomLoading}}">
          <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
        </view>
        <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
          <text>没有更多了</text>
        </view>
        <view class="body-loading" wx:if="{{skeletonLoding}}">
          <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
        </view>
      </scroll-view>
          <view class="title">
            <view class="line"></view>
            <view class="icon">
              <image src="/static/images/home/yangshuliebiao.png" mode="aspectFit" class="iconImage" />
            </view>
          </view>
          <view class="book-list" wx:if="{{bookList.length > 0 && !skeletonLoding}}">
            <view class="book-box" wx:for="{{bookList}}" wx:key="id">
              <view class="book-img" bind:tap="goDetail" data-book="{{item}}">
                <t-image src="{{item.icon}}" width="105" height="145" aria-label="{{item.name}}" wx:if="{{item.icon}}" />
                <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.name}}" wx:else />
              </view>
              <view class="book-name book-color" bind:tap="goDetail" data-book="{{item}}">{{ item.name}}</view>
              <view class="book-author book-color">{{item.author}}</view>
              <view class="checkbox">
                <t-checkbox label="纸质样书" icon="rectangle" borderless='true' checked="{{item.paperChecked}}" disabled="{{item.paperDisabled || item.isApplyBook == '1' || item.isApplyBook == '2'}}" data-book="{{item}}" bind:change="onChangePaper" />
                <t-checkbox label="电子样书" icon="rectangle" borderless='true' class="eBook" checked="{{item.electronChecked}}" disabled="{{item.electronDisabled || item.isApplyBook=='1' || item.isApplyBook=='3' }}" data-book="{{item}}" bind:change="onChangeElectron" />
              </view>
            </view>
          </view>
          <view wx:if="{{bookList.length == 0 && !skeletonLoding}}" class="empyt">
            <t-empty icon="folder-open" description="暂无数据" />
          </view>
          <view class="bottom-loading" wx:if="{{bottomLoading}}">
            <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
          </view>
          <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}">
            <text>没有更多了</text>
          </view>
          <view class="body-loading" wx:if="{{skeletonLoding}}">
            <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" />
          </view>
        </scroll-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" />
              <view class="num" wx:if="{{num > 0}}">{{num}}</view>
            </view>
          </view>
        </movable-view>
      </movable-area>
    </view>
  </view>
  <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top>
  <view class="applyBox" bindtap="goApply">
    <view class="box">
      <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" />
      <view class="num" wx:if="{{num > 0}}">{{num}}</view>
    </view>
  </view>
</view>
packageDomain/pages/sampleBookList/index.wxss
@@ -49,10 +49,11 @@
.header-scroll {
  width: 100vw;
  overflow-x: auto;
}
.srcolbox {
  width: 100%;
  width: 900rpx;
  white-space: nowrap;
}
@@ -279,14 +280,22 @@
  margin-left: 10rpx;
}
.movable-area {
  width: 100%;
  height: 100%;
}
.movable-view {
  width: 184rpx;
  height: 184rpx;
  top: 800rpx;
  left: 520rpx;
}
.applyBox {
  width: 184rpx;
  height: 184rpx;
  position: fixed;
  bottom: 20%;
  right: 0;
}
.applyBox .box {
@@ -299,6 +308,7 @@
.applyBox .box .t-image {
  width: 100%;
  height: 100%;
}
.num {
pages/home/home.js
@@ -173,6 +173,10 @@
        start: 0,
        size: 4
      },
      filterList: [{
        value: 'Normal',
        field: 'state'
      }],
      fields: {
        liveTime: [],
        lecturer: [],
@@ -198,7 +202,6 @@
  getCourseTypeListList() {
    const data = {
      path: 'jsek_homepageDigitalCourses',
      filterList: [],
      queryType: '\\',
      searchList: [],
      size: '20',
@@ -207,7 +210,11 @@
      sort: {
        type: 'Asc',
        field: 'LinkOrder'
      }
      },
      filterList: [{
        value: 'Normal',
        field: 'state'
      }]
    }
    app.MG.store.getStoreChannelList(data).then((res) => {
      if (res.datas && res.datas.length > 0) {
@@ -233,6 +240,10 @@
        start: 0,
        size: 4
      },
      filterList: [{
        value: 'Normal',
        field: 'state'
      }],
      fields: {
        courseLeader: [],
        affiliatedUnit: [],
@@ -260,7 +271,10 @@
  getBookTypeList() {
    const data = {
      path: 'jsek_homepageBookService',
      filterList: [],
      filterList: [{
        value: 'Normal',
        field: 'state'
      }],
      queryType: '\\',
      searchList: [],
      size: '20',
@@ -297,6 +311,10 @@
        start: 0,
        size: 6
      },
      filterList: [{
        value: 'Normal',
        field: 'state'
      }],
      fields: {
        author: []
      }
@@ -327,6 +345,10 @@
        start: 0,
        size: 3
      },
      filterList: [{
        value: 'Normal',
        field: 'state'
      }],
      fields: {
        author: []
      }
@@ -349,6 +371,10 @@
        start: 0,
        size: 6
      },
      filterList: [{
        value: 'Normal',
        field: 'state'
      }],
      fields: {
        author: [],
      }