闫增涛
2024-09-18 c96612e8a63ecef9590be0f8b5199277ec94e5b9
云学习购买目录,修改bug
32个文件已修改
2739 ■■■■■ 已修改文件
assets/js/middleGround/api/store.js 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/buyResource/index.js 366 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/buyResource/index.wxml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/teachResource/index.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/teachResource/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/teachResource/index.wxml 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/teachResource/index.wxss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js 231 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxml 302 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxss 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 360 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 421 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/publickBookForm/index.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/publickBookForm/index.wxml 165 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/publickBookForm/index.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.js 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.wxml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.wxml 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/applicationForm/index.wxss 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.wxml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/sampleBookList/index.wxss 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/cart/index.wxml 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/digitalCourses/digitalCoursesDetails/index.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/digitalCourses/digitalCoursesDetails/index.wxss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/digitalCourses/index.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/digitalCourses/index.wxml 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/retrievalPage/index.wxml 271 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/middleGround/api/store.js
@@ -480,7 +480,6 @@
        }]
      })
    }
    let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : '';
    let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct'
    return request({
@@ -488,12 +487,10 @@
        method: 'post',
        data: body,
        cancelToken: source?.token
      })
      .then((resp) => {
    }).then((resp) => {
        if (resp.length > 0) {
          const data = resp[0]
          if (data.datas.length) {
            data.datas[0].subDatas = data.datas[0].cmsDatas
            const datas = handleDetailQueryRequestData({
              item: data.datas[0],
packageBookService/pages/bookServices/detail/buyResource/index.js
@@ -39,7 +39,6 @@
      productLinkPath: options.productLinkPath,
      refCode: options.refCode
    });
    this.getResourceClass();
    this.getShoppingCartProductGet();
  },
@@ -141,12 +140,10 @@
            if (item.fileMap[item.file].protectType == 'Private') item.disabled = true
          }
        }
        // 在插入过程中对数据进行排序  并且去除已经领取和购买的
        if (item.sysType == 'CmsFolder') {
        // 在插入过程中对数据进行排序
          newArr = this.insertAndSortObjectsByProductLinkPath(newArr, item)
        } else if (item.sysType == 'CmsItem' && this.resourceIsBuy(item)) {
          newArr = this.insertAndSortObjectsByProductLinkPath(newArr, item)
        }
        // 插进数组后 从原数据中删除
        rootList = rootList.filter(nitem => nitem.id != item.id)
      }
    }
    //给数组里面再添加一个children的空数组
@@ -209,10 +206,44 @@
        flattenedArray.push(...childrenArray);
      }
    });
    return flattenedArray.filter((item) => item.sysType == "CmsItem");
    return flattenedArray;
  },
  // 教学资源 云学习 获取
  // 递归树结构,如果父级有销售方式(有效期),去掉所有子集的销售方式
  clearTreeSealmethod(clearSaleMethod, tree) {
    for (let item of tree) {
      const saleData = item.saleMethod &&
        item.saleMethod.length ?
        item.saleMethod.find((citem) => citem.SaleType == 'Normal') : null
      if (
        ((saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime()) ||
          clearSaleMethod) && item.children && item.children.length
      ) {
        item.children.forEach((ditem) => (ditem.saleMethod = []))
      }
      if (item.children && item.children.length)
        this.clearTreeSealmethod(
          saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime(),
          item.children
        )
    }
    return tree
  },
  // 勾选禁用
  handleTreeCheck(tree) {
    for (const item of tree) {
      const saleData = item.saleMethod &&
        item.saleMethod.length ?
        item.saleMethod.find((citem) => citem.SaleType == 'Normal') : undefined
      if (saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime()) {
        item.disabled = false
      } else {
        item.disabled = true
      }
      if (item.children && item.children.length) this.handleTreeCheck(item.children)
    }
    return tree
  },
  //  获取云学习
  getResourceDataList(type) {
    this.setData({
      loading: true,
@@ -251,39 +282,26 @@
        });
      }
      let list = []
      // 测试 6位// 正式 5位//  测试调用传20,内部7  正式调用传17 内部传6
      //教学资源 云学习
      if (
        type.refCode == "jsek_teachingResources" ||
        type.refCode == "jsek_cloudLearning"
      ) {
        res.datas.cmsDatas[0].datas.forEach((item) => {
          item.checked = false;
          if (item.sysType == 'CmsItem') {
            // 教学资源 类型名称赋值
            this.data.resourceClassList.forEach((type) => {
              if (type.value == item.resourcesClassification)
                item.resourceClass = type.name;
            });
            item.isbuy = this.isShowNeedBuy(item);
            item.isShopCar = this.isShoppingCart(item);
          }
        // if (item.sysType == 'CmsItem') {
        //   item.isbuy = this.resourceIsBuy(item);
        //   item.isShopCar = this.isShoppingCart(item);
        // }
        });
        // 显示 需要购买的和需要免费领取的
        this.getTreeList(res.datas.cmsDatas[0].datas, list, query.cmsPath)
        list = this.ensureTreeConsistency(list)
        list = this.changeResourceChildren(list)
      list = this.clearTreeSealmethod(false, list)
      list = this.handleTreeCheck(list)
      this.handleTreeData(list).forEach(item => {
        item.isbuy = this.resourceIsBuy(item);
        item.isShopCar = this.isShoppingCart(item);
      })
        console.log('修改后云', list);
        let result = [];
        if (type.refCode == "jsek_teachingResources") {
          this.findChildIds(list, result);
          this.setData({
            teach: list,
            loading: false,
            openTeachids: result,
          });
        } else if (type.refCode == "jsek_cloudLearning") {
          let arr = this.handleTreeData(list).filter(
      let arr = res.datas.cmsDatas[0].datas.filter(
            (item) => item.saleMethod[0]
          );
          let freeIds = arr.filter((item) => {
@@ -299,17 +317,10 @@
            loading: false,
            openLearnids: result,
          });
        }
      }
    })
  },
  async getBookInfo(id) {
    this.setData({
      "mockData'.id": 0,
      "mockData.price": 0,
      "mockData.count": 0,
    });
    const query = {
      path: "*",
      queryType: "*",
@@ -376,48 +387,73 @@
  // 判断资源是否购买
  resourceIsBuy(data) {
    if (data.saleMethod && data.saleMethod.length) {
      const isSHow = this.data.buyIdList.some(
        (item) => item == data.saleMethod[0].Id
      const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal')
      if (saleData.State == 'Disable') return false
      const isShow = this.data.buyIdList.some(
        (item) => item == saleData.Id
      );
      return !isSHow;
      // 已经购买
      if (isShow) return false
      // 未购买,查看销售方式是否过期
      if (!isShow) {
        const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() &&
          new Date(saleData.BeginDate).getTime() <= new Date().getTime()
        if (flag) {
          // 为过期 ,需要购买
          return true
        } else {
          // 已过期 无需购买
          return false
        }
      }
    } else {
      return false;
    }
  },
  isShowNeedBuy(data) {
    if (data.saleMethod && data.saleMethod.length) {
      const isSHow = this.data.buyIdList.some(
        (item) => item == data.saleMethod[0].Id
      );
      if (isSHow) {
        return false;
      } else {
        return data.saleMethod[0].Price > 0 ? true : false;
      }
      return !isSHow;
    } else {
      return false;
    }
  },
  // 判断资源加入购物车按钮是否显示
  isShoppingCart(data) {
    if (data.saleMethod && data.saleMethod.length) {
      if (data.saleMethod[0].Price <= 0) return false;
      const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal')
      // 先判断是否免费
      if (saleData.Price <= 0) return false
      // 再判断是否购买
      const isBuy = this.data.buyIdList.some(
        (item) => item == data.saleMethod[0].Id
      );
      const isBuy = this.data.buyIdList.some((item) => item == saleData.Id)
      if (isBuy) {
        // 购买了
        return false;
        return false
      } else {
        // 判断是否加入购物车
        const isSHow = this.data.shoppingCartGetId.some(
          (item) => item == data.saleMethod[0].Id
        );
        return !isSHow;
        const isShow = this.data.shoppingCartGetId.some((item) => item == saleData.Id)
        if (isShow) return false
        // 未购买,查看销售方式是否过期
        if (!isShow) {
          const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() &&
            new Date(saleData.BeginDate).getTime() <= new Date().getTime()
          if (flag) {
            // 为过期 ,需要购买
            return true
          } else {
            // 已过期 无需购买
            return false
      }
        }
      }
      // if (data.saleMethod[0].Price <= 0) return false;
      // // 再判断是否购买
      // const isBuy = this.data.buyIdList.some(
      //   (item) => item == data.saleMethod[0].Id
      // );
      // if (isBuy) {
      //   // 购买了
      //   return false;
      // } else {
      //   // 判断是否加入购物车
      //   const isSHow = this.data.shoppingCartGetId.some(
      //     (item) => item == data.saleMethod[0].Id
      //   );
      //   return !isSHow;
      // }
    } else {
      return false;
    }
@@ -450,18 +486,6 @@
      }
    }
  },
  // 获取资源所属分类
  getResourceClass() {
    let query = {
      refCodes: ["resourcesClassification"],
    };
    app.MG.store.getProductTypeField(query).then((res) => {
      this.setData({
        resourceClassList: JSON.parse(res[0].config).option,
      });
    });
  },
  checkAll() {
    const child = this.selectComponent("#tree");
    child.checkAll();
@@ -474,87 +498,90 @@
        title: '暂无数据',
      })
    }
    let saleMethodIds = [];
    let requests = [];
    let item = [];
    let selectAllId = [];
    const child = this.selectComponent("#tree");
    item = child.data.superiorPurchaseSaleMethodId;
    const sonItem = child.data.sonPurchaseSaleMethodId;
    let selectAll = child.data.selectAll;
    if (selectAll) {
      selectAll.forEach((item) => {
        if (item.saleMethod != 0) {
          selectAllId.push(item.saleMethod[0].Id);
        }
      });
      app.MG.store
        .initOrder({
          requests: selectAllId.map((id) => ({
            saleMethodId: id,
            count: 1,
          })),
        })
        .then((res) => {
          if (res) {
            wx.navigateTo({
              url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber,
            });
            selectAllId = [];
            child.setData({
              selectAll: [],
            });
          }
        });
    }
    if (item) {
      // 拿到id
      item.forEach((items) => {
        if (items.saleMethod != 0) {
          saleMethodIds.push(items.saleMethod[0].Id);
        }
      });
      app.MG.store
        .initOrder({
          requests: saleMethodIds.map((id) => ({
            saleMethodId: id,
            count: 1,
          })),
        })
        .then((res) => {
          if (res) {
            wx.navigateTo({
              url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber,
            });
    // 修改后方法
    const checkData = this.handleTreeData(this.data.learn).filter(item => item.checked == true)
    console.log('选中', checkData);
    // let saleMethodIds = [];
    // let requests = [];
    // let item = [];
    // let selectAllId = [];
    // const child = this.selectComponent("#tree");
    // item = child.data.superiorPurchaseSaleMethodId;
    // const sonItem = child.data.sonPurchaseSaleMethodId;
    // let selectAll = child.data.selectAll;
    // if (selectAll.length) {
    //   selectAll.forEach((item) => {
    //     if (item.saleMethod != 0) {
    //       selectAllId.push(item.saleMethod[0].Id);
    //     }
    //   });
    //   app.MG.store
    //     .initOrder({
    //       requests: selectAllId.map((id) => ({
    //         saleMethodId: id,
    //         count: 1,
    //       })),
    //     })
    //     .then((res) => {
    //       if (res) {
    //         wx.navigateTo({
    //           url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber,
    //         });
    //         selectAllId = [];
    //         child.setData({
    //           selectAll: [],
    //         });
    //       }
    //     });
    // }
    // if (item) {
    //   // 拿到id
    //   item.forEach((items) => {
    //     if (items.saleMethod != 0) {
    //       saleMethodIds.push(items.saleMethod[0].Id);
    //     }
    //   });
    //   app.MG.store
    //     .initOrder({
    //       requests: saleMethodIds.map((id) => ({
    //         saleMethodId: id,
    //         count: 1,
    //       })),
    //     })
    //     .then((res) => {
    //       if (res) {
    //         wx.navigateTo({
    //           url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber,
    //         });
            child.setData({
              superiorPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据
            });
          }
        });
    }
    if (item.length == 0 && sonItem) {
      app.MG.store
        .initOrder({
          requests: sonItem.map((id) => ({
            saleMethodId: id,
            count: 1,
          })),
        })
        .then((res) => {
          if (res) {
            wx.navigateTo({
              url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber,
            });
            this.setData({
              paymentPage: true,
            });
            child.setData({
              sonPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据
            });
          }
        });
    }
    //         child.setData({
    //           superiorPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据
    //         });
    //       }
    //     });
    // }
    // if (item.length == 0 && sonItem) {
    //   app.MG.store
    //     .initOrder({
    //       requests: sonItem.map((id) => ({
    //         saleMethodId: id,
    //         count: 1,
    //       })),
    //     })
    //     .then((res) => {
    //       if (res) {
    //         wx.navigateTo({
    //           url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber,
    //         });
    //         this.setData({
    //           paymentPage: true,
    //         });
    //         child.setData({
    //           sonPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据
    //         });
    //       }
    //     });
    // }
  },
  // 章节勾选方法
@@ -609,5 +636,26 @@
    this.setData({
      learn: updated
    })
  },
  upDateShopCar(id, tree) {
    for (let item of tree) {
      if (item.id == id) {
        item.isShopCar = false
      } else {
        if (item.children && item.children.length) this.upDateShopCar(id, item.children)
      }
    }
    return tree
  },
  // 更新购物车图标
  updateCloudLearning(e) {
    const {
      id
    } = e.detail
    console.log(id);
    const list = this.upDateShopCar(id, this.data.learn)
    this.setData({
      learn: list
    })
  }
});
packageBookService/pages/bookServices/detail/buyResource/index.wxml
@@ -1,7 +1,5 @@
<!-- 资源购买页面 -->
<view>
  <!--导航区域 -->
  <view style="width: 100%; height: {{barHeight}}px; "></view>
@@ -9,7 +7,11 @@
    <view class="flex">
      <view class="back-icon">
        <!-- <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> -->
        <image src="/static/images/digitalTextbooks/chevron-left.png" bind:tap="goBack" mode="aspectFit" />
        <image
          src="/static/images/digitalTextbooks/chevron-left.png"
          bind:tap="goBack"
          mode="aspectFit"
        />
      </view>
      <view class="navbar-title">资源购买</view>
    </view>
@@ -19,14 +21,34 @@
  <!-- 内容 -->
  <view class="buy-resource" wx:if="{{!loading}}">
    <tree id="tree" paymentPage="{{paymentPage}}" superior="{{superior}}" treeList="{{learn}}" learnList="{{learn}}" tab="{{'jsek_cloudLearning'}}" isShowCheck="{{true}}" openIds="{{openLearnids}}" checkAllState="{{checkAllState}}" bind:changeCheckAll="changeCheckAll" bind:changeListChecked="changeListChecked" bind:changeResourceChecked="changeResourceChecked" />
    <tree
      id="tree"
      paymentPage="{{paymentPage}}"
      superior="{{superior}}"
      treeList="{{learn}}"
      learnList="{{learn}}"
      tab="{{'jsek_cloudLearning'}}"
      isShowCheck="{{true}}"
      openIds="{{openLearnids}}"
      checkAllState="{{checkAllState}}"
      bind:changeCheckAll="changeCheckAll"
      bind:changeListChecked="changeListChecked"
      bind:changeResourceChecked="changeResourceChecked"
      bind:updateCloudLearning="updateCloudLearning"
    />
    <view class="noData" wx:if="{{noData}}">
      <!-- <t-empty icon="folder-open" description="暂无数据" /> -->
      <empty />
    </view>
  </view>
  <view class="page-bottom">
    <t-button theme="primary" size="large" class="btn-buy" bindtap="batchPurchase">批量购买</t-button>
    <t-button
      theme="primary"
      size="large"
      class="btn-buy"
      bindtap="batchPurchase"
      >批量购买</t-button
    >
  </view>
