闫增涛
2024-04-29 558845242a07b68f42fa1802c45ab2769395d8b8
合并代码
12个文件已修改
2个文件已添加
486 ■■■■ 已修改文件
packageBookService/pages/bookServices/detail/buyResource/index.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.js 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/myCollection/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packagePersonal/pages/sampleBooks/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/select/select.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookExhibitionList/select/select.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/home.wxml 318 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/buyResource/index.js
@@ -127,7 +127,7 @@
  // 扁平化数据转换tree
  getTreeList(rootList, pathLength, newArr, path) {
    for (const item of rootList) {
      if (item.productLinkPath.length == pathLength && item.productLinkPath.includes(path)) {
      if ((pathLength - item.productLinkPath.length >= 0 && pathLength - item.productLinkPath.length <= 3) && item.productLinkPath.includes(path)) {
        if (item.sysType == 'CmsItem') {
          if (item.selectType == 'webpage') {
            item.disabled = true
@@ -288,7 +288,8 @@
        //   })
        // }
        // debugger
        this.getTreeList(res.datas.cmsDatas[0].datas, 17, list, '\\')
        const num = query.cmsPath.length + 6
        this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\')
        list = this.ensureTreeConsistency(list)
        list = this.changeResourceChildren(list)
        console.log('修改后云', list);
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -48,6 +48,9 @@
    checkAllState: {
      type: Boolean,
    },
    deadline: {
      type: String
    }
  },
  data: {
    sonPurchaseSaleMethodId: "",
@@ -181,7 +184,7 @@
          }
        }
        wx.navigateTo({
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}`,
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`,
        });
        console.log(item, '7899');
@@ -226,10 +229,60 @@
            },
          });
        }
<<<<<<< Updated upstream
=======
        // if (item.selectType == "document" || item.selectType == "pdf") {
        //   const fileLink = app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file;
        //   let filePath = wx.env.USER_DATA_PATH + '/' + item.name
        //   console.log(filePath, 'filePath');
        //   //提示加载中
        //   util.showLoading();
        //   // 单次下载允许的最大文件为 200MB
        //   wx.downloadFile({
        //     url: fileLink,
        //     success: function (res) {
        //       if (res.statusCode != 200) {
        //         util.hideLoadingWithErrorTips();
        //         return false;
        //       }
        //       var Path = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
        //       wx.saveFile({
        //         tempFilePath: Path,
        //         success: function (res) {
        //           var savedFilePath = res.savedFilePath;
        //           // 将文件保存为 item.name
        //           wx.saveFile({
        //             tempFilePath: savedFilePath,
        //             filePath: wx.env.USER_DATA_PATH + '/' + item.name,
        //             success: function (res) {
        //               wx.openDocument({
        //                 filePath: res.savedFilePath,
        //                 showMenu: true,
        //                 success: function (res) {
        //                   util.hideLoading();
        //                 },
        //               });
        //             },
        //             fail: function (err) {
        //               util.hideLoadingWithErrorTips();
        //             }
        //           });
        //         },
        //         fail: function (err) {
        //           util.hideLoadingWithErrorTips();
        //         }
        //       });
        //     },
        //     fail: function (err) {
        //       util.hideLoadingWithErrorTips();
        //     },
        //   });
        // }
