Răsfoiți Sursa

Update community and my space pages

- Modify HTML, SCSS, and TS files for community pages
- Update HTML, SCSS, and TS files for my space pages
:wp
“0235959” 2 săptămâni în urmă
părinte
comite
458ea25876

+ 81 - 0
cloth-dit-web/src/modules/cloth/color/page/pages-community/pages-community/pages-community.html

@@ -1 +1,82 @@
 <p>pages-community works!</p>
+<div class="community-page">
+  <div class="community-header">
+    <h1>设计社区</h1>
+    <p>与全球设计师交流创意</p>
+    <div class="community-stats">
+      <div class="stat-item">
+        <div class="stat-number">12.8k</div>
+        <div class="stat-label">活跃用户</div>
+      </div>
+      <div class="stat-item">
+        <div class="stat-number">3.2k</div>
+        <div class="stat-label">今日作品</div>
+      </div>
+      <div class="stat-item">
+        <div class="stat-number">156</div>
+        <div class="stat-label">在线设计师</div>
+      </div>
+    </div>
+  </div>
+
+  <main class="main-content">
+    <div style="margin: 20px;">
+      <!-- 热门话题 -->
+      <div style="background: white; border-radius: 15px; padding: 20px; margin-bottom: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);">
+        <h4 style="margin-bottom: 15px; font-size: 16px;">🔥 热门话题</h4>
+        <div style="display: flex; flex-wrap: wrap; gap: 8px;">
+          <span style="background: #ff6b6b; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#春季时尚</span>
+          <span style="background: #4ecdc4; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#环保设计</span>
+          <span style="background: #45b7d1; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#极简主义</span>
+          <span style="background: #96ceb4; color: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; cursor: pointer;">#复古回潮</span>
+        </div>
+      </div>
+
+      <!-- 设计师排行榜 -->
+      <div style="background: white; border-radius: 15px; padding: 20px; margin-bottom: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);">
+        <h4 style="margin-bottom: 15px; font-size: 16px;">🏆 本周设计师排行</h4>
+        <div style="display: flex; flex-direction: column; gap: 12px;">
+          <div style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #f8f9fa; border-radius: 10px;">
+            <div style="display: flex; align-items: center; gap: 12px;">
+              <div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #ff6b6b, #ffa726); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">1</div>
+              <div>
+                <div style="font-weight: 600; font-size: 14px;">设计大师Alex</div>
+                <div style="font-size: 12px; color: #666;">点赞数: 8.9k</div>
+              </div>
+            </div>
+            <div style="font-size: 20px;">👑</div>
+          </div>
+          <div style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #f8f9fa; border-radius: 10px;">
+            <div style="display: flex; align-items: center; gap: 12px;">
+              <div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #4ecdc4, #44a08d); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">2</div>
+              <div>
+                <div style="font-weight: 600; font-size: 14px;">时尚达人Lisa</div>
+                <div style="font-size: 12px; color: #666;">点赞数: 7.2k</div>
+              </div>
+            </div>
+            <div style="font-size: 20px;">🥈</div>
+          </div>
+          <div style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #f8f9fa; border-radius: 10px;">
+            <div style="display: flex; align-items: center; gap: 12px;">
+              <div style="width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(45deg, #667eea, #764ba2); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;">3</div>
+              <div>
+                <div style="font-weight: 600; font-size: 14px;">创意师Mike</div>
+                <div style="font-size: 12px; color: #666;">点赞数: 5.8k</div>
+              </div>
+            </div>
+            <div style="font-size: 20px;">🥉</div>
+          </div>
+        </div>
+      </div>
+
+      <!-- 最新作品 -->
+      <div style="background: white; border-radius: 15px; padding: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);">
+        <h4 style="margin-bottom: 15px; font-size: 16px;">✨ 最新作品</h4>
+        <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;">
+          <div style="background: linear-gradient(45deg, #a8edea 0%, #fed6e3 100%); border-radius: 12px; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 36px; cursor: pointer; transition: all 0.3s ease;" (click)="likeWork($event)">🌸</div>
+          <div style="background: linear-gradient(45deg, #667eea 0%, #764ba2 100%); border-radius: 12px; height: 120px; display: flex; align-items: center; justify-content: center; font-size: 36px; cursor: pointer; transition: all 0.3s ease;" (click)="likeWork($event)">⚡</div>
+        </div>
+      </div>
+    </div>
+  </main>
+</div>

+ 36 - 0
cloth-dit-web/src/modules/cloth/color/page/pages-community/pages-community/pages-community.scss

@@ -0,0 +1,36 @@
+.community-page {
+  display: block;
+}
+
+.community-header {
+  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
+  padding: 20px;
+  color: white;
+  text-align: center;
+}
+
+.community-stats {
+  display: flex;
+  justify-content: space-around;
+  margin: 20px 0;
+}
+
+.stat-item {
+  text-align: center;
+}
+
+.stat-number {
+  font-size: 24px;
+  font-weight: 700;
+}
+
+.stat-label {
+  font-size: 12px;
+  opacity: 0.8;
+}
+
+.main-content {
+  flex: 1;
+  overflow-y: auto;
+  padding-bottom: 80px;
+}