</view>
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.js
@@ -18,7 +18,11 @@
    },
    isGoBuyResource: {
      type: Boolean
    }
    },
    isShowBuyCloundMenu: {
      type: Boolean,
      default: false
    },
  },
  /**
packageBookService/pages/bookServices/detail/components/learnResource/learnResource.wxml
@@ -1,18 +1,53 @@
<!--pages/bookServices/detail/components/learnResource/learnResource.wxml-->
<view class="learnResource" theme="primary" style="justify-content: {{!isshowDrawBtn ? 'flex-end' : ''}};">
  <t-button wx:if="{{isshowDrawBtn}}" loading="{{receive}}" class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx" t-class="external-class" bind:tap="getFreeResource">
<view
  class="learnResource"
  theme="primary"
  style="justify-content: {{!isshowDrawBtn ? 'flex-end' : ''}};"
>
  <t-button
    wx:if="{{isshowDrawBtn}}"
    loading="{{receive}}"
    class="btn"
    theme="primary"
    style="height: 72rpx; font-size: 28rpx"
    t-class="external-class"
    bind:tap="getFreeResource"
  >
    <view slot="content" class="btn-content">
      <image src=" /static/images/bookService/detail/yijianlingqu.png" />
      <text>领取查看</text>
    </view>
  </t-button>
  <t-button loading="{{buy}}" class="btn" theme="primary" bind:tap="goBuyResource" style="height: 72rpx; font-size: 28rpx;margin: {{!isshowDrawBtn ? '0 20rpx' : ''}}">
  <t-button
    wx:if="{{!isShowBuyCloundMenu}}"
    loading="{{buy}}"
    class="btn"
    theme="primary"
    bind:tap="goBuyResource"
    style="height: 72rpx; font-size: 28rpx;margin: {{!isshowDrawBtn ? '0 20rpx' : ''}}"
  >
    <view slot="content" class="btn-content">
      <image src="/static/images/bookService/detail/yijiangoumai.png" />
      <text>资源购买</text>
    </view>
  </t-button>
  <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx; margin: 0 20rpx" bind:tap="goLearnTask">
  <t-button
    theme="primary"
    class="btn"
    style="height: 72rpx; font-size: 28rpx"
    wx:if="{{isShowBuyCloundMenu}}"
  >
    <view slot="content" class="btn-content">
      <image src="/static/images/bookService/detail/yijiangoumai.png" />
      <text>全部购买</text>
    </view>
  </t-button>
  <t-button
    class="btn"
    theme="primary"
    style="height: 72rpx; font-size: 28rpx; margin: 0 20rpx"
    bind:tap="goLearnTask"
  >
    <view slot="content" class="btn-content">
      <image src="/static/images/bookService/detail/renwudan/icon.png" />
      <text>学习任务单</text>
packageBookService/pages/bookServices/detail/components/teachResource/index.js
@@ -16,6 +16,9 @@
      type: String,
      value: "",
    },
    treeList: {
      type: Array,
    }
  },
  data: {
    showRejectDialog: false,
packageBookService/pages/bookServices/detail/components/teachResource/index.json
@@ -3,6 +3,7 @@
  "usingComponents": {
    "t-image": "tdesign-miniprogram/image/image",
    "t-button": "tdesign-miniprogram/button/button",
    "t-dialog": "tdesign-miniprogram/dialog/dialog"
    "t-dialog": "tdesign-miniprogram/dialog/dialog",
    "empty": "/components/empty/index"
  }
}
packageBookService/pages/bookServices/detail/components/teachResource/index.wxml
@@ -1,38 +1,81 @@
<!-- <view class="teach-btn"> -->
  <!-- <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadBtn">
<view class="teach-btn">
  <t-button
    theme="primary"
    style="width: 120px; height: 36px"
    class="btn"
    bind:tap="uploadBtn"
  >
    <view slot="content" class="btn-content">
      <image src="/static/images/bookService/detail/upload.png" mode="aspectFit" ></image>
      <image
        src="/static/images/bookService/detail/upload.png"
        mode="aspectFit"
      ></image>
      <text>上传资源</text>
    </view>
  </t-button> -->
  </t-button>
  <!-- <t-button theme="primary" style="width: 120px; height: 36px">
    <t-image src="/static/images/bookService/detail/download.png"></t-image>
    批量下载
  </t-button> -->
<!-- </view> -->
<view class="applyResult  {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}">
  <view wx:if="{{applyState == 'WaitAudit'}}">资源下载申请正在审核中,请耐心等待!</view>
</view>
<view
  class="applyResult  {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}"
  wx:if="{{treeList.length}}"
>
  <view wx:if="{{applyState == 'WaitAudit'}}"
    >资源下载申请正在审核中,请耐心等待!</view
  >
  <view wx:if="{{applyState == 'Normal'}}">
    <view>
      资源下载申请已通过<text wx:if="{{deadline}}">,有效日期截至:{{ deadline }}</text></view>
      资源下载申请已通过<text wx:if="{{deadline}}"
        >,有效日期截至:{{ deadline }}</text
      ></view
    >
    <view style="display: flex; align-items: center; margin-top: 10rpx">
      <text>下载资源请到PC端京师智教</text>
      <text bind:tap="copy" class="copy-text">复制</text>
    </view>
  </view>
  <view wx:if="{{applyState == 'Reject'}}">资源下载需要申请,请先申请并等待审核通过后方可下载</view>
  <view wx:if="{{applyState == 'Reject'}}"
    >资源下载需要申请,请先申请并等待审核通过后方可下载</view
  >
  <view wx:if="{{applyState == 'none'}}">
    资源下载需要申请,请先申请并等待审核通过后方可下载
  </view>
  <view class="btn-box">
    <t-button wx:if="{{applyState == 'Reject'}}" bind:tap="checkCause" style="height: 50rpx" class="rejectBtn" bind:tap="showDialog">查看原因</t-button>
    <t-button wx:if="{{applyState == 'none' || applyState == 'Reject'}}" theme="primary" bind:tap="applyResource" class="applyBtn" style="height: 50rpx">申请</t-button>
    <t-button
      wx:if="{{applyState == 'Reject'}}"
      bind:tap="checkCause"
      style="height: 50rpx"
      class="rejectBtn"
      bind:tap="showDialog"
      >查看原因</t-button
    >
    <t-button
      wx:if="{{applyState == 'none' || applyState == 'Reject'}}"
      theme="primary"
      bind:tap="applyResource"
      class="applyBtn"
      style="height: 50rpx"
      >申请</t-button
    >
  </view>
</view>
<view class="noData" wx:else>
  <empty />
</view>
<!-- 未通过原因 -->
<t-dialog visible="{{showRejectDialog}}" title="提示" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog" class="notPassed">
<t-dialog
  visible="{{showRejectDialog}}"
  title="提示"
  confirm-btn="{{ confirmBtn }}"
  bind:confirm="closeDialog"
  class="notPassed"
>
  <view slot="content">
    <text class="cause-title">资源下载申请未通过,解决问题后可点击“申请”按钮重新提交申请</text>
    <text class="cause-title"
      >资源下载申请未通过,解决问题后可点击“申请”按钮重新提交申请</text
    >
    <view class="cause-content">原因:{{ rejectCause || '-'}}</view>
  </view>
</t-dialog>
packageBookService/pages/bookServices/detail/components/teachResource/index.wxss
@@ -113,3 +113,7 @@
.btn text {
  font-size: 28rpx;
}
.noData {
  height: 300rpx;
}
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -51,26 +51,23 @@
    deadline: {
      type: String,
    },
    cloundMenuIsBuy: {
      type: Boolean
    }
  },
  data: {
    sonPurchaseSaleMethodId: "",
    superiorPurchaseSaleMethodId: [],
    activeValues: [1, 2],
    webpageSrc: "",
    cloudShoppingCart: [],
    selectAll: [],
    shoppingCart: true,
    stop: false,
    cart: true,
    canExecute: true
    canExecute: true,
    purchaseList: []
  },
  ready() {},
  onLoad() {
    this.setData({
      sonPurchaseSaleMethodId: [],
    });
  },
  onLoad() {},
  observers: {
    treeList: function (newValue) {
      const list = [];
@@ -94,9 +91,22 @@
        }
      }
    },
    // 遍历树结构转换为数组方法
    handleTreeData(array) {
      const flattenedArray = [];
      array.forEach((node) => {
        // 将当前节点添加到展开的数组中
        flattenedArray.push(node);
        // 递归处理子节点
        if (node.children && node.children.length > 0) {
          const childrenArray = this.handleTreeData(node.children);
          flattenedArray.push(...childrenArray);
        }
      });
      return flattenedArray;
    },
    // 节点展开
    handleChange(e) {
      console.log(e.detail.value);
      this.setData({
        openIds: e.detail.value,
      });
@@ -124,11 +134,25 @@
    // 判断资源是否购买
    resourceIsBuy(data) {
      if (data.saleMethod && data.saleMethod.length) {
        if (data.saleMethod[0].State == "Disable") return false;
        const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal')
        if (saleData.State == 'Disable') return false
        const isSHow = this.properties.buyIds.some(
          (item) => item == data.saleMethod[0].Id
          (item) => item == saleData.Id
        );
        return !isSHow;
        // 已经购买
        if (isShow) return false
        // 未购买,查看销售方式是否过期
        if (!isShow) {
          const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() &&
            new Date(saleData.BeginDate).getTime() <= new Date().getTime()
          if (flag) {
            // 为过期 ,需要购买
            return true
          } else {
            // 已过期 无需购买
            return false
          }
        }
      } else {
        return false;
      }
@@ -146,24 +170,17 @@
      const parentName = parent ? parent.name : "教学资源";
      // 资源购买页面(只展示未购买资源) 点击不跳转
      if (this.properties.isShowCheck) return false;
      if (
        this.properties.tab == "jsek_cloudLearning" &&
        this.resourceIsBuy(item)
      ) {
        return wx.showToast({
          icon: "error",
          title: item.saleMethod[0].Price > 0 ?
            "请先购买该资源" : "请先点击领取查看按钮",
        });
      if (item.selectType == "webpage") {
        // 网页类型跳转到网址复制页,因为url传参不能传 带参数的网络地址,所以此处要把网络地址里的传参摘出来,放到url里
        let urlData = ''
        const flags = item.jsek_link.indexOf("?")
        if (flags > -1) {
          urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length)
      }
      if (this.properties.tab == "jsek_teachingResources" && (item.file || item.freeFile)) {
        let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile]
        if (file && file.protectType !== "Public") {
          return wx.showToast({
            icon: "error",
            title: "资源不可用,请联系管理员",
          });
        }
        url = '/packageBookService/pages/bookServices/linkPage/index'
        return wx.navigateTo({
          url: urlData ? url + `?path=${item.jsek_link.slice(0,flags)}` + '&' + urlData : url + `?path=${item.jsek_link}`
        })
      }
      if (!item.file && !item.freeFile && !item.protectedFile) {
        return wx.showToast({
@@ -184,20 +201,49 @@
          })
        }
      }
      let url;
      if (item.selectType == "webpage") {
        // 网页类型跳转到网址复制页,因为url传参不能传 带参数的网络地址,所以此处要把网络地址里的传参摘出来,放到url里
        let urlData = ''
        const flags = item.jsek_link.indexOf("?")
        if (flags > -1) {
          urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length)
      if (this.properties.tab == "jsek_teachingResources" && (item.file || item.freeFile)) {
        let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile]
        if (file && file.protectType !== "Public") {
          return wx.showToast({
            icon: "error",
            title: "资源不可用,请联系管理员",
          });
        }
        url = '/packageBookService/pages/bookServices/linkPage/index'
        return wx.navigateTo({
          url: urlData ? url + `?path=${item.jsek_link.slice(0,flags)}` + '&' + urlData : url + `?path=${item.jsek_link}`
      }
      if (this.properties.tab == "jsek_cloudLearning") {
        // 判断父级或自身是否购买
        var myEventOption = {
          bubbles: true,
          composed: true,
        };
        // 出发判断云学习是否购买判断
        this.triggerEvent("getCloundIsBuy", {}, myEventOption)
        if (!this.properties.cloundMenuIsBuy) {
          // 云学习未购买,查找以购买的目录和资源本身
          const learn = this.handleTreeData(this.properties.treeList).filter(
            (citem) => citem.saleMethod &&
            citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal') &&
            new Date(citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal').EndDate).getTime() >= new Date().getTime() &&
            new Date(citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal').BeginDate).getTime() <= new Date().getTime() &&
            item.productLinkPath.includes(citem.productLinkPath)
          )
          // 资源和父级目录都无销售方式
          // if (!learn.length) return wx.showToast({
          //   icon: 'error',
          //   title: '暂未开售',
          // })
          const buyList = learn.filter((citem) => this.properties.buyIds.includes(citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal').Id))
          // 资源和本身都未购买
          if (!buyList.length) {
            const itemSaleMethod = item.saleMethod && item.saleMethod.length ? item.saleMethod.find(citem => citem.SaleType == 'Normal') : undefined
            return wx.showToast({
              icon: 'error',
              title: itemSaleMethod && itemSaleMethod.Price == 0 ? '请先领取资源' : '请先购买资源',
        })
      }
        }
      }
      let url;
      if (item.selectType == "video" || item.learnSelectType == "video") {
        url = "/packageDomain/pages/resourceDetails/myVideo/index";
      }
@@ -237,7 +283,6 @@
          result.push(...item.children);
        }
      }
      console.log(this.properties.treeList, "this.properties.treeList");
      this.properties.treeList.forEach((item) => {
        findChildren(item);
      });
@@ -258,7 +303,6 @@
      tree.forEach((node) => {
        flatten(node);
      });
      // console.log(result, 'result');
      return result;
    },
@@ -266,7 +310,6 @@
    findAndUpdateItemsByIds(tree, ids, state) {
      function findAndUpdate(node) {
        if (ids.includes(node.id)) {
          // console.log(node, 'node');
          node.checked = state; // 将目标项的 check 属性设置为 true
        }
        if (node.children && node.children.length > 0) {
@@ -281,63 +324,31 @@
      return tree; // 返回修改后的完整数组
    },
    checkResoucrceInfo(tree, id) {
      function findAndUpdate(node) {
        if (node.sysType == "CmsFolder" && node.children.length > 0) {
          for (let index = 0; index < node.children.length; index++) {
            const element = node.children[index];
            findAndUpdate(element);
          }
        } else if (id == node.id && node.sysType == "CmsItem") {
          node.checked = !node.checked; // 将目标项的 check 属性设置为 true
        }
      }
      for (let node of tree) {
        findAndUpdate(node); // 对每个顶层节点执行查找和更新操作
      }
      return tree; // 返回修改后的完整数组
    },
    // 全选
    checkAll() {
      const ids = [];
      const list = [];
      let list = [];
      let checked = "";
      this.properties.treeList.forEach((item) => {
        if (item.children && item.children.length > 0) {
          list.push(...this.flattenTree([item]));
        }
      });
      list = list.filter(item => !item.disabled)
      list.forEach((item) => {
        ids.push(item.id);
        checked = item.checked;
      });
      // const flag =
      //   list.findIndex((item) => item.checked == false) > -1 ? true : false;
      const flag = this.properties.checkAllState;
      // const updataList = this.findAndUpdateItemsByIds(
      //   this.properties.treeList,
      //   ids,
      //   flag
      // );
      // this.setData({
      //   treeList: updataList,
      // });
      var myEventDetail = {
        ids,
        flag,
      }; // detail对象,提供给事件监听函数
      };
      var myEventOption = {
        bubbles: true,
        composed: true,
      }; // 触发事件的选项
      };
      this.triggerEvent("changeListChecked", myEventDetail, myEventOption);
      if (!checked) {
        this.setData({
          selectAll: list,
        });
      }
      var myEventDetail = {
        value: !flag,
      }; // detail对象,提供给事件监听函数
@@ -352,23 +363,18 @@
    checkResourceTitle(e) {
      const flag = e.detail.checked;
      // 这个时候checked的值是fals
      let checkResourceTitleList = [];
      const item = e.currentTarget.dataset.item;
      const parent = this.findParentById(this.properties.learnList, item.id);
      let childrenList;
      let childrenList = [];
      let flagNum;
      if (parent)
        childrenList = parent.children.filter((citem) => citem.id !== item.id);
      if (childrenList)
        flagNum = childrenList.findIndex((item) => item.checked == false);
      let list = this.flattenTree([item]);
      list = list.filter(item => !item.disabled)
      let ids = [];
      list.forEach((item) => {
        if (
          item.sysType == "CmsFolder" ||
          (item.sysType == "CmsItem" && item.saleMethod.length)
        )
          ids.push(item.id);
        ids.push(item.id)
      });
      var myEventDetail = {
        ids,
@@ -378,26 +384,22 @@
        bubbles: true,
        composed: true,
      }; // 触发事件的选项
      // 去勾选点击目录的子项
      this.triggerEvent("changeListChecked", myEventDetail, myEventOption);
      if (flagNum == -1) {
      // 去勾选点击目录的父项
      if (flagNum == -1 && parent && !parent.disabled) {
        let checkedState;
        var myEventDetail = {
          ids: [parent.id],
          flag,
        }; // detail对象,提供给事件监听函数
        };
        var myEventOption = {
          bubbles: true,
          composed: true,
        }; // 触发事件的选项
        };
        this.triggerEvent("changeListChecked", myEventDetail, myEventOption);
      }
      if (!list.checked) {
        this.setData({
          superiorPurchaseSaleMethodId: list,
        });
      }
      list.forEach((items) => {
        console.log(items.checked, "itesasd");
        if (!items.checked) {
          this.setData({
            cloudShoppingCart: items,
@@ -429,7 +431,7 @@
      };
      this.triggerEvent("changeResourceChecked", myEventDetail, myEventOption);
      // 通过判断,联通父级checked
      if (flag == -1) {
      if (flag == -1 && !parent.disabled) {
        let checkedState;
        citem.checked == false ? (checkedState = true) : (checkedState = false);
        var myEventDetail = {
@@ -455,7 +457,7 @@
        this.triggerEvent("changeListChecked", myEventDetail, myEventOption);
      }
      // 联通最外层级checked, 如果所有子项勾选, 且当前最外层未勾选, 则加上最外层的勾选
      if (!citem.checked && outermost) {
      if (!citem.checked && outermost && !outermost.disabled) {
        let allchildren = this.flattenTree([outermost]);
        allchildren = allchildren.filter(
          (item) =>
@@ -476,31 +478,12 @@
          this.triggerEvent("changeListChecked", myEventDetail, myEventOption);
        }
      }
      if (!citem.checked) {
        //选中的时候添加id
        let sonPurchaseSaleMethodId = this.data.sonPurchaseSaleMethodId || [];
        if (this.properties.paymentPage) {
          sonPurchaseSaleMethodId = [];
          this.properties.paymentPage = false;
        }
        if (!this.properties.paymentPage) {
          sonPurchaseSaleMethodId.push(citem.saleMethod[0].Id);
        }
        this.setData({
          sonPurchaseSaleMethodId: sonPurchaseSaleMethodId,
        });
      } else {
        // 取消选中的时候删除id
      }
    },
    // 加入购物车
    async onCloudShoppingCart(e) {
      let shoppingCartGetId = [];
      const item = e.currentTarget.dataset.item;
      console.log(item.isShopCar);
      const saleMethodId = e.currentTarget.dataset.item.saleMethod[0].Id;
      console.log(saleMethodId);
      let query = {
        start: 0,
        size: 999,
@@ -512,8 +495,6 @@
        shoppingCartGetId.push(item.saleMethod.id);
      });
      if (shoppingCartGetId.includes(saleMethodId)) {
        // this.data.updateShoppingCartHidden();
        // this.data.updateCloudLearning();
        wx.showToast({
          icon: "error",
          title: "已添加",
@@ -530,14 +511,20 @@
          }, ],
        };
        const addRes = await app.MG.store.addShoppingCart(query);
        console.log(addRes, "addRes");
        if (addRes) {
          wx.showToast({
            icon: "success",
            title: "添加成功",
          });
          item.isShopCar = false;
          this.triggerEvent("updateCloudLearning");
          var myEventDetail = {
            id: item.id,
          };
          var myEventOption = {
            bubbles: true,
            composed: true,
          };
          this.triggerEvent("updateCloudLearning", myEventDetail, myEventOption);
        }
      }
    },
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -1,32 +1,93 @@
<view class="tree">
  <t-collapse default-value="{{openIds}}" catchchange="handleChange">
    <view wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" wx:if="{{item.sysType== 'CmsItem' }}">
      <view class="listItems" wx:if="{{item.childrenFolderCount <= 0 && item.sysType == 'CmsItem'}}">
    <view
      wx:for="{{treeList}}"
      wx:for-item="item"
      wx:for-index="index"
      wx:key="id"
      wx:if="{{item.sysType== 'CmsItem' }}"
    >
      <view
        class="listItems"
        wx:if="{{item.childrenFolderCount <= 0 && item.sysType == 'CmsItem'}}"
      >
        <view class="itemsInfo" data-item="{{item}}" data-index="{{index}}">
          <view class="contentBox" bind:tap="goPlayer" data-item="{{item}}" data-parent="{{''}}">
          <view
            class="contentBox"
            bind:tap="goPlayer"
            data-item="{{item}}"
            data-parent="{{''}}"
          >
            <!-- 教学资源 云学习 图标 -->
            <view class="box-image fl-cn" style="width: 80%">
              <view class="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap">
                <!-- checked="{{citem.checked}}"  -->
                <!-- <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" catch:change="checkResource" data-item="{{citem}}" /> -->
                <t-checkbox disabled="{{!citem.saleMethod[0].Id}}" icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" data-parent="{{item}}" catch:change="checkResource" />
              <view
                class="checkBox"
                wx:if="{{isShowCheck}}"
                catchtap="catchTap"
              >
                <t-checkbox
                  disabled="{{item.disabled}}"
                  icon="rectangle"
                  checked="{{item.checked}}"
                  data-item="{{item}}"
                  data-parent="{{item}}"
                  catch:change="checkResource"
                />
              </view>
              <!-- 教学资源图标 -->
              <view class="teach-icon fl-cn">
                <image wx:if="{{item.selectType == 'audio' || item.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" />
                <image wx:elif="{{item.selectType == 'video' || item.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" />
                <image wx:elif="{{item.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" />
                <image wx:elif="{{item.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" />
                <image wx:elif="{{item.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" />
                <image wx:elif="{{item.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" />
                <image wx:elif="{{ item.fileMap[item.file].extension == 'doc' ||  item.fileMap[item.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" />
                <image wx:elif="{{ item.fileMap[item.file].extension == 'xlsx' ||  item.fileMap[item.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" />
                <image wx:elif="{{ item.fileMap[item.file].extension == 'ppt' ||  item.fileMap[item.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" />
                <image
                  wx:if="{{item.selectType == 'audio' || item.learnSelectType == 'audio'}}"
                  src="/static/images/bookService/detail/audioIcon.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{item.selectType == 'video' || item.learnSelectType == 'video'}}"
                  src="/static/images/bookService/detail/video.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{item.selectType == 'pdf'}}"
                  src="/static/images/bookService/detail/pdf.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{item.selectType == 'webpage'}}"
                  src="/static/images/bookService/detail/net.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{item.selectType == 'picture'}}"
                  src="/static/images/bookService/detail/picture.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{item.selectType == 'zip'}}"
                  src="/static/images/bookService/detail/zip.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{ item.fileMap[item.file].extension == 'doc' ||  item.fileMap[item.file].extension == 'docx'}}"
                  src="/static/images/bookService/detail/word.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{ item.fileMap[item.file].extension == 'xlsx' ||  item.fileMap[item.file].extension == 'xlsx'}}"
                  src="/static/images/bookService/detail/excel.png"
                  mode="aspectFill"
                />
                <image
                  wx:elif="{{ item.fileMap[item.file].extension == 'ppt' ||  item.fileMap[item.file].extension == 'pptx'}}"
                  src="/static/images/bookService/detail/PPT.png"
                  mode="aspectFill"
                />
                <!-- 资源无文件内容图标 -->
                <image wx:else src="/static/images/bookService/detail/word.png" mode="" />
                <image
                  wx:else
                  src="/static/images/bookService/detail/word.png"
                  mode=""
                />
              </view>
              <!-- 云学习图标 -->
              <view> </view>
              <!-- 名称 -->
              <text class="name" style="width: 100%">{{item.name || '-'}}</text>
            </view>
@@ -43,77 +104,216 @@
            </view>
            <view wx:if="{{tab == 'jsek_cloudLearning'}}">
              <!-- 云学习试看图标 -->
              <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!item.isbuy ? false : item.freeFile ? true : false}}"></image>
              <image
                src="/static/images/bookService/detail/shikan.png"
                class="testSee"
                wx:if="{{!item.isbuy ? false : item.freeFile ? true : false}}"
              ></image>
              <!-- 云学习加入购物车图标 -->
              <image src="/static/images/bookService/detail/cart@2x.png" wx:if="{{item.isShopCar}}" class="shopCar" data-item="{{item}}" catch:tap="onCloudShoppingCart"></image>
              <image
                src="/static/images/bookService/detail/cart@2x.png"
                wx:if="{{item.isShopCar}}"
                class="shopCar"
                data-item="{{item}}"
                catch:tap="onCloudShoppingCart"
              ></image>
              <!-- 云学习购买图标 -->
              <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{item.isbuy }}"></image>
              <image
                src="/static/images/bookService/detail/need-buy.png"
                class="need-buy"
                wx:if="{{item.isbuy }}"
              ></image>
            </view>
          </view>
        </view>
      </view>
    </view>
    <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{item.id}}" wx:if="{{item.sysType == 'CmsFolder' }}">
    <t-collapse-panel
      wx:for="{{treeList}}"
      wx:for-item="item"
      wx:for-index="index"
      wx:key="id"
      value="{{item.id}}"
      wx:if="{{item.sysType == 'CmsFolder' }}"
    >
      <view slot="header" class="header-title">
        <view class="title-checkBox" catchtap="catchTap">
          <t-checkbox style="align-items: center" icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catchchange="checkResourceTitle" wx:if="{{isShowCheck}}" />
          <t-checkbox
            style="align-items: center"
            icon="rectangle"
            disabled="{{item.disabled}}"
            checked="{{item.checked}}"
            data-item="{{item}}"
            catchchange="checkResourceTitle"
            wx:if="{{isShowCheck}}"
          />
          <!-- 章节名 -->
          <view class="title-box">
            <view class="title-t" >
            <view class="title-name">{{item.name}} </view>
            <view wx:if="{{item.sysType =='CmsFolder'}}" class="title-num">
              ({{item.childrenItem}})
            </view>
          </view>
            <view class="title-icon" >
              <!-- 云学习加入购物车图标 -->
              <image
                src="/static/images/bookService/detail/cart@2x.png"
                wx:if="{{item.isShopCar}}"
                class="shopCar"
                data-item="{{item}}"
                catch:tap="onCloudShoppingCart"
              ></image>
              <!-- 云学习购买图标 -->
              <image
                src="/static/images/bookService/detail/need-buy.png"
                class="need-buy"
                wx:if="{{item.isbuy }}"
              ></image>
        </view>
      </view>
      <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex">
        </view>
      </view>
      <view
        class="list"
        wx:for="{{item.children}}"
        wx:for-item="citem"
        wx:for-index="cindex"
        wx:key="cindex"
      >
        <!-- // 判断 无子项 且为商品item 直接显示 -->
        <view class="listItems" wx:if="{{citem.childrenFolderCount <= 0 && citem.sysType == 'CmsItem'}}">
        <view
          class="listItems"
          wx:if="{{citem.childrenFolderCount <= 0 && citem.sysType == 'CmsItem'}}"
        >
          <view class="itemsInfo" data-item="{{citem}}" data-index="{{cindex}}">
            <view class="contentBox" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}">
              <!-- 教学资源 云学习 图标 -->
            <view
              class="contentBox"
              bind:tap="goPlayer"
              data-item="{{citem}}"
              data-parent="{{item}}"
            >
              <!-- 教学资源 图标 -->
              <view class="box-image fl-cn">
                <view class="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap">
                  <!-- checked="{{citem.checked}}"  -->
                  <!-- <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" catch:change="checkResource" data-item="{{citem}}" /> -->
                  <t-checkbox disabled="{{!citem.saleMethod[0].Id}}" icon="rectangle" checked="{{citem.checked}}" data-item="{{citem}}" data-parent="{{item}}" catch:change="checkResource" />
                <view
                  class="checkBox"
                  wx:if="{{isShowCheck}}"
                  catchtap="catchTap"
                >
                  <t-checkbox
                    disabled="{{citem.disabled}}"
                    icon="rectangle"
                    checked="{{citem.checked}}"
                    data-item="{{citem}}"
                    data-parent="{{item}}"
                    catch:change="checkResource"
                  />
                </view>
                <!-- 教学资源图标 -->
                <view class="teach-icon fl-cn">
                  <image wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" />
                  <image wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" />
                  <image wx:elif="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" />
                  <image wx:elif="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" />
                  <image wx:elif="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" />
                  <image wx:elif="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" />
                  <image wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" />
                  <image wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" />
                  <image wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" />
                  <image
                    wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}"
                    src="/static/images/bookService/detail/audioIcon.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}"
                    src="/static/images/bookService/detail/video.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{citem.selectType == 'pdf'}}"
                    src="/static/images/bookService/detail/pdf.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{citem.selectType == 'webpage'}}"
                    src="/static/images/bookService/detail/net.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{citem.selectType == 'picture'}}"
                    src="/static/images/bookService/detail/picture.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{citem.selectType == 'zip'}}"
                    src="/static/images/bookService/detail/zip.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' ||  citem.fileMap[citem.file].extension == 'docx'}}"
                    src="/static/images/bookService/detail/word.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' ||  citem.fileMap[citem.file].extension == 'xlsx'}}"
                    src="/static/images/bookService/detail/excel.png"
                    mode="aspectFill"
                  />
                  <image
                    wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' ||  citem.fileMap[citem.file].extension == 'pptx'}}"
                    src="/static/images/bookService/detail/PPT.png"
                    mode="aspectFill"
                  />
                  <!-- 资源无文件内容图标 -->
                  <image wx:else src="/static/images/bookService/detail/word.png" mode="" />
                  <image
                    wx:else
                    src="/static/images/bookService/detail/word.png"
                    mode=""
                  />
                </view>
                <!-- 云学习图标 -->
                <view> </view>
                <!-- 名称 -->
                <text class="name" style="{{ tab == 'jsek_teachingResources' ? citem.resourceClass ? 'width: 420rpx'  :  'width: 560rpx;' : (citem.isShopCar &&citem.isbuy ) ? 'width: 400rpx;' : (citem.isShopCar ||citem.isbuy) ? 'width:520rpx' :  'width:560rpx'}}">{{citem.name || '-'}}</text>
                <text
                  class="name"
                  style="{{ tab == 'jsek_teachingResources' ? citem.resourceClass ? 'width: 420rpx'  :  'width: 500rpx;' : (citem.isShopCar &&citem.isbuy ) ? 'width: 400rpx;' : (citem.isShopCar ||citem.isbuy) ? 'width:460rpx' :  'width:500rpx'}}"
                  >{{citem.name || '-'}}</text
                >
              </view>
              <!-- 教学资源类型 -->
              <view class="teachClass fl-cn" wx:if="{{citem.resourceClass && tab == 'jsek_teachingResources'}}">
              <view
                class="teachClass fl-cn"
                wx:if="{{citem.resourceClass && tab == 'jsek_teachingResources'}}"
              >
                {{citem.resourceClass}}
              </view>
              <view wx:if="{{tab == 'jsek_cloudLearning'}}">
              <view wx:if="{{tab == 'jsek_cloudLearning'}}" class="clound-icon">
                <!-- 云学习试看图标 -->
                <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></image>
                <image
                  src="/static/images/bookService/detail/shikan.png"
                  class="testSee"
                  wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"
                ></image>
                <!-- 云学习加入购物车图标 -->
                <image src="/static/images/bookService/detail/cart@2x.png" wx:if="{{citem.isShopCar}}" class="shopCar" data-item="{{citem}}" catch:tap="onCloudShoppingCart"></image>
                <image
                  src="/static/images/bookService/detail/cart@2x.png"
                  wx:if="{{citem.isShopCar}}"
                  class="shopCar"
                  data-item="{{citem}}"
                  catch:tap="onCloudShoppingCart"
                ></image>
                <!-- 云学习购买图标 -->
                <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></image>
                <image
                  src="/static/images/bookService/detail/need-buy.png"
                  class="need-buy"
                  wx:if="{{citem.isbuy }}"
                ></image>
              </view>
            </view>
          </view>
        </view>
        <!-- // 判断 不是商品 有子项 递归组件 -->
        <tree wx:if="{{ citem.sysType == 'CmsFolder' }}" isShowCheck="{{isShowCheck}}" bookInfo="{{bookInfo}}" treeList="{{[citem]}}" learnList="{{learnList}}" itemId="{{itemId}}" tab="{{tab}}" buyIds="{{buyIds}}" openIds="{{openIds}}"></tree>
        <tree
          wx:if="{{ citem.sysType == 'CmsFolder' }}"
          isShowCheck="{{isShowCheck}}"
          bookInfo="{{bookInfo}}"
          treeList="{{[citem]}}"
          learnList="{{learnList}}"
          itemId="{{itemId}}"
          tab="{{tab}}"
          buyIds="{{buyIds}}"
          openIds="{{openIds}}"
        ></tree>
      </view>
      <!-- 暂无数据 -->
      <view wx:if="{{!item.children || !item.children.length}}" class="noData">
packageBookService/pages/bookServices/detail/components/tree/index.wxss
@@ -17,7 +17,16 @@
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.title-t,
.title-icon {
  display: flex;
  align-items: center;
}
.title-icon {}
.title-checkBox {
  width: 100%;
@@ -105,11 +114,12 @@
  padding-bottom: 20rpx;
}
/* .t-collapse-panel__content {
  padding: var(--td-collapse-content-padding, 0rpx) !important;
} */
.fl-cn {
  display: flex;
  align-items: center;
}
.clound-icon {
  display: flex;
}
packageBookService/pages/bookServices/detail/index.js
@@ -51,6 +51,9 @@
    applyState: "", // 教学资源申请状态
    deadline: "", // 教学资源申请有效日期,
    isshowDrawBtn: true, // 云学习领取查看按钮是否显示
    isShowBuyCloundMenu: false, //   云学习全部购买按钮是否显示
    isCloundHaveSaleMethod: false, // 云学习是否有销售方式
    cloundMenuIsBuy: false,
    rejectCause: "", // 下载拒绝原因
    buyIdList: [],
    shoppingCartGetId: [], // 已购买id列表