>>>>>>> Stashed changes
        if (item.selectType == "webpage") {
          this.setData({
            webpageSrc: item.jsek_link,
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -19,7 +19,7 @@
            data-parent="{{''}}"
          >
            <!-- 教学资源 云学习 图标 -->
            <view class="box-image" style="width: 100%">
            <view class="box-image" style="width: 80%">
              <view
                class="checkBox"
                wx:if="{{isShowCheck}}"
@@ -93,7 +93,7 @@
              <!-- 云学习图标 -->
              <view> </view>
              <!-- 名称 -->
              <text class="name" style="width: 80%">{{item.name || '-'}}</text>
              <text class="name" style="width: 100%">{{item.name || '-'}}</text>
            </view>
            <!-- 教学资源类型 -->
            <view class="teachClass"> {{item.resourceClass}} </view>
packageBookService/pages/bookServices/detail/index.js
@@ -150,7 +150,8 @@
      },
    ],
    showIndex: '',
    successOrderNumber: ''
    successOrderNumber: '',
    applicationState: '' // 电子样书申请状态
  },
  resetTree: function (e) {
@@ -767,7 +768,8 @@
  // 扁平化数据转换tree
  getTreeList(rootList, pathLength, newArr, path) {
    for (const item of rootList) {
      if (item.productLinkPath.length == pathLength && item.productLinkPath.includes(path)) {
      // 此处原本 item.productLinkPath.length == pathLength 但 productLinkPath 长度个别书存在4、5位交错
      if ((pathLength - item.productLinkPath.length >= 0 && pathLength - item.productLinkPath.length <= 3) && item.productLinkPath.includes(path)) {
        if (item.sysType == 'CmsItem') {
          if (item.selectType == 'webpage') {
            item.disabled = true
@@ -898,7 +900,8 @@
            }
          }
        });
        this.getTreeList(res.datas.cmsDatas[0].datas, 17, list, '\\')
        const num = query.cmsPath.length + 6
        this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\')
        list = this.ensureTreeConsistency(list)
        list = this.changeResourceChildren(list)
        console.log('修改后云', list);
@@ -1324,7 +1327,6 @@
  },
  // 申请教学资源
  applyResource() {
    // if (this.data.applyResourceState) {
    //   return wx.showToast({
    //     icon: "error",
@@ -1610,7 +1612,6 @@
  },
  updateShoppingCartHidden() {
    const isSHow = this.data.shoppingCartGetId.some(
      (item) => item == data.saleMethod[0].Id
    );
@@ -2087,6 +2088,20 @@
            list.push(item);
          }
        });
        const smBook = list.find(item => item.content[0].id == this.data.bookDetail.id)
        console.log('已申请', smBook);
        if (smBook && smBook.state == 'Normal') {
          const flag = new Date(JSON.parse(smBook.feedBack).endDate + '23:59:59').getTime() > new Date().getTime()
          if (flag) {
            this.setData({
              applicationState: 'Normal'
            })
          } else {
            this.setData({
              applicationState: 'overdue'
            })
          }
        }
        this.setData({
          alreadyElectronicBookList: list,
        });
