fangmingyue hace 1 año
padre
commit
e884591e5f

+ 0
- 9
src/components/FirstScreen.astro Ver fichero

@@ -1,9 +0,0 @@
1
----
2
-import Img from '@/components/children/Img.astro'
3
----
4
-
5
-<!-- 首屏图 -->
6
-<Img
7
-  url="//e.huawei.com/-/mediae/images/home/banner/jiasu-banner-pc1.jpg"
8
-  ratio="16 / 9"
9
-/>

+ 41
- 3
src/components/Footer.astro Ver fichero

@@ -1,7 +1,7 @@
1 1
 ---
2 2
 import { arr2Tree } from '@/utils/array'
3 3
 
4
-const [menus] = arr2Tree(Astro.locals._menus || [])
4
+// const [menus] = arr2Tree(Astro.locals._menus || [])
5 5
 
6 6
 const { lang } = Astro.props
7 7
 
@@ -14,6 +14,44 @@ function getName(item = {}) {
14 14
   )
15 15
 }
16 16
 
17
+const menus = [
18
+  {
19
+    id: '1',
20
+    name: '首页',
21
+  },
22
+  {
23
+    id: '2',
24
+    name: '产品与解决方案',
25
+    url: '/',
26
+    children: [
27
+      {
28
+        name: '智慧物联',
29
+      },
30
+      {
31
+        name: '工业互联网',
32
+      },
33
+      {
34
+        name: '政企医疗',
35
+      },
36
+      {
37
+        name: '其他业务',
38
+      },
39
+    ],
40
+  },
41
+  {
42
+    id: '3',
43
+    name: '最新资讯',
44
+  },
45
+  {
46
+    id: '4',
47
+    name: '关于云致',
48
+  },
49
+  {
50
+    id: '5',
51
+    name: '联系我们',
52
+  },
53
+]
54
+
17 55
 const colNum = Math.ceil(12 / (menus?.length + 1))
18 56
 ---
19 57
 