@@ -266,11 +269,6 @@
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {},
  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {
@@ -290,21 +288,6 @@
  },
  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {},
  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {},
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {},
  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {
@@ -314,11 +297,6 @@
    }
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
  onShareTimeline() {},
  // 格式化日期
  formatDate(dateString) {
    if (!dateString) {
@@ -545,8 +523,9 @@
    }
    app.MG.store.getProductDetail(query).then((res) => {
      this.setData({
        resourceCodeList: res.datas.cmsDatas[0].datas
        resourceCodeList: res.datas.cmsDatas[0].datas,
      })
      console.log('refcode', this.data.resourceCodeList);
    })
  },
  //请求子商品的文件
@@ -941,6 +920,26 @@
    // 返回更新后的数组  
    return array;
  },
  // 递归树结构,如果父级有销售方式(有效期),去掉所有子集的销售方式
  clearTreeSealmethod(clearSaleMethod, tree) {
    for (let item of tree) {
      const saleData = item.saleMethod &&
        item.saleMethod.length ?
        item.saleMethod.find((citem) => citem.SaleType == 'Normal') : null
      if (
        ((saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime()) ||
          clearSaleMethod) && item.children && item.children.length
      ) {
        item.children.forEach((ditem) => (ditem.saleMethod = []))
      }
      if (item.children && item.children.length)
        this.clearTreeSealmethod(
          saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime(),
          item.children
        )
    }
    return tree
  },
  // 教学资源 云学习 获取
  getResourceDataList(type) {
    this.setData({
@@ -950,7 +949,7 @@
    let query = {
      path: '*',
      queryType: '*',
      storeInfo: this.data.options.storeInfo,
      // storeInfo: this.data.options.storeInfo,
      productId: this.data.bookDetail.id,
      cmsPath: type.productLinkPath,
      cmsType: '*',
@@ -974,6 +973,7 @@
      },
    }
    app.MG.store.getProductDetailNoChildren(query).then((res) => {
      console.log('未处理资源', res.datas.cmsDatas[0].datas);
      if (!res.datas.cmsDatas[0].datas.length) {
        return this.setData({
          noResources: true,
@@ -981,13 +981,19 @@
        });
      }
      let list = []
      // 测试 6位// 正式 5位//  测试调用传20,内部7  正式调用传17 内部传6
      //教学资源 云学习
      if (
        type.refCode == "jsek_teachingResources" ||
        type.refCode == "jsek_cloudLearning"
      ) {
      // 判断云学习有无销售方式和有效期
      const cloundSaleMethod =
        type.saleMethod && type.saleMethod.length ?
        type.saleMethod.find((citem) => citem.SaleType == 'Normal') :
        null
      let flags =
        type.refCode == 'jsek_cloudLearning' &&
        cloundSaleMethod &&
        new Date().getTime() <= new Date(cloundSaleMethod.EndDate).getTime() &&
        new Date().getTime() >= new Date(cloundSaleMethod.BeginDate).getTime()
        res.datas.cmsDatas[0].datas.forEach((item) => {
        // 云学习上有销售方式,去掉云学习下所有销售方式
        if (flags) item.saleMethod = []
          item.checked = false;
          if (item.sysType == 'CmsItem') {
            // 教学资源 类型名称赋值
@@ -995,70 +1001,62 @@
              if (type.value == item.resourcesClassification)
                item.resourceClass = type.name;
            });
            if (this.data.tabValue == "jsek_teachingResources") {} else if (this.data.tabValue == "jsek_cloudLearning") {
              item.isbuy = this.isShowNeedBuy(item);
              item.isShopCar = this.isShoppingCart(item);
            }
          // if (this.data.tabValue == "jsek_teachingResources") {} else if (this.data.tabValue == "jsek_cloudLearning") {
          //   item.isbuy = this.isShowNeedBuy(item);
          //   item.isShopCar = this.isShoppingCart(item);
          // }
          }
        });
        if (type.refCode == "jsek_cloudLearning") {
          this.setData({
            learnPath: type.productLinkPath
          })
          const dataList = res.datas.cmsDatas[0].datas
          // 先判断是否否买云学习整个目录
          let couldId = null
          let codeData = null
          if (this.data.resourceCodeList.length) {
            codeData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning')
            if (codeData && codeData.saleMethod && codeData.saleMethod.length)
              couldId = codeData.saleMethod[0].Id
          }
          if (couldId) {
            this.setData({
              isGoBuyResource: this.data.buyIdList.indexOf(couldId) > -1 ? false : true
            })
          } else if (dataList.length) {
            const tag = dataList.findIndex(item => item.saleMethod.length && item.saleMethod[0].Price > 0)
            this.setData({
              isGoBuyResource: tag > -1 ? true : false
            })
      // 判断处理资源
      if (res.datas.cmsDatas[0].datas.some((item) => item.sysType == 'CmsFolder')) {
        if (!res.datas.cmsDatas[0].datas.some((item) => item.sysType == 'CmsItem')) {
          // 1.只有目录,没有资源
          list = res.datas.cmsDatas[0].datas
          } else {
            this.setData({
              isGoBuyResource: false
            })
          }
        }
        this.getTreeList(res.datas.cmsDatas[0].datas, list, query.cmsPath)
        list = this.ensureTreeConsistency(list)
        list = this.changeResourceChildren(list)
        }
      } else {
        // 3.只有资源,没有目录
        list = res.datas.cmsDatas[0].datas
      }
        let result = [];
        if (type.refCode == "jsek_teachingResources") {
          this.findChildIds(list, result);
          // const newUSeList = this.deleteTreeData(list, result)
          this.setData({
            openTeachids: result,
            loading: false,
            teach: list,
          });
        } else if (type.refCode == "jsek_cloudLearning") {
          let arr = this.handleTreeData(list).filter(
            (item) => item.saleMethod[0]
          );
          let freeIds = arr.filter((item) => {
            return item.saleMethod[0].Price == 0;
          });
          if (!freeIds.length)
            this.setData({
              isshowDrawBtn: false,
            });
        // 云学习上无销售方式,走目录 资源 销售方式去除方法
        if (!flags) list = this.clearTreeSealmethod(false, list)
        // 判断领取查看是否显示(云学习,或资源目录,有售价为0)
        let isshowDrawBtn = res.datas.cmsDatas[0].datas.some(
          (item) =>
          item.saleMethod.length &&
          item.saleMethod.find((citem) => citem.SaleType == 'Normal').Price == 0 &&
          new Date(item.saleMethod.find((citem) => citem.SaleType == 'Normal').EndDate).getTime() >= new Date().getTime() &&
          new Date(item.saleMethod.find((citem) => citem.SaleType == 'Normal').BeginDate).getTime() <= new Date().getTime()
        ) || (flags && cloundSaleMethod.Price == 0)
        // 判断云学习全部购买按钮是否显示
        let isShowBuyCloundMenu = flags && cloundSaleMethod.Price >= 0
        // 判断购物车按钮和锁按钮是否显示
        this.handleTreeData(list).forEach(item => {
          item.isbuy = this.resourceIsBuy(item);
          item.isShopCar = this.isShoppingCart(item);
        })
          this.findChildIds(list, result);
          this.setData({
          isshowDrawBtn,
          isShowBuyCloundMenu,
          isCloundHaveSaleMethod: flags,
            learn: list,
            loading: false,
            openLearnids: result,
          learnPath: type.productLinkPath
          });
        }
      }
    })
  },