@@ -2175,15 +2190,27 @@
          return false;
        }
        let isApply = this.data.alreadyElectronicBookList.find(
          (eitem) => eitem.id == this.data.bookDetail.id
          (eitem) => eitem.content[0].id == this.data.bookDetail.id
        );
        if (isApply) {
          wx.showToast({
            title: "该书已申请!",
            icon: "none",
            duration: 1000,
          });
          return false;
          if (isApply.state == 'WaitAudit') {
            wx.showToast({
              title: "该书已申请!",
              icon: "none",
              duration: 1000,
            });
            return false;
          } else if (isApply.state == 'Normal') {
            const flag = new Date(JSON.parse(isApply.feedBack).endDate + '23:59:59').getTime() > new Date().getTime()
            if (flag) {
              wx.showToast({
                title: "该书已申请!",
                icon: "none",
                duration: 1000,
              });
              return false;
            }
          }
        }
        if (this.data.electronicBookList.length >= 2) {
          wx.showToast({
@@ -2251,7 +2278,7 @@
          return false;
        }
        let isApply = this.data.alreadyPaperBookList.find(
          (pitem) => pitem.id == this.data.bookDetail.id
          (pitem) => pitem.content[0].id == this.data.bookDetail.id
        );
        if (isApply) {
          wx.showToast({
packageBookService/pages/bookServices/detail/index.wxml
@@ -230,6 +230,7 @@
                treeList="{{teach}}"
                tab="{{tabValue}}"
                applyState="{{applyState}}"
                deadline="{{deadline}}"
                bind:downloadTeach="downloadTeach"
                bind:handleTree="handleTree"
                openTeachids="{{openTeachids}}"
@@ -380,7 +381,7 @@
    <view
      class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}"
      bind:tap="goRead"
      wx:if="{{!bookBuy}}"
      wx:if="{{ applicationState == 'overdue' ? true :!bookBuy}}"
    >
      <view>
        <t-image src="/static/images/bookService/detail/shidu.png"></t-image>
@@ -406,7 +407,7 @@
      wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}"
      >免费领取</view
    >
    <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">立即查看</view>
    <view class="buy read" bind:tap="goRead" wx:if="{{ applicationState == 'Normal' ? true : bookBuy}}">立即查看</view>
  </view>
</view>
packageDomain/pages/resourceDetails/document/index.js
@@ -24,7 +24,9 @@
    titleName: '',
    pdfDatA: [],
    startTime: "", //进入页面当前时间
    pauseTime: 0 //暂停时间
    pauseTime: 0, //暂停时间
    applyState: '',
    deadline: '',
  },
  /**
   * 生命周期函数--监听页面加载
@@ -56,7 +58,9 @@
      cmsId: options.cmsId,
      parentName: options.parentName,
      parentProductLinkPath: options.parentProductLinkPath,
      productLinkPath: options.productLinkPath
      productLinkPath: options.productLinkPath,
      applyState: options.applyState,
      deadline: options.deadline
    })
    this.resourceDetailsData()
  },
@@ -194,6 +198,18 @@
  //zpi文件下载
  onDownloadButton() {
    const item = this.data.zipData;
    if (this.data.applyState !== 'Normal') {
      return wx.showToast({
        icon: 'none',
        title: '请先申请下载',
      })
    } else {
      const flag = new Date(this.data.deadline) > new Date()
      if (!flag) return wx.showToast({
        icon: 'none',
        title: '请先申请下载',
      })
    }
    if (!item || !item.file) {
      wx.showToast({
        title: '文件信息缺失',
@@ -201,7 +217,6 @@
      });
      return;
    }
    const downloadUrl = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file;
    wx.showLoading({
      title: '正在下载...',
packageDomain/pages/resourceDetails/myAudio/index.js
@@ -85,7 +85,7 @@
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(options);
    wx.setNavigationBarTitle({
      title: '资源详情-音频'
packagePersonal/pages/myCollection/index.js
@@ -90,6 +90,7 @@
          })
        } else {
          this.setData({
            list: [],
            skeletonLoding: false,
            loading: false
          })
packagePersonal/pages/sampleBooks/index.js
@@ -117,6 +117,7 @@
        field: 'CreateDate'
      }
    }).then((res) => {
      console.log(res.datas);
      try {
        if (res.datas.length > 0) {
          res.datas.forEach((item) => {
pages/bookExhibitionList/select/select.json
New file
@@ -0,0 +1,3 @@
{
  "usingComponents": {}
}
pages/bookExhibitionList/select/select.wxss
New file
@@ -0,0 +1 @@
/* pages/bookExhibitionList/select/select.wxss */
pages/home/home.js
@@ -606,7 +606,6 @@
      }
    }
  },
  isChange(data) {
    this.setData({
      isWhite: data
pages/home/home.wxml
@@ -1,21 +1,60 @@
<view class="container">
  <t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll" wx:if="{{!loading}}">
    <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px">
  <t-pull-down-refresh
    value="{{baseRefresh.value}}"
    loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}"
    bind:refresh="onPullDownRefresh"
    wx:if="{{!loading}}"
    bind:scroll="onScroll"
  >
    <view
      class="background {{ isWhite ? 'white':''}}"
      style="padding-top: {{barHeight}}px"
    >
      <text class="text">京师E课</text>
    </view>
    <view class="home-page-header">
      <view class="bg">
        <image src="/static/images/home/home-bg.png" mode="heightFix" class="image" />
        <image
          src="/static/images/home/home-bg.png"
          mode="heightFix"
          class="image"
        />
      </view>
      <view class="search">
        <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请输入关键词/书名/ISBN/作者" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}">
          <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" />
        <t-search
          t-class-input="t-search__input"
          t-class-input-container="t-search__input-container"
          placeholder="请输入关键词/书名/ISBN/作者"
          leftIcon=""
          bind:submit="onRetrievalPage"
          model:value="{{searchVal}}"
        >
          <t-icon
            slot="left-icon"
            prefix="wr"
            name="search"
            size="40rpx"
            color="#bbb"
            bind:tap="navToSearchPage"
          />
        </t-search>
      </view>
      <view class="swiper-wrap">
        <!-- <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{ { type: 'dots' } }}" height="380rpx" bind:click="navToActivityDetail" /> -->
        <swiper interval="5000" indicator-dots="true" autoplay="true" circular="true" class="swiper">
          <swiper-item wx:for="{{bannerList}}" wx:for-index="index" wx:key="index" data-info="{{item}}" bindtap="navToActivityDetail">
        <swiper
          interval="5000"
          indicator-dots="true"
          autoplay="true"
          circular="true"
          class="swiper"
        >
          <swiper-item
            wx:for="{{bannerList}}"
            wx:for-index="index"
            wx:key="index"
            data-info="{{item}}"
            bindtap="navToActivityDetail"
          >
            <view class="swiperItem">
              <image src="{{item.value}}" mode="widthFix" class="img" />
            </view>
@@ -24,36 +63,78 @@
      </view>
    </view>
    <view class="home-page-menu">
      <t-grid class="t-grid-block" theme="card" border="{{border}}" column="{{5}}">
        <t-grid-item wx:for="{{tabList}}" wx:for-index="index" wx:key="index" text="{{item.text}}" image="{{item.icon}}" data-info="{{item}}" bindtap="toPages" />
      <t-grid
        class="t-grid-block"
        theme="card"
        border="{{border}}"
        column="{{5}}"
      >
        <t-grid-item
          wx:for="{{tabList}}"
          wx:for-index="index"
          wx:key="index"
          text="{{item.text}}"
          image="{{item.icon}}"
          data-info="{{item}}"
          bindtap="toPages"
        />
      </t-grid>
    </view>
    <view class="home-page-container">
      <view class="home-page-list">
        <view class="tabCardPublic iconOne">
          <view class="icon">
            <image src="/static/images/home/zhuantitaolun2.png" mode="aspectFit" class="iconImage" />
            <image
              src="/static/images/home/zhuantitaolun2.png"
              mode="aspectFit"
              class="iconImage"
            />
          </view>
          <view data-info="{{'zhuantitaolun'}}" bindtap="onMoreGuide" class="flex" style="align-items: center;">
          <view
            data-info="{{'zhuantitaolun'}}"
            bindtap="onMoreGuide"
            class="flex"
            style="align-items: center"
          >
            <text class="more">更多</text>
            <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
          </view>
        </view>
        <view class="listBox">
          <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox">
            <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}">
          <view
            wx:for="{{specialSubjectList}}"
            wx:for-item="item"
            wx:for-index="index"
            wx:key="index"
            class="listItemBox"
          >
            <view
              class="listItem"
              bindtap="goSubjectDetail"
              data-book="{{item}}"
            >
              <view class="specialSubject-img">
                <image src="{{item.icon}}" mode="aspectFill" class="img" />
              </view>
              <view class="body-info">
                <view class="name">{{item.name}}</view>
                <view class="time" wx:if="{{item.liveTime}}">直播时间:{{item.liveTime}}</view>
                <view class="time" wx:if="{{item.startTime}}">开播时间:{{ item.startTime }}</view>
                <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">开播时间:<text class="grey">待定</text></view>
                <view class="time" wx:if="{{item.liveTime}}"
                  >直播时间:{{item.liveTime}}</view
                >
                <view class="time" wx:if="{{item.startTime}}"
                  >开播时间:{{ item.startTime }}</view
                >
                <view class="time" wx:if="{{!item.liveTime && !item.startTime}}"
                  >开播时间:<text class="grey">待定</text></view
                >
                <view class="flex jc-sb">
                  <text class="author">{{item.lecturer}} {{item.position}}</text>
                  <text class="author"
                    >{{item.lecturer}} {{item.position}}</text
                  >
                  <text class="price" wx:if="{{item.price == 0}}">免费</text>
                  <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text>
                  <text class="price" wx:if="{{item.price !== 0}}"
                    >¥{{item.price}}</text
                  >
                </view>
              </view>
            </view>
