gaoluyang
19 小时以前 eb3aa6ad8822ce2a33df07ad588a8e6e24f924c3
酒泉app
1.巡检上传图片预览修改
已修改2个文件
10 ■■■■ 文件已修改
src/config.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inspectionUpload/index.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config.js
@@ -1,6 +1,7 @@
// 应用全局配置
const config = {
  baseUrl: 'http://114.132.189.42:9017', // 华玺砂浆
  javaApi: 'http://114.132.189.42:9062', // 华玺砂浆
   // 应用信息
   appInfo: {
     // 应用名称
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
// 兼容场景: