QYF-GitLab1
3 天以前 188a925be5b1024608eba034d1225e126b3134a8
资源扫码
5个文件已修改
162 ■■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/tree/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/document/index.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myAudio/index.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageDomain/pages/resourceDetails/myVideo/index.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
project.config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -316,7 +316,7 @@
        }
        wx.navigateTo({
          url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`,
          // url: '/packageDomain/pages/resourceDetails/myVideo/index?formPath=jsek_cloudLearning&parentName=mingxing&cmsId=161796&productLinkPath=161796\\161798\\165396\\162299&activeId=162299&parentProductLinkPath=161798\\165396&source=qrcode&bookName=&bookId=7129'
          // url: '/packageDomain/pages/resourceDetails/myVideo/index?formPath=jsek_cloudLearning&parentName=gggg&cmsId=137103&productLinkPath=137103\\137105\\159492&activeId=159492&parentProductLinkPath=137105&source=qrcode&bookName=fffff&bookId=6745'
        });
      }
      const token = wx.getStorageSync(app.config.tokenKey);
packageDomain/pages/resourceDetails/document/index.js
@@ -295,32 +295,10 @@
  // 判断当前目标是否已购买
  async getCmsDataByQrcode() {
    let query = {
      storeInfo: this.data.storeInfo,
      path: '*',
      queryType: '*',
      productId: this.data.bookId,
      itemId: this.data.activeId,
      itemFields: {
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
        resourcesClassification: [],
        isDownload: [],
        jsek_resourceBrief: [],
        jsek_link: [],
        jsek_questionBank: [],
        learnSelectType: []
      },
      pading: {
        start: 0,
        size: 999
      }
    }
    const data = await app.MG.store.getProductDetail(query)
    return data?.datas ?? []
    const query = {
      cmsItemId: Number(this.data.activeId)
    };
    return app.MG.file.checkCmsItem(query)
  },
  resourceDetailsData() {
@@ -411,19 +389,23 @@
      })
      if (this.data.source == 'qrcode') {
        let qrData = this.data.threeLeveData.find(ditem => ditem.id == this.data.activeId)
        const currentSaleMaths = await this.getCmsDataByQrcode()
        // 判断是否购买目录
        const catalg = currentSaleMaths?.saleMethod?.find(i => currentSaleMaths.purchasedSaleMethodIdList.includes(i.Id))
        // 判断是否购买资源本身
        const ownCms = qrData.saleMethods?.find(i => currentSaleMaths.purchasedSaleMethodIdList.includes(i.Id))
        if (catalg || ownCms) {
        const isBuyCms = await this.getCmsDataByQrcode() // 当前资源或父级目录是否购买
        const isDefualtPrice = this.data.bookDetail?.defaultSaleMethod?.price // 当前书的价默认销售方式价格是否为0
        const isBuyBook = this.data.bookDetail?.alreadyBuy // 当前书是否购买
        if (isBuyCms) {
          this.setData({
            threeLeveData: [qrData]
          })
        } else {
          this.setData({
            threeLeveData: []
          })
          if (isDefualtPrice == 0 || isBuyBook) {
            this.setData({
              threeLeveData: [qrData]
            })
          } else {
            this.setData({
              threeLeveData: []
            })
          }
        }
      } else {
        this.setData({
packageDomain/pages/resourceDetails/myAudio/index.js
@@ -349,32 +349,10 @@
  // 判断当前目标是否已购买
  async getCmsDataByQrcode() {
    let query = {
      storeInfo: this.data.storeInfo,
      path: '*',
      queryType: '*',
      productId: this.data.bookId,
      itemId: this.data.activeId,
      itemFields: {
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
        resourcesClassification: [],
        isDownload: [],
        jsek_resourceBrief: [],
        jsek_link: [],
        jsek_questionBank: [],
        learnSelectType: []
      },
      pading: {
        start: 0,
        size: 999
      }
    }
    const data = await app.MG.store.getProductDetail(query)
    return data?.datas ?? []
    const query = {
      cmsItemId: Number(this.data.activeId)
    };
    return app.MG.file.checkCmsItem(query)
  },
  resourceDetailsData() {
@@ -446,19 +424,23 @@
      });
      if (this.data.source == 'qrcode') {
        let qrData = this.data.threeLeveData.find(ditem => ditem.id == this.data.activeId)
        const currentSaleMaths = await this.getCmsDataByQrcode()
        // 判断是否购买目录
        const catalg = currentSaleMaths?.saleMethod?.find(i => currentSaleMaths.purchasedSaleMethodIdList.includes(i.Id))
        // 判断是否购买资源本身
        const ownCms = qrData.saleMethods?.find(i => currentSaleMaths.purchasedSaleMethodIdList.includes(i.Id))
        if (catalg || ownCms) {
        const isBuyCms = await this.getCmsDataByQrcode() // 当前资源或父级目录是否购买
        const isDefualtPrice = this.data.bookDetail?.defaultSaleMethod?.price // 当前书的价默认销售方式价格是否为0
        const isBuyBook = this.data.bookDetail?.alreadyBuy // 当前书是否购买
        if (isBuyCms) {
          this.setData({
            threeLeveData: [qrData]
          })
        } else {
          this.setData({
            threeLeveData: []
          })
          if (isDefualtPrice == 0 || isBuyBook) {
            this.setData({
              threeLeveData: [qrData]
            })
          } else {
            this.setData({
              threeLeveData: []
            })
          }
        }
      } else {
        this.setData({
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -332,32 +332,10 @@
  // 判断当前目标是否已购买
  async getCmsDataByQrcode() {
    let query = {
      storeInfo: this.data.storeInfo,
      path: '*',
      queryType: '*',
      productId: this.data.bookId,
      itemId: this.data.activeId,
      itemFields: {
        // 资源类型,试读文件,是否允许下载等参数
        selectType: [],
        freeFile: [],
        file: [],
        protectedFile: [],
        resourcesClassification: [],
        isDownload: [],
        jsek_resourceBrief: [],
        jsek_link: [],
        jsek_questionBank: [],
        learnSelectType: []
      },
      pading: {
        start: 0,
        size: 999
      }
    }
    const data = await app.MG.store.getProductDetail(query)
    return data?.datas ?? []
    const query = {
      cmsItemId: Number(this.data.activeId)
    };
    return app.MG.file.checkCmsItem(query)
  },
  resourceDetailsData() {
@@ -433,21 +411,23 @@
      })
      if (this.data.source == 'qrcode') {
        let qrData = this.data.threeLeveData.find(ditem => ditem.id == this.data.activeId)
        const currentSaleMaths = await this.getCmsDataByQrcode()
        // 判断是否购买目录
        const catalg = currentSaleMaths?.saleMethod?.find(i => currentSaleMaths.purchasedSaleMethodIdList.includes(i.Id))
        // 判断是否购买资源本身
        const ownCms = qrData?.saleMethods?.find(i => currentSaleMaths.purchasedSaleMethodIdList.includes(i.Id))
        if (catalg || ownCms) {
          if (qrData) {
        const isBuyCms = await this.getCmsDataByQrcode() // 当前资源或父级目录是否购买
        const isDefualtPrice = this.data.bookDetail?.defaultSaleMethod?.price // 当前书的价默认销售方式价格是否为0
        const isBuyBook = this.data.bookDetail?.alreadyBuy // 当前书是否购买
        if (isBuyCms) {
          this.setData({
            threeLeveData: [qrData]
          })
        } else {
          if (isDefualtPrice == 0 || isBuyBook) {
            this.setData({
              threeLeveData: [qrData]
            })
          } else {
            this.setData({
              threeLeveData: []
            })
          }
        } else {
          this.setData({
            threeLeveData: []
          })
        }
      } else {
        this.setData({
project.config.json
@@ -136,6 +136,6 @@
    "include": []
  },
  "appid": "wx7f362fe7cb6e0d1f",
  "libVersion": "3.8.8",
  "libVersion": "3.8.11",
  "projectname": "jsek-applet"
}