diff --git a/components/homes/home-15/Features/UI.jsx b/components/homes/home-15/Features/UI.jsx index 40924af..9193783 100644 --- a/components/homes/home-15/Features/UI.jsx +++ b/components/homes/home-15/Features/UI.jsx @@ -7,6 +7,7 @@ export default function UI({ data }) { // 主图 const mainImage = data.image || "/assets/img/photos/about2.jpg"; + const secondImage = data.image_1 || "/assets/img/photos/about3.jpg"; // 标题/副标题/描述 const title = data.title || ""; const subtitle = data.subtitle || ""; @@ -17,9 +18,47 @@ export default function UI({ data }) { const buttonLink = data.button_link || "#"; return ( -
+
+ {/* 右侧图片区 - 错开叠放 */} +
+ {/* 装饰性背景点 */} +
+ {/* 错开叠放的图片容器 */} +
+ {/* 第一张图片 - 较大,位置偏右 */} +
+
+ image +
+
+ {/* 第二张图片 - 较小,位置偏左,覆盖第一张图片 */} +
+
+ image +
+
+
+
{/* 左侧内容区 */} -
+
{htmlCode ? (
- {/* 右侧图片区 */} -
-
- image -
-
); } diff --git a/public/files/0qkrqnrooo_1642a7fd.png b/public/files/0qkrqnrooo_1642a7fd.png new file mode 100644 index 0000000..bda3096 Binary files /dev/null and b/public/files/0qkrqnrooo_1642a7fd.png differ diff --git a/public/files/1695275377553861.jpg b/public/files/1695275377553861.jpg new file mode 100644 index 0000000..00afa98 Binary files /dev/null and b/public/files/1695275377553861.jpg differ diff --git a/public/files/1706767374889974.jpg b/public/files/1706767374889974.jpg new file mode 100644 index 0000000..55716fc Binary files /dev/null and b/public/files/1706767374889974.jpg differ diff --git a/public/files/1706841565240700.jpg b/public/files/1706841565240700.jpg new file mode 100644 index 0000000..f77fd55 Binary files /dev/null and b/public/files/1706841565240700.jpg differ diff --git a/utils/data.js b/utils/data.js index 390deb9..55d80cf 100644 --- a/utils/data.js +++ b/utils/data.js @@ -185,7 +185,7 @@ export async function getAllSlugs() { } } -export async function fetchComponentData(componentName) { +export async function fetchComponentData(componentName, downloadFiles = true) { try { const res = await axios.get( `${BACKEND_SERVER_URL}/api/action/jsite.api.v1.get_component_data`, @@ -193,7 +193,14 @@ export async function fetchComponentData(componentName) { params: { component_name: componentName, site_name: BACKEND_SITE_NAME }, } ); - return { data: res.data.message?.data || null }; + + let data = res.data.message?.data || null; + + if (data && downloadFiles) { + data = await processDataItem(data, downloadFiles); + } + + return { data }; } catch (error) { if ( error.response &&