@@ -1158,91 +1156,7 @@
        console.log(e);
      });
  },
  // 获取tag下所有资源
  async getAllResource(data) {
    if (!data.length) return false;
    for (let i = 0; i < data.length; i++) {
      let item = data[i];
      if (item.sysType == "CmsFolder" && item.childrenCount > 0) {
        item.children = [];
        item.children = await this.getFolderItem(item.productLinkPath);
        await this.getAllResource(item.children);
      }
    }
    return data;
  },
  // 获取资源接口
  async getFolderItem(path) {
    let query = {
      path: "*",
      queryType: "*",
      storeInfo: this.data.options.storeInfo,
      productId: this.data.bookDetail.id,
      cmsPath: path,
      itemFields: {
        SysType: "CmsFolder",
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
        resourcesClassification: [],
        isDownload: [],
        jsek_resourceBrief: [],
        jsek_link: [],
        accessType: [],
        learnSelectType: [],
      },
      pading: {
        start: 0,
        size: 999,
      },
    };
    let data = await app.MG.store.getProductDetail(query);
    // 如果item层级里有floder,删除floder
    const flag = data.datas.cmsDatas[0].datas.findIndex(
      (item) => item.sysType == "CmsItem"
    );
    if (flag > -1)
      data.datas.cmsDatas[0].datas = data.datas.cmsDatas[0].datas.filter(
        (item) => item.sysType == "CmsItem"
      );
    data.datas.cmsDatas[0].datas.forEach((item) => {
      //   if (item.sysType == "CmsFolder" && flag > -1) {
      //     item.isShow = false;
      //   } else {
      //     item.isShow = true;
      //   }
      this.data.resourceClassList.forEach((type) => {
        if (type.value == item.resourcesClassification)
          item.resourceClass = type.name;
      });
      // 网页 不能下载 私有文件
      if (item.sysType == "CmsItem") {
        if (item.selectType == "webpage") {
          item.disabled = true;
        } else {
          if (item.isDownload != 1) {
            item.disabled = true;
          }
        }
        if (item.file && item.fileMap && item.fileMap[item.file]) {
          if (item.fileMap[item.file].protectType == "Private")
            item.disabled = true;
        }
      }
    });
    data.datas.cmsDatas[0].datas.forEach((item) => {
      if (this.data.tabValue == "jsek_teachingResources") {
        item.checked = false;
      } else if (this.data.tabValue == "jsek_cloudLearning") {
        item.checked = false;
        item.isbuy = this.isShowNeedBuy(item);
        item.isShopCar = this.isShoppingCart(item);
      }
    });
    return data.datas.cmsDatas[0].datas;
  },
  // 获取展开项
  findChildIds(data, result) {
    let index = 0
@@ -1670,20 +1584,26 @@
  },
  // 判断资源是否购买
  resourceIsBuy(data) {
    let couldId = null
    let codeData = null
    if (this.data.resourceCodeList.length) {
      codeData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning')
      if (codeData && codeData.saleMethod && codeData.saleMethod.length)
        couldId = codeData.saleMethod[0].Id
    }
    if (couldId) {
      return this.data.buyIdList.indexOf(couldId) > -1 ? false : true
    } else if (data.saleMethod && data.saleMethod.length) {
      const isSHow = this.data.buyIdList.some(
        (item) => item == data.saleMethod[0].Id
    if (data.saleMethod && data.saleMethod.length) {
      const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal')
      if (saleData.State == 'Disable') return false
      const isShow = this.data.buyIdList.some(
        (item) => item == saleData.Id
      );
      return !isSHow;
      // 已经购买
      if (isShow) return false
      // 未购买,查看销售方式是否过期
      if (!isShow) {
        const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() &&
          new Date(saleData.BeginDate).getTime() <= new Date().getTime()
        if (flag) {
          // 为过期 ,需要购买
          return true
        } else {
          // 已过期 无需购买
          return false
        }
      }
    } else {
      return false;
    }
@@ -1725,30 +1645,31 @@
  },
  // 判断资源加入购物车按钮是否显示
  isShoppingCart(data) {
    let couldId = null
    let codeData = null
    if (this.data.resourceCodeList.length) {
      codeData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning')
      if (codeData && codeData.saleMethod && codeData.saleMethod.length)
        couldId = codeData.saleMethod[0].Id
    }
    if (couldId) {
      return this.data.buyIdList.indexOf(couldId) > -1 ? false : true
    } else if (data.saleMethod && data.saleMethod.length) {
      if (data.saleMethod[0].Price <= 0) return false;
    if (data.saleMethod && data.saleMethod.length) {
      const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal')
      // 先判断是否免费
      if (saleData.Price <= 0) return false
      // 再判断是否购买
      const isBuy = this.data.buyIdList.some(
        (item) => item == data.saleMethod[0].Id
      );
      const isBuy = this.data.buyIdList.some((item) => item == saleData.Id)
      if (isBuy) {
        // 购买了
        return false;
        return false
      } else {
        // 判断是否加入购物车
        const isSHow = this.data.shoppingCartGetId.some(
          (item) => item == data.saleMethod[0].Id
        );
        return !isSHow;
        const isShow = this.data.shoppingCartGetId.some((item) => item == saleData.Id)
        if (isShow) return false
        // 未购买,查看销售方式是否过期
        if (!isShow) {
          const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() &&
            new Date(saleData.BeginDate).getTime() <= new Date().getTime()
          if (flag) {
            // 为过期 ,需要购买
            return true
          } else {
            // 已过期 无需购买
            return false
          }
        }
      }
    } else {
      return false;
@@ -1782,7 +1703,7 @@
        flattenedArray.push(...childrenArray);
      }
    });
    return flattenedArray.filter((item) => item.sysType == "CmsItem");
    return flattenedArray;
  },
  // 云学习一键领取
  async getFreeResource() {
@@ -1797,19 +1718,34 @@
          // 出现错误,返回false
        }
      });
    }
    // 领取查看 ,先看云学习上的  再看资源上的
    const cloundMenu = this.data.resourceCodeList.find((item) => item.refCode == 'jsek_cloudLearning')
    const cloundMenuSaleMethod =
      cloundMenu.saleMethod && cloundMenu.saleMethod.length ?
      cloundMenu.saleMethod.find((ditem) => ditem.SaleType == 'Normal') :
      undefined
    let query = {}
    if (this.data.isCloundHaveSaleMethod && !cloundMenuSaleMethod.Price) {
      // 云学习上有销售方式,且为0元,直接领取云学习
      query = {
        remarks: '云学习',
        requests: [{
          saleMethodId: cloundMenuSaleMethod.Id,
          count: 1
        }]
      }
    } else {
      let arr = this.handleTreeData(this.data.learn).filter((item) =>
        this.resourceIsBuy(item)
      );
      // 领取资源
      let arr = this.handleTreeData(this.data.learn).filter(item => this.resourceIsBuy(item))
      let freeIds = arr.filter((item) => {
        return item.saleMethod[0].Price == 0;
      });
        return item.saleMethod.find((citem) => citem.SaleType == 'Normal').Price == 0
      })
      if (!freeIds.length)
        return wx.showToast({
          icon: "error",
          title: "暂无免费资源",
        });
      child.changeReceive(true);
      let requests = [];
      freeIds.forEach((item, index) => {
        if (this.resourceIsBuy(item)) {
@@ -1819,10 +1755,12 @@
          });
        }
      });
      let query = {
      query = {
        remarks: "云学习",
        requests,
      };
    }
    child.changeReceive(true);
      try {
        const initOrderRes = await app.MG.store.initOrder(query);
        let parameter = {
@@ -1847,7 +1785,6 @@
      } catch (error) {
        console.log(error);
      }
    }
  },
  // 云学习一键购买
  async allAddShoppiingCar() {
@@ -1861,7 +1798,8 @@
        },
      });
    }
    let shopList = this.handleTreeData(this.data.learn).filter((item) =>
    let shopList = this.handleTreeData(this.data.learn).filter(item => item.cmsType == 'cmsItem')
    shopList = shopList.filter((item) =>
      this.resourceIsBuy(item)
    );
    this.getShoppingCartProductGet();
@@ -1897,6 +1835,11 @@
        title: "请重试",
      });
    }
  },
  // 云学习字段购买
  async buyCloundMenu() {
    const cloundData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning')
  },
  // 变为所有check   true
  findAndUpdateItemsByIds(tree, ids) {
@@ -2834,5 +2777,16 @@
      });
      this.closeDialog()
    })
  },
  getCloundIsBuy() {
    let flag = false
    if (!this.data.isCloundHaveSaleMethod) flag = false
    const cloundData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning')
    const saleData = cloundData.saleMethod.find(item => item.SaleType == "Normal")
    if (!saleData) flag = false
    flag = this.data.buyIdList.some(item => item == saleData.Id)
    this.setData({
      cloundMenuIsBuy: flag
    })
  }
})
packageBookService/pages/bookServices/detail/index.wxml
@@ -1,47 +1,56 @@
<!--pages/bookServices/detail/index.wxml-->
<import src="index.skeleton.wxml" />
<template is="skeleton" wx:if="{{pageLoading}}" />
<!-- pageLoading -->
<!--导航区域 -->
<suggest-dialog class="suggest-dialog" showIndex="{{showIndex}}" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest-dialog>
<suggest-dialog
  class="suggest-dialog"
  showIndex="{{showIndex}}"
  bookIcon="{{bookDetail.icon}}"
  bookName="{{bookDetail.name}}"
