| | |
| | | if (url.startsWith("http://") || url.startsWith("https://")) { |
| | | return url; |
| | | } |
| | | const uploadsIndex = url.indexOf("uploads"); |
| | | if (uploadsIndex !== -1) { |
| | | const relativePath = url.substring(uploadsIndex); |
| | | return `${config.fileUrl}/${relativePath}`; |
| | | } |
| | | // const uploadsIndex = url.indexOf("uploads"); |
| | | // if (uploadsIndex !== -1) { |
| | | // const relativePath = url.substring(uploadsIndex); |
| | | // return `${config.fileUrl}/${relativePath}`; |
| | | // } |
| | | return `${config.fileUrl}/${url}`; |
| | | }; |
| | | |
| | |
| | | // 处理附件数据 - 支持多种数据结构 |
| | | console.log(data.imagesFile); |
| | | fileList.value = data.imagesFile; |
| | | console.log(formatFileUrl(fileList.value[0].url)); |
| | | }; |
| | | |
| | | // 返回上一页 |