feat: 替换img标签支持静态资源打包
parent
77362e3d6b
commit
2f829ba584
|
@ -1,6 +1,15 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
output: 'export'
|
||||
output: 'export',
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
source: '/',
|
||||
destination: '/zh/home',
|
||||
permanent: true,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import Image from "next/image";
|
||||
|
||||
|
||||
export default function Form() {
|
||||
return (
|
||||
|
@ -27,7 +25,7 @@ export default function Form() {
|
|||
style={{background: 'linear-gradient(155deg, #A4D5FF 55%, #82B2FF 99%)'}}
|
||||
>
|
||||
<div className="text-[#fff] text-[24px] font-semibold">提交</div>
|
||||
<Image
|
||||
<img
|
||||
src="/home/submit_icon.png"
|
||||
width={26}
|
||||
height={22}
|
||||
|
|
|
@ -6,7 +6,7 @@ export async function generateStaticParams() {
|
|||
|
||||
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
import { getDictionary } from '@/dictionaries';
|
||||
import Form from "./components/form";
|
||||
import Header from "@/app/components/header";
|
||||
|
@ -73,7 +73,7 @@ export default async function Home (props: PropsType) {
|
|||
</div>
|
||||
</section>
|
||||
<div className="w-full h-[428px] relative">
|
||||
<Image
|
||||
<img
|
||||
src="/home/img_bg2.png"
|
||||
width={745}
|
||||
height={428}
|
||||
|
@ -85,7 +85,7 @@ export default async function Home (props: PropsType) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="w-full h-[403px] relative">
|
||||
<Image
|
||||
<img
|
||||
className="absolute right-[0]"
|
||||
src="/home/img_AB.png"
|
||||
width={787}
|
||||
|
@ -101,7 +101,7 @@ export default async function Home (props: PropsType) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="w-full h-[392px] relative">
|
||||
<Image
|
||||
<img
|
||||
className="absolute"
|
||||
src="/home/img_mutilan.png"
|
||||
width={698}
|
||||
|
@ -117,7 +117,7 @@ export default async function Home (props: PropsType) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="w-full h-[317px] relative mt-[83px]">
|
||||
<Image
|
||||
<img
|
||||
className="absolute right-[0]"
|
||||
src="/home/img_Omnichannel.png"
|
||||
width={742}
|
||||
|
@ -133,7 +133,7 @@ export default async function Home (props: PropsType) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="w-full h-[317px] relative mt-[83px]">
|
||||
<Image
|
||||
<img
|
||||
className="absolute"
|
||||
src="/home/img_3.png"
|
||||
width={881}
|
||||
|
@ -167,7 +167,7 @@ export default async function Home (props: PropsType) {
|
|||
{
|
||||
caseList.map((item: CaseType, index: number) => {
|
||||
return <div key={'key'+index} className="cursor-pointer">
|
||||
<Image
|
||||
<img
|
||||
className="hover:scale-[1.17] hover:shadow-[0px_0px_20px_8px_#0988FF] rounded-[60px]
|
||||
transition ease-in-out duration-300"
|
||||
src={item.img}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import Image from "next/image"
|
||||
|
||||
export default function Footer(props: {dict: Record<string, string>}) {
|
||||
const { dict } = props
|
||||
return (
|
||||
<footer>
|
||||
<div className="flex items-start justify-between w-full px-[304px]">
|
||||
<div className=" w-[166px] flex flex-col items-center mb-[15px]">
|
||||
<Image
|
||||
<img
|
||||
className="mb-[16px]"
|
||||
src="/home/qrcode.png"
|
||||
width={151}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
'use client'
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
|
||||
|
@ -16,14 +15,14 @@ function SplitButton(props: {dict: Record<string, string>, lang: string}) {
|
|||
<div className="flex items-center w-[129px] h-[28px] bg-[#EEF1F6]
|
||||
border-[1px] border-[#eeeeee] rounded-[3px] px-[10px] mt-[18px] cursor-pointer"
|
||||
onClick={() => setShow(!show)}>
|
||||
<Image
|
||||
<img
|
||||
src="/common/earth.png"
|
||||
width={16.5}
|
||||
height={16.5}
|
||||
alt="logo"
|
||||
/>
|
||||
<div className="flex-1 text-[14px] text-[#333333] mx-[9px]">{ dict?.lang }</div>
|
||||
<Image
|
||||
<img
|
||||
src="/common/arrow.png"
|
||||
width={10}
|
||||
height={5}
|
||||
|
@ -65,7 +64,7 @@ export default function Header(props: {dict: Record<string, string>, lang: strin
|
|||
]
|
||||
return (<>
|
||||
<div className={"flex items-center px-[20px] h-[80px]"}>
|
||||
<Image
|
||||
<img
|
||||
src="/common/logo.png"
|
||||
width={180}
|
||||
height={47}
|
||||
|
@ -79,7 +78,7 @@ export default function Header(props: {dict: Record<string, string>, lang: strin
|
|||
<div className="my-[10px] w-[144px] text-[18px]">{ item.name }</div>
|
||||
{
|
||||
activeTab === item.name ?
|
||||
<Image src="/common/tab_checked.png" width={144} height={8} alt="" /> :
|
||||
<img src="/common/tab_checked.png" width={144} height={8} alt="" /> :
|
||||
<div className="h-[8px]"></div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -20,6 +20,12 @@ export const metadata: Metadata = {
|
|||
};
|
||||
|
||||
function RootLayout({ children }:{ children: ReactNode } ): ReactElement {
|
||||
// const languages = navigator.languages;
|
||||
// if(languages[0] === 'zh-CN') {
|
||||
// redirect('/zh/home')
|
||||
// } else {
|
||||
// redirect('/en/home')
|
||||
// }
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
|
|
Loading…
Reference in New Issue