></suggest-dialog>
<!-- <popup showIndex="{{showIndex}}"></popup> -->
<view class="page-bookService" wx:if="{{!pageLoading}}">
  <!-- <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;">
    <view>
      <t-icon
        name="chevron-left"
        size="30"
        data-name="{{item}}"
        bind:click="goBack"
      />
    </view>
    <view class="navbar-title" style="width: 100%">
      <text>{{options.name}}</text>
    </view>
  </view> -->
  <t-toast id="t-toast" />
  <movable-area class="movable-area">
    <scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom">
    <scroll-view
      scroll-y="{{true}}"
      class="book"
      bindscrolltolower="onReachBottom"
    >
      <!-- 图书详情 -->
      <view class="book-box">
        <view class="book-detail" id="book-detail">
          <view class="detail-left">
            <view class="book-img">
              <image loading="" src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" aria-label="{{bookDetail.name}}" />
              <image
                loading=""
                src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}"
                mode="aspectFit"
                aria-label="{{bookDetail.name}}"
              />
            </view>
            <view class="book-use">
              <view class="collect" bind:tap="setCollect">
                <view>
                  <image loading="" src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}" />
                  <image loading="" src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}" />
                  <image
                    loading=""
                    src="/static/images/bookService/detail/collect.png"
                    wx:if="{{!bookDetail.isFavourite}}"
                  />
                  <image
                    loading=""
                    src="/static/images/bookService/detail/collecting.png"
                    wx:if="{{bookDetail.isFavourite}}"
                  />
                </view>
                <view class="use-title">收藏</view>
              </view>
              <view class="suggest" bind:tap="suggestBtn">
                <view>
                  <image loading="" src="/static/images/bookService/detail/suggest.png" />
                  <image
                    loading=""
                    src="/static/images/bookService/detail/suggest.png"
                  />
                </view>
                <view class="use-title">我要建议</view>
              </view>
@@ -66,12 +75,19 @@
                <view class="li-title">出版时间:</view>
                <view class="li-content">{{bookDetail.publicationDate}}</view>
              </view>
              <view class="message-li" wx:if="{{bookClass.length}}" style="height: 80rpx">
              <view
                class="message-li"
                wx:if="{{bookClass.length}}"
                style="height: 80rpx"
              >
                <view class="li-title">图书分类:</view>
                <view class="class-name showTow">{{bookClass}}</view>
              </view>
            </view>
            <image src="/static/images/bookService/detail/square.png" class="right-background" />
            <image
              src="/static/images/bookService/detail/square.png"
              class="right-background"
            />
          </view>
        </view>
        <!-- 销售信息 -->
@@ -80,12 +96,19 @@
            <!-- 电子书售价 -->
            <view class="electron-price" wx:if="{{bookDetail.price}}">
              <view>
                <image src="/static/images/bookService/detail/electon-price.png" />
                <image
                  src="/static/images/bookService/detail/electon-price.png"
                />
              </view>
              <view class="price">
                <view class="price-text">{{bookDetail.price == '0.00' ? '免费' : '¥'+
                  bookDetail.price}}</view>
                <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}">¥{{bookDetail.oldPrice}}
                <view class="price-text"
                  >{{bookDetail.price == '0.00' ? '免费' : '¥'+
                  bookDetail.price}}</view
                >
                <view
                  class="price-old"
                  wx:if="{{bookDetail.oldPrice != '0.00'}}"
                  >¥{{bookDetail.oldPrice}}
                </view>
              </view>
              <view> </view>
@@ -93,27 +116,72 @@
            <!-- 纸质书售价 -->
            <view class="paper-price" wx:if="{{bookDetail.paperPrice}}">
              <view>
                <image src="/static/images/bookService/detail/paper-price.png" />
                <image
                  src="/static/images/bookService/detail/paper-price.png"
                />
              </view>
              <view class="price">{{bookDetail.paperPrice == '0.00' ? '免费' :
                '¥'+bookDetail.paperPrice}}</view>
              <view class="price"
                >{{bookDetail.paperPrice == '0.00' ? '免费' :
                '¥'+bookDetail.paperPrice}}</view
              >
            </view>
          </view>
          <!-- 网店 -->
          <view class="book-web">
            <image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.JDLink}}" data-type="jd" />
            <image class="tmall-image" src="/static/images/bookService/detail/tmall.png" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" wx:if="{{bookDetail.tmallLink}}" />
            <image src="/static/images/bookService/detail/dangdang.png" bind:tap="goShop" data-link="{{bookDetail.dangdangLink}}" wx:if="{{bookDetail.dangdangLink}}" />
            <image src="/static/images/bookService/detail/weidian.png" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}" />
            <image
              src="/static/images/bookService/detail/jd.png"
              wx:if="{{bookDetail.JDLink}}"
              bind:tap="goShop"
              data-link="{{bookDetail.JDLink}}"
              data-type="jd"
            />
            <image
              class="tmall-image"
              src="/static/images/bookService/detail/tmall.png"
              bind:tap="goShop"
              data-link="{{bookDetail.tmallLink}}"
              wx:if="{{bookDetail.tmallLink}}"
            />
            <image
              src="/static/images/bookService/detail/dangdang.png"
              bind:tap="goShop"
              data-link="{{bookDetail.dangdangLink}}"
              wx:if="{{bookDetail.dangdangLink}}"
            />
            <image
              src="/static/images/bookService/detail/weidian.png"
              bind:tap="goShop"
              data-link="{{bookDetail.weidianLink}}"
              wx:if="{{bookDetail.weidianLink}}"
            />
          </view>
        </view>
      </view>
      <view class="book-resource">
        <t-tabs value="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class">
          <t-tab-panel label="图书信息" icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}" value="brief" style="{{tabPanelstyle}}">
            <book-brief content="{{bookDetail.content}}" catalogue="{{bookDetail.catalogue}}" authorIntroduction="{{bookDetail.authorIntroduction}}" wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"></book-brief>
            <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction && !loading}}" class="noData">
        <t-tabs
          value="{{tabValue}}"
          bind:change="onTabsChange"
          t-class="custom-tabs"
          t-class-content="custom-panel"
          class="tab-class"
        >
          <t-tab-panel
            label="图书信息"
            icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}"
            value="brief"
            style="{{tabPanelstyle}}"
          >
            <book-brief
              content="{{bookDetail.content}}"
              catalogue="{{bookDetail.catalogue}}"
              authorIntroduction="{{bookDetail.authorIntroduction}}"
              wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"
            ></book-brief>
            <view
              wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction && !loading}}"
              class="noData"
            >
              <!-- <t-empty icon="folder-open" description="暂无数据" /> -->
              <empty />
            </view>
@@ -125,18 +193,37 @@
          style="{{tabPanelstyle}}"
        >
        </t-tab-panel> -->
          <t-tab-panel label="教学资源" icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}">
            <view wx:if="{{!loading && teach.length && !noResources && applyState}}">
              <view class="teach-btn">
                <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadFile">
                  <view slot="content" class="btn-content">
                    <image src="/static/images/bookService/detail/upload.png" mode="aspectFit" ></image>
                    <text>上传资源</text>
                  </view>
                </t-button>
              </view>
              <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource>
              <tree id="teach-tree" openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" deadline="{{deadline}}" bind:downloadTeach="downloadTeach" bind:handleTree="handleTree" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}" isShoppingCart="isShoppingCart" bind:updateCloudLearning="updateCloudLearning"></tree>
          <t-tab-panel
            label="教学资源"
            icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}"
            value="jsek_teachingResources"
            class="{{loading ? 'loading': ''}}"
          >
            <view wx:if="{{!loading  && applyState}}">
              <teach-resource
                applyState="{{applyState}}"
                rejectCause="{{rejectCause}}"
                deadline="{{deadline}}"
                bind:applyResource="applyResource"
                treeList="{{teach}}"
                applyResourceLoading="{{applyResourceLoading}}"
                bind:uploadFile="uploadFile"
              ></teach-resource>
              <tree
                id="teach-tree"
                openIds="{{openTeachids}}"
                bookInfo="{{bookDetail}}"
                treeList="{{teach}}"
                tab="{{tabValue}}"
                applyState="{{applyState}}"
                deadline="{{deadline}}"
                bind:downloadTeach="downloadTeach"
                bind:handleTree="handleTree"
                openTeachids="{{openTeachids}}"
                wx:if="{{teach.length}}"
                isShoppingCart="isShoppingCart"
                bind:updateCloudLearning="updateCloudLearning"
              ></tree>
            </view>
            <!-- <t-loading
              theme="circular"
@@ -145,34 +232,92 @@
              loading="{{loading }}"
            /> -->
            <view wx:if="{{loading}}" style="width: 100%; height: min-content">
              <t-skeleton row-col="{{rowCol}}" theme="paragraph" animation="gradient" loading="{{loading}}"></t-skeleton>
            </view>
            <view wx:if="{{noResources && !loading}}" class="noData">
              <!-- <t-empty icon="folder-open" description="暂无数据" /> -->
              <empty />
              <t-skeleton
                row-col="{{rowCol}}"
                theme="paragraph"
                animation="gradient"
                loading="{{loading}}"
              ></t-skeleton>
            </view>
          </t-tab-panel>
          <t-tab-panel label="云学习" icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" value="jsek_cloudLearning" style="{{tabPanelstyle}}">
          <t-tab-panel
            label="云学习"
            icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}"
            value="jsek_cloudLearning"
            style="{{tabPanelstyle}}"
          >
            <view wx:if="{{!loading && learn.length}}">
              <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}" isshowDrawBtn="{{isshowDrawBtn}}" successOrderNumber="{{successOrderNumber}}" isGoBuyResource="{{isGoBuyResource}}"></learn-resource>
              <learn-resource
                bind:getFreeResource="getFreeResource"
                bind:allAddShoppiingCar="allAddShoppiingCar"
                id="learn-resource"
                buyResourceData="{{buyResourceData}}"
                bookId="{{bookDetail.id}}"
                isshowDrawBtn="{{isshowDrawBtn}}"
                successOrderNumber="{{successOrderNumber}}"
                isGoBuyResource="{{isGoBuyResource}}"
                isShowBuyCloundMenu="{{isShowBuyCloundMenu}}"
              ></learn-resource>
              <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree>
              <tree
                id="tree"
                openIds="{{openLearnids}}"
                bookInfo="{{bookDetail}}"
                tab="{{tabValue}}"
                treeList="{{learn}}"
                buyIds="{{buyIdList}}"
                openLearnids="{{openLearnids}}"
                cloundMenuIsBuy="{{cloundMenuIsBuy}}"
                bind:updateShoppingCartHidden="updateShoppingCartHidden"
                bind:updateCloudLearning="updateCloudLearning"
                bind:getCloundIsBuy="getCloundIsBuy"
              ></tree>
            </view>
            <view wx:if="{{noResources && !loading}}" class="noData">
              <!-- <t-empty icon="folder-open" description="暂无数据" /> -->
              <empty />
            </view>
          </t-tab-panel>
          <t-tab-panel label="云测试" icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}" value="questionBank" style="{{tabPanelstyle}}">
          <t-tab-panel
            label="云测试"
            icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}"
            value="questionBank"
            style="{{tabPanelstyle}}"
          >
            <view wx:if="{{!loading}}">
              <test-resource id="test-resource" list="{{test}}" bookInfo="{{bookDetail}}" openIds="{{openLearnids}}" mockData="{{mockData}}" tab="{{tabValue}}" storeInfo="{{options.storeInfo}}" jslx="{{jslx}}" bind:buyMock="buyMock"></test-resource>
              <test-resource
                id="test-resource"
                list="{{test}}"
                bookInfo="{{bookDetail}}"
                openIds="{{openLearnids}}"
                mockData="{{mockData}}"
                tab="{{tabValue}}"
                storeInfo="{{options.storeInfo}}"
                jslx="{{jslx}}"
                bind:buyMock="buyMock"
              ></test-resource>
            </view>
          </t-tab-panel>
          <t-tab-panel label="云笔记" icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}" value="jsek_note" style="{{tabPanelstyle}}">
          <t-tab-panel
            label="云笔记"
            icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}"
            value="jsek_note"
            style="{{tabPanelstyle}}"
          >
            <note bookInfo="{{bookDetail}}" id="note" class="note-list"></note>
          </t-tab-panel>
          <t-tab-panel label="相关图书" icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}" value="related_books" style="{{tabPanelstyle}}">
            <related-books relatedBookData="{{relatedBookData}}" relatedBookLoading="{{relatedBookLoading}}" noRelatedBookData="{{noRelatedBookData}}" bind:goBookDetails="goBookDetails"></related-books>
          <t-tab-panel
            label="相关图书"
            icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}"
            value="related_books"
            style="{{tabPanelstyle}}"
          >
            <related-books
              relatedBookData="{{relatedBookData}}"
              relatedBookLoading="{{relatedBookLoading}}"
              noRelatedBookData="{{noRelatedBookData}}"
              bind:goBookDetails="goBookDetails"
            ></related-books>
          </t-tab-panel>
        </t-tabs>
      </view>
@@ -180,41 +325,86 @@
    <movable-view class="movable-view" :x="{{x}}" :y="{{y}}" direction="all">
      <view class="applyBox" bindtap="goApply">
        <view class="box">
          <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" />
          <t-image
            src="/static/images/home/yangshuForm1.png"
            mode="heightFix"
            class="img"
          />
          <view class="num" wx:if="{{num > 0}}">{{num}}</view>
        </view>
      </view>
    </movable-view>
  </movable-area>
  <!-- 我要建议弹窗 -->
  <suggest class="suggest-component" id="suggest-component" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest>
  <suggest
    class="suggest-component"
    id="suggest-component"
    bookIcon="{{bookDetail.icon}}"
    bookName="{{bookDetail.name}}"
  ></suggest>
  <!-- 教学资源下载提示弹窗 -->
  <t-dialog class="teachDownloadDialog" visible="{{isShowTeachDownload}}" title="提示" content="请前往PC端下载" confirm-btn="{{ confirmBtn }}" bind:confirm="closeTeachDownload" />
  <t-dialog
    class="teachDownloadDialog"
    visible="{{isShowTeachDownload}}"
    title="提示"
    content="请前往PC端下载"
    confirm-btn="{{ confirmBtn }}"
    bind:confirm="closeTeachDownload"
  />
  <!-- 购买按钮 -->
  <view class="box-bottom">
    <view class="bottom-btn" bind:tap="appplyElectronicBook">
      <view>
        <t-image loading="" src="/static/images/bookService/detail/ebook.png"></t-image>
        <t-image
          loading=""
          src="/static/images/bookService/detail/ebook.png"
        ></t-image>
      </view>
      <view class="btn-text">电子样书申请</view>
    </view>
    <view class="bottom-btn" bind:tap="appplyPaperBook">
      <view>
        <t-image src="/static/images/bookService/detail/paper-book.png"></t-image>
        <t-image
          src="/static/images/bookService/detail/paper-book.png"
        ></t-image>
      </view>
      <view class="btn-text">纸质样书申请</view>
    </view>
    <view class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy || applicationState == 'overdue'}}">
    <view
      class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}"
      bind:tap="goRead"
      wx:if="{{!bookBuy || applicationState == 'overdue'}}"
    >
      <view>
        <t-image src="/static/images/bookService/detail/shidu.png"></t-image>
      </view>
      <view class="btn-text">试读</view>
    </view>
    <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy &&  bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">加入购物车</view>
    <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">立即购买</view>
    <view class="buy receiveColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}">免费领取</view>
    <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy || applicationState == 'Normal'}}">立即查看</view>
    <view
      class="shopCar shopCarColor"
      bind:tap="addBookShopcCar"
      wx:if="{{!bookBuy &&  bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}"
      >加入购物车</view
    >
    <view
      class="buy buyColor"
      bind:tap="buyBtn"
      wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}"
      >立即购买</view
    >
    <view
      class="buy receiveColor"
      bind:tap="buyBtn"
      wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}"
      >免费领取</view
    >
    <view
      class="buy read"
      bind:tap="goRead"
      wx:if="{{bookBuy || applicationState == 'Normal'}}"
      >立即查看</view
    >
  </view>
