This commit is contained in:
Phoenix 2025-05-26 14:12:57 +08:00
commit f72dd8ad9d
5 changed files with 172 additions and 302 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="home-page"> <div class="home-page">
<div class="business-page"> <div class="business-page">
<!-- 渐变背景标题区 - 增加层次感 --> <!-- 渐变背景标题区 -->
<section class="hero-section"> <section class="hero-section">
<div class="container"> <div class="container">
<div class="title-wrapper"> <div class="title-wrapper">
@ -25,86 +25,23 @@
<!-- 解决方案网格 - 响应式弹性布局 --> <!-- 解决方案网格 - 响应式弹性布局 -->
<div class="solution-grid"> <div class="solution-grid">
<!-- 主推解决方案组 --> <!-- 统一使用弹性列布局通过媒体查询控制排列方式 -->
<div class="solution-group"> <div
<div class="featured-solution"> v-for="(solution, sIndex) in solutions"
<div class="solution-card" :style="{ '--delay': '0s' }"> :key="sIndex"
<div class="card-header"> class="featured-solution"
<div class="decorative-line"></div>
<h2 class="card-title">{{ solutions[0].title }}</h2>
</div>
<ul class="card-content">
<li
v-for="(point, pIndex) in solutions[0].points"
:key="pIndex"
class="content-point"
> >
<div class="point-icon"></div>
<div class="point-text">{{ point }}</div>
</li>
</ul>
</div>
</div>
<div class="featured-solution">
<div class="solution-card" :style="{ '--delay': '0.2s' }">
<div class="card-header">
<div class="decorative-line"></div>
<h2 class="card-title">{{ solutions[1].title }}</h2>
</div>
<ul class="card-content">
<li
v-for="(point, pIndex) in solutions[1].points"
:key="pIndex"
class="content-point"
>
<div class="point-icon"></div>
<div class="point-text">{{ point }}</div>
</li>
</ul>
</div>
</div>
</div>
<!-- 次推解决方案组 -->
<div class="solution-group">
<div class="featured-solution">
<div <div
class="solution-card" class="solution-card"
style="height: auto" :style="{ '--delay': `${sIndex * 0.2}s` }"
:style="{ '--delay': '0.4s' }"
> >
<div class="card-header"> <div class="card-header">
<div class="decorative-line"></div> <div class="decorative-line"></div>
<h2 class="card-title">{{ solutions[2].title }}</h2> <h2 class="card-title">{{ solution.title }}</h2>
</div> </div>
<ul class="card-content"> <ul class="card-content">
<li <li
v-for="(point, pIndex) in solutions[2].points" v-for="(point, pIndex) in solution.points"
:key="pIndex"
class="content-point"
>
<div class="point-icon"></div>
<div class="point-text">{{ point }}</div>
</li>
<li style="padding-bottom: 45px"></li>
</ul>
</div>
</div>
<div class="featured-solution">
<div
class="solution-card"
style="height: auto"
:style="{ '--delay': '0.6s' }"
>
<div class="card-header">
<div class="decorative-line"></div>
<h2 class="card-title">{{ solutions[3].title }}</h2>
</div>
<ul class="card-content">
<li
v-for="(point, pIndex) in solutions[3].points"
:key="pIndex" :key="pIndex"
class="content-point" class="content-point"
> >
@ -115,7 +52,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</main> </main>
</div> </div>
</div> </div>
@ -166,6 +102,7 @@ const solutions = computed(() => [
.container { .container {
margin: 0 auto; margin: 0 auto;
padding: 0 2rem; padding: 0 2rem;
max-width: 1600px;
} }
/* 标题区样式 */ /* 标题区样式 */
@ -188,13 +125,25 @@ const solutions = computed(() => [
} }
.hero-title { .hero-title {
font-size: 40px; font-size: 2.5rem;
color: #2c3e50; color: #2c3e50;
margin-bottom: 2rem; margin-bottom: 2rem;
animation: slideIn 1s ease; position: relative;
}
.hero-title::after {
content: "";
position: absolute;
bottom: -10px;
left: 0;
width: 80px;
height: 4px;
background: linear-gradient(135deg, #895bff 0%, #6a11cb 100%);
border-radius: 2px;
} }
.hero-description { .hero-description {
max-width: 1000px;
margin: 0 auto; margin: 0 auto;
font-size: 1.1rem; font-size: 1.1rem;
line-height: 1.8; line-height: 1.8;
@ -211,6 +160,7 @@ const solutions = computed(() => [
var(--primary-color) 100% var(--primary-color) 100%
); );
} }
.home-page { .home-page {
background-image: url("@/assets/image/bg-mobile.png"); background-image: url("@/assets/image/bg-mobile.png");
background-size: 100% 100%; background-size: 100% 100%;
@ -218,99 +168,29 @@ const solutions = computed(() => [
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.container { /* 解决方案网格 - 响应式布局 */
margin: 0 auto;
padding: 0 2rem;
}
/* 标题区 - 紫色渐变 */
.hero-section {
background: var(--primary-gradient);
padding: 10rem 0 8rem;
position: relative;
overflow: hidden;
color: white;
}
.hero-section::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.05)" d="M0,0 L100,0 L100,100 Q50,80 0,100 Z"></path></svg>')
no-repeat bottom/100% 30%;
}
.title-decoration {
position: absolute;
bottom: -15px;
left: 0;
width: 80%;
height: 4px;
background: rgba(255, 255, 255, 0.5);
border-radius: 2px;
}
/* 解决方案网格 */
.solution-grid { .solution-grid {
padding: 6rem 0 4rem; padding: 6rem 0;
} display: grid;
grid-template-columns: 1fr; /* 默认单列(移动端) */
.solution-group {
display: flex;
flex-direction: column;
gap: 3rem; gap: 3rem;
margin-bottom: 4rem;
} }
/* 桌面端布局(>=768px */ /* 中等屏幕768px-1439px - 单列布局 */
@media (min-width: 768px) { @media (min-width: 768px) and (max-width: 1439px) {
.solution-group { .solution-grid {
flex-direction: row; grid-template-columns: 1fr;
gap: 4rem;
}
.featured-solution {
flex: 1;
}
.solution-card {
height: 350px;
} }
} }
/* 移动端布局(<768px */ /* 大屏幕≥1440px - 双列布局 */
@media (max-width: 767px) { @media (min-width: 1440px) {
.home-page { .solution-grid {
background-image: url("@/assets/image/bg-mobile.png"); grid-template-columns: 1fr 1fr;
}
.hero-title {
font-size: 1.8rem;
}
.solution-group {
flex-direction: column;
gap: 2rem;
}
.featured-solution {
width: 100% !important; /* 强制占满容器 */
margin-bottom: 2rem;
}
.solution-card {
padding: 2rem;
height: auto;
}
.content-point {
padding: 1rem 0;
} }
} }
/* 卡片公共样式 */ /* 卡片样式 */
.solution-card { .solution-card {
background: white; background: white;
border-radius: 16px; border-radius: 16px;
@ -322,22 +202,17 @@ const solutions = computed(() => [
position: relative; position: relative;
overflow: hidden; overflow: hidden;
border: 1px solid rgba(137, 91, 255, 0.2); border: 1px solid rgba(137, 91, 255, 0.2);
background: linear-gradient(135deg, #f9f6ff 0%, #f0e9ff 100%); transition: all 0.3s ease;
} }
.solution-card::after { .solution-card::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 4px;
background: linear-gradient( background: var(--primary-gradient);
135deg,
rgba(137, 91, 255, 0.03) 0%,
rgba(137, 91, 255, 0) 100%
);
z-index: -1;
} }
.solution-card:hover { .solution-card:hover {
@ -355,6 +230,7 @@ const solutions = computed(() => [
background: var(--primary-gradient); background: var(--primary-gradient);
margin-bottom: 1rem; margin-bottom: 1rem;
border-radius: 3px; border-radius: 3px;
transition: width 0.3s ease;
} }
.solution-card:hover .decorative-line { .solution-card:hover .decorative-line {
@ -374,6 +250,10 @@ const solutions = computed(() => [
border-bottom: 1px solid rgba(137, 91, 255, 0.1); border-bottom: 1px solid rgba(137, 91, 255, 0.1);
} }
.content-point:last-child {
border-bottom: none;
}
.point-icon { .point-icon {
color: var(--primary-color); color: var(--primary-color);
font-size: 1.2rem; font-size: 1.2rem;

View File

@ -25,13 +25,17 @@
class="result-item" class="result-item"
> >
<div class="content"> <div class="content">
<a :href="item.url" class="result-title subtitle">{{ item.title }}</a> <p class="result-title subtitle">{{ item.title }}</p>
<p class="result-description content-text">{{ item.description }}</p> <p class="result-description content-text">{{ item.description }}</p>
</div> </div>
<div class="pdf-icon">
<a :href="item.url" target="_blank"> <div
class="pdf-icon"
@click="downloadPdf(item.url)"
style="color: #2979ff; cursor: pointer"
>
<img src="@/assets/image/pdf.png" alt="PDF" /> <img src="@/assets/image/pdf.png" alt="PDF" />
</a> {{ t("financialinformation.quarterlyresults.download") }}
</div> </div>
</div> </div>
</div> </div>
@ -341,6 +345,31 @@ const handleSearch = () => {
// //
console.log("搜索:", searchQuery.value); console.log("搜索:", searchQuery.value);
}; };
const downloadPdf = async (pdfResource, filename = "") => {
try {
// PDF
const response = await fetch(pdfResource);
const blob = await response.blob();
// Blob URL
const blobUrl = URL.createObjectURL(blob);
//
const a = document.createElement("a");
a.href = blobUrl;
a.download = filename || pdfResource.split("/").pop() || "download.pdf";
//
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
// Blob URL
URL.revokeObjectURL(blobUrl);
} catch (error) {
console.error("下载PDF文件失败:", error);
}
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.title { .title {
@ -387,7 +416,7 @@ const handleSearch = () => {
.result-item { .result-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: center;
padding: 15px 0; padding: 15px 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
@ -401,10 +430,6 @@ const handleSearch = () => {
text-decoration: none; text-decoration: none;
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
&:hover {
text-decoration: underline;
}
} }
.result-description { .result-description {

View File

@ -25,13 +25,16 @@
class="result-item" class="result-item"
> >
<div class="content"> <div class="content">
<a :href="item.url" class="result-title subtitle">{{ item.title }}</a> <p class="result-title subtitle">{{ item.title }}</p>
<p class="result-description content-text">{{ item.description }}</p> <p class="result-description content-text">{{ item.description }}</p>
</div> </div>
<div class="pdf-icon"> <div
<a :href="item.url" target="_blank"> class="pdf-icon"
@click="downloadPdf(item.url)"
style="color: #2979ff; cursor: pointer"
>
<img src="@/assets/image/pdf.png" alt="PDF" /> <img src="@/assets/image/pdf.png" alt="PDF" />
</a> {{ t("financialinformation.quarterlyresults.download") }}
</div> </div>
</div> </div>
</div> </div>
@ -341,6 +344,32 @@ const handleSearch = () => {
// //
console.log("搜索:", searchQuery.value); console.log("搜索:", searchQuery.value);
}; };
const downloadPdf = async (pdfResource, filename = "") => {
try {
// PDF
const response = await fetch(pdfResource);
const blob = await response.blob();
// Blob URL
const blobUrl = URL.createObjectURL(blob);
//
const a = document.createElement("a");
a.href = blobUrl;
a.download = filename || pdfResource.split("/").pop() || "download.pdf";
//
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
// Blob URL
URL.revokeObjectURL(blobUrl);
} catch (error) {
console.error("下载PDF文件失败:", error);
}
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.title { .title {
@ -387,7 +416,7 @@ const handleSearch = () => {
.result-item { .result-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: center;
padding: 15px 0; padding: 15px 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
@ -401,10 +430,6 @@ const handleSearch = () => {
text-decoration: none; text-decoration: none;
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;
&:hover {
text-decoration: underline;
}
} }
.result-description { .result-description {

View File

@ -36,7 +36,7 @@
<img <img
src="@/assets/image/download.svg" src="@/assets/image/download.svg"
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
@click="handleDownload(item.url)" @click="downloadPdf(item.url)"
/> />
</div> </div>
</div> </div>
@ -345,55 +345,29 @@ const handleSearch = () => {
console.log("搜索:", searchQuery.value); console.log("搜索:", searchQuery.value);
}; };
const handleDownload = (url) => { const downloadPdf = async (pdfResource, filename = "") => {
// try {
console.log("下载:", url); // PDF
const response = await fetch(pdfResource);
const blob = await response.blob();
// a // Blob URL
const link = document.createElement("a"); const blobUrl = URL.createObjectURL(blob);
link.href = url;
// //
let fileName = url.split("/").pop(); const a = document.createElement("a");
// a.href = blobUrl;
if (fileName.includes("?") || fileName.includes("_t=")) { a.download = filename || pdfResource.split("/").pop() || "download.pdf";
fileName = fileName.split(/[?_]/)[0];
}
link.download = fileName;
link.target = "_blank";
// //
const isMobile = document.body.appendChild(a);
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( a.click();
navigator.userAgent document.body.removeChild(a);
);
if (isMobile) { // Blob URL
// 使fetchblob URL.revokeObjectURL(blobUrl);
fetch(url) } catch (error) {
.then((response) => response.blob()) console.error("下载PDF文件失败:", error);
.then((blob) => {
const objectUrl = URL.createObjectURL(blob);
link.href = objectUrl;
document.body.appendChild(link);
link.click();
//
setTimeout(() => {
document.body.removeChild(link);
URL.revokeObjectURL(objectUrl);
}, 100);
})
.catch((error) => {
console.error("下载文件时出错:", error);
// fetch退window.open
window.open(url, "_blank");
});
} else {
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
} }
}; };
</script> </script>
@ -475,10 +449,6 @@ const handleDownload = (url) => {
margin-bottom: 8px; margin-bottom: 8px;
font-size: 92px; font-size: 92px;
font-weight: 600; font-weight: 600;
&:hover {
text-decoration: underline;
}
} }
.result-description { .result-description {

View File

@ -36,7 +36,7 @@
<img <img
src="@/assets/image/download.svg" src="@/assets/image/download.svg"
style="width: 20px; height: 20px" style="width: 20px; height: 20px"
@click="handleDownload(item.url)" @click="downloadPdf(item.url)"
/> />
</div> </div>
</div> </div>
@ -345,55 +345,29 @@ const handleSearch = () => {
console.log("搜索:", searchQuery.value); console.log("搜索:", searchQuery.value);
}; };
const handleDownload = (url) => { const downloadPdf = async (pdfResource, filename = "") => {
// try {
console.log("下载:", url); // PDF
const response = await fetch(pdfResource);
const blob = await response.blob();
// a // Blob URL
const link = document.createElement("a"); const blobUrl = URL.createObjectURL(blob);
link.href = url;
// //
let fileName = url.split("/").pop(); const a = document.createElement("a");
// a.href = blobUrl;
if (fileName.includes("?") || fileName.includes("_t=")) { a.download = filename || pdfResource.split("/").pop() || "download.pdf";
fileName = fileName.split(/[?_]/)[0];
}
link.download = fileName;
link.target = "_blank";
// //
const isMobile = document.body.appendChild(a);
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( a.click();
navigator.userAgent document.body.removeChild(a);
);
if (isMobile) { // Blob URL
// 使fetchblob URL.revokeObjectURL(blobUrl);
fetch(url) } catch (error) {
.then((response) => response.blob()) console.error("下载PDF文件失败:", error);
.then((blob) => {
const objectUrl = URL.createObjectURL(blob);
link.href = objectUrl;
document.body.appendChild(link);
link.click();
//
setTimeout(() => {
document.body.removeChild(link);
URL.revokeObjectURL(objectUrl);
}, 100);
})
.catch((error) => {
console.error("下载文件时出错:", error);
// fetch退window.open
window.open(url, "_blank");
});
} else {
//
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
} }
}; };
</script> </script>
@ -475,10 +449,6 @@ const handleDownload = (url) => {
margin-bottom: 8px; margin-bottom: 8px;
font-size: 50px; font-size: 50px;
font-weight: 600; font-weight: 600;
&:hover {
text-decoration: underline;
}
} }
.result-description { .result-description {