litian
2024-09-06 266c7278841d2cbae5e9ab969ffd2efae1d0dda5
packageDomain/pages/resourceDetails/myVideo/index.js
@@ -25,6 +25,7 @@
    productLinkPath: '',
    threeLeveData: [],
    showData: '',
    showDataVod: '',
    src: '',
    selectedId: null,
    topicId: '',
@@ -255,11 +256,14 @@
              showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey),
              titleName: items.name
            })
            this.aliVod(file, this.data.showData)
          } else {
            this.setData({
              showData: items.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.freeFile,
              titleName: items.name
            })
            this.aliVod(items.file, this.data.showData)
          }
          let selectedIndex = index; // 存储选中项的索引
          this.setData({
@@ -290,14 +294,36 @@
        this.setData({
          showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey)
        })
        this.aliVod(file, this.data.showData)
      } else {
        this.setData({
          showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile,
        })
        this.aliVod(item.file, this.data.showData)
      }
    }
  },
  aliVod(md5, currentVideo) {
    let query = {
      md5: md5,
      appRefCode: config.appRefCode
    }
    MG.file.getAliVod(query).then((res) => {
      if (res) {
        this.setData({
          showDataVod: res,
        })
      } else if (currentVideo) {
        this.setData({
          showDataVod: currentVideo,
        })
      } else {
        return ElMessage.error('无法获取视频资源')
      }
    })
  },
  timeUpdate(e) {
    console.log(2);
    let {