</view>
<view wx:if="{{dialogBox}}">
@@ -224,12 +414,19 @@
      <view class="row-info">
        <view class="body">
          <view class="dialog-title">文件上传</view>
          <view style="width: 100%; height: 2rpx; background-color: #f4f4f4"></view>
          <view
            style="width: 100%; height: 2rpx; background-color: #f4f4f4"
          ></view>
          <view class="from-item">
            <view class="label"> <text class="icon">*</text>资源名称: </view>
            <view class="item-content">
              <view class="inputBox1">
                <t-input placeholder="输入资源名称" borderless value="{{resourceInfo.resourceName}}" bindchange="onNameInput" />
                <t-input
                  placeholder="输入资源名称"
                  borderless
                  value="{{resourceInfo.resourceName}}"
                  bindchange="onNameInput"
                />
              </view>
            </view>
          </view>
@@ -239,8 +436,25 @@
              <!-- <view class="inputBox1">
                <t-input placeholder="输入资源类型" borderless value="{{resourceInfo.fileType}}" bindchange="onFileTypeInput" />
              </view> -->
              <t-cell class="mb-16" title="" arrow hover note="{{resourceInfo.fileType}}" bind:click="onResourcePicker" />
              <t-picker visible="{{resourceVisible}}" value="{{resourceValue}}" data-key="resource" title="选择资源类型" cancelBtn="取消" confirmBtn="确认" usingCustomNavbar bindchange="onPickerChange" bindcancel="onPickerCancel">
              <t-cell
                class="mb-16"
                title=""
                arrow
                hover
                note="{{resourceInfo.fileType}}"
                bind:click="onResourcePicker"
              />
              <t-picker
                visible="{{resourceVisible}}"
                value="{{resourceValue}}"
                data-key="resource"
                title="选择资源类型"
                cancelBtn="取消"
                confirmBtn="确认"
                usingCustomNavbar
                bindchange="onPickerChange"
                bindcancel="onPickerCancel"
              >
                <t-picker-item options="{{fileTypeList}}" />
              </t-picker>
            </view>
@@ -249,24 +463,51 @@
            <view class="label">文件描述:</view>
            <view class="item-content">
              <view class="inputBox1">
                <t-textarea placeholder="请输入文件描述" value="{{resourceInfo.description}}" disableDefaultPadding="{{true}}" autosize="{{true}}" maxlength="300" indicator bind:change="textareaChange" />
                <t-textarea
                  placeholder="请输入文件描述"
                  value="{{resourceInfo.description}}"
                  disableDefaultPadding="{{true}}"
                  autosize="{{true}}"
                  maxlength="300"
                  indicator
                  bind:change="textareaChange"
                />
              </view>
            </view>
          </view>
          <view class="from-item">
            <view class="label"> <text class="icon">*</text>上传文件: </view>
            <view class="item-content">
              <t-button size="small" class="right-btn" bind:tap="uploadPicture" wx:if="{{isShowUp}}">点击上传</t-button>
              <view wx:if="{{!isShowUp && fileList.length > 0}}" class="fileList">
              <t-button
                size="small"
                class="right-btn"
                bind:tap="uploadPicture"
                wx:if="{{isShowUp}}"
                >点击上传</t-button
              >
              <view
                wx:if="{{!isShowUp && fileList.length > 0}}"
                class="fileList"
              >
                <text>{{fileList[0].name}}</text>
                <image src="/static/images/bookService/detail/deleteHover.png" class="deleteBtn" data-md5="{{fileList[0].md5}}" bind:tap="handleRemove" />
                <image
                  src="/static/images/bookService/detail/deleteHover.png"
                  class="deleteBtn"
                  data-md5="{{fileList[0].md5}}"
                  bind:tap="handleRemove"
                />
              </view>
            </view>
            <view class="tip">注:文件大小不得超过50MB</view>
          </view>
          <view class="from-item">
            <view class="protocolBox">
              <t-checkbox label="同意" icon="rectangle" checked="{{resourceInfo.agree}}" bind:change="onChange" />
              <t-checkbox
                label="同意"
                icon="rectangle"
                checked="{{resourceInfo.agree}}"
                bind:change="onChange"
              />
              <text class="wait" bind:tap="getAgreement">《授权同意书》</text>
            </view>
          </view>
@@ -281,12 +522,22 @@
</view>
<view class="popupBox">
  <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center">
  <t-popup
    visible="{{protocolShow}}"
    bind:visible-change="onVisibleChange"
    placement="center"
  >
    <view class="block">
      <view class="protocol">
        <rich-text space="emsp" nodes="{{protocolTxt}}" class="content" />
      </view>
      <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseProtocol" />
      <t-icon
        t-class="close-btn"
        name="close-circle"
        size="32"
        color="#fff"
        bind:tap="onCloseProtocol"
      />
    </view>
  </t-popup>
