gaoluyang
18 小时以前 a8cc939b9a017ae8dbd7b2b28279b13e67a6c8da
src/pages/inspectionUpload/index.vue
@@ -230,7 +230,7 @@
                <view v-for="(file, index) in getCurrentViewAttachments()" :key="index" class="attachment-item"
                  @click="previewAttachment(file)">
                  <view class="attachment-preview-container">
                    <image v-if="file.type === 'image' || isImageFile(file)" :src="file.url || file.downloadUrl"
                    <image v-if="file.type === 'image' || isImageFile(file)" :src="getAttachmentImageUrl(file)"
                      class="attachment-preview" mode="aspectFill" />
                    <view v-else class="attachment-video-preview">
                      <u-icon name="video" size="24" color="#409eff"></u-icon>
@@ -937,8 +937,13 @@
  return ['jpg', 'jpeg', 'png', 'gif', 'webp'].includes(ext)
}
// 获取查看附件图片的完整URL(javaApi + url)
const getAttachmentImageUrl = (file) => {
  return file.url
}
// 文件访问基础域(后端要求前缀)
const filePreviewBase = 'http://1181ybjh99334.vicp.fun'
const filePreviewBase = config.javaApi
// 将后端返回的文件地址规范成可访问URL
// 兼容场景: