bug
litian
2024-09-10 99dfeb5fc86bce593a5d3f43f45c26eedc00ab0a
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -26,6 +26,7 @@
    parentProductLinkPath: '',
    productLinkPath: '',
    threeLeveData: [],
    source: "",
    showData: '',
    showDataVod: '',
    src: '',
@@ -48,7 +49,7 @@
    videoLoading: false,
    progress: 0,
    playerList: [],
    videoLoaidng: true
    videoLoading: true
  },
  // 格式化笔记时间
  convertTimestamp(timestamp) {
@@ -85,6 +86,7 @@
      productLinkPath: options.productLinkPath,
      formPath: options.formPath,
      flag: false,
      source: options.source,
    })
    if (options.parentName !== "教学资源" && options.parentName !== "云学习") {
      this.setData({
@@ -223,7 +225,7 @@
  },
  resourceDetailsData() {
    this.setData({
      videoLoaidng: true,
      videoLoading: true,
      loading: true
    })
    let query = {
@@ -253,11 +255,17 @@
    }
    app.MG.store.getProductDetail(query).then(res => {
      res.datas.cmsDatas[0].datas.forEach((item) => {
        if (item.selectType === "video" || item.learnSelectType === "video") {
          this.data.threeLeveData.push(item)
          this.setData({
            threeLeveData: this.data.threeLeveData
          })
        if (this.data.source == 'qrcode') {
          if (item.id == this.data.activeId) {
            this.data.threeLeveData.push(item);
          }
        } else {
          if (item.selectType === "video" || item.learnSelectType === "video") {
            this.data.threeLeveData.push(item)
            this.setData({
              threeLeveData: this.data.threeLeveData
            })
          }
        }
      })
      this.data.threeLeveData.forEach((items, index) => { // 修改此处添加index参数
@@ -293,7 +301,7 @@
    this.setPlayerList()
    const item = e.currentTarget.dataset.item
    this.setData({
      videoLoaidng: true,
      videoLoading: true,
      selectedId: e.currentTarget.dataset.index,
      activeId: item.id,
      // showData: '',
@@ -326,16 +334,19 @@
        if (res && res.data == '') {
          this.setData({
            showDataVod: currentVideo,
            videoLoading: false,
          })
        } else {
          this.setData({
            showDataVod: res,
            videoLoading: false,
          })
        }
        this.setData({})
      } else if (currentVideo) {
        this.setData({
          showDataVod: currentVideo,
          videoLoading: false,
        })
      } else {
        return ElMessage.error('无法获取视频资源')
@@ -646,7 +657,7 @@
  loadedmetadata(e) {
    console.log(1);
    this.setData({
      videoLoaidng: false
      videoLoading: false
    })
  }
})