Yansen 1 year ago
parent
commit
c1e5b1d812

+ 1
- 1
src/components/Footer.astro View File

63
           href="/"
63
           href="/"
64
           class="d-flex align-items-center mb-3 link-body-emphasis text-decoration-none"
64
           class="d-flex align-items-center mb-3 link-body-emphasis text-decoration-none"
65
         >
65
         >
66
-          <img class="bi me-2" width="120" src="../logo.png" />
66
+          <img class="bi me-2" width="120" src="/public/logo.png" />
67
         </a>
67
         </a>
68
         <p class="text-body-secondary">© 2024</p>
68
         <p class="text-body-secondary">© 2024</p>
69
       </div>
69
       </div>

+ 36
- 0
src/components/ImgPro.astro View File

1
+---
2
+import Img from '@/components/children/Img.astro'
3
+import Text from '@/components/children/Text.astro'
4
+
5
+const {
6
+  data,
7
+  url,
8
+  ratio,
9
+  btnDisplay,
10
+  titleSize,
11
+  childrenSize,
12
+  textWeight,
13
+  ellipsis,
14
+  position,
15
+} = Astro.props
16
+---
17
+
18
+<!-- 图片Pro版 -->
19
+<div class="box">
20
+  <Img url={data?.url} ratio={ratio} />
21
+  <Text
22
+    data={data}
23
+    btnDisplay={btnDisplay}
24
+    titleSize={titleSize}
25
+    childrenSize={childrenSize}
26
+    textWeight={textWeight}
27
+    ellipsis={ellipsis}
28
+    position={position}
29
+  />
30
+</div>
31
+<style>
32
+  .box {
33
+    position: relative;
34
+    text-align: center;
35
+  }
36
+</style>

+ 26
- 28
src/components/LeftImgRightText.astro View File

1
 ---
1
 ---
2
-const { json, lang, list } = Astro.props
2
+const { json, lang, listOrData } = Astro.props
3
 import Img from '@/components/children/Img.astro'
3
 import Img from '@/components/children/Img.astro'
4
 import Text from '@/components/children/Text.astro'
4
 import Text from '@/components/children/Text.astro'
5
-// const value = {
6
-//   id: '1',
7
-//   url: 'https://e.huawei.com/-/mediae/images/solutions/computing/ascend-computing/ascend-computing-case-1.jpg',
8
-//   title: '制造、AI开发平台 AI淬炼传统经验,让美味代代相传',
9
-//   content:
10
-//     '为生产优质香料和调料,提高公司竞争力,HEXA FOOD走上了数字化转型之路。通过使用华为云ModelArts一站式AI开发平台和Atlas 500智能小站,实现了辣椒智能分拣,筛选出优质原料,大幅提升了香料生产效率和品质',
11
-// }
5
+console.log('-----listOrData22----->', listOrData)
12
 ---
6
 ---
13
 
7
 
14
 <!-- 左图右文 -->
8
 <!-- 左图右文 -->
15
 <div class="container">
9
 <div class="container">
16
   <div class="row">
10
   <div class="row">
17
-    <div class="col-sm-12 col-md-12 my-5">
18
-      <div class="card border-0">
19
-        <div
20
-          class="left-right-card"
21
-          style={list?.id ? 'cursor: pointer' : ''}
22
-          data-post={list?.id}
23
-        >
24
-          <div class="row g-0">
25
-            <div class="col-md-6 col-sm-6">
26
-              <Img url={list?.url} ratio="3 / 2" />
27
-            </div>
28
-            <div class="col-md-6 col-sm-6">
29
-              <div class="card-body pt-0 px-5">
30
-                <Text
31
-                  list={list}
32
-                  btnDisplay={true}
33
-                  ellipsis="line-ellipsis-large"
34
-                />
11
+    {
12
+      listOrData?.map((item, index) => (
13
+        <div class="col-sm-12 col-md-12 my-5">
14
+          <div class="card border-0">
15
+            <div
16
+              class="left-right-card"
17
+              style={item?.id ? 'cursor: pointer' : ''}
18
+              data-post={item?.id}
19
+            >
20
+              <div class="row g-0">
21
+                <div class="col-md-6 col-sm-6">
22
+                  <Img url={item?.url} ratio="3 / 2" />
23
+                </div>
24
+                <div class="col-md-6 col-sm-6">
25
+                  <div class="card-body pt-0 px-5">
26
+                    <Text
27
+                      data={item?.children}
28
+                      btnDisplay={true}
29
+                      ellipsis="line-ellipsis-large"
30
+                    />
31
+                  </div>
32
+                </div>
35
               </div>
33
               </div>
36
             </div>
34
             </div>
37
           </div>
35
           </div>
38
         </div>
36
         </div>
39
-      </div>
40
-    </div>
37
+      ))
38
+    }
41
   </div>