@@ -61,35 +142,77 @@
        </view>
        <view class="tabCardPublic iconTwo">
          <view class="icon">
            <image src="/static/images/home/jingxuankecheng2.png" mode="aspectFit" class="iconImage" />
            <image
              src="/static/images/home/jingxuankecheng2.png"
              mode="aspectFit"
              class="iconImage"
            />
          </view>
          <view data-info="{{'jingxuankecheng'}}" bindtap="onMoreGuide" class="flex">
          <view
            data-info="{{'jingxuankecheng'}}"
            bindtap="onMoreGuide"
            class="flex"
          >
            <text class="more">更多</text>
            <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
          </view>
        </view>
        <view class="home-page-tabs">
          <t-tabs t-class="t-tabs" split="{{false}}" defaultValue="{{activeItem}}" bind:change="tabChangeHandle">
            <t-tab-panel wx:for="{{courseTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" />
          <t-tabs
            t-class="t-tabs"
            split="{{false}}"
            defaultValue="{{activeItem}}"
            bind:change="tabChangeHandle"
          >
            <t-tab-panel
              wx:for="{{courseTypeList}}"
              wx:for-index="index"
              wx:key="index"
              label="{{item.name}}"
              value="{{index}}"
            />
          </t-tabs>
        </view>
        <view class="listBox1">
          <view wx:if="{{courseList.length>0}}">
            <view wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox">
            <view
              wx:for="{{courseList}}"
              wx:for-item="item"
              wx:for-index="index"
              wx:key="index"
              class="listItemBox"
            >
              <view class="listItem flex">
                <view class="specialSubject-img" data-book="{{item}}" bindtap="goCourseDetail">
                <view
                  class="specialSubject-img"
                  data-book="{{item}}"
                  bindtap="goCourseDetail"
                >
                  <image src="{{item.icon}}" mode="aspectFill" class="img" />
                </view>
                <view class="body-info">
                  <view class="name" data-book="{{item}}" bindtap="goCourseDetail">{{item.name}}</view>
                  <view
                    class="name"
                    data-book="{{item}}"
                    bindtap="goCourseDetail"
                    >{{item.name}}</view
                  >
                  <view class="flex jc-sb">
                    <text class="author">{{item.courseLeader}}</text>
                    <text class="classHours">{{item.classHours}}课时</text>
                  </view>
                  <view class="priceBox flex jc-sb">
                    <text class="price" wx:if="{{item.price == 0}}">免费</text>
                    <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text>
                    <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" />
                    <text class="price" wx:if="{{item.price !== 0}}"
                      >¥{{item.price}}</text
                    >
                    <image
                      src="/static/images/home/home-cart.png"
                      mode="aspectFit"
                      class="addCartImg"
                      bind:tap="addCart"
                      data-info="{{item}}"
                    />
                  </view>
                </view>
              </view>
