2 Achegas 4d18938eb5 ... f59b0564bd

Autor SHA1 Mensaxe Data
  0225236 f59b0564bd Merge branch 'master' of http://git.fmode.cn:3000/0225273/APPmy hai 4 meses
  0225236 5be2ffad19 tab2 hai 4 meses
Modificáronse 3 ficheiros con 266 adicións e 222 borrados
  1. 153 175
      src/app/tab2/tab2.page.html
  2. 1 1
      src/app/tab2/tab2.page.scss
  3. 112 46
      src/app/tab2/tab2.page.ts

+ 153 - 175
src/app/tab2/tab2.page.html

@@ -76,188 +76,166 @@
         </ion-card-content>
       </ion-card>
     </div>
-    <div *ngIf="selectedSegment === 'company'">
-      <!-- 公司详情页内容 -->
-    </div>
 
     <!-- 设计机构详情页 -->
     <div *ngIf="selectedSegment === 'design'">
-      <!-- 机构详情页内容 -->
-      <div *ngIf="selectedSegment === 'design'">
-        <!-- 设计机构详情页 -->
-        <ion-card>
-          <ion-card-header>
-            机构名称: {{ agency.name }}
-          </ion-card-header>
-          <ion-card-content>
-            <ion-item>
-              <ion-label>星级评分:</ion-label>
-              <ion-text>{{ agency.starRating }}</ion-text>
-            </ion-item>
-            <ion-item>
-              <ion-label>评价数量:</ion-label>
-              <ion-text>{{ agency.reviewCount }}</ion-text>
-            </ion-item>
-            <ion-item>
-              <ion-label>机构简介:</ion-label>
-              <ion-text>{{ agency.description }}</ion-text>
-            </ion-item>
-            <!-- 机构介绍 -->
-            <ion-card>
-              <ion-card-header>
-                机构介绍
-              </ion-card-header>
-              <ion-card-content>
-                <ion-list>
-                  <ion-item>
-                    <ion-label>服务:</ion-label>
-                    <ion-text>{{ agency.services }}</ion-text>
-                  </ion-item>
-                  <ion-item>
-                    <ion-label>优势:</ion-label>
-                    <ion-text>{{ agency.advantages }}</ion-text>
-                  </ion-item>
-                  <ion-item>
-                    <ion-label>案例:</ion-label>
-                    <ion-text>{{ agency.cases }}</ion-text>
-                  </ion-item>
-                </ion-list>
-              </ion-card-content>
-            </ion-card>
-            <!-- 设计师团队 -->
-            <ion-card>
-              <ion-card-header>
-                设计师团队
-              </ion-card-header>
-              <ion-card-content>
-                <!-- 展示机构的设计师团队 -->
-              </ion-card-content>
-            </ion-card>
-            <!-- 案例展示 -->
-            <ion-card>
-              <ion-card-header>
-                案例展示
-              </ion-card-header>
-              <ion-card-content>
-                <!-- 展示机构完成的装修案例 -->
-              </ion-card-content>
-            </ion-card>
-            <!-- 设计理念 -->
-            <ion-card>
-              <ion-card-header>
-                设计理念
-              </ion-card-header>
-              <ion-card-content>
-                <!-- 展示机构的设计理念和风格 -->
-              </ion-card-content>
-            </ion-card>
-            <!-- 服务流程 -->
-            <ion-card>
-              <ion-card-header>
-                服务流程
-              </ion-card-header>
-              <ion-card-content>
-                <!-- 展示机构的装修流程和服务标准 -->
-              </ion-card-content>
-            </ion-card>
-            <!-- 用户评价 -->
-            <ion-card>
-              <ion-card-header>
-                用户评价
-              </ion-card-header>
-              <ion-card-content>
-                <!-- 展示用户对机构的评价 -->
-              </ion-card-content>
-            </ion-card>
-            <!-- 底部按钮 -->
-            <ion-button expand="full">电话</ion-button>
-            <ion-button expand="full">预约</ion-button>
-            <ion-button expand="full">咨询</ion-button>
-            <ion-button expand="full">查看案例</ion-button>
-          </ion-card-content>
-        </ion-card>
-      </div>
+    <div *ngFor="let designCompany of designCompanies">
+      <ion-card class="company-card">
+        <ion-card-header>
+          <ion-card-title>{{ designCompany.name }}</ion-card-title>
+          <ion-card-subtitle>星级评分: {{ designCompany.starRating }} | 评价数量: {{ designCompany.reviewCount }}</ion-card-subtitle>
+        </ion-card-header>
+        <ion-card-content>
+          <ion-item lines="none">
+            <ion-label>机构简介:</ion-label>
+            <ion-text>{{ designCompany.description }}</ion-text>
+          </ion-item>
+  
+          <!-- 机构介绍 -->
+          <ion-card class="info-card">
+            <ion-card-header>
+              机构介绍
+            </ion-card-header>
+            <ion-card-content>
+              <ion-item>
+                <ion-label>服务:</ion-label>
+                <ion-text>{{ designCompany.services }}</ion-text>
+              </ion-item>
+              <ion-item>
+                <ion-label>优势:</ion-label>
+                <ion-text>{{ designCompany.advantages }}</ion-text>
+              </ion-item>
+              <ion-item>
+                <ion-label>案例:</ion-label>
+                <ion-text>{{ designCompany.cases }}</ion-text>
+              </ion-item>
+            </ion-card-content>
+          </ion-card>
+  
+          <!-- 设计师团队 -->
+          <ion-card class="team-card">
+            <ion-card-header>
+              设计师团队
+            </ion-card-header>
+            <ion-card-content>
+              <ion-item *ngFor="let designer of designCompany.designers" lines="none">
+                <ion-avatar slot="start">
+                  <img [src]="designer.avatar" alt="设计师头像">
+                </ion-avatar>
+                <ion-label>{{ designer.name }}</ion-label>
+                <ion-text>{{ designer.style }}</ion-text>
+                <ion-text>{{ designer.serviceArea }}</ion-text>
+                <ion-text>{{ designer.price }}</ion-text>
+              </ion-item>
+            </ion-card-content>
+          </ion-card>
+  
+          <!-- 案例展示 -->
+          <ion-card class="case-card">
+            <ion-card-header>
+              案例展示
+            </ion-card-header>
+            <ion-card-content>
+              <ion-item *ngFor="let case of designCompany.cases" lines="none">
+                <img [src]="case.image" alt="案例图片">
+                <ion-label>{{ case.description }}</ion-label>
+                <ion-text>{{ case.style }}</ion-text>
+              </ion-item>
+            </ion-card-content>
+          </ion-card>
+  
+          <!-- 设计理念 -->
+          <ion-card class="concept-card">
+            <ion-card-header>
+              设计理念
+            </ion-card-header>
+            <ion-card-content>
+              <ion-text>{{ designCompany.designConcept }}</ion-text>
+            </ion-card-content>
+          </ion-card>
+  
+          <!-- 服务流程 -->
+          <ion-card class="process-card">
+            <ion-card-header>
+              服务流程
+            </ion-card-header>
+            <ion-card-content>
+              <ion-text>{{ designCompany.serviceProcess }}</ion-text>
+            </ion-card-content>
+          </ion-card>
+  
+          <!-- 用户评价 -->
+          <ion-card class="review-card">
+            <ion-card-header>
+              用户评价
+            </ion-card-header>
+            <ion-card-content>
+              <ion-item *ngFor="let review of designCompany.userReviews" lines="none">
+                <img [src]="review.image" alt="用户评价图片">
+                <ion-label>{{ review.text }}</ion-label>
+                <ion-text>星级评分: {{ review.starRating }}</ion-text>
+              </ion-item>
+            </ion-card-content>
+          </ion-card>
+  
+          <!-- 底部按钮 -->
+          <ion-button expand="full" color="primary">电话</ion-button>
+          <ion-button expand="full" color="primary">预约</ion-button>
+          <ion-button expand="full" color="primary">咨询</ion-button>
+          <ion-button expand="full" color="primary">查看案例</ion-button>
+  
+        </ion-card-content>
+      </ion-card>
     </div>
