From 5a6dc3b9f7d583f50e3fa1981576188407750f5a Mon Sep 17 00:00:00 2001 From: dongsk Date: Sun, 18 Oct 2026 16:10:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 4 +++- .../jieya-ibp/jieya-logo-on-dark.png | Bin .../jieya-ibp/jieya-logo-on-light.png | Bin public/{ => mod-assets}/jieya-ibp/sql-wasm.wasm | Bin .../supplier-platform/hansong-logo.png | Bin .../welltrust-qap/methods/anodizing.jpg | Bin .../welltrust-qap/methods/cnc-bending.jpg | Bin .../welltrust-qap/methods/cnc-punch.jpg | Bin .../welltrust-qap/methods/diecast-chamfer.jpg | Bin .../welltrust-qap/methods/fixture-assembly.jpg | Bin .../welltrust-qap/methods/hand-assembly.jpg | Bin .../welltrust-qap/methods/hand-bending.jpg | Bin .../welltrust-qap/methods/hand-chamfer.jpg | Bin .../welltrust-qap/methods/hand-grinding.jpg | Bin .../welltrust-qap/methods/laser-weld.jpg | Bin .../welltrust-qap/methods/machine-chamfer.jpg | Bin .../welltrust-qap/methods/powder-coating.jpg | Bin .../welltrust-qap/methods/repair-weld.jpg | Bin .../welltrust-qap/methods/rivet-nut.jpg | Bin .../welltrust-qap/methods/robot-arc-weld.jpg | Bin .../welltrust-qap/methods/spot-weld.jpg | Bin .../welltrust-qap/methods/tapping.jpg | Bin .../welltrust-qap/methods/tig-weld.jpg | Bin public/{ => mod-assets}/welltrust-qap/sql-wasm.wasm | Bin .../welltrust-qap/welltrust-logo-on-dark.png | Bin .../welltrust-qap/welltrust-logo-on-light.png | Bin src/modules/jieya-ibp/components/MecHeader.tsx | 2 +- src/modules/jieya-ibp/data/sqlite.ts | 2 +- src/modules/supplier-platform/components/TopBar.tsx | 2 +- src/modules/welltrust-qap/components/MecHeader.tsx | 2 +- src/modules/welltrust-qap/data/methodImages.ts | 2 +- src/modules/welltrust-qap/data/sqlite.ts | 2 +- 32 files changed, 9 insertions(+), 7 deletions(-) rename public/{ => mod-assets}/jieya-ibp/jieya-logo-on-dark.png (100%) rename public/{ => mod-assets}/jieya-ibp/jieya-logo-on-light.png (100%) rename public/{ => mod-assets}/jieya-ibp/sql-wasm.wasm (100%) rename public/{ => mod-assets}/supplier-platform/hansong-logo.png (100%) rename public/{ => mod-assets}/welltrust-qap/methods/anodizing.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/cnc-bending.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/cnc-punch.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/diecast-chamfer.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/fixture-assembly.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/hand-assembly.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/hand-bending.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/hand-chamfer.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/hand-grinding.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/laser-weld.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/machine-chamfer.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/powder-coating.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/repair-weld.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/rivet-nut.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/robot-arc-weld.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/spot-weld.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/tapping.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/methods/tig-weld.jpg (100%) rename public/{ => mod-assets}/welltrust-qap/sql-wasm.wasm (100%) rename public/{ => mod-assets}/welltrust-qap/welltrust-logo-on-dark.png (100%) rename public/{ => mod-assets}/welltrust-qap/welltrust-logo-on-light.png (100%) diff --git a/nginx.conf b/nginx.conf index 5bb08bc..29523e8 100644 --- a/nginx.conf +++ b/nginx.conf @@ -61,8 +61,10 @@ server { } # SPA 路由 fallback:所有非文件请求回退到 index.html + # 注意不能带 $uri/:dist 下存在与路由同名的静态资源目录(如 mod-assets/jieya-ibp), + # 若命中目录(无 index.html)会返回 403 导致 SPA 路由失效 location / { - try_files $uri $uri/ /index.html; + try_files $uri /index.html; } # 静态资源长缓存(Vite 构建产物带 hash) diff --git a/public/jieya-ibp/jieya-logo-on-dark.png b/public/mod-assets/jieya-ibp/jieya-logo-on-dark.png similarity index 100% rename from public/jieya-ibp/jieya-logo-on-dark.png rename to public/mod-assets/jieya-ibp/jieya-logo-on-dark.png diff --git a/public/jieya-ibp/jieya-logo-on-light.png b/public/mod-assets/jieya-ibp/jieya-logo-on-light.png similarity index 100% rename from public/jieya-ibp/jieya-logo-on-light.png rename to public/mod-assets/jieya-ibp/jieya-logo-on-light.png diff --git a/public/jieya-ibp/sql-wasm.wasm b/public/mod-assets/jieya-ibp/sql-wasm.wasm similarity index 100% rename from public/jieya-ibp/sql-wasm.wasm rename to public/mod-assets/jieya-ibp/sql-wasm.wasm diff --git a/public/supplier-platform/hansong-logo.png b/public/mod-assets/supplier-platform/hansong-logo.png similarity index 100% rename from public/supplier-platform/hansong-logo.png rename to public/mod-assets/supplier-platform/hansong-logo.png diff --git a/public/welltrust-qap/methods/anodizing.jpg b/public/mod-assets/welltrust-qap/methods/anodizing.jpg similarity index 100% rename from public/welltrust-qap/methods/anodizing.jpg rename to public/mod-assets/welltrust-qap/methods/anodizing.jpg diff --git a/public/welltrust-qap/methods/cnc-bending.jpg b/public/mod-assets/welltrust-qap/methods/cnc-bending.jpg similarity index 100% rename from public/welltrust-qap/methods/cnc-bending.jpg rename to public/mod-assets/welltrust-qap/methods/cnc-bending.jpg diff --git a/public/welltrust-qap/methods/cnc-punch.jpg b/public/mod-assets/welltrust-qap/methods/cnc-punch.jpg similarity index 100% rename from public/welltrust-qap/methods/cnc-punch.jpg rename to public/mod-assets/welltrust-qap/methods/cnc-punch.jpg diff --git a/public/welltrust-qap/methods/diecast-chamfer.jpg b/public/mod-assets/welltrust-qap/methods/diecast-chamfer.jpg similarity index 100% rename from public/welltrust-qap/methods/diecast-chamfer.jpg rename to public/mod-assets/welltrust-qap/methods/diecast-chamfer.jpg diff --git a/public/welltrust-qap/methods/fixture-assembly.jpg b/public/mod-assets/welltrust-qap/methods/fixture-assembly.jpg similarity index 100% rename from public/welltrust-qap/methods/fixture-assembly.jpg rename to public/mod-assets/welltrust-qap/methods/fixture-assembly.jpg diff --git a/public/welltrust-qap/methods/hand-assembly.jpg b/public/mod-assets/welltrust-qap/methods/hand-assembly.jpg similarity index 100% rename from public/welltrust-qap/methods/hand-assembly.jpg rename to public/mod-assets/welltrust-qap/methods/hand-assembly.jpg diff --git a/public/welltrust-qap/methods/hand-bending.jpg b/public/mod-assets/welltrust-qap/methods/hand-bending.jpg similarity index 100% rename from public/welltrust-qap/methods/hand-bending.jpg rename to public/mod-assets/welltrust-qap/methods/hand-bending.jpg diff --git a/public/welltrust-qap/methods/hand-chamfer.jpg b/public/mod-assets/welltrust-qap/methods/hand-chamfer.jpg similarity index 100% rename from public/welltrust-qap/methods/hand-chamfer.jpg rename to public/mod-assets/welltrust-qap/methods/hand-chamfer.jpg diff --git a/public/welltrust-qap/methods/hand-grinding.jpg b/public/mod-assets/welltrust-qap/methods/hand-grinding.jpg similarity index 100% rename from public/welltrust-qap/methods/hand-grinding.jpg rename to public/mod-assets/welltrust-qap/methods/hand-grinding.jpg diff --git a/public/welltrust-qap/methods/laser-weld.jpg b/public/mod-assets/welltrust-qap/methods/laser-weld.jpg similarity index 100% rename from public/welltrust-qap/methods/laser-weld.jpg rename to public/mod-assets/welltrust-qap/methods/laser-weld.jpg diff --git a/public/welltrust-qap/methods/machine-chamfer.jpg b/public/mod-assets/welltrust-qap/methods/machine-chamfer.jpg similarity index 100% rename from public/welltrust-qap/methods/machine-chamfer.jpg rename to public/mod-assets/welltrust-qap/methods/machine-chamfer.jpg diff --git a/public/welltrust-qap/methods/powder-coating.jpg b/public/mod-assets/welltrust-qap/methods/powder-coating.jpg similarity index 100% rename from public/welltrust-qap/methods/powder-coating.jpg rename to public/mod-assets/welltrust-qap/methods/powder-coating.jpg diff --git a/public/welltrust-qap/methods/repair-weld.jpg b/public/mod-assets/welltrust-qap/methods/repair-weld.jpg similarity index 100% rename from public/welltrust-qap/methods/repair-weld.jpg rename to public/mod-assets/welltrust-qap/methods/repair-weld.jpg diff --git a/public/welltrust-qap/methods/rivet-nut.jpg b/public/mod-assets/welltrust-qap/methods/rivet-nut.jpg similarity index 100% rename from public/welltrust-qap/methods/rivet-nut.jpg rename to public/mod-assets/welltrust-qap/methods/rivet-nut.jpg diff --git a/public/welltrust-qap/methods/robot-arc-weld.jpg b/public/mod-assets/welltrust-qap/methods/robot-arc-weld.jpg similarity index 100% rename from public/welltrust-qap/methods/robot-arc-weld.jpg rename to public/mod-assets/welltrust-qap/methods/robot-arc-weld.jpg diff --git a/public/welltrust-qap/methods/spot-weld.jpg b/public/mod-assets/welltrust-qap/methods/spot-weld.jpg similarity index 100% rename from public/welltrust-qap/methods/spot-weld.jpg rename to public/mod-assets/welltrust-qap/methods/spot-weld.jpg diff --git a/public/welltrust-qap/methods/tapping.jpg b/public/mod-assets/welltrust-qap/methods/tapping.jpg similarity index 100% rename from public/welltrust-qap/methods/tapping.jpg rename to public/mod-assets/welltrust-qap/methods/tapping.jpg diff --git a/public/welltrust-qap/methods/tig-weld.jpg b/public/mod-assets/welltrust-qap/methods/tig-weld.jpg similarity index 100% rename from public/welltrust-qap/methods/tig-weld.jpg rename to public/mod-assets/welltrust-qap/methods/tig-weld.jpg diff --git a/public/welltrust-qap/sql-wasm.wasm b/public/mod-assets/welltrust-qap/sql-wasm.wasm similarity index 100% rename from public/welltrust-qap/sql-wasm.wasm rename to public/mod-assets/welltrust-qap/sql-wasm.wasm diff --git a/public/welltrust-qap/welltrust-logo-on-dark.png b/public/mod-assets/welltrust-qap/welltrust-logo-on-dark.png similarity index 100% rename from public/welltrust-qap/welltrust-logo-on-dark.png rename to public/mod-assets/welltrust-qap/welltrust-logo-on-dark.png diff --git a/public/welltrust-qap/welltrust-logo-on-light.png b/public/mod-assets/welltrust-qap/welltrust-logo-on-light.png similarity index 100% rename from public/welltrust-qap/welltrust-logo-on-light.png rename to public/mod-assets/welltrust-qap/welltrust-logo-on-light.png diff --git a/src/modules/jieya-ibp/components/MecHeader.tsx b/src/modules/jieya-ibp/components/MecHeader.tsx index a453c92..d070432 100644 --- a/src/modules/jieya-ibp/components/MecHeader.tsx +++ b/src/modules/jieya-ibp/components/MecHeader.tsx @@ -79,7 +79,7 @@ export default function MecHeader({ period }: HeaderProps) { {/* 品牌 logo:白底反预乘抠成透明,深浅主题各用一版—— 浅色版保留原墨色,深色版把中性色(深蓝/灰)换成近白、品红方块原样保留 */} JIEYA 洁雅家居 { // sql.js 浏览器构建会请求 sql-wasm-browser.wasm,而 public/ 下只放了 sql-wasm.wasm // (两者字节一致)。统一指回已存在的文件,否则未命中路径会被 SPA fallback // 返回 index.html,报 "expected magic word 00 61 73 6d, found 3c 21 64 6f"。 - locateFile: () => '/jieya-ibp/sql-wasm.wasm', + locateFile: () => '/mod-assets/jieya-ibp/sql-wasm.wasm', }); db = new SQL.Database(); diff --git a/src/modules/supplier-platform/components/TopBar.tsx b/src/modules/supplier-platform/components/TopBar.tsx index 889f5f2..478d1a2 100644 --- a/src/modules/supplier-platform/components/TopBar.tsx +++ b/src/modules/supplier-platform/components/TopBar.tsx @@ -18,7 +18,7 @@ export default function TopBar() { return (
- HANSONG + HANSONG
汉桑科技 · AI+供应商智能管控平台LIVE
HANSONG TECHNOLOGY (NANJING) · INTELLIGENT SRM
diff --git a/src/modules/welltrust-qap/components/MecHeader.tsx b/src/modules/welltrust-qap/components/MecHeader.tsx index f70ed85..fedb85f 100644 --- a/src/modules/welltrust-qap/components/MecHeader.tsx +++ b/src/modules/welltrust-qap/components/MecHeader.tsx @@ -87,7 +87,7 @@ export default function MecHeader({ period }: HeaderProps) { 浅色版保留标准蓝,深色版提亮成 #62B6E8,两版都按主题切换。 源图 379x246(官网 header logo 抠底),按 56px 高等比显示 → 86px 宽 */} WELL TRUST PRECISION 和信精密 = { /** 方法 id → 图片 URL;没有配图时返回 undefined,由调用方回退到图标 */ export function methodImageSrc(id: string): string | undefined { const slug = METHOD_IMAGE[id]; - return slug ? `${import.meta.env.BASE_URL}welltrust-qap/methods/${slug}.jpg` : undefined; + return slug ? `${import.meta.env.BASE_URL}mod-assets/welltrust-qap/methods/${slug}.jpg` : undefined; } diff --git a/src/modules/welltrust-qap/data/sqlite.ts b/src/modules/welltrust-qap/data/sqlite.ts index d4c2da9..a21052d 100644 --- a/src/modules/welltrust-qap/data/sqlite.ts +++ b/src/modules/welltrust-qap/data/sqlite.ts @@ -187,7 +187,7 @@ export async function initDatabase(): Promise { // sql.js 浏览器构建会请求 sql-wasm-browser.wasm,而 public/ 下只放了 sql-wasm.wasm // (两者字节一致)。统一指回已存在的文件,否则未命中路径会被 SPA fallback // 返回 index.html,报 "expected magic word 00 61 73 6d, found 3c 21 64 6f"。 - locateFile: () => '/welltrust-qap/sql-wasm.wasm', + locateFile: () => '/mod-assets/welltrust-qap/sql-wasm.wasm', }); db = new SQL.Database();