|
@@ -1,19 +1,133 @@
|
|
<template>
|
|
<template>
|
|
<div class="home">
|
|
<div class="home">
|
|
- <h2>欢迎使用Prototype Design, 请您根据您的需要设计您的Prototype</h2>
|
|
|
|
|
|
+ <header>
|
|
|
|
+ <nav>
|
|
|
|
+ <ul>
|
|
|
|
+ <li><router-link to="/">首页</router-link></li>
|
|
|
|
+ <li><router-link to="/product-list">全部商品</router-link></li>
|
|
|
|
+ <li><router-link to="/cart">购物车</router-link></li>
|
|
|
|
+ <li><router-link to="/order">我的订单</router-link></li>
|
|
|
|
+ <li><router-link to="/user-profile">个人中心</router-link></li>
|
|
|
|
+ </ul>
|
|
|
|
+ </nav>
|
|
|
|
+ </header>
|
|
|
|
+ <main>
|
|
|
|
+ <section class="carousel">
|
|
|
|
+ <h2>热门商品轮播</h2>
|
|
|
|
+ <div class="carousel-images">
|
|
|
|
+ <img src="@/assets/img/project_view.png" alt="Product 1" />
|
|
|
|
+ <img src="@/assets/img/prompt_view.png" alt="Product 2" />
|
|
|
|
+ <img src="@/assets/img/upload_view.png" alt="Product 3" />
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+ <section class="featured-products">
|
|
|
|
+ <h2>推荐商品</h2>
|
|
|
|
+ <div class="product-list">
|
|
|
|
+ <div class="product-item">
|
|
|
|
+ <img src="@/assets/img/project_view.png" alt="Product 1" />
|
|
|
|
+ <p>产品1 - 描述</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="product-item">
|
|
|
|
+ <img src="@/assets/img/prompt_view.png" alt="Product 2" />
|
|
|
|
+ <p>产品2 - 描述</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="product-item">
|
|
|
|
+ <img src="@/assets/img/upload_view.png" alt="Product 3" />
|
|
|
|
+ <p>产品3 - 描述</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+ <section class="categories">
|
|
|
|
+ <h2>商品分类</h2>
|
|
|
|
+ <!-- 商品分类导航 -->
|
|
|
|
+ </section>
|
|
|
|
+ </main>
|
|
|
|
+ <footer>
|
|
|
|
+ <p>© 2025 Prototype Design. All rights reserved.</p>
|
|
|
|
+ </footer>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-
|
|
|
|
-export default {}
|
|
|
|
|
|
+export default {
|
|
|
|
+ name: 'HomeView',
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
-<style>
|
|
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
.home {
|
|
.home {
|
|
- height: 100vh;
|
|
|
|
- width: 100vw;
|
|
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ min-height: 100vh;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+header nav ul {
|
|
|
|
+ list-style-type: none;
|
|
|
|
+ padding: 0;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+ background-color: #f8f8f8;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+header nav ul li a {
|
|
|
|
+ text-decoration: none;
|
|
|
|
+ color: #333;
|
|
|
|
+ padding: 10px 20px;
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+header nav ul li a:hover {
|
|
|
|
+ background-color: #ddd;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+main {
|
|
|
|
+ flex: 1;
|
|
|
|
+ padding: 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.carousel,
|
|
|
|
+.featured-products,
|
|
|
|
+.categories {
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.carousel-images {
|
|
|
|
+ display: flex;
|
|
|
|
+ overflow-x: scroll;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.carousel-images img {
|
|
|
|
+ width: 300px;
|
|
|
|
+ height: auto;
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.product-list {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
+ gap: 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.product-item {
|
|
|
|
+ border: 1px solid #ddd;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ width: 200px;
|
|
|
|
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.product-item img {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: auto;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.product-item p {
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+footer {
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ background-color: #f8f8f8;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|