@@ -101,7 +224,11 @@
        </view>
        <view class="tabCardPublic iconTwo">
          <view class="icon">
            <image src="/static/images/home/tushufuwu2.png" mode="aspectFit" class="iconImage" />
            <image
              src="/static/images/home/tushufuwu2.png"
              mode="aspectFit"
              class="iconImage"
            />
          </view>
          <view data-info="{{'tushufuwu'}}" bindtap="onMoreGuide" class="flex">
            <text class="more">更多</text>
@@ -109,16 +236,39 @@
          </view>
        </view>
        <view class="home-page-tabs">
          <t-tabs t-class="t-tabs" split="{{false}}" position="{{'home'}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick">
            <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" />
          <t-tabs
            t-class="t-tabs"
            split="{{false}}"
            position="{{'home'}}"
            defaultValue="{{activeItem1}}"
            bind:change="tabBookClick"
          >
            <t-tab-panel
              wx:for="{{bookTypeList}}"
              wx:for-index="index"
              wx:key="index"
              label="{{item.name}}"
              value="{{index}}"
            />
          </t-tabs>
        </view>
        <view class="listBox2">
          <view wx:if="{{booksList.length > 0}}" class="flex">
            <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox">
            <view
              wx:for="{{booksList}}"
              wx:for-item="item"
              wx:for-index="index"
              wx:key="index"
              class="booksListItemBox"
            >
              <view class="listItem" bind:tap="goDetail" data-book="{{item}}">
                <view class="specialSubject-img">
                  <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" class="img" aria-label="{{item.name}}" />
                  <image
                    src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}"
                    mode="aspectFit"
                    class="img"
                    aria-label="{{item.name}}"
                  />
                </view>
                <view class="body-info">
                  <view class="name">{{item.name}}</view>
