发布到 https://fmode.cn/aipm-lesson/fmode-app-mirror/ 后, ../../assets 从 路由 /tabs/tab1 解析为 fmode.cn/assets/* → 404。改为 base-href 相对路径 assets/images/*, ng serve 与子路径部署均正确。 Co-Authored-By: Claude Code <noreply@anthropic.com>
@@ -25,7 +25,7 @@
</ion-segment>
<div *ngIf="changeTab === 'default'" style="display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; text-align: center; padding: 20px;">
- <img src="../../assets/images/1.jpg" alt="" style="max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
+ <img src="assets/images/1.jpg" alt="" style="max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);">
<h2 style="margin-top: 20px;">欢迎来到虚拟试衣</h2>
<ion-button color="primary" shape="round" style="margin-top: 20px;" (click)="startDressing()">开始换装</ion-button>
</div>
@@ -19,7 +19,7 @@ import { trigger, transition, style, animate } from '@angular/animations';
]
})
export class Tab1Page {
- images: string[] = ['../../assets/images/3.png', '../../assets/images/2.jpg', '../../assets/images/4.jpg'];
+ images: string[] = ['assets/images/3.png', 'assets/images/2.jpg', 'assets/images/4.jpg'];
currentImageIndex: number = 0;
changeImage(direction: number) {