@@ -37,7 +75,7 @@ const colNum = Math.ceil(12 / (menus?.length + 1))
37 75
           menus?.map((item) => {
38 76
             return (
39 77
               <div class={`col-md-${colNum} col-sm-12 mb-3`}>
40
-                <h5>{getName(item)}</h5>
78
+                <h5>{item?.name}</h5>
41 79
                 <ul class="nav flex-column">
42 80
                   {item?.children?.map((child) => (
43 81
                     <li class="nav-item mb-2">
@@ -45,7 +83,7 @@ const colNum = Math.ceil(12 / (menus?.length + 1))
45 83
                         href={`/${lang}/${child.categaryId}`}
46 84
                         class="nav-link p-0 text-body-secondary"
47 85
                       >
48
-                        {getName(child)}
86
+                        {child?.name}
49 87
                       </a>
50 88
                     </li>
51 89
                   ))}

+ 2
- 30
src/components/LeftMiddleRightImgText.astro Ver fichero

@@ -1,40 +1,12 @@
1 1
 ---
2
-const { json, lang } = Astro.props
2
+const { json, lang, list, componentTitle } = Astro.props
3 3
 import Img from '@/components/children/Img.astro'
4 4
 import Text from '@/components/children/Text.astro'
5
-const list = [
6
-  {
7
-    id: '1',
8
-    url: 'https://e.huawei.com/-/mediae/images/solutions/computing/banner/huawei-data-center-banner-share.jpg',
9
-    children: {
10
-      title: '国家区域人工智能计算中心',
11
-      content:
12
-        '方案主要用于人工智能深度学习模型开发、模型训练和模型推理场景,以AI算力集群赋能产业集群,推动人工智能产业集约集聚发展。',
13
-    },
14
-  },
15
-  {
16
-    id: '2',
17
-    url: 'https://e.huawei.com/-/mediae/images/solutions/computing/banner/huawei-computing-ai-solution2-banner-share.jpg',
18
-    children: {
19
-      title: '城市人工智能中枢',
20
-      content:
21
-        '依托ICT技术与知识创新融合,推动城市的感知、认知、决策和执行实现深度协同,打造面向城市的智能应用和场景化服务。',
22
-    },
23
-  },
24
-  {
25
-    id: '3',
26
-    url: 'https://e.huawei.com/-/mediae/images/solutions/computing/banner/huawei-computing-solution-ai-1-share.jpg',
27
-    children: {
28
-      title: '通用训练服务器场景',
29
-      content:
30
-        '通用训练服务器场景主要面向互联网、金融、运营商等行业,提供Atlas 800、Atlas 300T Pro等通用训练服务产品。',
31
-    },
32
-  },
33
-]
34 5
 ---
35 6
 
36 7
 <!-- 左中右图文 -->
37 8
 <div class="container">
9
+  <div class="fs-1 text-center mt-5">{componentTitle}</div>
38 10
   <div class="row row-cols-md-3 row-cols-sm-1">
39 11
     {
40 12
       list?.map((item, index) => (

+ 11
- 5
src/components/LeftOneRightFourImg.astro Ver fichero

@@ -62,11 +62,13 @@ const list = [
62 62
           list?.map((item, index) => (
63 63
             <div class="col-md-6" id={item?.id}>
64 64
               <div class="right-block">
65
-                <Img
66
-                  url={item?.url}
67
-                  ratio="3 / 2"
68
-                  transformEnlarge="transformEnlarge"
69
-                />
65
+                <div class="limit">
66
+                  <Img
67
+                    url={item?.url}
68
+                    ratio="3 / 2"
69
+                    transformEnlarge="transformEnlarge"
70
+                  />
71
+                </div>
70 72
                 <Text list={item?.children} ellipsis="line-ellipsis-small" />
71 73
               </div>
72 74
             </div>
@@ -87,4 +89,8 @@ const list = [
87 89
     height: auto;
88 90
     overflow: hidden;
89 91
   }
92
+  .limit {
93
+    height: auto;
94
+    overflow: hidden;
95
+  }
90 96
 </style>

+ 1
- 0
src/components/LeftRightCarousel.astro Ver fichero

@@ -1,4 +1,5 @@
1 1
 ---
2
+const { json, lang } = Astro.props
2 3
 import LeftImgRightText from '@/components/LeftImgRightText.astro'
3 4
 import Carousel from '@/components/children/Carousel.astro'
4 5
 const list = [

+ 83
- 38
src/components/VerticalNavigationContent.astro Ver fichero

@@ -3,10 +3,31 @@ const domId = `tab-${Math.random().toString(36).substring(2, 7)}`
3 3
 import Text from '@/components/children/Text.astro'
4 4
 const list = [
5 5
   {
6
+    id: '1',
6 7
     tabName: '精选视频',
7
-    children: [],
8
+    children: [
9
+      {
10
+        title: '中信银行携手华为的数字化转型实践',
11
+      },
12
+      {
13
+        title: 'HIFS2023 曹冲丨拥抱大模型,构建无所不及的金融智能',
14
+      },
15
+      {
16
+        title: 'BDO携手华为共同应对数字化转型的新挑战',
17
+      },
18
+      {
19
+        title: '申万宏源通过基础设施现代化为数字化转型夯基垒台',
20
+      },
21
+      {
22
+        title: '华为iMaster NCE助力华夏银行网络自服务平台搭建',
23
+      },
24
+      {
25
+        title: '常熟农商银行科技创新之路',
26
+      },
27
+    ],
8 28
   },
9 29
   {
30
+    id: '2',
10 31
     tabName: '会议演讲材料',
11 32
     children: [
12 33
       {
@@ -24,10 +45,12 @@ const list = [
24 45
     ],
25 46
   },
26 47
   {
48
+    id: '3',
27 49
     tabName: '白皮书/第三方报告',
28 50
     children: [],
29 51
   },
30 52
   {
53
+    id: '4',
31 54
     tabName: '快捷书架',
32 55
     children: [],
33 56
   },
@@ -36,42 +59,64 @@ const list = [
36 59
 
37 60
 <!-- 竖形导航内容 -->
38 61
 <div class="d-flex align-items-start">
39
-  <div
40
-    class="nav flex-column nav-pills me-3"
41
-    id="v-pills-tab"
42
-    role="tablist"
43
-    aria-orientation="vertical"
44
-  >
45
-    {
46
-      list?.map((item, index) => (
47
-        <a
48
-          class={index == 0 ? 'nav-link active' : 'nav-link'}
49
-          id={`v-pills-${index}-tab`}
50
-          data-bs-toggle="pill"
51
-          href={`#v-pills-${index}`}
52
-          role="tab"
53
-          aria-controls={`v-pills-${index}`}
54
-          aria-selected={index == 0 ? 'true' : 'false'}
55
-        >
56
-          {item?.tabName}
57
-        </a>
58
-      ))
59
-    }
60
-  </div>
61
-  <div class="tab-content" id="v-pills-tabContent">
62
-    {
63
-      list?.map((item, index) => (
64
-        <div
65
-          class={index == 0 ? 'tab-pane fade' : 'tab-pane fade show active'}
66
-          id={`v-pills-${index}`}
67
-          role="tabpanel"
68
-          aria-labelledby={`v-pills-${index}-tab`}
69
-        >
70
-          {item?.children?.map((item, index) => (
71
-            <Text id={index} list={item} ellipsis="line-ellipsis-small" />
72
-          ))}
73
-        </div>
74
-      ))
75
-    }
62
+  <div class="row">
63
+    <div class="col-md-2">
64
+      <div
65
+        class="nav flex-column nav-pills me-3"
66
+        id="v-pills-tab"
67
+        role="tablist"
68
+        aria-orientation="vertical"
69
+      >
70
+        {
71
+          list?.map((item, index) => (
72
+            <a
73
+              class={index == 0 ? 'nav-link active mt-5' : 'nav-link mt-5'}
74
+              id={`v-pills-${index}-tab`}
75
+              data-bs-toggle="pill"
76
+              href={`#v-pills-${index}`}
77
+              role="tab"
78
+              aria-controls={`v-pills-${index}`}
79
+              aria-selected={index == 0 ? 'true' : 'false'}
80
+            >
81
+              {item?.tabName}
82
+            </a>
83
+          ))
84
+        }
85
+      </div>
86
+    </div>
87
+    <div class="col-md-10">
88
+      <div class="tab-content" id="v-pills-tabContent">
89
+        {
90
+          list?.map((item, index) => (
91
+            <div
92
+              class={index == 0 ? 'tab-pane fade show active' : 'tab-pane fade'}
93
+              id={`v-pills-${index}`}
94
+              role="tabpanel"
95
+              aria-labelledby={`v-pills-${index}-tab`}
96
+            >
97
+              <div class="row">
98
+                {item?.children?.map((item, index) => (
99
+                  <div class="col-md-4" id={index}>
100
+                    <Text
101
+                      list={item}
102
+                      ellipsis="line-ellipsis-small"
103
+                      btnDisplay={true}
104
+                    />
105
+                  </div>
106
+                ))}
107
+              </div>
108
+            </div>
109
+          ))
110
+        }
111
+      </div>
112
+    </div>
76 113
   </div>
77 114
 </div>
115
+<style>
116
+  .nav-link {
117
+    color: #787878;
118
+  }
119
+  .nav-link.active {
120
+    background-color: #c80510;
121
+  }
122
+</style>

+ 4
- 4
src/components/children/Carousel.astro Ver fichero

@@ -1,9 +1,9 @@
1 1
 ---
2 2
 const domId = `carousel-${Math.random().toString(36).substring(2, 7)}`
3
-const { list, Children } = Astro.props
3
+const { list, Children, componentTitle } = Astro.props
4 4
 ---
5 5
 
6
-<!-- 左右轮播 -->
6
+<!-- 轮播 -->
7 7
 <div class="container">
8 8
   <div id={domId} class="carousel slide" data-bs-ride="carousel">
9 9
     <div class="carousel-inner">
@@ -15,14 +15,14 @@ const { list, Children } = Astro.props
15 15
           >
16 16
             <div class="row">
17 17
               {item.map((it, index) => (
18
-                <div class="col-md-12 col-sm-12 my-5 px-5">
18
+                <div class="col-md-12 col-sm-12 px-5">
19 19
                   <div
20 20
                     class="top-bottom-project-card-carousel"
21 21
                     style={it.id ? 'cursor: pointer' : ''}
22 22
                     data-post={it.id}
23 23
                   >
24 24
                     <div class="card border-0" />
25
-                    <Children list={it} />
25
+                    <Children list={it} componentTitle={componentTitle} />
26 26
                   </div>
27 27
                 </div>
28 28
               ))}

+ 19
- 5
src/components/children/Text.astro Ver fichero

@@ -1,22 +1,24 @@
1 1
 ---
2 2
 const {
3 3
   list,
4
-  textSize,
4
+  titleSize = 'fs-4',
5
+  childrenSize,
5 6
   textColor,
6 7
   textWeight,
7 8
   ellipsis,
8 9
   btnDisplay,
9 10
   textUnderline,
11
+  position,
10 12
 } = Astro.props
11 13
 ---
12 14
 
13 15
 <!-- 文本 -->
14
-<div>
15
-  <p class="fs-4 mb-0 pt-5">{list?.title}</p>
16
+<div class=`${position}`>
17
+  <p class=`${titleSize} ${textWeight} mb-0 pt-5`>{list?.title}</p>
16 18
   <!-- <p class="fs-4">打造全球首个“岛式”精益智造工厂</p> -->
17 19
   {textUnderline && <div class="text-underline" />}
18 20
 
19
-  <p class=`text-secondary ${ellipsis} pt-1`>{list?.content}</p>
21
+  <p class=`text-secondary ${childrenSize} ${ellipsis} pt-1`>{list?.content}</p>
20 22
   {
21 23
     btnDisplay && (
22 24
       <button type="button" class="btn btn-outline-danger rounded-5">
@@ -35,7 +37,7 @@ const {
35 37
   }
36 38
   .line-ellipsis-small {
37 39
     display: -webkit-box;
38
-    height: 4.4em;
40
+    height: 5em;
39 41
     -webkit-line-clamp: 3;
40 42
     -webkit-box-orient: vertical;
41 43
     overflow: hidden;
@@ -49,4 +51,16 @@ const {
49 51
     overflow: hidden;
50 52
     text-overflow: ellipsis;
51 53
   }
54
+  .positionMiddle {
55
+    position: absolute;
56
+    top: 50%;
57
+    left: 50%;
58
+    transform: translate(-50%, -50%);
59
+  }
60
+  .positionBottom {
61
+    position: absolute;
62
+    top: 70%;
63
+    left: 50%;
64
+    transform: translate(-50%, -50%);
65
+  }
52 66
 </style>

+ 1
- 1
src/layouts/Layout.astro Ver fichero

@@ -20,7 +20,7 @@ const { title } = Astro.props
20 20
       crossorigin="anonymous"></script>
21 21
     <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
22 22
     <meta name="generator" content={Astro.generator} />
23
-    <title>{title} - Academe</title>
23
+    <title>{title} - 南京云致</title>
24 24
     <style is:global>
25 25
       html,
26 26
       body {

+ 147
- 21
src/pages/[lang]/index.astro Ver fichero

@@ -2,18 +2,13 @@
2 2
 import Layout from '@/layouts/Layout.astro'
3 3
 import Footer from '@/components/Footer.astro'
4 4
 import Navbar from '@/components/Navbar.astro'
5
-import FirstScreen from '@/components/FirstScreen.astro'
5
+import FirstScreen from 'src/pages/components/FirstScreen.astro'
6 6
 import LeftOneRightFourImg from '@/components/LeftOneRightFourImg.astro'
7
-import Text from '@/components/children/Text.astro'
8
-import Img from '@/components/children/Img.astro'
9
-import Carousel from '@/components/children/Carousel.astro'
10
-import BigImg from '@/components/BigImg.astro'
11 7
 import LeftMiddleRightImgText from '@/components/LeftMiddleRightImgText.astro'
8
+import Carousel from '@/components/children/Carousel.astro'
12 9
 import LeftRightCarousel from '@/components/LeftRightCarousel.astro'
13 10
 import VerticalNavigationContent from '@/components/VerticalNavigationContent.astro'
14 11
 import NavMenu from '@/components/NavMenu/index.jsx'
15
-// import Dynamic from '@/components/Dynamic.astro'
16
-import { getContentList } from '@/services/apis'
17 12
 
18 13
 function getName(item = {}) {
19 14
   return (
@@ -30,22 +25,153 @@ const categary = Astro.locals._menus?.find(
30 25
 )
31 26
 const title = getName(categary)
32 27
 
33
-// const contentList = await getContentList(categaryId);
28
+const firstScreenList = {
29
+  title: '加速行业智能化',
30
+  content:
31
+    '华为持续引领数智基础设施产品与解决方案创新,使能百模千态,赋能千行万业智能化转型',
32
+}
33
+
34
+const carouselList = [
35
+  [
36
+    [
37
+      {
38
+        id: '1',
39
+        url: 'https://e.huawei.com/-/mediae/images/home/casestorys/casestorys-driving-bank-of-beijing-digital.jpg',
40
+        children: {
41
+          title: '智慧物联',
42
+          content: '',
43
+        },
44
+      },
45
+      {
46
+        id: '2',
47
+        url: 'https://e.huawei.com/-/mediae/images/home/casestorys/casestorys-wuling-manufacturing-plant.jpg',
48
+        children: {
49
+          title: '工业互联网',
50
+          content: '',
51
+        },
52
+      },
53
+      {
54
+        id: '3',
55
+        url: 'https://e.huawei.com/-/mediae/images/home/casestorys/casestorys-zjhtcm.jpg',
56
+        children: {
57
+          title: '政企业务',
58
+          content: '',
59
+        },
60
+      },
61
+    ],
62
+  ],
63
+  [
64
+    [
65
+      {
66
+        id: '4',
67
+        url: 'https://e.huawei.com/-/mediae/images/home/casestorys/casestorys-shenyang-metro.jpg',
68
+        children: {
69
+          title: '其他业务',
70
+          content: '',
71
+        },
72
+      },
73
+    ],
74
+  ],
75
+]
76
+
77
+const caseList = [
78
+  {
79
+    id: '1',
80
+    url: 'https://e.huawei.com/-/mediae/images/home/newsevents/events/events-finance-summit-2024.jpg',
81
+    children: {
82
+      title: '房源交易系统',
83
+      content: '房源交易业务支撑系统,涵盖新房、二手房、租房的功能管理模块。',
84
+    },
85
+  },
86
+  {
87
+    id: '2',
88
+    url: 'https://e.huawei.com/-/mediae/images/home/newsevents/events/events-hpc2024.jpg',
89
+    children: {
90
+      title: '城的空间',
91
+      content:
92
+        '为提升售楼处的体验,提高数字化和智能化的进程,提高小区的品质和形象,引入售楼处和后续小区的私有化会所形象,专门为品质生活服务的需求应运而生。',
93
+    },
94
+  },
95
+  {
96
+    id: '3',
97
+    url: 'https://e.huawei.com/-/mediae/images/events/list/2307-storage-ai-product-launch-event-list.jpg',
98
+    children: {
99
+      title: '资源管理平台',
100
+      content:
101
+        '是针对集团性企业有众多供应商库和众多分公司,对于内部信息 不对称,资源拥有量不清楚的情况,做一个自有资源展示、交易平台。',
102
+    },
103
+  },
104
+  {
105
+    id: '4',
106
+    url: 'https://e.huawei.com/-/mediae/images/events/list/2023-cn-data-storage-user-forum-list.jpg',
107
+    children: {
108
+      title: '智慧社区',
109
+      content:
110
+        '物业系统(停车系统、缴费系统、门禁系统、公告发布系统)、安防系统、管家系统(智能家居)、社区系统以及智能硬件模块对接,实现用户数据采 集、用户电子化管理、用户激活等功能。',
111
+    },
112
+  },
113
+  {
114
+    id: '5',
115
+    url: 'https://e.huawei.com/-/mediae/EBG2022/Events/list-230426-cn-smart-manufacturing-data-infrastructure.jpg',
116
+    children: {
117
+      title: '智慧消防控制平台',
118
+      content:
119
+        '展示大屏(分析),依赖动态且丰富的主题信息设计,配合 设计感强的大屏场景设计,从而展示数据及业务现状,达到 一定的数据应用价值。',
120
+    },
121
+  },
122
+  {
123
+    id: '6',
124
+    url: 'https://e.huawei.com/-/mediae/images/events/list/220909-cn-longkou-intelligent-city.jpg',
125
+    children: {
126
+      title: '邓州市共享农机系统',
127
+      content:
128
+        '农机共享平台针对农业农村 局等管理单位提供管理运营 的功能,农业农村局等管理 单位,担任审核、运营及数 据管理的职能。',
129
+    },
130
+  },
131
+]
132
+
133
+const informationList = [
134
+  {
135
+    id: '1',
136
+    url: 'https://e.huawei.com/-/mediae/images/home/newsevents/news/news-20240314-4.jpg',
137
+    children: {
138
+      title: '“因聚而生 数智有为”华为举办中国合作伙伴大会2024',
139
+      content: '',
140
+    },
141
+  },
142
+  {
143
+    id: '2',
144
+    url: 'https://e.huawei.com/-/mediae/images/home/newsevents/news/news-20240314-1.jpg',
145
+    children: {
146
+      title: '华为连续四年获Gartner Peer Insights™ SD-WAN “客户之选”',
147
+      content: '',
148
+    },
149
+  },
150
+  {
151
+    id: '3',
152
+    url: 'https://e.huawei.com/-/mediae/images/home/newsevents/news/news-20240314-2.jpg',
153
+    children: {
154
+      title: '华为独家荣获Gartner Peer Insights™主存储全球“客户之选”',
155
+      content: '',
156
+    },
157
+  },
158
+]
34 159
 ---
35 160
 
36 161
 <Layout title={title}>
37
-  <!-- 导航栏 -->
38 162
   <NavMenu lang={lang} client:load />
39
-  <FirstScreen />
40
-  <BigImg />
41
-  <LeftMiddleRightImgText />
42
-  <LeftRightCarousel />
43
-  <LeftOneRightFourImg />
44
-  <VerticalNavigationContent />
45
-  <!-- <Text />
46
-  <Img />
47
-  <Carousel /> -->
48
-  <!-- <Dynamic contentList={contentList} lang={lang} /> -->
49
-
50
-  <!-- <Footer lang={lang} /> -->
163
+
164
+  <!-- 首屏图 -->
165
+  <FirstScreen list={firstScreenList} />
166
+
167
+  <!-- 三列图文轮播图 -->
168
+  <Carousel
169
+    componentTitle="产品与解决方案"
170
+    list={carouselList}
171
+    Children={LeftMiddleRightImgText}
172
+  />
173
+
174
+  <LeftMiddleRightImgText componentTitle="案例展示" list={caseList} />
175
+  <LeftMiddleRightImgText componentTitle="最新资讯" list={informationList} />
176
+  <Footer lang={lang} />
51 177
 </Layout>

+ 29
- 0
src/pages/components/FirstScreen.astro Ver fichero

@@ -0,0 +1,29 @@
1
+---
2
+import Img from '@/components/children/Img.astro'
3
+import Text from '@/components/children/Text.astro'
4
+
5
+const { list } = Astro.props
6
+---
7
+
8
+<div class="box">
9
+  <Img
10
+    url="//e.huawei.com/-/mediae/images/home/banner/jiasu-banner-pc1.jpg"
11
+    ratio="16 / 9"
12
+    class="img"
13
+  />
14
+  <Text
15
+    list={list}
16
+    btnDisplay={true}
17
+    titleSize="fs-1"
18
+    childrenSize="fs-4"
19
+    textWeight="fw-bold"
20
+    ellipsis="line-ellipsis-small"
21
+    position="positionBottom"
22
+  />
23
+</div>
24
+<style>
25
+  .box {
26
+    position: relative;
27
+    text-align: center;
28
+  }
29
+</style>

+ 0
- 0
src/pages/products-solutions/lot/building/index.astro Ver fichero