</view>
packageDomain/pages/publickBookForm/index.js
@@ -35,7 +35,8 @@
    },
    phoneError: false,
    emailError: false,
    loading: false
    loading: false,
    isKeyboard: false
  },
  /**
@@ -78,6 +79,22 @@
  onUnload() {
  },
  scroll() {
    // 监听视图滚动,手动收起键盘
    if (this.data.isKeyboard) {
      console.log(1);
      wx.hideKeyboard()
    }
  },
  // 监听键盘弹起和收起
  bindkeyboardheightchange(e) {
    // 键盘高度
    const height = e.detail.height;
    this.setData({
      isKeyboard: height ? true : false
    })
  },
  //获取字段
  getType() {
    app.MG.resource.getCmsTypeByRefCode({
packageDomain/pages/publickBookForm/index.wxml
@@ -1,103 +1,218 @@
<view class="container" style="height:calc(100vh + {{keyboardHeight ? (keyboardHeight + 'px'):'0'}});padding-bottom:calc(180rpx +  {{keyboardHeight ?  120 + 'px':0}}) ">
  <scroll-view class="scroll content" scroll-y>
    <view class="tips"> 诚挚的欢迎您投稿出书,并郑重承诺:我们将认真审阅所有的来稿,以令人信服的效率、质量和稿酬择优出版! </view>
<view class="container">
  <scroll-view class="scroll content" scroll-y="{{true}}" bindscroll="scroll">
    <view class="tips">
      诚挚的欢迎您投稿出书,并郑重承诺:我们将认真审阅所有的来稿,以令人信服的效率、质量和稿酬择优出版!
    </view>
    <view class="page-body">
      <view class=" baseInfoBox">
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>选题名称: </view>
          <view class="item-content">
            <t-textarea placeholder="丛书要列出总名称和各本书的名称" value="{{teacherInfo.topicName}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicNameInput" />
            <t-textarea
              placeholder="丛书要列出总名称和各本书的名称"
              value="{{teacherInfo.topicName}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onTopicNameInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>申报人: </view>
          <view class="item-content">
            <t-input placeholder="请输入申报人姓名" borderless value="{{teacherInfo.declarer}}" bindchange="onDeclarerInput" />
            <t-input
              placeholder="请输入申报人姓名"
              borderless
              value="{{teacherInfo.declarer}}"
              bindchange="onDeclarerInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>申报单位: </view>
          <view class="item-content">
            <t-input placeholder="请输入申报单位" borderless value="{{teacherInfo.declarationUnit}}" bindchange="ondeclarationUnitInput" />
            <t-input
              placeholder="请输入申报单位"
              borderless
              value="{{teacherInfo.declarationUnit}}"
              bindchange="ondeclarationUnitInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>学科专业: </view>
          <view class="item-content">
            <t-input placeholder="请输入学科专业" borderless value="{{teacherInfo.disciplineMajor}}" bindchange="onDisciplineMajorInput" />
            <t-input
              placeholder="请输入学科专业"
              borderless
              value="{{teacherInfo.disciplineMajor}}"
              bindchange="onDisciplineMajorInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>作者基本情况: </view>
          <view class="item-content">
            <t-textarea placeholder="姓名、职务、研究领域、思想倾向、师德师风、学术水平、研究成果等" value="{{teacherInfo.authorBasicInformation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onAuthorBasicInfoInput" />
            <t-textarea
              placeholder="姓名、职务、研究领域、思想倾向、师德师风、学术水平、研究成果等"
              value="{{teacherInfo.authorBasicInformation}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onAuthorBasicInfoInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>手机号: </view>
          <view class="item-content">
            <t-input placeholder="输入手机号码" borderless value="{{teacherInfo.phone}}" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" />
            <t-input
              placeholder="输入手机号码"
              borderless
              value="{{teacherInfo.phone}}"
              type="number"
              tips="{{phoneError ? '手机号输入不正确' : ''}}"
              bindchange="onPhoneInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>邮箱: </view>
          <view class="item-content">
            <t-input placeholder="输入邮箱" borderless value="{{teacherInfo.email}}" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" />
            <t-input
              placeholder="输入邮箱"
              borderless
              value="{{teacherInfo.email}}"
              tips="{{emailError ? '邮箱输入不正确' : ''}}"
              bindchange="onEmailInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>读者对象: </view>
          <view class="item-content">
            <t-input placeholder="定位、范围、数量等" borderless value="{{teacherInfo.targetReaders}}" bindchange="onTargetReadersInput" />
            <t-input
              placeholder="定位、范围、数量等"
              borderless
              value="{{teacherInfo.targetReaders}}"
              bindchange="onTargetReadersInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="icon">*</text>选题特色: </view>
          <view class="item-content">
            <t-textarea placeholder="选题背景、主要内容、出版价值等" value="{{teacherInfo.topicFeatures}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicFeaturesInput" />
            <t-textarea
              placeholder="选题背景、主要内容、出版价值等"
              value="{{teacherInfo.topicFeatures}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onTopicFeaturesInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="empty"></text>选题学术影响与预期社会效益: </view>
          <view class="label">
            <text class="empty"></text>选题学术影响与预期社会效益:
          </view>
          <view class="item-content">
            <t-textarea placeholder="选题学术影响与预期社会效益" value="{{teacherInfo.topicImpactAndExpected}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicImpactAndExpectedInput" />
            <t-textarea
              placeholder="选题学术影响与预期社会效益"
              value="{{teacherInfo.topicImpactAndExpected}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onTopicImpactAndExpectedInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="empty"></text>选题的进度安排: </view>
          <view class="label">
            <text class="empty"></text>选题的进度安排:
          </view>
          <view class="item-content">
            <t-textarea placeholder="预计来稿时间、出版时间等" value="{{teacherInfo.topicProgress}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicProgressInput" />
            <t-textarea
              placeholder="预计来稿时间、出版时间等"
              value="{{teacherInfo.topicProgress}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onTopicProgressInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="empty"></text>市场分析: </view>
          <view class="item-content">
            <t-textarea placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费" value="{{teacherInfo.marketAnalysis}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMarketAnalysisInput" />
            <t-textarea
              placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费"
              value="{{teacherInfo.marketAnalysis}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onMarketAnalysisInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="empty"></text>营销与宣传推广计划: </view>
          <view class="label">
            <text class="empty"></text>营销与宣传推广计划:
          </view>
          <view class="item-content">
            <t-textarea placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费" value="{{teacherInfo.marketingAndPromotionPlan}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMarketingAndPromotionPlanInput" />
            <t-textarea
              placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费"
              value="{{teacherInfo.marketingAndPromotionPlan}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onMarketingAndPromotionPlanInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="empty"></text>配套数字资源开发方案: </view>
          <view class="label">
            <text class="empty"></text>配套数字资源开发方案:
          </view>
          <view class="item-content">
            <t-textarea placeholder="配套数字资源名称、类型、内容、经费预算、效益分析等" value="{{teacherInfo.digitalResourceDevelopmentPlan}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="ondigitalResourceInput" />
            <t-textarea
              placeholder="配套数字资源名称、类型、内容、经费预算、效益分析等"
              value="{{teacherInfo.digitalResourceDevelopmentPlan}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="ondigitalResourceInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="from-item">
          <view class="label"> <text class="empty"></text>存在的其他问题: </view>
          <view class="label">
            <text class="empty"></text>存在的其他问题:
          </view>
          <view class="item-content">
            <t-textarea placeholder="请输入其他问题" value="{{teacherInfo.otherExistingIssues}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onOtherExistingIssuesInput" />
            <t-textarea
              placeholder="请输入其他问题"
              value="{{teacherInfo.otherExistingIssues}}"
              disableDefaultPadding="{{true}}"
              autosize="{{autosize}}"
              bindchange="onOtherExistingIssuesInput"
              bindkeyboardheightchange="bindkeyboardheightchange"
            />
          </view>
        </view>
        <view class="btn-area">
          <button class="submit" bindtap="submit" loading="{{loading}}">提交</button>
          <button class="submit" bindtap="submit" loading="{{loading}}">
            提交
          </button>
        </view>
      </view>
    </view>
  </scroll-view>
</view>
packageDomain/pages/publickBookForm/index.wxss
@@ -5,7 +5,7 @@
.container {
  width: 100vw;
  height: 100vh;
  height: 100%;
}
.content {
packageDomain/pages/resourceDetails/myAudio/index.js
@@ -45,7 +45,6 @@
    myAudioDuration: '00:00', // 视频时间
    myAudioCurrent: '00:00', // 当前播放进度
    isplay: false, //是否默认播放,
    selectId: '',
    speed: 1.0,
    myAudioPos: '',
    startTime: "", //进入页面当前时间
@@ -145,14 +144,17 @@
   * 生命周期函数--监听页面隐藏
   */
  onHide() {
    // this.setData({
    //   pauseTime: Date.now()
    // })
    // if (wx.getStorageSync(app.config.tokenKey)) {
    //   let duration = this.data.pauseTime - this.data.startTime
    //   this.count(duration)
    // }
    // this.setPlayerList()
    this.setData({
      pauseTime: Date.now()
      isplay: true
    })
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
    this.setPlayerList()
  },
  /**
@@ -162,29 +164,24 @@
   * 
   */
  onUnload() {
    // this.setData({
    //   pauseTime: Date.now()
    // })
    // if (wx.getStorageSync(app.config.tokenKey)) {
    //   let duration = this.data.pauseTime - this.data.startTime
    //   this.count(duration)
    // }
    // myAudio.src = ''
    // myAudio.destroy()
    this.setData({
      // myAudioPos: '',
      isplay: false, //是否默认播放,
      myAudioCurrent: '00:00', // 当前播放进度
      showData: '',
      speed: 1.0,
      pauseTime: Date.now()
    });
    myAudio.playbackRate = this.data.speed;
    // 停止音频播放
    myAudio.stop();
    // 销毁 InnerAudioContext 实例
    // myAudio.destroy();
    // 统计学习时长
    if (wx.getStorageSync(app.config.tokenKey)) {
      let duration = this.data.pauseTime - this.data.startTime
      this.count(duration)
    }
    this.setPlayerList()
  },
  count(timeStr) {
@@ -203,6 +200,7 @@
    if (this.data.cmsId) {
      data.cmsItemId = this.data.cmsId
    }
    console.log('统计', data)
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  /**
@@ -348,11 +346,9 @@
    if (this.data.showData != '') {
      this.setData({
        titleName: item.name,
        selectId: item.id,
        selectedId: e.currentTarget.dataset.index,
        showData: '',
        activeId: item.id
      })
      if (item.selectType == "audio" || item.learnSelectType === "audio") {
        if (this.data.formPath == 'jsek_cloudLearning') {
@@ -645,9 +641,6 @@
        myAudioCurrent: '00:00',
        myAudioPos: '',
      })
    });
    //进度条变化   
@@ -680,57 +673,6 @@
    });
  },
  //右切换
  onLeftSwitch() {
    this.setData({
      speed: 1.0,
      myAudioCurrent: '00:00'
    })
    const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId)
    if (this.data.threeLeveData[index - 1]) {
      this.changeItem(this.data.threeLeveData[index - 1])
      this.setData({
        selectedId: index - 1,
      })
    } else {
      console.log('已经是第一首了');
    }
  },
  //右切换
  onRightSwitch() {
    this.setData({
      speed: 1.0,
      myAudioCurrent: '00:00'
    })
    const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId)
    if (this.data.threeLeveData[index + 1]) {
      this.changeItem(this.data.threeLeveData[index + 1])
      this.setData({
        selectedId: index + 1,
      })
    } else {
      console.log('已经是最后一首了');
    }
  },
  // 左右切换
  changeItem(item) {
    if (this.data.showData != '') {
      this.setData({
        showData: ''
      })
    }
    this.setData({
      titleName: item.name,
      selectId: item.id
    })
    if (item.selectType == "audio") {
      this.setData({
        showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file
      })
      this.pubulicPlayFun()
    }
  },
  // 播放倍速
  onSpeed() {
    let c = this.data.speed;
@@ -827,12 +769,12 @@
  setPlayerList() {
    let that = this
    if (that.data.progress > 0) {
      let index = that.data.playerList.findIndex((itemData) => itemData.cmsItemId == that.data.selectId)
      let index = that.data.playerList.findIndex((itemData) => itemData.cmsItemId == that.data.activeId)
      if (index > -1) {
        that.data.playerList.splice(index, 1)
      }
      that.data.playerList.push({
        cmsItemId: that.data.selectId,
        cmsItemId: that.data.activeId,
        progress: that.data.progress
      })
      app.MG.identity
packageDomain/pages/resourceDetails/myAudio/index.wxml
@@ -22,10 +22,7 @@
    <!-- 视频播放的按钮 -->
    <view class="bigFunctionBox">
      <view class="functionBox">
        <!-- 左切换 -->
        <!-- <view class="leftSwitchBox  color" bind:tap="onLeftSwitch">
        <t-icon name="previous" size="24" />
      </view> -->
        <!-- 暂停播放 -->
        <view class="audioIconBox color" style="margin-left: 30rpx; margin-right: 10rpx">
@@ -39,10 +36,7 @@
          </view>
        </view>
        <slider style="width: 300rpx" activeColor="#FF6C00" class="mp-slider-bar" block-size="16" value="{{myAudioPos}}" bindchange="hanle_slider_change"></slider>
        <!-- 右切换 -->
        <!-- <view class="rightSwitchBox color" bind:tap="onRightSwitch">
        <t-icon name="next" size="24" />
      </view> -->
        <!-- 时间 -->
        <view class="timeBox">
packageDomain/pages/sampleBookList/applicationForm/index.js
@@ -410,14 +410,14 @@
  // 监听页面软键盘弹起手动推动页面
  scrollToInput(keyboardHeight, scrollTop) {
    this.setData({
      keyboardHeight,
      keyboardHeight: keyboardHeight ? keyboardHeight + 300 : 0,
    });
    if (scrollTop) {
      try {
        this.getScrollOffset().then((lastScrollTop) => {
          wx.pageScrollTo({
            // 如果已经存在滚动,在此基础上继续滚
            scrollTop: lastScrollTop ? lastScrollTop + scrollTop : scrollTop,
            scrollTop: lastScrollTop ? lastScrollTop + scrollTop + 100 : scrollTop + 200,
            duration: 300,
          });
        });
packageDomain/pages/sampleBookList/applicationForm/index.wxml
@@ -1,34 +1,62 @@
<view class="container" style="height:calc(100vh + {{keyboardHeight ? (keyboardHeight + 'px'):'0'}});padding-bottom:calc(180rpx+  {{keyboardHeight ?  120 + 'px':0}})">
  <t-tabs t-class="t-tabs" defaultValue="{{active}}" split="{{false}}" bind:change="tabClick" show-bottom-line="false">
<view class="tab">
  <t-tabs
    t-class="t-tabs"
    defaultValue="{{active}}"
    split="{{false}}"
    bind:change="tabClick"
    show-bottom-line="false"
  >
    <t-tab-panel label="纸质样书" value="0" />
    <t-tab-panel label="电子样书" value="1" />
  </t-tabs>
  <view class="page-content">
    <view class="con-bg"></view>
    <scroll-view class="scroll content" scroll-y>
</view>
      <view class="bookListBox">
        <view class="tips">
          <rich-text space="emsp" nodes="{{description}}" class="content" />
        </view>
        <view class="bookList">
          <view wx:if="{{bookList.length > 0}}">
            <view wx:for="{{bookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="textbooksItemBox">
      <view
        wx:for="{{bookList}}"
        wx:for-item="item"
        wx:for-index="index"
        wx:key="index"
        class="textbooksItemBox"
      >
              <t-swipe-cell>
                <t-cell title="左滑单操作" note="辅助信息" bordered="{{false}}">
                  <view class="listItem flex">
                    <view class="specialSubject-img">
                      <image src="{{item.icon}}" mode="aspectFill" class="img" wx:if="{{item.icon}}" />
                      <image src="/static/images/default-book-img.png" mode="aspectFill" class="img" wx:else="" />
                <image
                  src="{{item.icon}}"
                  mode="aspectFill"
                  class="img"
                  wx:if="{{item.icon}}"
                />
                <image
                  src="/static/images/default-book-img.png"
                  mode="aspectFill"
                  class="img"
                  wx:else=""
                />
                    </view>
                    <view class="body-info">
                      <view class="name">{{item.title}}</view>
                      <view class="author">作者:{{item.author}}</view>
                      <view class="author">ISBN:{{item.isbn}}</view>
                      <view class="author" wx:if="{{item.publicationDate}}">出版时间:{{item.publicationDate}}</view>
                <view class="author" wx:if="{{item.publicationDate}}"
                  >出版时间:{{item.publicationDate}}</view
                >
                    </view>
                  </view>
                </t-cell>
                <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-book="{{item}}">删除</view>
          <view
            slot="right"
            class="btn delete-btn"
            bind:tap="onDelete"
            data-book="{{item}}"
            >删除</view
          >
              </t-swipe-cell>
            </view>
          </view>
@@ -55,26 +83,55 @@
          <view class="item form-input-1">
            <text class="label"><text class="icon">*</text>姓名:</text>
            <view class="item-content">
              <t-input placeholder="请输入真实姓名" borderless value="{{contactInfo.user}}" bindchange="onFullNameInput" adjust-position="{{isIos?false:true}}" bindkeyboardheightchange="bindkeyboardheightchange" bindblur="changeParam" data-class="form-input-1" />
        <t-input
          placeholder="请输入真实姓名"
          borderless
          value="{{contactInfo.user}}"
          bindchange="onFullNameInput"
          adjust-position="{{false}}"
          bindkeyboardheightchange="bindkeyboardheightchange"
          bindblur="changeParam"
          data-class="form-input-1"
        />
            </view>
          </view>
          <view class="item form-input-2">
            <text class="label"><text class="icon">*</text>联系电话:</text>
            <view class="item-content">
              <t-input placeholder="输入联系电话" borderless value="{{contactInfo.phone}}" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" adjust-position="{{isIos?false:true}}" bindkeyboardheightchange="bindkeyboardheightchange" bindblur="changeParam" data-class="form-input-2" />
        <t-input
          placeholder="输入联系电话"
          borderless
          value="{{contactInfo.phone}}"
          type="number"
          tips="{{phoneError ? '手机号输入不正确' : ''}}"
          bindchange="onPhoneInput"
          adjust-position="{{false}}"
          bindkeyboardheightchange="bindkeyboardheightchange"
          bindblur="changeParam"
          data-class="form-input-2"
        />
            </view>
          </view>
          <view class="item form-input-3">
            <text class="label"><text class="icon">*</text>详细地址:</text>
            <view class="item-content">
              <t-input placeholder="请输入详细地址" borderless value="{{contactInfo.address}}" bindchange="onAddressInput" adjust-position="{{isIos?false:true}}" bindkeyboardheightchange="bindkeyboardheightchange" bindblur="changeParam" data-class="form-input-3" />
        <t-input
          placeholder="请输入详细地址"
          borderless
          value="{{contactInfo.address}}"
          bindchange="onAddressInput"
          adjust-position="{{false}}"
          bindkeyboardheightchange="bindkeyboardheightchange"
          bindblur="changeParam"
          data-class="form-input-3"
        />
            </view>
          </view>
        </view>
      </view>
      <view class="btn-area">
<view
  class="btn-area"
  style="padding-bottom: {{keyboardHeight ? keyboardHeight + 'rpx' : '60rpx'}}"
>
        <button class="submit" bindtap="submit">提交</button>
      </view>
    </scroll-view>
  </view>
</view>
packageDomain/pages/sampleBookList/applicationForm/index.wxss
@@ -1,10 +1,12 @@
page {
  background-color: #f0f2f5 !important;
  overflow-y: auto !important;
  position: relative;
  background-color: #F2F3F8 !important;
}
.container {
  width: 100%;
  height: 100vh;
  height: 100%;
}
@@ -28,13 +30,18 @@
}
.t-tabs {
.tab {
  width: 100%;
  position: fixed !important;
  top: 0;
  left: 0;
  padding-top: 20rpx;
  background-color: #F2F3F8 !important;
}
.t-tabs {
  background: none !important;
  width: 100%;
  position: fixed;
  top: 0rpx;
  left: 0;
  z-index: 1
}
@@ -77,8 +84,7 @@
  background: #fff;
  min-height: 200rpx;
  border-radius: 10rpx;
  padding: 60rpx 40rpx 40rpx 40rpx;
  padding: 180rpx 40rpx 40rpx 40rpx;
}
.tips {
packageDomain/pages/sampleBookList/index.js
@@ -84,6 +84,7 @@
    num: 0,
    x: 280,
    y: 300,
    scrollTop: 0
  },
  /**
@@ -205,6 +206,17 @@
    }
    that.getBookList(false);
  },
  onHide() {
    const query = wx.createSelectorQuery()
    query.select('#scrollView').scrollOffset(res => {
      console.log(1, res);
      this.setData({
        scrollTop: res.scrollTop
      })
      console.log('隐藏', this.data.scrollTop);
    }).exec()
  },
  goBack() {
    wx.navigateBack();
  },
packageDomain/pages/sampleBookList/index.wxml
@@ -73,10 +73,12 @@
        <!-- model:scroll-top="{{setScrollValue}}" -->
        <scroll-view
          class="scroll content"
          id="scrollView"
          bind:scroll="onPageScroll"
          scroll-y
          enable-passive="{{true}}"
          refresher-enabled="{{true}}"
          lower-threshold="{{200}}"
          lower-threshold="{{100}}"
          refresher-threshold="{{180}}"
          refresher-default-style="none"
          refresher-triggered="{{triggered}}"
packageDomain/pages/sampleBookList/index.wxss
@@ -300,9 +300,17 @@
  margin-left: 10rpx;
}
movable-area {
  pointer-events: auto;
}
.movable-area {
  width: 100%;
  height: 100%;
}
movable-view {
  pointer-events: auto;
}
.movable-view {
@@ -355,4 +363,3 @@
.t-search__input-box {
  height: 70rpx !important;
}
pages/cart/index.js
@@ -101,7 +101,7 @@
      searchList: []
    };
    app.MG.store.getShoppingCartProductList(query).then(res => {
      console.log(res);
      console.log(res.datas);
      this.setData({
        totalSize: res.totalSize
      })
@@ -119,8 +119,6 @@
        item.type = type; // 将type设置为item对象的属性,而不是使用setData
        item.name = item.linkCmsItems[0].name ? item.productMonWithLinkDto.product.name + ':' + item.linkCmsItems[0].name : item.productMonWithLinkDto.product.name
        item.saleMethod.price = this.numFormat(item.saleMethod.price)
        //
        if (item.productMonWithLinkDto.links[0].storeRefCode == 'jsek_digitalTextbooks') {
          item.typeTxt = '数字教材'
          item.productType = "数字教材"
@@ -131,7 +129,7 @@
          item.typeTxt = '电子书'
          item.productType = "图书服务-电子书"
          if (item.saleMethod.type == 'createProductItemSaleMethod') {
          if (item.saleMethod.type == 'createProductItemSaleMethod' || item.saleMethod.type == 'createProductFolderSaleMethod') {
            item.typeTxt = '云学习'
            item.productType = "图书服务-云学习"
          }
pages/cart/index.wxml
@@ -4,7 +4,11 @@
<!-- loading
hidden -->
<view hidden="{{hidden}}">
  <scroll-view scroll-y="{{true}}" class="outsideContentBox" bindscrolltolower="onScrollToLower">
  <scroll-view
    scroll-y="{{true}}"
    class="outsideContentBox"
    bindscrolltolower="onScrollToLower"
  >
    <view>
      <!-- <checkbox-group bindchange="HandelItemChange"> -->
      <view wx:if="{{shoppingCartData.length <= 0}}" class="noDataBox">
@@ -12,7 +16,13 @@
        <empty />
      </view>
      <!-- <button bind:tap="onLogin"> 去登录</button> -->
      <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index" opened="{{swipeOpened}}">
      <t-swipe-cell
        wx:for="{{shoppingCartData}}"
        wx:key="index"
        wx:for-item="item"
        wx:for-index="index"
        opened="{{swipeOpened}}"
      >
        <view class="itemWarp">
          <t-cell bordered="{{false}}">
            <view slot="title" class="titleBox">
@@ -31,8 +41,9 @@
            </view>
            <view slot="description" class="descriptionBox">
              <view>
                <view class="textBox" wx:if="{{item.type == 'product'}}">图书服务-电子书</view>
                <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view>
                <!-- <view class="textBox" wx:if="{{item.type == 'product'}}">图书服务-电子书</view>
                <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view> -->
                <view class="textBox"> {{item.productType}} </view>
              </view>
              <view wx:if="{{item.saleMethod.price != 0}}" class="price-box">
                ¥{{item.saleMethod.price }}
@@ -41,19 +52,46 @@
            </view>
            <view slot="left-icon" class="left-icon">
              <view class="contentCheckbox">
                <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" />
                <t-checkbox
                  icon="rectangle"
                  value=" {{item.id}}"
                  data-item="{{item}}"
                  checked="{{item.checked}}"
                  bindchange="HandelItemChange"
                />
              </view>
              <view class="left-image" data-item="{{item}}" bind:tap="onBook">
                <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" />
                <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" />
                <image
                  wx:if="{{item.imgUrl}}"
                  src="{{item.imgUrl}}"
                  class="imageStyle"
                  mode="aspectFit"
                />
                <image
                  wx:else
                  src="/static/images/default-book-img.png"
                  class="imageStyle"
                  mode="aspectFit"
                />
              </view>
            </view>
          </t-cell>
        </view>
        <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">删除</view>
        <view
          slot="right"
          class="btn delete-btn"
          bind:tap="onDelete"
          data-item="{{item}}"
          >删除</view
        >
      </t-swipe-cell>
      <view wx:if="{{shoppingCartData.length > 0}}" class="bottom-box">
        <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
        <t-loading
          theme="circular"
          size="40rpx"
          class="wrapper"
          wx:if="{{isMore == true}}"
        />
        <text wx:if="{{isMore == false}}">没有更多了</text>
      </view>
    </view>
@@ -63,13 +101,22 @@
  <view class="bottomBox">
    <view class="checkGroupBox">
      <checkbox-group bindchange="bottomChange">
        <checkbox disabled="{{onDisabled}}" value="全选" checked="{{checkAll}}">全选</checkbox>
        <checkbox disabled="{{onDisabled}}" value="全选" checked="{{checkAll}}"
          >全选</checkbox
        >
      </checkbox-group>
    </view>
    <view class="settlementBox">
      <view class="totalPrice">总价:<text class="totalPriceText">¥{{totalPrice}}</text></view>
      <view class="totalPrice"
        >总价:<text class="totalPriceText">¥{{totalPrice}}</text></view
      >
      <view class="buttonBox">
        <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage">
        <t-button
          class="tButtonBox"
          size="small"
          shape="round"
          bind:tap="goPaymentPage"
        >
          <view>去结算({{selectedCount}})</view>
        </t-button>
      </view>
pages/digitalCourses/digitalCoursesDetails/index.js
@@ -174,9 +174,10 @@
    this.digitalCoursesDetailsGet(options.id)
    this.getPlayerList()
    this.getType()
    // this.setData({
    //   userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
    // })
    this.setData({
      userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name,
    })
    console.log('1', options.id);
  },
  /**
@@ -190,6 +191,10 @@
   * 生命周期函数--监听页面显示
   */
  onShow() {
    if (this.data.tabValue == 2) {
      this.getPlayerList()
      this.getResource()
    }
  },
@@ -481,7 +486,6 @@
        res.datas.cmsDatas[0].datas.forEach((item) => {
          if (item.type == 'questionBankFolder' || item.type == 'questionBankItem') {
            test.push(item)
          } else if (item.type != "resourceItem") {
            this.data.playerList.forEach(pItem => {
              if (pItem.cmsItemId == item.id) {
@@ -493,9 +497,7 @@
          if (item.type == 'productItem') {
            learnItemList.push(item)
          }
        })
        if (this.data.selectActive === 'learn') {
          let list = []
          // 测试 6位// 正式 5位//  测试调用传20,内部7  正式调用传17 内部传6
@@ -514,6 +516,7 @@
              learnList: list,
              openTeachids: result,
            });
            console.log(1, this.data.learnList, this.data.playerList)
          }
        } else {
          const data = test.filter(
@@ -878,6 +881,7 @@
            })
            .then((res) => {
              if (res) {
                this.digitalCoursesDetailsGet(this.data.digitalsData.id);
                wx.showToast({
                  title: "领取成功",
                  icon: "none",
pages/digitalCourses/digitalCoursesDetails/index.wxss
@@ -200,7 +200,7 @@
  height: 68rpx;
  line-height: 68rpx;
  text-align: center;
  color: #ff6c00;
  flex: 1;
}
pages/digitalCourses/index.js
@@ -21,6 +21,7 @@
    activeItem: null,
    loading: false,
    contentLoading: false,
    noData:false,
    shoppingCartGetId: [],
    sorter: {
      value: "*",
@@ -132,7 +133,7 @@
  },
  getCourseTypeListList() {
    this.setData({
      loading: true
      loading: true,
    })
    const data = {
      path: '*',
@@ -230,6 +231,12 @@
      }
    }
    app.MG.store.getProductList(obj).then((res) => {
      if(!res.datas.length) {
        return this.setData({
          noData:true,
          contentLoading:false
        })
      }
      res.datas.forEach(item => {
        item.price = item.price.toFixed(2)
        item.productLinkInfo = JSON.parse(item.productLinkInfo)
pages/digitalCourses/index.wxml
@@ -5,20 +5,45 @@
  <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;">
    <view class="back-icon">
      <!-- <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> -->
      <image src="/static/images/digitalTextbooks/chevron-left.png" bind:tap="goBack" mode="aspectFit" />
      <image
        src="/static/images/digitalTextbooks/chevron-left.png"
        bind:tap="goBack"
        mode="aspectFit"
      />
    </view>
    <t-search model:value="{{searchValue}}" shape="round" placeholder="请输入课程名称/ISBN/课程负责人" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" />
    <t-search
      model:value="{{searchValue}}"
      shape="round"
      placeholder="请输入课程名称/ISBN/课程负责人"
      class="navBar-search"
      style="width: 464rpx"
      bind:submit="searchBook"
    />
  </view>
  <view class="heardTab">
    <view class="tabBox">
      <t-tabs defaultValue="{{active}}" bind:change="onTabsChange" t-class="custom-tabs">
        <t-tab-panel wx:for="{{tabList}}" wx:key="index" wx:for-item="item" label="{{item.name}}" value="{{index}}">
      <t-tabs
        defaultValue="{{active}}"
        bind:change="onTabsChange"
        t-class="custom-tabs"
      >
        <t-tab-panel
          wx:for="{{tabList}}"
          wx:key="index"
          wx:for-item="item"
          label="{{item.name}}"
          value="{{index}}"
        >
        </t-tab-panel>
      </t-tabs>
    </view>
    <view class="dropdown">
      <t-dropdown-menu>
        <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" />
        <t-dropdown-item
          options="{{sorter.options}}"
          default-value="{{sorter.value}}"
          bindchange="onSort"
        />
      </t-dropdown-menu>
    </view>
  </view>
@@ -26,17 +51,39 @@
    <view class="titleBox">
      <view class="frameBox"></view>
      <view class="titleTextBox">
        <image src="/static/images/digitalCourses/zhuantitaolun@2x.png" mode="aspectFit" />
        <image
          src="/static/images/digitalCourses/zhuantitaolun@2x.png"
          mode="aspectFit"
        />
      </view>
    </view>
  </view>
  <t-skeleton theme="paragraph" animation="gradient" loading="{{contentLoading}}" class="content-loading" wx:if="{{contentLoading}}"></t-skeleton>
  <scroll-view scroll-y="{{true}}" class="outsideContentBox" bindscrolltolower="onScrollToLower" wx:if="{{!contentLoading}}">
  <t-skeleton
    theme="paragraph"
    animation="gradient"
    loading="{{contentLoading}}"
    class="content-loading"
    wx:if="{{contentLoading}}"
  ></t-skeleton>
  <scroll-view
    scroll-y="{{true}}"
    class="outsideContentBox"
    bindscrolltolower="onScrollToLower"
    wx:if="{{!contentLoading}}"
  >
    <view class="ExternalInformationBox">
      <view class="informationBox" wx:for="{{courseList}}" wx:key="index" wx:for-item="item" data-item="{{item}}">
      <view
        class="informationBox"
        wx:for="{{courseList}}"
        wx:key="index"
        wx:for-item="item"
        data-item="{{item}}"
      >
        <view class="book-img" bind:tap="courseDetail" data-item="{{item}}">
          <image src="{{item.icon ? item.icon : 'https://jsek.bnuic.com/home/image/courseIcon.png'}}" mode="aspectFit" />
          <image
            src="{{item.icon ? item.icon : 'https://jsek.bnuic.com/home/image/courseIcon.png'}}"
            mode="aspectFit"
          />
        </view>
        <view class="book-Info">
          <view class="book-name" bind:tap="courseDetail" data-item="{{item}}">
@@ -57,7 +104,7 @@
        </view>
      </view>
    </view>
    <view wx:if="{{courseList.length <= 0 &&  !contentLoading}}" class="noDataBox">
    <view wx:if="{{noData}}" class="noDataBox">
      <t-empty icon="folder-open" description="暂无数据" font-size="80" />
    </view>
  </scroll-view>
pages/retrievalPage/index.wxml
@@ -4,7 +4,12 @@
<view class="outsideRetrievalPageBox" hidden="{{hidden}}">
  <view class="retrievalPageBox">
    <view class="example-search">
      <t-search bind:submit="onSearchSubmit" class="searchBox" model:value="{{searchVal}}" placeholder="请输入关键词/书名/ISBN/作者" />
      <t-search
        bind:submit="onSearchSubmit"
        class="searchBox"
        model:value="{{searchVal}}"
        placeholder="请输入关键词/书名/ISBN/作者/项目负责人"
      />
      <view class="cancellation" bind:tap="onCancellation">取消</view>
    </view>
  </view>
@@ -12,9 +17,15 @@
    <!-- Tab布局 -->
    <scroll-view scroll-x="{{true}}" class="scroll-x">
      <view class="navBox">
        <view class="titleBox" wx:for="{{tabList}}" bindtap="tabsOn" data-idx="{{item.index}}">
        <view
          class="titleBox"
          wx:for="{{tabList}}"
          bindtap="tabsOn"
          data-idx="{{item.index}}"
        >
          <view class="tabIndexBox">
            <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}">{{item.title}} ({{item.bookTotal}})
            <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}"
              >{{item.title}} ({{item.bookTotal}})
            </text>
          </view>
          <hr class="{{item.index == tabsId ? 'lineBox' : ''}}" />
@@ -22,22 +33,52 @@
      </view>
    </scroll-view>
    <!-- 内容布局 -->
    <swiper class="swiperTtemBox" bindchange="slideOn" current="{{tabsId}}" circular>
    <swiper
      class="swiperTtemBox"
      bindchange="slideOn"
      current="{{tabsId}}"
      circular
    >
      <!-- circular 启用循环滑动 -->
      <swiper-item>
        <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
        <scroll-view
          scroll-y="{{true}}"
          class="scrollViewBox"
          bindscrolltolower="onScrollToLower"
        >
          <view class="bookDataBox">
            <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook">
            <view
              class="bookDataForBox"
              wx:for="{{bookData}}"
              wx:key="index"
              wx:for-item="item"
              wx:for-index="index"
              data-item="{{item}}"
              bind:tap="onBook"
            >
              <view class="imageBox">
                <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" />
                <image wx:if="{{!item.icon}}" src="/static/images/default-book-img.png" mode="" />
                <image
                  wx:if="{{item.icon}}"
                  src="{{item.icon}}"
                  mode="aspectFit"
                />
                <image
                  wx:if="{{!item.icon}}"
                  src="/static/images/default-book-img.png"
                  mode=""
                />
              </view>
              <view class="bookDataNmae"> {{item.name}} </view>
              <view class="bookDataAuthor">{{item.author}}</view>
            </view>
          </view>
          <view wx:if="{{bookData.length}}" class="bottom-box">
            <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
            <t-loading
              theme="circular"
              size="40rpx"
              class="wrapper"
              wx:if="{{isMore == true}}"
            />
            <text wx:if="{{isMore == false}}">没有更多了</text>
          </view>
          <view wx:if="{{bookData.length <= 0}}" class="noDataBox">
@@ -47,11 +88,27 @@
        </scroll-view>
      </swiper-item>
      <swiper-item>
        <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
        <scroll-view
          scroll-y="{{true}}"
          class="scrollViewBox"
          bindscrolltolower="onScrollToLower"
        >
          <view class="listBox1">
            <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" data-item="{{item}}" bind:tap="underConstruction">
              <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"
                  data-item="{{item}}"
                  bind:tap="underConstruction"
                >
                  <view class="specialSubject-img-box">
                    <image src="{{item.icon}}" mode="aspectFill" />
                  </view>
@@ -62,9 +119,17 @@
                      <text>{{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="aspectFill" class="addCartImg" />
                      <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="aspectFill"
                        class="addCartImg"
                      />
                    </view>
                  </view>
                </view>
@@ -72,7 +137,12 @@
            </view>
          </view>
          <view wx:if="{{courseData.length != 0}}" class="bottom-box">
            <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
            <t-loading
              theme="circular"
              size="40rpx"
              class="wrapper"
              wx:if="{{isMore == true}}"
            />
            <text wx:if="{{isMore == false}}">没有更多了</text>
          </view>
          <view wx:if="{{courseData.length <= 0}}" class="noDataBox">
@@ -82,9 +152,21 @@
        </scroll-view>
      </swiper-item>
      <swiper-item>
        <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
        <scroll-view
          scroll-y="{{true}}"
          class="scrollViewBox"
          bindscrolltolower="onScrollToLower"
        >
          <view class="bookDataBox">
            <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="underConstruction">
            <view
              class="bookDataForBox"
              wx:for="{{digitalTextbooksData}}"
              wx:key="index"
              wx:for-item="item"
              wx:for-index="index"
              data-item="{{item}}"
              bind:tap="underConstruction"
            >
              <view class="imageBox">
                <image src="{{item.icon}}" mode="" />
              </view>
@@ -94,7 +176,12 @@
          </view>
          <view wx:if="{{digitalTextbooksData.length != 0}}" class="bottom-box">
            <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
            <t-loading
              theme="circular"
              size="40rpx"
              class="wrapper"
              wx:if="{{isMore == true}}"
            />
            <text wx:if="{{isMore == false}}">没有更多了</text>
          </view>
          <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox">
@@ -104,29 +191,62 @@
        </scroll-view>
      </swiper-item>
      <swiper-item>
        <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
        <scroll-view
          scroll-y="{{true}}"
          class="scrollViewBox"
          bindscrolltolower="onScrollToLower"
        >
          <view class="listBox">
            <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox" data-item="{{item}}" bind:tap="underConstruction">
              <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}">
            <view
              wx:for="{{seminarData}}"
              wx:for-item="item"
              wx:for-index="index"
              wx:key="index"
              class="listItemBox"
              data-item="{{item}}"
              bind:tap="underConstruction"
            >
              <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>
            </view>
          </view>
          <view wx:if="{{seminarData.length != 0}}" class="bottom-box">
            <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
            <t-loading
              theme="circular"
              size="40rpx"
              class="wrapper"
              wx:if="{{isMore == true}}"
            />
            <text wx:if="{{isMore == false}}">没有更多了</text>
          </view>
          <view wx:if="{{seminarData.length <= 0}}" class="noDataBox">
@@ -136,15 +256,44 @@
        </scroll-view>
      </swiper-item>
      <swiper-item>
        <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
        <scroll-view
          scroll-y="{{true}}"
          class="scrollViewBox"
          bindscrolltolower="onScrollToLower"
        >
          <view class="outsideHigherBox">
            <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index">
            <view
              class="higherBox"
              wx:for="{{bookFairData}}"
              wx:key="index"
              wx:for-item="item"
              wx:for-index="index"
            >
              <view class="outsideHigherImageBox">
                <view class="higherImageBox" bind:tap="openBookFair" data-item="{{item}}">
                <view
                  class="higherImageBox"
                  bind:tap="openBookFair"
                  data-item="{{item}}"
                >
                  <image src="{{item.icon}}" mode="aspectFill" />
                  <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" catch:tap="mailbox">
                    <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" />
                    <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" />
                  <view
                    class="downloadIcon"
                    data-item="{{item}}"
                    data-key="showWithInput"
                    catch:tap="mailbox"
                  >
                    <image
                      wx:if="{{determine}}"
                      class="download"
                      src="/static/images/bibliographyList/email-click.png"
                      mode="aspectFit"
                    />
                    <image
                      wx:else=""
                      class="downloadshiftin"
                      src="/static/images/bibliographyList/email.png"
                      mode="aspectFit"
                    />
                  </view>
                </view>
              </view>
@@ -153,7 +302,12 @@
          </view>
          <view wx:if="{{bookFairData.length != 0}}" class="bottom-box">
            <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
            <t-loading
              theme="circular"
              size="40rpx"
              class="wrapper"
              wx:if="{{isMore == true}}"
            />
            <text wx:if="{{isMore == false}}">没有更多了</text>
          </view>
          <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox">
@@ -163,21 +317,54 @@
        </scroll-view>
      </swiper-item>
      <swiper-item>
        <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower">
        <scroll-view
          scroll-y="{{true}}"
          class="scrollViewBox"
          bindscrolltolower="onScrollToLower"
        >
          <view class="outside">
            <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}">
              <image class="bookFairImage" wx:if="{{item.icon}}" src="{{item.icon}}" mode="" />
              <image class="bookFairImage" wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" />
            <view
              class="contentBox"
              wx:for="{{biblioClassificationData}}"
              wx:key="index"
              wx:for-item="item"
              wx:for-index="index"
              bindtap="onBookExhibitionDetails"
              data-item="{{item}}"
            >
              <image
                class="bookFairImage"
                wx:if="{{item.icon}}"
                src="{{item.icon}}"
                mode=""
              />
              <image
                class="bookFairImage"
                wx:else=""
                src="/static/images/bookExhibitionList/banner.png"
                mode=""
              />
              <view class="textBox" title="{{item.name}}">
                <text>{{item.subtitleName}}</text>
              </view>
            </view>
          </view>
          <view wx:if="{{biblioClassificationData.length != 0}}" class="bottom-box">
            <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" />
          <view
            wx:if="{{biblioClassificationData.length != 0}}"
            class="bottom-box"
          >
            <t-loading
              theme="circular"
              size="40rpx"
              class="wrapper"
              wx:if="{{isMore == true}}"
            />
            <text wx:if="{{isMore == false}}">没有更多了</text>
          </view>
          <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox">
          <view
            wx:if="{{biblioClassificationData.length <= 0}}"
            class="noDataBox"
          >
            <!-- <t-empty icon="folder-open" description="暂无数据" /> -->
            <empty />
          </view>