闫增涛
2024-03-22 88d80c9f40935c6ce7ea51683c6cdc1a80d1997b
Merge refs/remotes/origin/master into refs/heads/master
34个文件已修改
1381 ■■■■ 已修改文件
assets/js/toolClass.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 444 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxss 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/list/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.wxss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/myCollection/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.js 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.wxml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/userSetting/index.wxss 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.js 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.json 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bibliographyList/index.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.js 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxml 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/index.wxss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.json 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/components/user-center-card/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/personalCenter/index.js 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.js 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.json 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.wxml 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.wxss 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/toolClass.js
@@ -163,6 +163,7 @@
      })
    )
  }
  res.forEach((item) => {
    const obj = {
      baseType: item.typeField.baseType,
packageBookService/pages/bookServices/detail/index.js
@@ -16,6 +16,7 @@
      name: '',
    },
    bookDetail: {},
    bookItemDetail: {},
    link: {
      jd: '',
      tamll: '',
@@ -53,7 +54,19 @@
    },
    flag: true,
    applyResourceLoading: false,
    noResources: false
    noResources: false,
    selectedIds: "",//商品或子商品销售方式
    bookBuy: false, //商品或子商品是否购买
    expire: false,//商品或子商品销售方式是否过期
    noFile: false, //商品或子商有无电子书文件
    num: 0, //样书申请单数量
    alreadyPaperBookList: [], //已申请纸质样书
    alreadyElectronicBookList: [], //已申请电子样书
    paperBookList: [], //样书单纸质书
    electronicBookList: [], //样书单电子书
    paperBookCount: 0, //纸质书剩余次数
    ebookCount: 0, //电子书剩余次数
    userInfo: {},
  },
@@ -81,6 +94,7 @@
        name: options.name,
      },
    });
    this.getBookInfo(options.id);
    this.getResourceClass() // 获取资源所属分类
    const token = wx.getStorageSync('jsek-token')