+  </div>
 
     <!-- 设计师详情页 -->
     <div *ngIf="selectedSegment === 'designer'">
-      <!-- 设计师详情页内容 -->
-      <div *ngIf="selectedSegment === 'designer'">
-        <!-- 设计师详情页 -->
-        <ion-card>
-          <ion-card-header>
-            设计师信息
-          </ion-card-header>
-          <ion-card-content>
-            <ion-item>
-              <ion-avatar slot="start">
-                <ion-img src="{{ designer.avatar }}"></ion-img>
-              </ion-avatar>
-              <ion-label>
-                <h2>{{ designer.name }}</h2>
-                <p>{{ designer.specialty }}</p>
-              </ion-label>
-            </ion-item>
-            <ion-item>
-              <ion-label>擅长风格:</ion-label>
-              <ion-text>{{ designer.style }}</ion-text>
-            </ion-item>
-            <ion-item>
-              <ion-label>服务地区:</ion-label>
-              <ion-text>{{ designer.serviceArea }}</ion-text>
-            </ion-item>
-            <ion-item>
-              <ion-label>价格:</ion-label>
-              <ion-text>{{ designer.price }}</ion-text>
-            </ion-item>
-            <ion-item>
-              <ion-label>用户评价:</ion-label>
-              <ion-text>{{ designer.rating }}</ion-text>
-            </ion-item>
-            <!-- 设计师作品展示 -->
-            <ion-card>
-              <ion-card-header>
-                设计师作品
-              </ion-card-header>
-              <ion-card-content>
-                <ion-grid>
-                  <ion-row>
-                    <ion-col size="6" *ngFor="let work of designer.works">
-                      <ion-img src="{{ work.image }}"></ion-img>
-                      <p>{{ work.description }}</p>
-                    </ion-col>
-                  </ion-row>
-                </ion-grid>
-              </ion-card-content>
-            </ion-card>
-            <!-- 用户评价 -->
-            <ion-card>
-              <ion-card-header>
-                用户评价
-              </ion-card-header>
-              <ion-card-content>
-                <ion-list>
-                  <ion-item *ngFor="let review of designer.reviews">
-                    <ion-avatar slot="start">
-                      <ion-img src="{{ review.avatar }}"></ion-img>
-                    </ion-avatar>
-                    <ion-label>
-                      <h2>{{ review.username }}</h2>
-                      <p>{{ review.comment }}</p>
-                    </ion-label>
-                    <ion-icon slot="end" name="star" [color]="review.rating >= 4 ? 'warning' : 'medium'"></ion-icon>
-                  </ion-item>
-                </ion-list>
-              </ion-card-content>
-            </ion-card>
-            <!-- 底部按钮 -->
-            <ion-button expand="full">咨询</ion-button>
-            <ion-button expand="full">电话</ion-button>
-            <ion-button expand="full">在线预约</ion-button>
-            <ion-button expand="full">查看案例</ion-button>
-          </ion-card-content>
-        </ion-card>
-      </div>
+      <!-- 设计师详情页 -->
+      <ion-card *ngFor="let designer of designers">
+        <!-- 头部 -->
+        <ion-card-header>
+          <ion-avatar>
+            <img src="{{ designer.avatar }}" alt="Designer Avatar">
+          </ion-avatar>
+          <ion-card-title>{{ designer.username }}</ion-card-title>
+          <ion-button fill="outline" slot="end">关注</ion-button>
+        </ion-card-header>
+        <ion-card-content>
+          <p>{{ designer.bio }}</p>
+        </ion-card-content>
+    
+        <!-- 内容 -->
+        <ion-card-content>
+          <ion-img [src]="designer.portfolioImage" alt="Designer Portfolio"></ion-img>
+          <ion-item>
+            <ion-label>作品数量:</ion-label>
+            <ion-text>{{ designer.portfolioCount }}</ion-text>
+          </ion-item>
+          <ion-item>
+            <ion-label>擅长风格:</ion-label>
+            <ion-text>{{ designer.style }}</ion-text>
+          </ion-item>
+          <ion-item>
+            <ion-label>服务地区:</ion-label>
+            <ion-text>{{ designer.serviceArea }}</ion-text>
+          </ion-item>
+          <ion-item>
+            <ion-label>价格:</ion-label>
+            <ion-text>{{ designer.price }}</ion-text>
+          </ion-item>
+          <ion-item>
+            <ion-label>用户评价:</ion-label>
+            <ion-text>{{ designer.rating }}</ion-text>
+          </ion-item>
+        </ion-card-content>
+    
+        <!-- 底部 -->
+          <ion-button expand="full" fill="outline">咨询</ion-button>
+          <ion-button expand="full" fill="outline">电话</ion-button>
+          <ion-button expand="full" fill="outline">在线预约</ion-button>
+          <ion-button expand="full" fill="outline">查看案例</ion-button>
+      </ion-card>
     </div>
   </div>
 </ion-content>