@@ -133,7 +283,11 @@
        </view>
        <view class="tabCardPublic iconTwo">
          <view class="icon">
            <image src="/static/images/home/shuziyuedu2.png" mode="aspectFit" class="iconImage" />
            <image
              src="/static/images/home/shuziyuedu2.png"
              mode="aspectFit"
              class="iconImage"
            />
          </view>
          <view data-info="{{'shuziyuedu'}}" bindtap="onMoreGuide" class="flex">
            <text class="more">更多</text>
@@ -141,8 +295,18 @@
          </view>
        </view>
        <view class="listBox2 flex">
          <view wx:for="{{readBookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox">
            <view class="listItem" bind:tap="goReadBookDetail" data-book="{{item}}">
          <view
            wx:for="{{readBookList}}"
            wx:for-item="item"
            wx:for-index="index"
            wx:key="index"
            class="booksListItemBox"
          >
            <view
              class="listItem"
              bind:tap="goReadBookDetail"
              data-book="{{item}}"
            >
              <view class="specialSubject-img">
                <image src="{{item.icon}}" mode="aspectFit" class="img" />
              </view>
@@ -155,28 +319,64 @@
        </view>
        <view class="tabCardPublic iconTwo">
          <view class="icon">
            <image src="/static/images/home/shuzijiaocai2.png" mode="aspectFit" class="iconImage" />
            <image
              src="/static/images/home/shuzijiaocai2.png"
              mode="aspectFit"
              class="iconImage"
            />
          </view>
          <view data-info="{{'shuzijiaocai'}}" bindtap="onMoreGuide" class="flex">
          <view
            data-info="{{'shuzijiaocai'}}"
            bindtap="onMoreGuide"
            class="flex"
          >
            <text class="more">更多</text>
            <t-icon name="chevron-right" size="32rpx" color="#ff6d00" />
          </view>
        </view>
        <view class="listBox3">
          <view wx:if="{{textbookList.length > 0}}">
            <view wx:for="{{textbookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="textbooksItemBox">
            <view
              wx:for="{{textbookList}}"
              wx:for-item="item"
              wx:for-index="index"
              wx:key="index"
              class="textbooksItemBox"
            >
              <view class="listItem flex">
                <view class="specialSubject-img" bind:tap="goTextBookDetail" data-book="{{item}}">
                <view
                  class="specialSubject-img"
                  bind:tap="goTextBookDetail"
                  data-book="{{item}}"
                >
                  <image src="{{item.icon}}" mode="aspectFit" class="img" />
                </view>
                <view class="body-info">
                  <view class="name" bind:tap="goTextBookDetail" data-book="{{item}}">{{item.name}}</view>
                  <view class="introduction" bind:tap="goTextBookDetail" data-book="{{item}}">{{item.description}}</view>
                  <view
                    class="name"
                    bind:tap="goTextBookDetail"
                    data-book="{{item}}"
                    >{{item.name}}</view
                  >
                  <view
                    class="introduction"
                    bind:tap="goTextBookDetail"
                    data-book="{{item}}"
                    >{{item.description}}</view
                  >
                  <view class="author">{{item.author}}</view>
                  <view class="priceBox flex jc-sb">
                    <text class="price" wx:if="{{item.price == 0}}">免费</text>
                    <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text>
                    <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" />
                    <text class="price" wx:if="{{item.price !== 0}}"
                      >¥{{item.price}}</text
                    >
                    <image
                      src="/static/images/home/home-cart.png"
                      mode="aspectFit"
                      class="addCartImg"
                      bind:tap="addCart"
                      data-info="{{item}}"
                    />
                  </view>
                </view>
              </view>