@@ -89,6 +103,24 @@
      this.getApplyInfo(options.id)
      this.getMockData()
    }
    if (wx.getStorageSync(app.config.userInfoKey)) {
      this.setData({
        userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      })
    }
    if (wx.getStorageSync("paperBookList")) {
      this.setData({
        paperBookList: wx.getStorageSync("paperBookList"),
      })
    }
    if (wx.getStorageSync("electronicBookList")) {
      this.setData({
        electronicBookList: wx.getStorageSync("electronicBookList"),
      })
    }
    this.setData({
      num: this.data.paperBookList.length + this.data.electronicBookList.length
    })
  },
  /**
@@ -237,6 +269,7 @@
        cmsDatas: res.datas.cmsDatas[0].datas,
        buyIdList: res.datas.purchasedSaleMethodIdList
      });
      this.getSubTtem();
      // 获取图书分类
      const iconType = JSON.parse(res.datas.bookClassification)[0][0];
      const classType = JSON.parse(res.datas.bookClassification)[0][1];
@@ -273,6 +306,76 @@
      console.log('图书信息', this.data.bookDetail);
    });
  },
  //请求子商品的文件
  getSubTtem() {
    const obj = {
      path: '*',
      queryType: 'SubProduct',
      sort: {
        type: 'Desc',
        field: 'CreateDate'
      },
      paging: {
        start: 0,
        size: 6
      },
      mainProductId: this.data.bookDetail.id,
      fields: {
        author: [],
        bookshelf_pdf: [],
        bookshelf_protectedEpub: [],
        bookshelf_freeEpub: [], //epub试读百分比
        bookshelf_probationPage: [] //pdf试读页数
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      if (res.datas && res.datas.length > 0) {
        this.setData({
          bookItemDetail: res.datas[0],
          selectedIds: res.datas[0].defaultSaleMethod.id,
          bookBuy: res.datas[0].purchasedSaleMethodIdList.indexOf(res.datas[0].defaultSaleMethodId) > -1
        });
        console.log(this.data.bookItemDetail, 'bookItemData.value');
        let times = new Date(res.datas[0].defaultSaleMethod.endDate).getTime()
        let startTime = new Date(res.datas[0].defaultSaleMethod.beginDate).getTime()
        if (times < new Date().getTime() || new Date().getTime() < startTime) {
          this.setData({
            expire: true
          });
        } else {
          this.setData({
            expire: false
          });
        }
        if (res.datas[0].bookshelf_pdf || res.datas[0].bookshelf_protectedEpub) {
          this.setData({
            noFile: true
          });
        }
      } else {
        if (this.data.bookDetail.pdf || this.data.bookDetail.protectedEpub) {
          this.setData({
            noFile: true
          });
        }
        this.setData({
          selectedIds: this.data.bookDetail.defaultSaleMethodId,
          bookBuy: this.data.bookDetail.purchasedSaleMethodIdList.indexOf(this.data.bookDetail.defaultSaleMethodId) > -1
        });
        let times = new Date(this.data.bookDetail.defaultSaleMethod.endDate).getTime()
        let startTime = new Date(this.data.bookDetail.defaultSaleMethod.beginDate).getTime()
        if (times < new Date().getTime() || new Date().getTime() < startTime) {
          this.setData({
            expire: true
          });
        } else {
          this.setData({
            expire: false
          });
        }
      }
    })
  },
  // 获取图书分类
  async getBookClass(iconType, classType) {
@@ -566,7 +669,6 @@
  // 图书添加购物车
  async addBookShopcCar() {
    const token = wx.getStorageSync('jsek-token')
    if (!token) {
      return wx.getUserProfile({
@@ -590,15 +692,14 @@
      shoppingCartGetId.push(item.saleMethod.id)
    })
    console.log(shoppingCartGetId, 'shoppingCartGetId');
    console.log(this.data.bookDetail.defaultSaleMethodId, 'this.data.bookDetail.defaultSaleMethodId');
    const determine = shoppingCartGetId.some((item) => item == this.data.bookDetail.defaultSaleMethodId)
    console.log(this.data.selectedIds, '销售方式id');
    const determine = shoppingCartGetId.some((item) => item == this.data.selectedIds)
    console.log(determine);
    if (!determine) {
      let query = {
        requests: [
          {
            saleMethodId: this.data.bookDetail.defaultSaleMethodId,
            saleMethodId: this.data.selectedIds,
            storeEventId: null,
            agentCode: '电子书'
          }
@@ -632,31 +733,38 @@
  async buyBook() {
    let bookOrdersId = ''
    let query = {
      remarks: '电子书',
      requests: [
        {
          saleMethodId: this.data.bookDetail.defaultSaleMethodId,
          count: 1
        }
      ]
    }
    // 发起订单初始化请求并等待结果
    const res = await app.MG.store.initOrder(query)
    // 获取订单号并赋值给 orderNumber.value
    bookOrdersId = res.orderNumber
    console.log(bookOrdersId);
    // 检查订单号是否存在
    if (bookOrdersId) {
      const url = '/pages/cart/paymentPage/index?orderNumber=' + bookOrdersId
      wx.navigateTo({
        url
      })
    if (!this.data.expire) {
      let bookOrdersId = ''
      let query = {
        remarks: '电子书',
        requests: [
          {
            saleMethodId: this.data.bookItemDetail.defaultSaleMethodId ? this.data.bookItemDetail.defaultSaleMethodId : this.data.bookDetail.defaultSaleMethodId,
            count: 1
          }
        ]
      }
      // 发起订单初始化请求并等待结果
      const res = await app.MG.store.initOrder(query)
      // 获取订单号并赋值给 orderNumber.value
      bookOrdersId = res.orderNumber
      console.log(bookOrdersId);
      // 检查订单号是否存在
      if (bookOrdersId) {
        const url = '/pages/cart/paymentPage/index?orderNumber=' + bookOrdersId
        wx.navigateTo({
          url
        })
      } else {
        console.log(222);
      }
    } else {
      console.log(222);
      wx.showToast({
        title: "商品不在有效期",
        icon: 'none',
        duration: 1000,
      })
    }
  },
  // 获取教学资源下载是否申请通过
@@ -1226,10 +1334,7 @@
    }
    else if (this.data.tabValue == 'jsek_cloudLearning') {
      const tree = this.selectComponent('#tree')
      tree.onCloudShoppingCart()
    } else if (this.data.tabValue == 'questionBank') {
      this.buyMock()
    } else {
@@ -1237,4 +1342,279 @@
    }
  },
  //样书申请
  //申请电子样书
  appplyElectronicBook() {
    console.log(this.data.bookDetail)
    if (this.data.bookDetail.isApplyBook == 2 || this.data.bookDetail.isApplyBook == 4) {
      let role = this.data.userInfo != null ? this.data.userInfo.role : null
      if (role) {
        if (role == 'Teacher') {
          if (this.data.noFile) {
            this.getSelectBookCount()
          } else {
            wx.showToast({
              title: "暂无电子书文件,请联系管理员!",
              icon: 'none',
              duration: 1000,
            })
          }
        } else {
          wx.showModal({
            title: '尊敬的用户,您好!', //提示的标题
            content: '请先进行教师认证?', //提示的内容
            success: function (res) {
              if (res.confirm) {
                wx.navigateTo({
                  url: "/packageDomain/pages/teacherCertification/index",
                });
              } else if (res.cancel) {
              }
            }
          })
        }
      }
    }
  },
  //申请纸质样书
  appplyPaperBook() {
    if (this.data.bookDetail.isApplyBook == 3 || this.data.bookDetail.isApplyBook == 4) {
      let role = this.data.userInfo != null ? this.data.userInfo.role : null
      if (role) {
        if (role == 'Teacher') {
          this.getSelectPaperBookCount()
        } else {
          wx.showModal({
            title: '尊敬的用户,您好!', //提示的标题
            content: '请先进行教师认证?', //提示的内容
            success: function (res) {
              if (res.confirm) {
                wx.navigateTo({
                  url: "/packageDomain/pages/teacherCertification/index",
                });
              } else if (res.cancel) {
              }
            }
          })
        }
      }
    }
  },
  //获取当前已申请次数(纸质)
  getSelectPaperBookCount() {
    app.MG.app
      .getTicketResult({
        ticketRefCodeOrGuid: 'paperSampleBookapplyNum',
        roleId: this.data.userInfo.roleId
      })
      .then((res) => {
        this.setData({
          paperBookCount: res.totalCount - res.usedCount
        })
        this.getAlreadyBookList(this.data.bookDetail, 'pBook')
      })
  },
  //获取当前已申请次数(电子)
  getSelectBookCount() {
    app.MG.app
      .getTicketResult({
        ticketRefCodeOrGuid: 'electronicSampleBookapplyNum',
        roleId: this.data.userInfo.roleId
      })
      .then((res) => {
        this.setData({
          ebookCount: res.totalCount - res.usedCount
        })
        this.getAlreadyBookList(this.data.bookDetail, 'eBook')
      })
  },
  //获取已申请的样书列表
  getAlreadyBookList(item, type) {
    let topicIdOrRefCode = null
    if (type == 'eBook') {
      topicIdOrRefCode = 'applyBook'
    } else {
      topicIdOrRefCode = 'applyEntityBook'
    }
    const data = {
      start: 0,
      size: 9999,
      topicIdOrRefCode,
      appRefCode: app.config.appRefCode,
      sort: {
        type: 'Desc',
        field: 'CreateDate'
      }
    }
    app.MG.ugc.getTopicMessageList(data).then((res) => {
      let itemAttr = null
      let isHas = false
      itemAttr = {
        id: item.id,
        title: item.name || '--',
        icon: item.icon,
        checked: false,
        defaultSaleMethodId: item.defaultSaleMethodId,
        md5: item.datas.Icon,
        author: item.author || '--',
        price: item.price || '--',
        isbn: item.isbn || '--',
        publicationDate: item.publicationDate
      }
      res.datas.map((item) => {
        if (item.feedBack) {
          item.feedBack = JSON.parse(item.feedBack)
          if (item.feedBack.endDate) {
            const currentDate = new Date()
            let times = new Date(item.feedBack.endDate + ' 23:59:59').getTime()
            if (times < currentDate.getTime()) {
              item.isExpiry = true
            }
          }
        }
        if (item.content) {
          item.content = JSON.parse(item.content)
          item.content.map((e) => (item.productId = e.id))
        }
      })
      let objVal = null
      if (type != 'eBook') {
        objVal = res.datas.find(
          (i) => i.productId == item.id && i.state != 'Reject' && i.state == 'WaitAudit'
        )
      } else {
        objVal = res.datas.find((i) => i.productId == item.id && i.state != 'Reject')
      }
      if (objVal && !objVal.isExpiry && type == 'eBook') {
        wx.showToast({
          title: "您已申请该样书",
          icon: 'none',
          duration: 1000,
        })
      } else if (objVal && type != 'eBook') {
        wx.showToast({
          title: "您已申请该样书",
          icon: 'none',
          duration: 1000,
        })
      } else {
        if (type == 'eBook') {
          if (this.data.ebookCount > 0) {
            const eBookData = this.data.electronicBookList
            if (eBookData.length == 2) {
              wx.showToast({
                title: "每次最多只可申请2本样书",
                icon: 'none',
                duration: 1000,
              })
              return false
            }
            if (eBookData.length > 0) {
              for (let i = 0; i < eBookData.length; i++) {
                if (eBookData[i].id == item.id) {
                  isHas = true
                }
              }
              if (!isHas) {
                wx.showToast({
                  title: "添加成功,在样书申请单等您哦~",
                  icon: "none",
                  duration: 1000,
                })
                this.setData({
                  electronicBookList: [...this.data.electronicBookList, ...[itemAttr]],
                  num: this.data.electronicBookList.length + this.data.paperBookList.length
                })
                wx.setStorageSync("electronicBookList", this.data.electronicBookList);
              } else {
                wx.showToast({
                  title: "该书已在清单列表中",
                  icon: "none",
                  duration: 1000,
                })
              }
            } else {
              wx.showToast({
                title: "添加成功,在样书申请单等您哦~",
                icon: "none",
                duration: 1000,
              })
              this.setData({
                electronicBookList: [itemAttr],
                num: 1 + this.data.paperBookList.length
              })
              wx.setStorageSync("electronicBookList", [itemAttr]);
            }
          } else {
            wx.showToast({
              title: "您的电子样书申请次数已用尽,若要继续,请联系管理员!",
              icon: "none",
              duration: 1000,
            })
          }
        } else {
          if (this.data.paperBookCount > 0) {
            const pBookData = this.data.paperBookList
            if (pBookData.length == 2) {
              wx.showToast({
                title: "每次最多只可申请2本样书",
                icon: 'none',
                duration: 1000,
              })
              return false
            }
            if (pBookData.length > 0) {
              for (let i = 0; i < pBookData.length; i++) {
                if (pBookData[i].id == item.id) {
                  isHas = true
                }
              }
              if (!isHas) {
                wx.showToast({
                  title: "添加成功,在样书申请单等您哦~",
                  icon: 'none',
                  duration: 1000,
                })
                this.setData({
                  paperBookList: [...this.data.paperBookList, ...[itemAttr]],
                  num: this.data.paperBookList.lenght + this.data.electronicBookList.length
                })
                wx.setStorageSync("paperBookList", this.data.paperBookList);
              } else {
                wx.showToast({
                  title: "该书已在清单列表中",
                  icon: "none",
                  duration: 1000,
                })
              }
            } else {
              wx.showToast({
                title: "添加成功,在样书申请单等您哦~",
                icon: 'none',
                duration: 1000,
              })
              this.setData({
                paperBookList: [itemAttr],
                num: 1 + this.data.electronicBookList.length
              })
              wx.setStorageSync("paperBookList", [itemAttr]);
            }
          } else {
            wx.showToast({
              title: "您的纸质样书申请次数已用尽,若要继续,请联系管理员!",
              icon: 'none',
              duration: 1000,
            })
          }
        }
      }
    })
  },
  //去样书申请单
  goApply() {
    wx.navigateTo({
      url: "/packageDomain/pages/sampleBookList/applicationForm/index",
    });
  },
})
packageBookService/pages/bookServices/detail/index.wxml
@@ -137,13 +137,13 @@
  </view>
  <!-- 购买按钮 -->
  <view class="box-bottom">
    <view class="bottom-btn">
    <view class="bottom-btn" bind:tap="appplyElectronicBook">
      <view>
        <t-image src="/static/images/bookService/detail/ebook.png"></t-image>
      </view>
      <view class="btn-text">电子样书申请</view>
    </view>
    <view class="bottom-btn">
    <view class="bottom-btn" bind:tap="appplyPaperBook">
      <view>
        <t-image src="/static/images/bookService/detail/paper-book.png"></t-image>
      </view>
@@ -156,4 +156,11 @@
<!-- 我要建议弹窗 -->
<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/yangshuForm.png" mode="heightFix" class="img" />
    <view class="num" wx:if="{{num > 0}}">{{num}}</view>
  </view>
</view>
packageBookService/pages/bookServices/detail/index.wxss
@@ -227,7 +227,7 @@
}
.box-bottom image {
  width: 36rpx;
  width: 38rpx;
  height: 44rpx;
}
@@ -300,4 +300,40 @@
.noData {
  height: 100%;
}
.applyBox {
  width: 184rpx;
  height: 184rpx;
  position: fixed;
  bottom: 20%;
  right: 0;
}
.applyBox .box {
  width: 184rpx;
  height: 184rpx;
  color: #fff;
  position: relative;
}
.applyBox .box .t-image {
  width: 100%;
  height: 100%;
}
.num {
  background-color: #FD3D16;
  color: #fff;
  border: 2rpx solid #FFFFFF;
  font-size: 24rpx;
  line-height: 30rpx;
  font-weight: 400;
  width: 48rpx;
  height: 32rpx;
  text-align: center;
  border-radius: 9px;
  position: absolute;
  top: 30rpx;
  left: 118rpx;
}
packageBookService/pages/bookServices/list/index.js
@@ -287,7 +287,7 @@
        subAccess: this.data.pathList,
      };
    } else {
      pathObj = {
      pathObj = {
        path,
        queryType: '*',
      };
packageDomain/pages/resourceDetails/myAudio/index.wxml
@@ -86,7 +86,7 @@
          <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}">
            <view slot="header" class="collapse-header">
              <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image>
              <view class="header-name">{{item.name}}</view>
              <view class="header-name">{{titleName}}</view>
            </view>
            <view>
              <view class="note-content">{{item.content}}</view>
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -345,6 +345,7 @@
        // item.deleteHover = false
        item.createDate = this.convertTimestamp(item.createDate)
      })
      console.log(res, 'res');
      this.setData({
        "pageCount.total": res.totalSize,
        noteList: res.datas,
packageDomain/pages/resourceDetails/myVideo/index.json
@@ -12,7 +12,8 @@
    "t-image": "tdesign-miniprogram/image/image",
    "t-textarea": "tdesign-miniprogram/textarea/textarea",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-popup": "tdesign-miniprogram/popup/popup"
    "t-popup": "tdesign-miniprogram/popup/popup",
    "t-empty": "tdesign-miniprogram/empty/empty"
  },
  "navigationStyle": "custom"
}
packageDomain/pages/resourceDetails/myVideo/index.wxml
@@ -31,11 +31,15 @@
    <t-tab-panel label="笔记" value="1" style="{{tabPanelstyle}}">
      <view class="wrapper">
        <view wx:if="{{!noteList.length}}" class="noData">
          <t-empty icon="folder-open" description="暂无数据" />
        </view>
        <t-collapse value="{{activeValues}}" bind:change="handleChange">
          <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}">
            <view slot="header" class="collapse-header">
              <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image>
              <view class="header-name">{{item.name}}</view>
              <view class="header-name">{{titleName}}</view>
            </view>
            <view>
              <view class="note-content">{{item.content}}</view>
packageDomain/pages/resourceDetails/myVideo/index.wxss
@@ -296,4 +296,8 @@
.t-tabs__track {
  background-color: #FF6C00 !important;
}
.noData {
  margin-top: 120rpx;
}
packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -9,6 +9,7 @@
      workInfo: null,
      schoolName: "",
      courseName: "",
      detailedAddress: ""
    },
    contactInfo: {
      fullName: "",
@@ -101,6 +102,7 @@
            'teacherInfo.workInfo': res[0].cmsTypeLinks[0].children,
          })
        }
        console.log(this.data.teacherInfo.workInfo, 333)
      })
  },
  //获取当前已申请次数(电子)
@@ -177,12 +179,13 @@
          })
          return
        }
        const mailAddress = JSON.stringify(that.data.contactInfo)
        that.setData({
          teacherInfo: {
            detailedAddress: mailAddress,
          }
          'teacherInfo.detailedAddress': mailAddress
        })
        console.log(that.data.teacherInfo.workInfo, 345)
        data = {
          topicIdOrRefCode: 'applyEntityBook',
          name: that.data.userInfo.name || '',
@@ -214,7 +217,6 @@
              })
              wx.setStorageSync("paperBookList", that.data.paperBookList);
            }
            wx.showModal({
              title: '提示!', //提示的标题
              content: '您的样书申请已提交,管理员审核中!申请状态在【个人中心—样书申请】中查询。', //提示的内容
packageDomain/pages/sampleBookList/applicationForm/index.wxss
@@ -6,6 +6,11 @@
  width: 100%;
}
.page-content {
  padding-bottom: env(safe-area-inset-bottom);
}
.t-tabs__track {
  display: none;
packagePersonal/pages/myCollection/index.js
@@ -167,7 +167,7 @@
                icon: 'success',
                duration: 1000,
              })
              this.getDataList(false)
              that.getDataList(false)
            });
        } else if (res.cancel) {
          console.log('用户点击了取消')
packagePersonal/pages/userSetting/index.js
@@ -1,4 +1,6 @@
const app = getApp()
import tool from "../../../assets/js/toolClass.js";
import FormData from '../../../utils/formdata/index.js';
Page({
  /**
@@ -10,6 +12,8 @@
    userInfoBox: false,
    editType: '',
    userInfoForm: {
      icon: '',
      nickName: '',
      phone: '',
      email: '',
      captcha: '',
@@ -49,6 +53,7 @@
      // 用户信息优先级:教师认证 > 微信 > 学生(注册时默认)
      if (res) {
        let defaultUser = {};
        let nickNameData = res.infoList.find((item) => item.type == 'nickName')
        let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher')
        let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo')
        let secretData = res.secretList.find(i => i.type == 'LoginNameAndPassword')
@@ -58,8 +63,8 @@
        if (teacherRole && teacherInfos) {
          defaultUser = {
            ...teacherInfos,
            fullName: teacherInfos.fullName,
            icon: teacherInfos.icon,
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : teacherInfos.name,
            icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '',
            userId: res.userId,
            role: 'Teacher',
            roleId: teacherRole.role.id,
@@ -69,16 +74,16 @@
        } else if (WeChatInfo) {
          defaultUser = {
            ...WeChatInfo,
            fullName: WeChatInfo.name,
            icon: WeChatInfo.icon,
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name,
            icon: JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon,
            userId: res.userId,
            phoneNumber: phoneInfo?.credential,
            Email: emailInfo?.credential
          }
        } else if (secretData) {
          defaultUser = {
            fullName: secretData.credential,
            icon: "",
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : secretData.credential,
            icon: JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : '',
            userId: res.userId,
            phoneNumber: phoneInfo?.credential,
            Email: emailInfo?.credential
@@ -99,7 +104,8 @@
        userInfoBox: true,
        editType: info,
        "userInfoForm.captcha": "",
        "userInfoForm.code": ""
        "userInfoForm.code": "",
        "userInfoForm.nickName": ''
      });
    }
    this.getImgCapcha()
@@ -110,7 +116,86 @@
      countDown: 0,
    });
  },
  editIconInfo(e) {
    var that = this;
    wx.chooseMedia({
      // count: 1, // 默认9
      sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
      sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
      success: function (res) {
        // 返回选定照片的本地文件路径列表,tempFilePath也可以作为img标签的src属性显示图片
        console.log(res.tempFiles[0])
        tool.getFileMd5(res.tempFiles[0]).then((e) => {
          console.log(e, 4)
          let formData = new FormData();
          formData.append('Md5', e);
          formData.append('FileName', e);
          formData.append('FileType', res.tempFiles[0].fileType);
          formData.appendFile("file", res.tempFiles[0].tempFilePath);
          const data = formData.getData();
          let _token = wx.getStorageSync(app.config.tokenKey);
          let header = {};
          if (_token == null) {
            header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`;
          } else {
            header["Authorization"] = `Bearer ` + _token;
          }
          new Promise((resolve, reject) => {
            wx.request({
              url: app.config.requestCtx + '/file/api/ApiUpload',
              method: 'POST',
              header: {
                'content-type': data.contentType,
                ...header
              },
              data: data.buffer,
              success(res) {
                console.log(res)
                if (res.statusCode == 200) {
                  resolve(res.data);
                  if (res.data) {
                    that.setData({
                      'userInfoForm.icon': app.config.requestCtx + `/file/GetPreViewImage?md5=` + e,
                    });
                    let userTypeInfo = {
                      requests: [
                        {
                          data: JSON.stringify({ nickName: that.data.userInfo.nickName, icon: that.data.userInfoForm.icon }),
                          name: '用户昵称头像',
                          type: 'nickName'
                        }
                      ]
                    }
                    app.MG.identity.setAppUserInfo(userTypeInfo).then((res) => {
                      if (res) {
                        wx.showToast({
                          title: "修改成功",
                          icon: 'success',
                          duration: 1000,
                        })
                        this.getUserInfo()
                        this.setData({
                          userInfoBox: false,
                        });
                      }
                    })
                  }
                } else {
                  reject('运行时错误,请稍后再试');
                }
              }
            })
          })
        })
      }
    });
  },
  onNameInput(e) {
    this.setData({
      "userInfoForm.nickName": e.detail.value,
    });
  },
  //输入手机号
  onPhoneInput(e) {
    console.log(e)
@@ -247,7 +332,31 @@
  },
  confirmInfo() {
    if (this.data.changeType == 'phone') {
    if (this.data.editType == 'nickName') {
      let userTypeInfo = {
        requests: [
          {
            data: JSON.stringify({ nickName: this.data.userInfoForm.nickName, icon: this.data.userInfo.icon }),
            name: '用户昵称头像',
            type: 'nickName'
          }
        ]
      }
      app.MG.identity.setAppUserInfo(userTypeInfo).then((res) => {
        if (res) {
          wx.showToast({
            title: "修改成功",
            icon: 'success',
            duration: 1000,
          })
          this.getUserInfo()
          this.setData({
            userInfoBox: false,
          });
        }
      })
    } else if (this.data.editType == 'phone') {
      let query = {
        phoneNumber: this.data.userInfoForm.phone,
        phoneCaptcha: this.data.userInfoForm.code
packagePersonal/pages/userSetting/index.wxml
@@ -2,13 +2,15 @@
  <view class="itemList">
    <view class="label">头像</view>
    <view class="contentImg">
      <t-avatar image="{{defaultAvatarUrl}}" class="user-center-card__header__avatar" />
      <t-avatar image="{{userInfo.icon}}" class="user-center-card__header__avatar" />
    </view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
    <view class="iconEdit" data-info="{{'icon'}}" bindtap="editIconInfo">
      <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
    </view>
  </view>
  <view class="itemList">
    <view class="label">用户名</view>
    <view class="content">{{userInfo.fullName || '微信用户'}}</view>
    <view class="content" data-info="{{'nickName'}}" bindtap="editUserInfo">{{userInfo.nickName || '微信用户'}}</view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
  </view>
  <view class="itemList">
@@ -24,6 +26,14 @@
  <t-popup visible="{{userInfoBox}}" bind:visible-change="onVisibleChange" placement="bottom">
    <view class="block">
      <view class="body">
        <view class="from-item" wx:if="{{editType == 'nickName'}}">
          <view class="label"> 昵称: </view>
          <view class="item-content">
            <view class="inputBox1">
              <t-input placeholder="输入用户名" borderless value="{{userInfoForm.nickName}}" bindchange="onNameInput" />
            </view>
          </view>
        </view>
        <view class="from-item" wx:if="{{editType == 'phone'}}">
          <view class="label"> 手机号: </view>
          <view class="item-content">
@@ -40,7 +50,7 @@
            </view>
          </view>
        </view>
        <view class="from-item">
        <view class="from-item" wx:if="{{editType !== 'nickName'}}">
          <view class="label"> 图形验证码: </view>
          <view class="item-content">
            <view class="inputBox">
packagePersonal/pages/userSetting/index.wxss
@@ -32,6 +32,10 @@
  overflow: hidden;
}
.iconEdit {
  padding: 40rpx 0;
}
.content {
  flex: 1;
  color: #5C5C5C;
@@ -59,10 +63,10 @@
}
.block .body .from-item .label {
  width: 170rpx;
  width: 200rpx;
  height: 72rpx;
  line-height: 72rpx;
  font-size: 28rpx;
  font-size: 32rpx;
}
.block .body .from-item .item-content {
@@ -72,14 +76,17 @@
}
.inputBox1 {
  width: 540rox;
  height: 72rpx;
  border: 2rpx solid #D9D9D9;
  flex: 1;
}
.inputBox1 .t-input {
  width: 440rpx !important;
}
.block .body .inputBox {
  width: 280rpx;
  width: 250rpx;
  height: 72rpx;
  border: 2rpx solid #D9D9D9;
}
@@ -90,17 +97,17 @@
.imgCode {
  height: 72rpx;
  width: 200rpx;
  width: 190rpx;
}
.code {
  width: 200rpx;
  width: 190rpx;
  height: 72rpx;
  margin-left: 20rpx;
}
.btn {
  width: 200rpx;
  width: 190rpx;
  height: 72rpx;
  padding: 0 10rpx !important;
  background: #ff6c00;
pages/bibliographyList/index.js
@@ -7,6 +7,7 @@
     * 页面的初始数据
     */
    data: {
      isMore: null,
      higherList: [],
      vocationalList: [],
      teacherList: [],
@@ -16,7 +17,8 @@
      value: '',
      BarHeight: '',
      navBarHeight: '',
      start: 1,
      tabValue: ''
    },
    /**
@@ -35,7 +37,12 @@
        barHeight: systInfo.statusBarHeight,
      })
      let event =
      {
        detail: { value: "0" }
      }
      this.onTabsChange(event)
@@ -92,12 +99,28 @@
    },
    onTabsChange(event) {
      console.log(`Change tab, tab-panel value is ${event.detail.value}.`);
      const value = event.detail.value
      if (value === '0') {
        console.log(value);
        this.setData({
          tabValue: value
        })
      } else if (value === '1') {
        console.log(value);
        this.setData({
          tabValue: value
        })
      } else if (value === '2') {
        console.log(value);
        this.setData({
          tabValue: value
        })
      }
    },
    onTabsClick(event) {
      console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
    },
    //高等教育
    higherGet(keyword) {
      let searchObj = {
@@ -112,7 +135,7 @@
        queryType: '*',
        paging: {
          start: '0',
          size: '999'
          size: this.data.start * 9
        },
        coverSize: {
          width: 260
@@ -139,7 +162,7 @@
        })
        console.log(this.data.higherList, '5555');
      })
      wx.stopPullDownRefresh()
    },
@@ -156,7 +179,7 @@
        queryType: '*',
        paging: {
          start: '0',
          size: '999'
          size: this.data.start * 9
        },
        coverSize: {
          width: 260
@@ -181,6 +204,7 @@
        })
      })
      wx.stopPullDownRefresh()
    },
    // 职业教育
    teacherGet(keyword) {
@@ -195,7 +219,7 @@
        queryType: '*',
        paging: {
          start: '0',
          size: '999'
          size: this.data.start * 9
        },
        coverSize: {
          width: 260
@@ -220,7 +244,7 @@
        })
      })
      wx.stopPullDownRefresh()
    },
    downloadData(event) {
@@ -267,5 +291,82 @@
    goBack() {
      wx.navigateBack();
    },
    onReachBottom(e) {
      if (this.data.tabValue == 0) {
        console.log(0);
        if (this.data.higherList.length < this.data.higherTotal) {
          this.setData({
            isMore: true,
            start: this.data.start + 1
          })
          this.higherGet()
        } else {
          this.setData({
            isMore: true,
          })
          setTimeout(() => {
            this.setData({
              isMore: false
            })
          }, 100)
        }
      } else if (this.data.tabValue == 1) {
        if (this.data.teacherList.length < this.data.teacherTotal) {
          this.setData({
            isMore: true,
            start: this.data.start + 1
          })
          this.teacherGet()
        } else {
          this.setData({
            isMore: true,
          })
          setTimeout(() => {
            this.setData({
              isMore: false
            })
          }, 100)
        }
        console.log(2);
      } else if (this.data.tabValue == 2) {
        if (this.data.vocationalList.length < this.data.vocationalTotal && this.data.vocationalList.length > 9) {
          this.setData({
            isMore: true,
            start: this.data.start + 1
          })
          this.vocationalGet()
        } else {
          this.setData({
            isMore: true,
          })
          setTimeout(() => {
            this.setData({
              isMore: false
            })
          }, 100)
        }
        console.log(2);
      }
    },
    onPullDownRefresh() {
      this.setData({
        start: 1
      })
      this.vocationalGet()
      this.higherGet()
      this.teacherGet()
    },
  })
pages/bibliographyList/index.json
@@ -4,7 +4,12 @@
    "t-tabs": "tdesign-miniprogram/tabs/tabs",
    "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
    "t-search": "tdesign-miniprogram/search/search",
    "t-icon": "tdesign-miniprogram/icon/icon"
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-image": "tdesign-miniprogram/image/image"
  },
  "navigationStyle": "custom"
  "navigationStyle": "custom",
  "enablePullDownRefresh": true,
  "onReachBottomDistance": 200,
  "backgroundTextStyle": "dark"
}
pages/bibliographyList/index.wxml
@@ -49,7 +49,10 @@
      </view>
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
  <t-tab-panel label="职业教育({{vocationalTotal}})" value="1">
    <view class="outsideHigherBox">
@@ -67,7 +70,10 @@
      </view>
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
  <t-tab-panel label="教师教育({{teacherTotal}})" value="2">
@@ -86,6 +92,10 @@
      </view>
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
</t-tabs>
pages/bibliographyList/index.wxss
@@ -119,4 +119,13 @@
.t-tabs__track {
  background-color: #FF6C00 !important;
}
.bottom-box {
  display: flex;
  justify-content: center;
  color: #999;
  height: 80rpx;
  font-size: 28rpx;
  --td-loading-color: #ff6c00
}
pages/bookExhibitionList/index.js
@@ -8,6 +8,7 @@
   * 页面的初始数据
   */
  data: {
    keynoteDisabled: true,
    value: '',
    keyword: '',
    nameSort: null,
@@ -49,9 +50,7 @@
          price: 'jsek_teacherEducation',
          label: '教师教育',
        },
      ],
    },
    multipleSelect: {
      value: [],
@@ -68,33 +67,7 @@
    * 生命周期函数--监听页面加载
    */
  onLoad(options) {
    // 获取屏幕高度
    wx.getSystemInfo({
      success: function (res) {
        // this.setData({
        //   windowHeight: res.windowHeight
        // })
        // 获取节点的类名
        var query = wx.createSelectorQuery();
        query.select('.assembleContent').boundingClientRect();
        query.exec(function (res) {
          // console.log(res, 'res');
          let node = res[0];
          node.setStyle({
            backgroundColor: '#0256b9',
          })
          // // 修改节点样式
          // if (node) {
          //   node.setStyle({
          //     backgroundColor: 'red',
          //     color: 'white'
          //   });
          // }
        });
      }
    });
    // console.log(this.data.filteredItems, 88888);
    const systInfo = wx.getSystemInfoSync();
@@ -114,18 +87,18 @@
    if (this.data.filteredItems = []) {
      console.log(11111);
      singleSelectOptions.push({
        label: '禁用选项',
        value: 'disabled',
        disabled: true,
      });
      // singleSelectOptions.push({
      //   label: '暂无数据',
      //   value: 'disabled',
      //   disabled: true,
      // });
    } else {
      console.log(7889);
    }
    // singleSelectOptions.push({
    //   label: '禁用选项',
    //   value: 'disabled',
    //   disabled: true,
    // });
    // 更新数据
@@ -300,6 +273,18 @@
    const newValue = e.detail.value;
    const selectedOption = this.data.product.options.find(option => option.value === newValue);
    const newPrice = selectedOption ? selectedOption.price : null;
    console.log(newValue, 'newValue');
    console.log(newPrice, 'newPrice');
    if (newPrice) {
      this.setData({
        keynoteDisabled: false
      })
    } else {
      this.setData({
        keynoteDisabled: true
      })
    }
    this.setData({
      'product.value': newValue,
      'product.price': newPrice, // 将选中的 price 值保存在数据中
@@ -330,6 +315,7 @@
    });
  },
  handleConfirm(event) {
    const { value } = event.detail;
    // 确认操作的处理逻辑
@@ -369,8 +355,6 @@
    this.data.nameSort = 'Desc'
    // console.log('sssssss');
    this.bookExhibitionGet()
  },
  onBookExhibitionDetails: function (event) {
    const item = event.currentTarget.dataset.item;
pages/bookExhibitionList/index.json
@@ -6,7 +6,8 @@
    "t-dropdown-menu": "tdesign-miniprogram/dropdown-menu/dropdown-menu",
    "t-dropdown-item": "tdesign-miniprogram/dropdown-item/dropdown-item",
    "t-toast": "tdesign-miniprogram/toast/toast",
    "t-icon": "tdesign-miniprogram/icon/icon"
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-empty": "tdesign-miniprogram/empty/empty"
  },
  "onReachBottomDistance": 200,
  "navigationStyle": "custom",
pages/bookExhibitionList/index.wxml
@@ -2,41 +2,49 @@
<!-- 弹出框 禁止 -->
<t-toast id="t-toast" />
<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" />
  </view>
  <view class="example-search">
    <t-search model:value="{{value}}" placeholder="请输入书展名称" bind:submit="onSearchSubmit" />
  </view>
</view>
<view class="menuBox">
  <t-dropdown-menu class="classification">
    <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" />
    <t-dropdown-item label="重点项目" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" />
  </t-dropdown-menu>
  <view class="outsideSortBox">
    <view class="sortBox" bind:tap="onSwapRight">
      <text>排序</text>
      <view class="iconBox">
        <t-icon class="swapRight" name="swap-right" size="35rpx" color="{{nameSort == 'Asc' ? '#ff6c00' : ''}}" />
        <t-icon class="swapLeft" name="swap-right" size="35rpx" color="{{nameSort == 'Desc' ? '#ff6c00' : ''}}" />
      </view>
<view class="bigTitleBox">
  <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" />
    </view>
    <view class="example-search">
      <t-search model:value="{{value}}" placeholder="请输入书展名称" bind:submit="onSearchSubmit" />
    </view>
  </view>
</view>
<view>
</view>
<view class="outsideMenuBox">
  <view class="menuBox">
    <t-dropdown-menu class="classification">
      <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" />
      <t-dropdown-item disabled="{{keynoteDisabled}}" label=" 重点项目" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" />
    </t-dropdown-menu>
    <view class="outsideSortBox">
      <view class="sortBox" bind:tap="onSwapRight">
        <text>排序</text>
        <view class="iconBox">
          <t-icon class="swapRight" name="swap-right" size="35rpx" color="{{nameSort == 'Asc' ? '#ff6c00' : ''}}" />
          <t-icon class="swapLeft" name="swap-right" size="35rpx" color="{{nameSort == 'Desc' ? '#ff6c00' : ''}}" />
        </view>
      </view>
    </view>
  </view>
</view>
<view class="assembleContent">
  <view class="titleBox">
@@ -47,7 +55,7 @@
  </view>
  <view class="outside">
    <view wx:if="{{bookExhibitionList.length }}">
    <view wx:if="{{!bookExhibitionList.length }}" class="noData">
      <t-empty icon="folder-open" description="暂无数据" />
    </view>
pages/bookExhibitionList/index.wxss
@@ -139,8 +139,9 @@
.assembleContent {
  background-color: #F2F3F8;
  min-height: 90vh;
}
.t-dropdown-menu:after,
.t-dropdown-menu::after {
  height: 0px;
@@ -202,4 +203,11 @@
.menu--t-dropdown-menu::after {
  background-color: var(--td-component-border, var(--td-gray-color-4, #fff)) !important;
}
.noData {
  /* display: flex;
  justify-content: center; */
  margin: 0 auto;
  margin-top: 100rpx;
}
pages/cart/index.js
@@ -11,10 +11,14 @@
    checkedList: [],
    selectedCount: 0,
    totalPrice: 0.00,
    type: ''
    type: '',
    start: 1,
    totalSize: '',
    isMore: null,
  },
  onLoad(options) {
    wx.setNavigationBarTitle({
      title: '购物车'
    });
@@ -38,16 +42,19 @@
  shoppingCartGet() {
    let query = {
      start: 0,
      size: 999,
      size: this.data.start * 4,
      filterList: [],
      searchList: []
    };
    app.MG.store.getShoppingCartProductList(query).then(res => {
      console.log(res, 'res');
      this.setData({
        totalSize: res.totalSize
      })
      res.datas.forEach(item => {
        item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160');
        console.log(item);
        console.log(item.saleMethod.type, 'item.saleMethod.type')
        this.setData({
          type: item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'
        })
@@ -58,6 +65,7 @@
        shoppingCartData: res.datas
      });
    });
    wx.stopPullDownRefresh()
  },
  bottomChange(e) {
@@ -134,5 +142,35 @@
    wx.navigateTo({
      url: '/pages/testLogin/index'
    });
  }
  },
  //触底函数
  onReachBottom() {
    if (this.data.shoppingCartData.length < this.data.totalSize) {
      this.setData({
        isMore: true,
        start: this.data.start + 1
      })
      this.shoppingCartGet()
    } else {
      this.setData({
        isMore: true,
      })
      setTimeout(() => {
        this.setData({
          isMore: false
        })
      }, 100)
    }
  },
  // 下拉函数
  onPullDownRefresh() {
    this.setData({
      start: 1
    })
    console.log(978);
    this.shoppingCartGet()
  },
});
pages/cart/index.json
@@ -6,6 +6,11 @@
    "t-cell": "tdesign-miniprogram/cell/cell",
    "t-button": "tdesign-miniprogram/button/button",
    "t-toast": "tdesign-miniprogram/toast/toast",
    "t-empty": "tdesign-miniprogram/empty/empty"
  }
    "t-empty": "tdesign-miniprogram/empty/empty",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-image": "tdesign-miniprogram/image/image"
  },
  "enablePullDownRefresh": true,
  "onReachBottomDistance": 200,
  "backgroundTextStyle": "dark"
}
pages/cart/index.wxml
@@ -46,7 +46,10 @@
    </view>
    <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">删除</view>
  </t-swipe-cell>
  <view class="bottom-box">
    <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
    <text wx:if="{{isMore == false}}">没有更多了</text>
  </view>