39
   </div>
42
 </div>
40
 </div>
43
 <style></style>
41
 <style></style>

+ 3
- 3
src/components/LeftMiddleRightImgText.astro View File

1
 ---
1
 ---
2
-const { json, lang, list, componentTitle } = Astro.props
2
+const { json, lang, listOrData, componentTitle } = Astro.props
3
 import Img from '@/components/children/Img.astro'
3
 import Img from '@/components/children/Img.astro'
4
 import Text from '@/components/children/Text.astro'
4
 import Text from '@/components/children/Text.astro'
5
 ---
5
 ---
9
   <div class="fs-1 text-center mt-5">{componentTitle}</div>
9
   <div class="fs-1 text-center mt-5">{componentTitle}</div>
10
   <div class="row row-cols-md-3 row-cols-sm-1">
10
   <div class="row row-cols-md-3 row-cols-sm-1">
11
     {
11
     {
12
-      list?.map((item, index) => (
12
+      listOrData?.map((item, index) => (
13
         <div class="col-md-4 col-sm-12 my-5" id={item.id}>
13
         <div class="col-md-4 col-sm-12 my-5" id={item.id}>
14
           <div
14
           <div
15
             class="title-img"
15
             class="title-img"
26
                   />
26
                   />
27
                 </div>
27
                 </div>
28
                 <Text
28
                 <Text
29
-                  list={item?.children}
29
+                  data={item?.children}
30
                   btnDisplay={true}
30
                   btnDisplay={true}
31
                   ellipsis="line-ellipsis-small"
31
                   ellipsis="line-ellipsis-small"
32
                 />
32
                 />

+ 1
- 1
src/components/LeftOneRightFourImg.astro View File

69
                     transformEnlarge="transformEnlarge"
69
                     transformEnlarge="transformEnlarge"
70
                   />
70
                   />
71
                 </div>
71
                 </div>
72
-                <Text list={item?.children} ellipsis="line-ellipsis-small" />
72
+                <Text data={item?.children} ellipsis="line-ellipsis-small" />
73
               </div>
73
               </div>
74
             </div>
74
             </div>
75
           ))
75
           ))

+ 1
- 3
src/components/LeftRightCarousel.astro View File

24
 ]
24
 ]
25
 ---
25
 ---
26
 
26
 
27
-<!-- 左右轮播图 -->
28
-<Carousel list={list} Children={LeftImgRightText} />
29
-
27
+<!-- 左右轮播图 --><!-- <Carousel list={list} Children={LeftImgRightText} /> -->
30
 <style></style>
28
 <style></style>

+ 1
- 1
src/components/VerticalNavigationContent.astro View File

98
                 {item?.children?.map((item, index) => (
98
                 {item?.children?.map((item, index) => (
99
                   <div class="col-md-4" id={index}>
99
                   <div class="col-md-4" id={index}>
100
                     <Text
100
                     <Text
101
-                      list={item}
101
+                      data={item}
102
                       ellipsis="line-ellipsis-small"
102
                       ellipsis="line-ellipsis-small"
103
                       btnDisplay={true}
103
                       btnDisplay={true}
104
                     />
104
                     />

+ 1
- 1
src/components/children/Carousel.astro View File

22
                     data-post={it.id}
22
                     data-post={it.id}
23
                   >
23
                   >
24
                     <div class="card border-0" />
24
                     <div class="card border-0" />
25
-                    <Children list={it} componentTitle={componentTitle} />
25
+                    <Children listOrData={it} componentTitle={componentTitle} />
26
                   </div>
26
                   </div>
27
                 </div>
27
                 </div>
28
               ))}
28
               ))}

