浏览代码

feat: 新增支持和使用条款国际化配置,添加新图片和视频资源

本次提交主要进行了以下修改:
1. 在国际化配置中新增了“支持”和“使用条款”的翻译内容,提升多语言支持。
2. 新增了图片资源home-a-2.webp和视频资源banner03.mp4,以丰富网站内容和视觉效果。
3. 更新了首页的轮播图配置,确保新资源能够正确渲染。

这些改动旨在增强用户体验,提供更全面的信息和视觉展示。
master
lizhuang 1 个月前
父节点
当前提交
3b454983aa
共有 7 个文件被更改,包括 202 次插入40 次删除
  1. 二进制
      assets/images/home-a-2.webp
  2. 二进制
      assets/videos/banner03.mp4
  3. 17
    1
      i18n/locales/en.ts
  4. 16
    0
      i18n/locales/ja.ts
  5. 18
    2
      i18n/locales/zh.ts
  6. 16
    24
      pages/contact.vue
  7. 135
    13
      pages/index.vue

二进制
assets/images/home-a-2.webp 查看文件


二进制
assets/videos/banner03.mp4 查看文件


+ 17
- 1
i18n/locales/en.ts 查看文件

@@ -25,11 +25,27 @@ export default {
title: "Privacy Policy",
description: "Learn how we collect, use, and protect your personal information",
},
support: {
title: "Support",
description: "Learn how we collect, use, and protect your personal information",
},
terms: {
title: "Terms of Use",
description: "Learn how we collect, use, and protect your personal information",
},
meta: {
privacy: {
title: "Privacy Policy - Hanye",
description: "Learn how Hanye collects, uses, and protects your personal information"
}
},
support: {
title: "Support - Hanye",
description: "Learn how Hanye collects, uses, and protects your personal information",
},
terms: {
title: "Terms of Use - Hanye",
description: "Learn how Hanye collects, uses, and protects your personal information",
},
},
footer: {
productsLinks: {

+ 16
- 0
i18n/locales/ja.ts 查看文件

@@ -25,11 +25,27 @@ export default {
title: "プライバシーポリシー",
description: "当社が収集、使用、保護する個人情報について学ぶ",
},
support: {
title: "サポート",
description: "当社が収集、使用、保護する個人情報について学ぶ",
},
terms: {
title: "利用規約",
description: "当社が収集、使用、保護する個人情報について学ぶ",
},
meta: {
privacy: {
title: "プライバシーポリシー - Hanye",
description: "Hanyeが収集、使用、保護する個人情報について学ぶ",
},
support: {
title: "サポート - Hanye",
description: "Hanyeが収集、使用、保護する個人情報について学ぶ",
},
terms: {
title: "利用規約 - Hanye",
description: "Hanyeが収集、使用、保護する個人情報について学ぶ",
},
},
footer: {
productsLinks: {

+ 18
- 2
i18n/locales/zh.ts 查看文件

@@ -44,11 +44,27 @@ export default {
title: "隐私政策",
description: "了解我们如何收集、使用和保护您的个人信息",
},
support: {
title: "技术支持",
description: "联系我们,获取更多产品信息和支持。",
},
terms: {
title: "使用条款",
description: "了解我们如何收集、使用和保护您的个人信息",
},
meta: {
privacy: {
title: "隐私政策 - Hanye",
description: "了解 Hanye 如何收集、使用和保护您的个人信息"
}
description: "了解 Hanye 如何收集、使用和保护您的个人信息",
},
support: {
title: "技术支持 - Hanye",
description: "联系我们,获取更多产品信息和支持。",
},
terms: {
title: "使用条款 - Hanye",
description: "了解 Hanye 如何收集、使用和保护您的个人信息",
},
},
},
home: {

+ 16
- 24
pages/contact.vue 查看文件

@@ -17,9 +17,11 @@
>{{ t("common.home") }}</nuxt-link
>
<span class="text-white/60 text-base font-normal px-2"> / </span>
<nuxt-link :to="`${homepagePath}/contact`" class="text-white text-base font-normal">{{
t("contact.title")
}}</nuxt-link>
<nuxt-link
:to="`${homepagePath}/contact`"
class="text-white text-base font-normal"
>{{ t("contact.title") }}</nuxt-link
>
</div>
</div>
<div
@@ -243,18 +245,13 @@
*/
import { useErrorHandler } from "~/composables/useErrorHandler";
import { useCaptcha } from "~/composables/useCaptcha";
import emailjs from '@emailjs/browser';
import emailjs from "@emailjs/browser";
const { t, locale } = useI18n();

const homepagePath = computed(() => {
return locale.value === "zh" ? "" : `/${locale.value}`;
});

// EmailJS 配置
const EMAILJS_SERVICE_ID = 'YOUR_SERVICE_ID'; // 替换为你的 Service ID
const EMAILJS_TEMPLATE_ID = 'YOUR_TEMPLATE_ID'; // 替换为你的 Template ID
const EMAILJS_PUBLIC_KEY = 'YOUR_PUBLIC_KEY'; // 替换为你的 Public Key

const { error, isLoading, wrapAsync } = useErrorHandler();
const captcha = useCaptcha();
const isSubmitting = ref(false);
@@ -280,20 +277,15 @@ async function handleSubmit() {
return;
}

// 准备邮件模板参数
const templateParams = {
from_name: form.value.name,
from_email: form.value.email,
message: form.value.message,
to_name: 'Hanye Team',
};

// 发送邮件
const response = await emailjs.send(
EMAILJS_SERVICE_ID,
EMAILJS_TEMPLATE_ID,
templateParams,
EMAILJS_PUBLIC_KEY
const response = await fetch(
`https://192.168.1.104/dev-api/system/zsEmail/sendEmailWeb?receiveEmail=${form.value.email}&context=${form.value.message}&title=[Hanye Website]${form.value.name}`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
}
);

if (response.status === 200) {
@@ -307,11 +299,11 @@ async function handleSubmit() {
submitSuccess.value = true;
return { success: true };
} else {
throw new Error('Failed to send email');
throw new Error("Failed to send email");
}
});
} catch (error) {
console.error('Error sending email:', error);
console.error("Error sending email:", error);
throw error;
} finally {
isSubmitting.value = false;

+ 135
- 13
pages/index.vue 查看文件

@@ -88,7 +88,132 @@
class="w-36 h-14 mt-12 flex items-center justify-center bg-[#35F1FF] rounded-lg hover:bg-[#35F1FF]/80 transition-colors duration-300"
>
<nuxt-link
to="/products/1"
:to="`${homepagePath}/products/HE80-2TNLHS`"
class="w-full h-full !flex items-center justify-center text-zinc-900"
>
{{ t("products.view_details") }}
</nuxt-link>
</div>
</div>
</div>
</SwiperSlide>
<SwiperSlide>
<div
class="max-w-screen-2xl mx-auto h-full relative"
:style="{
backgroundImage: `url(${homeA2Webp})`,
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
}"
>
<div
class="w-full h-full flex-col justify-center hidden md:flex relative z-10"
>
<div
class="rounded border border-white w-11 h-6 leading-none justify-center flex items-center text-white text-sm font-normal"
>
SSD
</div>
<div class="justify-center">
<span class="text-white text-6xl font-normal leading-[78px]">{{
t("home.carousel.one.title")
}}</span>
<span class="text-white text-6xl font-normal leading-[78px]">{{
t("home.carousel.one.description")
}}</span>
<br />
<span class="text-white text-6xl font-normal leading-[78px]">{{
t("home.carousel.one.description2")
}}</span
><br />
<span
class="text-cyan-400 text-6xl font-normal leading-[78px]"
>{{ t("home.carousel.one.description3") }}</span
>
</div>
<div class="flex flex-col gap-2 mt-4">
<div
class="flex items-center gap-2 text-stone-50 text-xl font-normal"
>
<div class="w-2 h-2 bg-white rounded-full"></div>
{{ t("home.carousel.one.description4") }}
</div>
<div
class="flex items-center gap-2 text-stone-50 text-xl font-normal"
>
<div class="w-2 h-2 bg-white rounded-full"></div>
{{ t("home.carousel.one.description5") }}
</div>
</div>
<div
class="w-36 h-14 mt-12 flex items-center justify-center bg-[#35F1FF] rounded-lg hover:bg-[#35F1FF]/80 transition-colors duration-300"
>
<nuxt-link
:to="`${homepagePath}/products/HE80-2TNLHS`"
class="w-full h-full !flex items-center justify-center text-zinc-900"
>
{{ t("products.view_details") }}
</nuxt-link>
</div>
</div>
</div>
</SwiperSlide>
<SwiperSlide>
<div
class="max-w-screen-2xl mx-auto h-full relative"
>
<video
:src="homeA3Webp"
autoplay
muted
loop
class="w-full h-full object-cover"
></video>
<div
class="w-full h-full flex-col justify-center hidden md:flex absolute top-0 left-0 z-10"
>
<div
class="rounded border border-white w-11 h-6 leading-none justify-center flex items-center text-white text-sm font-normal"
>
SSD
</div>
<div class="justify-center">
<span class="text-white text-6xl font-normal leading-[78px]">{{
t("home.carousel.one.title")
}}</span>
<span class="text-white text-6xl font-normal leading-[78px]">{{
t("home.carousel.one.description")
}}</span>
<br />
<span class="text-white text-6xl font-normal leading-[78px]">{{
t("home.carousel.one.description2")
}}</span
><br />
<span
class="text-cyan-400 text-6xl font-normal leading-[78px]"
>{{ t("home.carousel.one.description3") }}</span
>
</div>
<div class="flex flex-col gap-2 mt-4">
<div
class="flex items-center gap-2 text-stone-50 text-xl font-normal"
>
<div class="w-2 h-2 bg-white rounded-full"></div>
{{ t("home.carousel.one.description4") }}
</div>
<div
class="flex items-center gap-2 text-stone-50 text-xl font-normal"
>
<div class="w-2 h-2 bg-white rounded-full"></div>
{{ t("home.carousel.one.description5") }}
</div>
</div>
<div
class="w-36 h-14 mt-12 flex items-center justify-center bg-[#35F1FF] rounded-lg hover:bg-[#35F1FF]/80 transition-colors duration-300"
>
<nuxt-link
:to="`${homepagePath}/products/HE80-2TNLHS`"
class="w-full h-full !flex items-center justify-center text-zinc-900"
>
{{ t("products.view_details") }}
@@ -538,8 +663,11 @@ import { useI18n, useRoute, useAsyncData, queryCollection } from "#imports";
import video from "@/assets/videos/video.mp4";
import videoWebp from "@/assets/videos/video.webp";
import homeA1Webp from "@/assets/images/home-a-1.webp";
import homeA2Webp from "@/assets/images/home-a-2.webp";
import homeA3Webp from "@/assets/videos/banner03.mp4";
import homeC1Webp from "@/assets/images/home-c-1.webp";


// 数据类型定义
interface Product {
id: number;
@@ -580,16 +708,6 @@ const isMobile = breakpoints.smaller("md");

const videoSrc = ref(video);

// 获取轮播图数据(由于没有对应的content文件,这里保留为静态数据)
const carouselList = ref([
{
id: 1,
title: "高性能SSD",
image: homeA1Webp,
link: "/products/W400-1TBSY01",
},
]);

/**
* 使用计算属性获取当前语言的数据文件URL
*/
@@ -676,7 +794,9 @@ const loadUsageData = async () => {
id: `placeholder-${usage.id}`,
title: usage.title,
image: ``,
link: `${homepagePath.value}/products?usage=${encodeURIComponent(usage.title)}`,
link: `${homepagePath.value}/products?usage=${encodeURIComponent(
usage.title
)}`,
description: "",
});
}
@@ -724,7 +844,9 @@ const loadCategoryData = async () => {
title: category.title || "",
description: category.description || "",
image: category.image || "",
link: `${homepagePath.value}/products?category=${encodeURIComponent(category.title)}`,
link: `${homepagePath.value}/products?category=${encodeURIComponent(
category.title
)}`,
capacities: category.capacities || [],
summary: category.summary || "",
sort: category.sort || 0,

正在加载...
取消
保存