fix: Use BASE_URL for image paths to support /info/ subpath
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-03-30 20:29:29 +08:00
parent fec7961114
commit ba2d4cc73c

View File

@@ -4,6 +4,8 @@
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
const BASE = import.meta.env.BASE_URL;
import { import {
ShieldCheck, ShieldCheck,
LayoutDashboard, LayoutDashboard,
@@ -50,7 +52,7 @@ const Navbar = () => {
{/* Left: Logo */} {/* Left: Logo */}
<div className="flex items-center"> <div className="flex items-center">
<div className="h-10 md:h-12 flex items-center justify-center overflow-hidden"> <div className="h-10 md:h-12 flex items-center justify-center overflow-hidden">
<img src="/assets/screenshots/logo.png" alt="Logo" className="h-full w-auto object-contain" referrerPolicy="no-referrer" /> <img src={`${BASE}assets/screenshots/logo.png`} alt="Logo" className="h-full w-auto object-contain" referrerPolicy="no-referrer" />
</div> </div>
</div> </div>
@@ -393,8 +395,8 @@ const AssetManagementSystem = () => {
<ScreenshotPlaceholder <ScreenshotPlaceholder
label="工作台" label="工作台"
description="任务流程一屏统管,业务处理高效协同。" description="任务流程一屏统管,业务处理高效协同。"
src="/assets/screenshots/01.jpg" src={`${BASE}assets/screenshots/01.jpg`}
onClick={() => setSelectedImage("/assets/screenshots/01.jpg")} onClick={() => setSelectedImage(`${BASE}assets/screenshots/01.jpg`)}
/> />
<div className="px-2"> <div className="px-2">
<h4 className="text-xl font-bold text-slate-900 mb-2">01. </h4> <h4 className="text-xl font-bold text-slate-900 mb-2">01. </h4>
@@ -410,8 +412,8 @@ const AssetManagementSystem = () => {
<ScreenshotPlaceholder <ScreenshotPlaceholder
label="车辆全生命周期档案" label="车辆全生命周期档案"
description="一屏掌控所有细节" description="一屏掌控所有细节"
src="/assets/screenshots/02.jpg" src={`${BASE}assets/screenshots/02.jpg`}
onClick={() => setSelectedImage("/assets/screenshots/02.jpg")} onClick={() => setSelectedImage(`${BASE}assets/screenshots/02.jpg`)}
/> />
<div className="px-2"> <div className="px-2">
<h4 className="text-xl font-bold text-slate-900 mb-2">02. </h4> <h4 className="text-xl font-bold text-slate-900 mb-2">02. </h4>
@@ -427,8 +429,8 @@ const AssetManagementSystem = () => {
<ScreenshotPlaceholder <ScreenshotPlaceholder
label="全链路业务闭环" label="全链路业务闭环"
description="覆盖车辆运营全生命周期" description="覆盖车辆运营全生命周期"
src="/assets/screenshots/03.jpg" src={`${BASE}assets/screenshots/03.jpg`}
onClick={() => setSelectedImage("/assets/screenshots/03.jpg")} onClick={() => setSelectedImage(`${BASE}assets/screenshots/03.jpg`)}
/> />
<div className="px-2"> <div className="px-2">
<h4 className="text-xl font-bold text-slate-900 mb-2">03. </h4> <h4 className="text-xl font-bold text-slate-900 mb-2">03. </h4>
@@ -444,8 +446,8 @@ const AssetManagementSystem = () => {
<ScreenshotPlaceholder <ScreenshotPlaceholder
label="费用明细透明可视" label="费用明细透明可视"
description="构建信任结算体系" description="构建信任结算体系"
src="/assets/screenshots/04.png" src={`${BASE}assets/screenshots/04.png`}
onClick={() => setSelectedImage("/assets/screenshots/04.png")} onClick={() => setSelectedImage(`${BASE}assets/screenshots/04.png`)}
/> />
<div className="px-2"> <div className="px-2">
<h4 className="text-xl font-bold text-slate-900 mb-2">04. </h4> <h4 className="text-xl font-bold text-slate-900 mb-2">04. </h4>
@@ -472,16 +474,16 @@ const AssetManagementSystem = () => {
className="flex gap-6 overflow-x-auto pb-8 snap-x no-scrollbar scroll-smooth" className="flex gap-6 overflow-x-auto pb-8 snap-x no-scrollbar scroll-smooth"
> >
{[ {[
{ src: "/assets/screenshots/05.png", label: "首页概览" }, { src: `${BASE}assets/screenshots/05.png`, label: "首页概览" },
{ src: "/assets/screenshots/06.png", label: "验车流程" }, { src: `${BASE}assets/screenshots/06.png`, label: "验车流程" },
{ src: "/assets/screenshots/07.png", label: "费用录入" }, { src: `${BASE}assets/screenshots/07.png`, label: "费用录入" },
{ src: "/assets/screenshots/08.png", label: "任务列表" }, { src: `${BASE}assets/screenshots/08.png`, label: "任务列表" },
{ src: "/assets/screenshots/09.png", label: "个人中心" }, { src: `${BASE}assets/screenshots/09.png`, label: "个人中心" },
{ src: "/assets/screenshots/05.png", label: "消息通知" }, { src: `${BASE}assets/screenshots/05.png`, label: "消息通知" },
{ src: "/assets/screenshots/06.png", label: "系统设置" }, { src: `${BASE}assets/screenshots/06.png`, label: "系统设置" },
{ src: "/assets/screenshots/07.png", label: "数据分析" }, { src: `${BASE}assets/screenshots/07.png`, label: "数据分析" },
{ src: "/assets/screenshots/08.png", label: "审批中心" }, { src: `${BASE}assets/screenshots/08.png`, label: "审批中心" },
{ src: "/assets/screenshots/09.png", label: "资产看板" }, { src: `${BASE}assets/screenshots/09.png`, label: "资产看板" },
].map((img, i) => ( ].map((img, i) => (
<div key={i} className="flex-shrink-0 snap-center w-[240px] md:w-[280px]"> <div key={i} className="flex-shrink-0 snap-center w-[240px] md:w-[280px]">
<ScreenshotPlaceholder <ScreenshotPlaceholder
@@ -553,7 +555,7 @@ const Footer = () => (
<div className="flex flex-col md:flex-row justify-between items-center gap-8"> <div className="flex flex-col md:flex-row justify-between items-center gap-8">
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<div className="h-8 flex items-center justify-center overflow-hidden"> <div className="h-8 flex items-center justify-center overflow-hidden">
<img src="/assets/screenshots/logo.png" alt="Logo" className="h-full w-auto object-contain" referrerPolicy="no-referrer" /> <img src={`${BASE}assets/screenshots/logo.png`} alt="Logo" className="h-full w-auto object-contain" referrerPolicy="no-referrer" />
</div> </div>
<span className="text-lg font-bold tracking-tight text-slate-900">OneOS <span className="text-brand">Solutions</span></span> <span className="text-lg font-bold tracking-tight text-slate-900">OneOS <span className="text-brand">Solutions</span></span>
</div> </div>