+ 1 - 1
src/app/tab2/tab2.page.scss

@@ -1,3 +1,3 @@
 .details-container {
-    padding: 10px;
+    padding: 20px;
   }

+ 112 - 46
src/app/tab2/tab2.page.ts

@@ -7,7 +7,6 @@ import { Component } from '@angular/core';
   
 })
 export class Tab2Page {
-  selectedSegment: string = 'company';
   companies = [
     {
       name: '装修公司A',
@@ -38,51 +37,118 @@ export class Tab2Page {
     }
     // 添加更多装修公司信息
   ];
-  agency = {
-    name: '机构名称',
-    starRating: 4.4,
-    reviewCount: 95,
-    description: '机构简介',
-    services: '机构提供的服务',
-    advantages: '机构的优势',
-    cases: '机构的案例',
-    designers: [
-      { name: '设计师1', avatar: 'assets/designer1.jpg', specialty: '擅长风格1' },
-      { name: '设计师2', avatar: 'assets/designer2.jpg', specialty: '擅长风格2' },
-      // 添加更多设计师信息
-    ],
-    casesList: [
-      { image: 'assets/case1.jpg', description: '案例描述1' },
-      { image: 'assets/case2.jpg', description: '案例描述2' },
-      // 添加更多案例信息
-    ],
-    designPhilosophy: '设计理念内容',
-    serviceProcess: '服务流程内容',
-    reviews: [
-      { avatar: 'assets/user1.jpg', username: '用户1', comment: '评价1', rating: 5 },
-      { avatar: 'assets/user2.jpg', username: '用户2', comment: '评价2', rating: 4 },
-      // 添加更多用户评价
-    ]
-  };
-  designer = {
-    name: '设计师姓名',
-    avatar: 'assets/designer-avatar.jpg',
-    specialty: '设计师专长',
-    style: '设计风格',
-    serviceArea: '服务地区',
-    price: '设计师价格',
-    rating: '用户评价',
-    works: [
-      { image: 'assets/work1.jpg', title: '作品1', description: '作品描述1' },
-      { image: 'assets/work2.jpg', title: '作品2', description: '作品描述2' },
-      // 添加更多设计师作品
-    ],
-    reviews: [
-      { avatar: 'assets/user1.jpg', username: '用户1', comment: '评价1', rating: 5 },
-      { avatar: 'assets/user2.jpg', username: '用户2', comment: '评价2', rating: 4 },
-      // 添加更多用户评价
-    ]
-  };
+  selectedSegment: string = 'company';
+  
+  designCompanies = [
+    {
+      name: '设计机构X',
+      starRating: 4.8,
+      reviewCount: 200,
+      description: '设计机构X的简介',
+      services: '室内设计、景观设计',
+      advantages: '创新设计、高品质服务',
+      cases: [
+        {
+          image: 'case1.jpg',
+          description: '案例描述1',
+          style: '现代风格'
+        },
+        // 添加更多案例
+      ],
+      designers: [
+        {
+          avatar: 'designer1.jpg',
+          name: '设计师A',
+          style: '现代风格',
+          serviceArea: '城市A',
+          price: '1'
+        },
+        // 添加更多设计师
+      ],
+      designConcept: '设计理念描述',
+      serviceProcess: '服务流程描述',
+      userReviews: [
+        {
+          text: '用户评价1',
+          image: 'review1.jpg',
+          starRating: 5
+        },
+        // 添加更多用户评价
+      ]
+    },
+    {
+      name: '设计机构Y',
+      starRating: 4.5,
+      reviewCount: 150,
+      description: '设计机构Y的简介',
+      services: '建筑设计、室内设计',
+      advantages: '专业团队、精细施工',
+      cases: [
+        {
+          image: 'case2.jpg',
+          description: '案例描述2',
+          style: '现代简约风格'
+        },
+        // 添加更多案例
+      ],
+      designers: [
+        {
+          avatar: 'designer2.jpg',
+          name: '设计师B',
+          style: '简约风格',
+          serviceArea: '城市B',
+          price: '$$'
+        },
+        {
+          avatar: 'designer2.jpg',
+          name: '设计师B',
+          style: '简约风格',
+          serviceArea: '城市B',
+          price: '$$'
+        },
+        // 添加更多设计师
+      ],
+      designConcept: '设计理念描述',
+      serviceProcess: '服务流程描述',
+      userReviews: [
+        {
+          text: '用户评价2',
+          image: 'review2.jpg',
+          starRating: 4
+        },
+        // 添加更多用户评价
+      ]
+    }
+    // 添加更多设计机构信息
+  ];
+  selectedTab: string = 'designCompany';
+  
+  designers = [
+    {
+      username: '设计师A',
+      avatar: 'assets/designer1.jpg',
+      bio: '设计师A的简介',
+      portfolioImage: 'assets/portfolio1.jpg',
+      portfolioCount: 10,
+      style: '现代风格',
+      serviceArea: '北京',
+      price: '100-200元/平米',
+      rating: 4.8
+    },
+    {
+      username: '设计师B',
+      avatar: 'assets/designer2.jpg',
+      bio: '设计师B的简介',
+      portfolioImage: 'assets/portfolio2.jpg',
+      portfolioCount: 8,
+      style: '简约风格',
+      serviceArea: '上海',
+      price: '150-250元/平米',
+      rating: 4.6
+    }
+    // 添加更多设计师信息
+  ];
+  selectedDesignerSegment: string = 'designer';
 
   constructor() {}