page.tsx
3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import Carousel from '@/components/Carousel';
import Header from '@/components/Header';
import FourCard from '@/components/MainTitleList/FourCard';
import MainTitleThreeCard from '@/components/MainTitleList/ThreeCard';
import { Container } from '@mui/material';
import React from 'react';
// import MainTitleListOdd from '@/components/MainTitleListOdd';
// import { isMobile } from '@/utils';
const BATTERIES = [
{ name: 'Material Evaluation', imageUrl: '/imgs/pc/home/batteries/1.png', href: '/customize' },
{ name: 'R&D Foundry', imageUrl: '/imgs/pc/home/batteries/2.png', href: '/customize' },
{ name: 'Chemical System', imageUrl: '/imgs/pc/home/batteries/3.png', href: '/customize' },
{
name: 'Semi Product Customization',
imageUrl: '/imgs/pc/home/batteries/4.png',
href: '/customize'
}
]
const PACKS = [
{ name: 'Power bank', imageUrl: '/imgs/pc/home/packs/1.png', href: '/pack' },
{ name: 'Energy storage', imageUrl: '/imgs/pc/home/packs/2.png', href: '/pack' },
{ name: 'power tool', imageUrl: '/imgs/pc/home/packs/3.png', href: '/pack' },
{
name: 'portable energy storage',
imageUrl: '/imgs/pc/home/packs/4.png',
href: '/pack'
}
]
const TESTS = [
{
name: 'Electrochemical performance',
imageUrl: '/imgs/pc/home/tests/1.svg',
href: '/test'
},
{ name: 'Reliability testing', imageUrl: '/imgs/pc/home/tests/2.svg', href: '/test' },
{ name: 'Material testing', imageUrl: '/imgs/pc/home/tests/3.svg', href: '/test' },
{ name: 'Calibration', imageUrl: '/imgs/pc/home/tests/4.svg', href: '/test' }
]
const Page = async () => {
let category = []
const response = await fetch('http://39.108.227.113:8002/shop/product/category', {
method: 'POST',
body: JSON.stringify({})
})
const result = await response.json();
if (result.result === 0) {
category = result.data?.rootCategoryList || []
console.log('%c [ ]-18', 'font-size:13px; background:pink; color:#bf2c9f;', category)
}
return (
<div className="w-full">
<Header />
<div className='h-[600px] w-full'>
<Carousel />
<div className="py-8 py-sm-16">
<Container>
<MainTitleThreeCard title={"Material Reagents"} desc={'Leading global provider of energy storage research materials and providing other professional/universal experimental materials.'} list={undefined} href={undefined} />
</Container>
{/* Lab Device */}
<Container>
<FourCard
title="Lab Device"
list={category?.[3]?.list.map((item) => ({ ...item, href: '/products' }))}
desc="Self-built High-precision Machining Center with Powerful Design and Manufacturing Capabilities. "
href="/equipment"
/>
</Container>
{/* Customized Battery */}
<Container>
<FourCard
title="Customized Battery"
list={BATTERIES}
desc="200mAh~10Ah, Winding/Stacking, Unfilled/Filled Electrolyte Cells, Three-Electrode, and More."
href="/equipment"
/>
</Container>
{/* Testing */}
<Container>
<FourCard
title="Testing"
list={TESTS.map((item) => ({ ...item, href: '/products' }))}
desc="Self built testing center and signed strategic cooperation with ATL, Tsinghua and other units. "
href="/test"
/>
</Container>
{/* pack */}
<Container>
<FourCard
title="Pack"
list={PACKS.map((item) => ({ ...item, href: '/products' }))}
desc="Focusing on energy materials/new energy storage systems/modules and other fields, mastering advanced technologies to provide high-quality services."
href="/pack"
/>
</Container>
</div>
</div>
</div>
);
};
export default Page;