</view>
<view class="bottomBox">
pages/cart/index.wxss
@@ -249,4 +249,13 @@
  color: #333333;
  /* margin: 10rpx 0; */
  margin-bottom: 20rpx;
}
.bottom-box {
  display: flex;
  justify-content: center;
  color: #999;
  height: 80rpx;
  font-size: 28rpx;
  --td-loading-color: #ff6c00
}
pages/personalCenter/components/user-center-card/index.wxml
@@ -17,7 +17,7 @@
    <view class="user-center-card__header">
      <t-avatar image="{{userInfo.icon || defaultAvatarUrl}}" class="user-center-card__header__avatar" />
      <view>
        <view class="user-center-card__header__name">{{userInfo.fullName || '微信用户'}}</view>
        <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view>
        <view class="userTypeBox">
          <text>{{userInfo.userType}}</text>
          <text class="edit" bindtap="editUserType">修改</text>
@@ -36,7 +36,7 @@
    <view class="user-center-card__header">
      <t-avatar t-class="avatar" mode="aspectFill" class="user-center-card__header__avatar" image="{{userInfo.icon || defaultAvatarUrl}}" />
      <view>
        <view class="user-center-card__header__name">{{userInfo.fullName || '微信用户'}}</view>
        <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view>
        <view class="userTypeBox">
          <text>{{userInfo.userType}}</text>
          <text bindtap="editUserType">修改</text>