@@ -188,17 +388,37 @@
        </view>
        <view class="tabCardPublic">
          <view class="icon">
            <image src="/static/images/home/paihangbang2.png" mode="" class="iconImage" />
            <image
              src="/static/images/home/paihangbang2.png"
              mode=""
              class="iconImage"
            />
          </view>
        </view>
        <view class="rankingList">
          <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'>
          <scroll-view class="srcolbox" scroll-x scroll-with-animation="true">
            <view class="booksListBox">
              <view wx:for="{{rankingList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox">
              <view
                wx:for="{{rankingList}}"
                wx:for-item="item"
                wx:for-index="index"
                wx:key="index"
                class="booksListItemBox"
              >
                <view class="listItem" bind:tap="goDetail" data-book="{{item}}">
                  <view class="specialSubject-img">
                    <image src="{{item.icon}}" mode="aspectFit" class="img" wx:if="{{item.icon}}" />
                    <image src="/static/images/default-book-img.png" mode="aspectFit" class="img" wx:else />
                    <image
                      src="{{item.icon}}"
                      mode="aspectFit"
                      class="img"
                      wx:if="{{item.icon}}"
                    />
                    <image
                      src="/static/images/default-book-img.png"
                      mode="aspectFit"
                      class="img"
                      wx:else
                    />
                  </view>
                  <view class="body-info">
                    <view class="name">{{item.name}}</view>
@@ -214,4 +434,4 @@
  </t-pull-down-refresh>
</view>
<import src="home.skeleton.wxml" />
<template is="skeleton" wx:if="{{loading}}" />
<template is="skeleton" wx:if="{{loading}}" />
project.config.json
@@ -1,9 +1,5 @@
{
  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
  "packOptions": {
    "ignore": [],
    "include": []
  },
  "setting": {
    "urlCheck": true,
    "es6": true,
@@ -24,8 +20,6 @@
    "compileHotReLoad": false,
    "lazyloadPlaceholderEnable": false,
    "useMultiFrameRuntime": true,
    "useApiHook": true,
    "useApiHostProcess": true,
    "ignoreDevUnusedFiles": false,
    "babelSetting": {
      "ignore": [],
@@ -47,9 +41,6 @@
    "condition": false
  },
  "compileType": "miniprogram",
  "libVersion": "2.23.1",
  "appid": "wx7f362fe7cb6e0d1f",
  "projectname": "tdesign-miniprogram-starter-retail",
  "simulatorType": "wechat",
  "simulatorPluginLibVersion": {},
  "condition": {
@@ -139,5 +130,10 @@
  "editorSetting": {
    "tabIndent": "insertSpaces",
    "tabSize": 2
  }
  },
  "packOptions": {
    "ignore": [],
    "include": []
  },
  "appid": "wx7f362fe7cb6e0d1f"
}