+ 2
- 2
src/components/children/Img.astro View File

1
 ---
1
 ---
2
-const { url, ratio, circle, transformEnlarge } = Astro.props
2
+const { url, ratio, transformEnlarge } = Astro.props
3
 ---
3
 ---
4
 
4
 
5
 <!-- 图片 -->
5
 <!-- 图片 -->
6
 <img
6
 <img
7
   src={url}
7
   src={url}
8
-  class=`img-fluid object-fit-cover ${circle} ${transformEnlarge}`
8
+  class=`img-fluid object-fit-cover ${transformEnlarge}`
9
   style=`aspect-ratio:${ratio}`
9
   style=`aspect-ratio:${ratio}`
10
   alt=""
10
   alt=""
11
 />
11
 />

+ 16
- 10
src/components/children/Text.astro View File

1
 ---
1
 ---
2
 const {
2
 const {
3
-  list,
3
+  data,
4
   titleSize = 'fs-4',
4
   titleSize = 'fs-4',
5
   childrenSize,
5
   childrenSize,
6
   textColor,
6
   textColor,
14
 
14
 
15
 <!-- 文本 -->
15
 <!-- 文本 -->
16
 <div class=`${position}`>
16
 <div class=`${position}`>
17
-  <p class=`${titleSize} ${textWeight} mb-0 pt-5`>{list?.title}</p>
17
+  <p class=`${titleSize} ${textWeight} mb-0 pt-5`>{data?.title}</p>
18
   <!-- <p class="fs-4">打造全球首个“岛式”精益智造工厂</p> -->
18
   <!-- <p class="fs-4">打造全球首个“岛式”精益智造工厂</p> -->
19
   {textUnderline && <div class="text-underline" />}
19
   {textUnderline && <div class="text-underline" />}
20
 
20
 
21
-  <p class=`text-secondary ${childrenSize} ${ellipsis} pt-1`>{list?.content}</p>
22
-  {
23
-    btnDisplay && (
24
-      <button type="button" class="btn btn-outline-danger rounded-5">
25
-        了解更多
26
-      </button>
27
-    )
28
-  }
21
+  <p class=`text-secondary ${childrenSize} ${ellipsis} pt-1`>{data?.content}</p>
22
+  {btnDisplay && <a class="fs-5 a-link">了解更多</a>}
29
 </div>
23
 </div>
30
 
24
 
31
 <style>
25
 <style>
63
     left: 50%;
57
     left: 50%;
64
     transform: translate(-50%, -50%);
58
     transform: translate(-50%, -50%);
65
   }
59
   }
60
+  .a-link {
61
+    padding: 12px 28px;
62
+    border: 2px solid red;
63
+    border-radius: 25px;
64
+    text-decoration: none;
65
+    color: red;
66
+    cursor: pointer;
67
+  }
68
+  /* .a-link:hover {
69
+    color: white;
70
+    background-color: red;
71
+  } */
66
 </style>
72
 </style>

+ 18
- 6
src/pages/[lang]/index.astro View File

2
 import Layout from '@/layouts/Layout.astro'
2
 import Layout from '@/layouts/Layout.astro'
3
 import Footer from '@/components/Footer.astro'
3
 import Footer from '@/components/Footer.astro'
4
 import Navbar from '@/components/Navbar.astro'
4
 import Navbar from '@/components/Navbar.astro'
5
-import FirstScreen from 'src/pages/components/FirstScreen.astro'
5
+import ImgPro from '@/components/ImgPro.astro'
6
 import LeftOneRightFourImg from '@/components/LeftOneRightFourImg.astro'
