feat 完善注释

This commit is contained in:
Ironsp
2026-10-01 17:24:57 +08:00
parent 2b59f68fd7
commit 9f4a5c7cda
183 changed files with 485 additions and 3615 deletions

View File

@@ -1,15 +1,5 @@
import service from '@/utils/request'
/**
* 同源预览:后端从 OSS 读取字节后以 `inline` 方式返回,绕开阿里云 OSS 桶「强制下载」配置。
*
* <p>⚠️ 该端点返回的是<b>裸字节</b>(非 `R.ok()` 包装的 `ApiResponse<T>`),故不走统一的
* `request<T>` 解包逻辑,直接用底层 axios 实例拿 `blob`:请求拦截器已自动带上
* `Authorization` 与 `clientid` 头,后端据此放行(端点需登录)。</p>
*
* <p>用 blob 而非 `window.open(url)` 的关键:blob URL 自身不带 `Content-Disposition`,
* 天然绕开 OSS 的强制下载;且全程同源,不受 OSS 跨域 / 强制下载限制。</p>
*/
export async function fetchOssPreviewBlob(ossId: string | number): Promise<Blob> {
const resp = await service.get(`/web/workOrderDraft/preview/${ossId}`, {
responseType: 'blob',