guoshilong
2023-09-28 cbcb844edf5c3bef84560af8bde1e4973fab7f3a
src/components/MediaPanel.vue
@@ -122,7 +122,7 @@
const showVideo = ref(false)
const videoPlayerId = ref('videoPlayerId')
// 文件前缀
const prefix = 'http://dev.jxpskj.com:9000/cloud-bucket'
const prefix = 'https://dev.jxpskj.com:8026/cloud-bucket'
// 搜索栏配置项
const searchPanelOptions = reactive({
  size: 'large',
@@ -144,8 +144,8 @@
}
const subFileTypeOptions = [
  { value: 0, label: '普通图片' },
  { value: 1, label: '全景图' },
  // { value: 0, label: '普通图片' },
  // { value: 1, label: '全景图' },
]
const payloadOptions = [
@@ -249,7 +249,10 @@
  let url = ''
  if (!objectKey.startsWith('/')) {
    url = prefix + '/' + objectKey
  } else {
    url = prefix + objectKey
  }
  console.log('文件地址:', url)
  if (fileType === 'image') {
    viewImage(url)
@@ -367,6 +370,7 @@
    })
    Promise.all(promiseList).then(res => {
      console.log(res, '+++++++++++')
      res.forEach(e => {
        zip.file(e.name, e.data, { base64: true })
      })
@@ -390,10 +394,6 @@
      .then((response) => {
        const ext = url.split('.')[1]
        // 若文件名不以后缀结尾,则手动添加后缀
        if (!name.endsWith(ext)) {
          name = name + '.' + ext
        }
        resolve({
          name: name,
          data: response.data