6
 import LeftOneRightFourImg from '@/components/LeftOneRightFourImg.astro'
7
 import LeftMiddleRightImgText from '@/components/LeftMiddleRightImgText.astro'
7
 import LeftMiddleRightImgText from '@/components/LeftMiddleRightImgText.astro'
8
 import Carousel from '@/components/children/Carousel.astro'
8
 import Carousel from '@/components/children/Carousel.astro'
26
 )
26
 )
27
 const title = getName(categary)
27
 const title = getName(categary)
28
 
28
 
29
-const firstScreenList = {
29
+const imgProData = {
30
+  url: '//e.huawei.com/-/mediae/images/home/banner/jiasu-banner-pc1.jpg',
30
   title: '加速行业智能化',
31
   title: '加速行业智能化',
31
   content:
32
   content:
32
     '华为持续引领数智基础设施产品与解决方案创新,使能百模千态,赋能千行万业智能化转型',
33
     '华为持续引领数智基础设施产品与解决方案创新,使能百模千态,赋能千行万业智能化转型',
162
 <Layout title={title}>
163
 <Layout title={title}>
163
   <NavMenu lang={lang} client:load />
164
   <NavMenu lang={lang} client:load />
164
 
165
 
165
-  <!-- 首屏图 -->
166
-  <FirstScreen data={pageData.firstpage} />
166
+  <ImgPro
167
+    data={imgProData}
168
+    ratio="16 / 9"
169
+    btnDisplay={true}
170
+    titleSize="fs-1"
171
+    childrenSize="fs-4"
172
+    textWeight="fw-bold"
173
+    ellipsis="line-ellipsis-small"
174
+    position="positionBottom"
175
+  />
167
 
176
 
168
   <!-- 三列图文轮播图 -->
177
   <!-- 三列图文轮播图 -->
169
   <Carousel
178
   <Carousel
172
     Children={LeftMiddleRightImgText}
181
     Children={LeftMiddleRightImgText}
173
   />
182
   />
174
 
183
 
175
-  <LeftMiddleRightImgText componentTitle="案例展示" list={caseList} />
176
-  <LeftMiddleRightImgText componentTitle="最新资讯" list={informationList} />
184
+  <LeftMiddleRightImgText componentTitle="案例展示" listOrData={caseList} />
185
+  <LeftMiddleRightImgText
186
+    componentTitle="最新资讯"
187
+    listOrData={informationList}
188
+  />
177
   <Footer lang={lang} />
189
   <Footer lang={lang} />
178
 </Layout>
190
 </Layout>

+ 115
- 0
src/pages/[lang]/products-solutions/lot/building/index.astro View File

1
+---
2
+import Layout from '@/layouts/Layout.astro'
3
+import NavMenu from '@/components/NavMenu/index.jsx'
4
+import Img from '@/components/children/Img.astro'
5
+import LeftImgRightText from '@/components/LeftImgRightText.astro'
6
+import LeftMiddleRightImgText from '@/components/LeftMiddleRightImgText.astro'
7
+import Carousel from '@/components/children/Carousel.astro'
8
+import ImgPro from '@/components/ImgPro.astro'
9
+import Footer from '@/components/Footer.astro'
10
+
11
+const { lang = 'zh' } = Astro.params
12
+
13
+const data = [
14
+  {
15
+    id: '1',
16
+    url: 'https://e.huawei.com/-/mediae/images/solutions/computing/ascend-computing/ascend-computing-case-2.jpg',
17
+    title: '重新定义园区',
18
+    content:
19
+      '依托新ICT技术,华为打造园区产品组合方案,重新定义园区,最终实现终端互联、数据融合、业务汇聚。重新定义园区网络:多线合一、有线变无线,将15张网简化为4种网络技术',
20
+  },
21
+]
22
+const imgProData = {
23
+  url: '//e.huawei.com/-/mediae/images/solutions/campus/campus/secondbanner-pc.jpg',
24
+  title: '加速行业智能化',
25
+  content:
26
+    '华为持续引领数智基础设施产品与解决方案创新,使能百模千态,赋能千行万业智能化转型',
27
+}
28
+
29
+const informationList = [
30
+  {
31
+    id: '1',
32
+    url: 'https://e.huawei.com/-/mediae/images/solutions/campus/office-network/office-network-banner-bequoted.png',
33
+    children: {
34
+      title: '极简办公网',
35
+      content: '三层变两层,轻量化运维,打造园区办公网络致简体验',
36
+    },
37
+  },
38
+  {
39
+    id: '2',
40
+    url: 'https://e.huawei.com/-/mediae/images/solutions/campus/sdwan/sdwan-banner-bequoted.jpg',
41
+    children: {
42
+      title: '总部分支互联',
43
+      content:
44
+        '华为总部分支互联方案,应对传统网络架构封闭、业务体验难保障、运维困难所带来的挑战,随时随地安全接入。',
45
+    },
46
+  },
47
+  {
48
+    id: '3',
49
+    url: 'https://e.huawei.com/-/mediae/images/solutions/campus/converged-production-network/banner-bequoted.png',
50
+    children: {
51
+      title: '融合生产网',
52
+      content: '数字化生产需要高可靠、无线化、工业级的网络联接能力',
53
+    },
54
+  },
55
+]
56
+
57
+const carouselList = [
58
+  [
59
+    [
60
+      {
61
+        id: '1',
62
+        url: 'https://e.huawei.com/-/mediae/images/case-studies/industries/education/2022/southeast-university-smart-campus/banner-bequoted1.jpg',
63
+        children: {
64
+          title: '东南大学:携手华为打造“数智东南”信息高速公路',
65
+          content:
66
+            '“升级后的Wi-Fi网络感觉确实挺好的,信号穿透力更强,在宿舍不同位置信号很强;连接很稳定,在高峰期时期也再不会出现突然掉线了。让人感觉最直接的还是网络带宽的提升,让直播课程流畅了很多,使用网盘下载文件时比过去快了好几倍。”',
67
+        },
68
+      },
69
+    ],
70
+  ],
71
+  [
72
+    [
73
+      {
74
+        id: '2',
75
+        url: 'https://e.huawei.com/-/mediae/images/case-studies/solutions/campus/2023/chongqing-lianglu-guoyuan-port/banner-bequoted.jpg',
76
+        children: {
77
+          title:
78
+            '重庆两路果园港综合保税区:绿色、生态、环保、城景融合的智慧园区',
79
+          content:
80
+            '国贸会展集团携手华为打造智慧会展中心,以ICT基础设施为支撑,以安全保障能力为基础,以运营管理能力、服务体验能力和数据运营能力为核心,带来智慧会展全新体验。',
81
+        },
82
+      },
83
+    ],
84
+  ],
85
+]
86
+---
87
+
88
+<Layout>
89
+  <NavMenu lang={lang} client:load />
90
+  <Img
91
+    url="//e.huawei.com/-/mediae/images/solutions/campus/campus/banner-pc.jpg"
92
+    ratio="3 / 1"
93
+  />
94
+  <LeftImgRightText listOrData={data} />
95
+  <ImgPro
96
+    data={imgProData}
97
+    ratio="3 / 1"
98
+    btnDisplay={true}
99
+    titleSize="fs-1"
100
+    childrenSize="fs-4"
101
+    textWeight="fw-bold"
102
+    ellipsis="line-ellipsis-small"
103
+    position="positionMiddle"
104
+  />
105
+  <LeftMiddleRightImgText
106
+    componentTitle="场景化解决方案"
107
+    listOrData={informationList}
108
+  />
109
+  <Carousel
110
+    componentTitle="成功案例"
111
+    list={carouselList}
112
+    Children={LeftImgRightText}
113
+  />
114
+  <Footer lang={lang} />
115
+</Layout>

+ 0
- 0
src/pages/products-solutions/lot/building/index.astro View File