pages/personalCenter/index.js
@@ -175,6 +175,7 @@
          type = '-'
        }
        let defaultUser = {};
        let nickNameData = res.infoList.find((item) => item.type == 'nickName')
        let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher')
        let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo')
        let secretData = res.secretList.find(i => i.type == 'LoginNameAndPassword')
@@ -182,8 +183,8 @@
        if (teacherRole && teacherInfos) {
          defaultUser = {
            ...teacherInfos,
            fullName: teacherInfos.fullName,
            icon: teacherInfos.icon,
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : teacherInfos.name,
            icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '',
            userId: res.userId,
            role: 'Teacher',
            roleId: teacherRole.role.id,
@@ -196,8 +197,8 @@
        } else if (WeChatInfo) {
          defaultUser = {
            ...WeChatInfo,
            fullName: WeChatInfo.name,
            icon: WeChatInfo.icon,
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name,
            icon: JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon,
            userId: res.userId,
            userType: type
          }
@@ -206,8 +207,8 @@
          });
        } else if (secretData) {
          defaultUser = {
            fullName: secretData.credential,
            icon: "",
            nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : secretData.credential,
            icon: JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : "",
            userId: res.userId,
            userType: type
          }
pages/retrievalPage/index.js
@@ -9,6 +9,7 @@
   * 页面的初始数据
   */
  data: {
    isMore: null,
    tabPanelstyle: 'display:flex;justify-content:center;align-items:center;',
    navBarHeight: '',
    barHeight: '',
@@ -24,7 +25,12 @@
    biblioClassificationData: [],//书展
    biblioClassificationTotal: 0,
    bookFairData: [],//书目
    bookFairTotal: 0
    bookFairTotal: 0,
    pageCount: {
      page: 1,
      total: 0,
    },
    tabValue: ''
  },
  /**
@@ -35,7 +41,6 @@
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
      searchVal: options.searchVal
@@ -44,6 +49,13 @@
    this.retrievalPageGet()
    this.bibliographyGet()
    let event = {
      detail: {
        value: "0"
      }
    }
    this.onTabsChange(event)
  },
  /**
@@ -105,13 +117,47 @@
    this.retrievalPageGet()
    this.bibliographyGet()
  },
  //标签的切换
  onTabsChange(event) {
    console.log(`Change tab, tab-panel searchVal is ${event.detail.searchVal}.`);
    const value = event.detail.value
    if (value === '0') {
      this.setData({
        tabValue: value,
        isMore: false
      })
    } else if (value === '1') {
      console.log(value, 'tab');
      this.setData({
        tabValue: value,
        isMore: false
      })
    } else if (value === '2') {
      this.setData({
        tabValue: value,
        isMore: false
      })
    } else if (value === '3') {
      this.setData({
        tabValue: value,
        isMore: false
      })
    } else if (value === '4') {
      this.setData({
        tabValue: value,
        isMore: false
      })
    } else if (value === '5') {
      this.setData({
        tabValue: value,
        isMore: false
      })
    }
  },
  onTabsClick(event) {
    console.log(`Click tab, tab-panel searchVal is ${event.detail.searchVal}.`);
  },
  retrievalPageGet() {
@@ -149,7 +195,7 @@
      },
      PageQuery: {
        Start: 0,
        Size: 999
        Size: this.data.pageCount.page * 9,
      },
      SortQuery: [
        {
@@ -194,7 +240,7 @@
      },
      PageQuery: {
        Start: 0,
        Size: 999
        Size: this.data.pageCount.page * 4
      },
      SortQuery: [
        {
@@ -238,7 +284,7 @@
      },
      PageQuery: {
        Start: 0,
        Size: 999
        Size: this.data.pageCount.page * 9,
      },
      SortQuery: [
        {
@@ -283,7 +329,7 @@
      },
      PageQuery: {
        Start: 0,
        Size: 999
        Size: this.data.pageCount.page * 6,
      },
      SortQuery: [
        {
@@ -327,7 +373,7 @@
      PageQuery: {
        Start: 0,
        Size: 999
        Size: this.data.pageCount.page * 10
      },
      SortQuery: [
        {
@@ -382,7 +428,8 @@
      })
      this.setData({
        bookData: datas1,
        bookTotal: data1.totalCount
        bookTotal: data1.totalCount,
      })
@@ -434,7 +481,7 @@
      datas5.forEach((items) => {
        items.subtitleName = items.subtitle + items.name
      })
      console.log(datas5, 'sadasd');
      // console.log(datas5, 'sadasd');
      this.setData({
        biblioClassificationData: datas5,
        biblioClassificationTotal: data5.totalCount
@@ -444,7 +491,7 @@
    })
    wx.stopPullDownRefresh()
  },
  bibliographyGet() {
    let bibliographyObj = {}
@@ -462,7 +509,7 @@
      queryType: '*',
      paging: {
        start: 0,
        size: 999
        size: this.data.pageCount.page * 9,
      },
      coverSize: {
        width: 260
@@ -478,13 +525,14 @@
      },
      SysType: "CmsItem"
    }).then(res => {
      // console.log(res);
      this.setData({
        bookFairData: res.datas,
        bookFairTotal: res.total
      })
    })
    wx.stopPullDownRefresh()
  },
  downloadData(event) {
    console.log(111);
@@ -527,8 +575,6 @@
    const item = e.currentTarget.dataset.item
    wx.navigateTo({
      url: '/packageBookService/pages/bookServices/detail/index?id=' + item.id + '&name=' + item.name
    })
  },
  onBookExhibitionDetails(e) {
@@ -539,14 +585,151 @@
      url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name // 假设跳转到详情页面,并传递了id参数
    });
  },
  //触底函数
  onReachBottom() {
    console.log("上拉加载....");
  },
  //上拉函数
  onPullDownRefresh() {
    console.log("下拉刷新...");
  },
  /**
     * 页面上拉触底事件的处理函数
     */
  onReachBottom(e) {
    if (this.data.tabValue == 0) {
      console.log(0);
      if (this.data.bookData.length < this.data.bookTotal) {
        this.setData({
          isMore: true,
          "pageCount.page": this.data.pageCount.page + 1
        })
        this.retrievalPageGet()
      } else {
        this.setData({
          isMore: true,
        })
        setTimeout(() => {
          this.setData({
            isMore: false
          })
        }, 100)
      }
    } else if (this.data.tabValue == 1) {
      if (this.data.courseData.length < this.data.courseTotal) {
        this.setData({
          isMore: true,
          "pageCount.page": this.data.pageCount.page + 1
        })
        this.retrievalPageGet()
      } else {
        this.setData({
          isMore: true,
        })
        setTimeout(() => {
          this.setData({
            isMore: false
          })
        }, 100)
      }
      console.log(2);
    } else if (this.data.tabValue == 2) {
      if (this.data.digitalTextbooksData.length < this.data.digitalTextbooksTotal && this.data.digitalTextbooksData.length > 9) {
        this.setData({
          isMore: true,
          "pageCount.page": this.data.pageCount.page + 1
        })
        this.retrievalPageGet()
      } else {
        this.setData({
          isMore: true,
        })
        setTimeout(() => {
          this.setData({
            isMore: false
          })
        }, 100)
      }
      console.log(2);
    } else if (this.data.tabValue == 3) {
      if (this.data.seminarData.length < this.data.seminarTotal) {
        this.setData({
          isMore: true,
          "pageCount.page": this.data.pageCount.page + 1
        })
        this.retrievalPageGet()
      } else {
        this.setData({
          isMore: true,
        })
        setTimeout(() => {
          this.setData({
            isMore: false
          })
        }, 100)
      }
      console.log(3);
    } else if (this.data.tabValue == 4) {
      if (this.data.bookFairData.length < this.data.bookFairTotal) {
        this.setData({
          isMore: true,
          "pageCount.page": this.data.pageCount.page + 1
        })
        this.bibliographyGet()
      } else {
        this.setData({
          isMore: true,
        })
        setTimeout(() => {
          this.setData({
            isMore: false
          })
        }, 100)
      }
      console.log(4);
    } else if (this.data.tabValue == 5) {
      if (this.data.biblioClassificationData.length < this.data.biblioClassificationTotal) {
        this.setData({
          isMore: true,
          "pageCount.page": this.data.pageCount.page + 1
        })
        this.retrievalPageGet()
      } else {
        this.setData({
          isMore: true,
        })
        setTimeout(() => {
          this.setData({
            isMore: false
          })
        }, 100)
      }
    }
  },
  // 下拉函数
  onPullDownRefresh() {
    if (this.data.tabValue == 4) {
      this.setData({
        "pageCount.page": 1
      })
      this.bibliographyGet()
    } else {
      this.setData({
        "pageCount.page": 1
      })
      this.retrievalPageGet()
    }
  },
})
pages/retrievalPage/index.json
@@ -5,8 +5,13 @@
    "t-search": "tdesign-miniprogram/search/search",
    "t-tabs": "tdesign-miniprogram/tabs/tabs",
    "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
    "t-empty": "tdesign-miniprogram/empty/empty"
    "t-empty": "tdesign-miniprogram/empty/empty",
    "t-toast": "tdesign-miniprogram/toast/toast",
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-image": "tdesign-miniprogram/image/image"
  },
  "navigationStyle": "custom",
  "enablePullDownRefresh": true
  "enablePullDownRefresh": true,
  "onReachBottomDistance": 200,
  "backgroundTextStyle": "dark"
}
pages/retrievalPage/index.wxml
@@ -10,7 +10,6 @@
<view class="example-search">
  <t-search bind:submit="onSearchSubmit" class="searchBox" model:value="{{searchVal}}" placeholder="请输入关键词/书名/ISBN/作者" />
  <view class="cancellation" bind:tap="onCancellation">取消</view>