+ 15 - 1
cloth-dit-web/src/modules/cloth/color/page/pages-community/pages-community/pages-community.ts

@@ -7,5 +7,19 @@ import { Component } from '@angular/core';
   styleUrl: './pages-community.scss'
 })
 export class PagesCommunity {
+  likeWork(event: Event) {
+    const element = event.target as HTMLElement;
+    element.style.transform = 'scale(0.95)';
+    setTimeout(() => {
+      element.style.transform = 'scale(1)';
+    }, 150);
+    
+    this.showNotification('点赞成功', '感谢你的支持!');
+  }
 
-}
+  private showNotification(title: string, message: string) {
+    // 在这里实现通知逻辑
+    console.log(`${title}: ${message}`);
+    // 在实际应用中,你会使用通知服务或组件
+  }
+}

+ 52 - 0
cloth-dit-web/src/modules/cloth/color/page/pages-my-space/pages-my-space/pages-my-space.html

@@ -1 +1,53 @@
 <p>pages-my-space works!</p>
+<div class="profile-page">
+  <div class="profile-header">
+    <div class="avatar">👤</div>
+    <h2>时尚设计师</h2>
+    <p>让创意成为生活的一部分</p>
+  </div>
+
+  <div class="profile-menu">
+    <div class="menu-item" (click)="showMyDesigns()">
+      <div class="menu-left">
+        <span class="menu-icon">🎨</span>
+        <span>我的设计稿</span>
+      </div>
+      <span>></span>
+    </div>
+    <div class="menu-item" (click)="showTryOnHistory()">
+      <div class="menu-left">
+        <span class="menu-icon">👕</span>
+        <span>试穿历史</span>
+      </div>
+      <span>></span>
+    </div>
+    <div class="menu-item" (click)="showOrders()">
+      <div class="menu-left">
+        <span class="menu-icon">📦</span>
+        <span>订单管理</span>
+      </div>
+      <span>></span>
+    </div>
+    <div class="menu-item" (click)="showCollections()">
+      <div class="menu-left">
+        <span class="menu-icon">❤️</span>
+        <span>收藏夹</span>
+      </div>
+      <span>></span>
+    </div>
+    <div class="menu-item" (click)="showFollowers()">
+      <div class="menu-left">
+        <span class="menu-icon">👥</span>
+        <span>粉丝管理</span>
+      </div>
+      <span>></span>
+    </div>
+    <div class="menu-item" (click)="showSettings()">
+      <div class="menu-left">
+        <span class="menu-icon">⚙️</span>
+        <span>设置</span>
+      </div>
+      <span>></span>
+    </div>
+  </div>
+</div>

+ 56 - 0
cloth-dit-web/src/modules/cloth/color/page/pages-my-space/pages-my-space/pages-my-space.scss

@@ -0,0 +1,56 @@
+.profile-page {
+  display: block;
+}
+
+.profile-header {
+  background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 100%);
+  padding: 30px 20px;
+  text-align: center;
+  color: white;
+}
+
+.avatar {
+  width: 80px;
+  height: 80px;
+  border-radius: 50%;
+  background: rgba(255,255,255,0.3);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 36px;
+  margin: 0 auto 15px;
+  border: 3px solid rgba(255,255,255,0.5);
+}
+
+.profile-menu {
+  padding: 20px;
+}
+
+.menu-item {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 15px;
+  background: white;
+  border-radius: 12px;
+  margin-bottom: 10px;
+  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
+  cursor: pointer;
+  transition: all 0.3s ease;
+}
+
+.menu-item:hover {
+  transform: translateX(5px);
+  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
+}
+
+.menu-left {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+
+.menu-icon {
+  font-size: 18px;
+  color: #667eea;
+}

+ 29 - 1
cloth-dit-web/src/modules/cloth/color/page/pages-my-space/pages-my-space/pages-my-space.ts

@@ -7,5 +7,33 @@ import { Component } from '@angular/core';
   styleUrl: './pages-my-space.scss'
 })
 export class PagesMySpace {
+  showMyDesigns() {
+    console.log('Navigate to My Designs');
+    // In a real app, you would navigate to the my-designs component
+  }
 
-}
+  showTryOnHistory() {
+    console.log('Navigate to Fitting History');
+    // In a real app, you would navigate to the fitting-history component
+  }
+
+  showOrders() {
+    console.log('Navigate to Order Management');
+    // In a real app, you would navigate to the order-management component
+  }
+
+  showCollections() {
+    console.log('Navigate to Collections');
+    // In a real app, you would navigate to the collections component
+  }
+
+  showFollowers() {
+    console.log('Navigate to Followers');
+    // In a real app, you would navigate to the followers component
+  }
+
+  showSettings() {
+    console.log('Navigate to Settings');
+    // In a real app, you would navigate to the settings component
+  }
+}