</view>
@@ -37,7 +36,10 @@
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
  <t-tab-panel label="课程({{courseTotal}})" value="1">
@@ -47,7 +49,7 @@
      <view wx:if="{{courseData.length <= 0}}" class="noDataBox">
        <t-empty icon="folder-open" description="暂无数据" />
      </view>
      <view wx:if="{{courseData.length>0}}">
      <view>
        <view wx:for="{{courseData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox">
          <view class="listItem flex">
            <view class="specialSubject-img">
@@ -71,7 +73,10 @@
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
  <t-tab-panel label="数字教材({{digitalTextbooksTotal}})" value="2">
@@ -95,7 +100,10 @@
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
@@ -125,7 +133,10 @@
      </view>
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
  <t-tab-panel label="书目({{bookFairTotal}})" value="4">
@@ -154,7 +165,10 @@
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
@@ -173,7 +187,10 @@
    </view>
    <view class="bottom-box">
      <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
      <text wx:if="{{isMore == false}}">没有更多了</text>
    </view>
  </t-tab-panel>
</t-tabs>
pages/retrievalPage/index.wxss
@@ -87,6 +87,11 @@
  font-weight: 400;
  font-size: 22rpx;
  color: #333333;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@@ -111,6 +116,7 @@
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0px 0px 20rpx 2px #f1f1f1;
  min-height: 170rpx;
}
@@ -128,6 +134,7 @@
.body-info {
  padding: 20rpx;
  font-size: 28rpx;
  min-height: 110rpx;
}
.body-info .name {
@@ -301,4 +308,22 @@
  align-items: center */
  margin: 0 auto;
  margin-top: 250rpx;
}
.bottom-box {
  display: flex;
  justify-content: center;
  color: #999;
  height: 80rpx;
  font-size: 28rpx;
  --td-loading-color: #ff6c00
}
.loading-box {
  width: 100%;
  height: calc(100vh - 500rpx);
  display: flex;
  align-items: center;
  justify-content: center;
  --td-loading-color: #ff6c00;
}