Iakz há 4 meses atrás
pai
commit
0e776b6dda

+ 1 - 30
src/app/tab1/tab1.page.html

@@ -80,33 +80,4 @@
       <ion-icon name="add"></ion-icon>
     </ion-fab-button>
   </ion-fab>
-</ion-content>
-
-<ion-footer>
-  <ion-toolbar color="light">
-    <ion-buttons slot="start">
-      <ion-button [class.active]="selectedTab === 'home'" (click)="selectTab('home')">
-        <ion-button [routerLink]="'/tabs/tab1'" routerDirection="root">
-          <ion-icon name="home"></ion-icon>
-        </ion-button>
-      </ion-button>
-      <ion-button [class.active]="selectedTab === 'shop'" (click)="selectTab('shop')">
-        <ion-button [routerLink]="'/tabs/tab2'" routerDirection="root">
-          <ion-icon name="cart"></ion-icon>
-        </ion-button>
-      </ion-button>
-    </ion-buttons>
-    <ion-buttons slot="end">
-      <ion-button [class.active]="selectedTab === 'message'" (click)="selectTab('message')">
-        <ion-button [routerLink]="'/tabs/tab3'" routerDirection="root">
-          <ion-icon name="chatbox"></ion-icon>
-        </ion-button>
-      </ion-button>
-      <ion-button [class.active]="selectedTab === 'profile'" (click)="selectTab('profile')">
-        <ion-button [routerLink]="'/tabs/tab4'" routerDirection="root">
-          <ion-icon name="person"></ion-icon>
-        </ion-button>
-      </ion-button>
-    </ion-buttons>
-  </ion-toolbar>
-</ion-footer>
+</ion-content>

+ 29 - 1
src/app/tab1/tab1.page.scss

@@ -13,4 +13,32 @@ ion-avatar {
 
 ion-button {
   --border-radius: 0;
-}
+}
+/*
+<ion-footer class="footer">
+  <ion-toolbar color="light">
+    <ion-buttons>
+      <ion-button [class.active]="selectedTab === 'home'" (click)="selectTab('home')">
+        <ion-button [routerLink]="'/tabs/tab1'" routerDirection="root">
+          <ion-icon name="home"></ion-icon>
+        </ion-button>
+      </ion-button>
+      <ion-button [class.active]="selectedTab === 'shop'" (click)="selectTab('shop')">
+        <ion-button [routerLink]="'/tabs/tab2'" routerDirection="root">
+          <ion-icon name="cart"></ion-icon>
+        </ion-button>
+      </ion-button>
+      <ion-button [class.active]="selectedTab === 'message'" (click)="selectTab('message')">
+        <ion-button [routerLink]="'/tabs/tab3'" routerDirection="root">
+          <ion-icon name="chatbox"></ion-icon>
+        </ion-button>
+      </ion-button>
+      <ion-button [class.active]="selectedTab === 'profile'" (click)="selectTab('profile')">
+        <ion-button [routerLink]="'/tabs/tab4'" routerDirection="root">
+          <ion-icon name="person"></ion-icon>
+        </ion-button>
+      </ion-button>
+    </ion-buttons>
+  </ion-toolbar>
+</ion-footer>
+*/

+ 1 - 1
src/app/tab1/tab1.page.spec.ts

@@ -5,7 +5,7 @@ import { ExploreContainerComponentModule } from '../explore-container/explore-co
 
 import { Tab1Page } from './tab1.page';
 
-describe('Tab1Page', () => {
+describe('tab1Page', () => {
   let component: Tab1Page;
   let fixture: ComponentFixture<Tab1Page>;
 

+ 70 - 100
src/app/tab2/tab2.page.html

@@ -1,111 +1,81 @@
 <ion-header>
-  <ion-toolbar color="" class="header">
-    <ion-buttons slot="start">
-      <ion-button>
-        <ion-icon name="menu"></ion-icon>
-      </ion-button>
-    </ion-buttons>
-    <ion-title>User Profile</ion-title>
+  <ion-toolbar color="light">
+    <ion-searchbar placeholder="搜索"></ion-searchbar>
     <ion-buttons slot="end">
       <ion-button>
-        <ion-icon name="scan"></ion-icon>
-      </ion-button>
-      <ion-button>
-        <ion-icon name="settings"></ion-icon>
+        <ion-icon name="ellipsis-horizontal"></ion-icon>
       </ion-button>
     </ion-buttons>
+    
   </ion-toolbar>
+  <div class="user-actions">
+    <ion-button color="light">
+      <ion-icon name="document"></ion-icon>
+      我的订单
+    </ion-button>
+    <ion-button color="light">
+      <ion-icon name="cart"></ion-icon>
+      购物车
+    </ion-button>
+    <ion-button color="light">
+      <ion-icon name="ticket"></ion-icon>
+      红包/卡券
+    </ion-button>
+    <ion-button color="light">
+      <ion-icon name="time"></ion-icon>
+      浏览记录
+    </ion-button>
+  </div>
+  
 </ion-header>
 
 <ion-content>
-  <div class="user-profile">
-    <div class="user-info">
-      <img src="assets/user-avatar.jpg" alt="User Avatar">
-      <h3>不吃粉面菜蛋</h3>
-      <p>ID:0210033</p>
-      <p>个人简介</p>
-      <div class="info-icons">
-        <div class="icon-wrapper">
-          <ion-icon name="male"></ion-icon>
-          <span>21</span>
-        </div>
-        <div class="action-buttons">
-          <span>关注 104</span>
-          <span>粉丝 62</span>
-          <span>获赞 896</span>
-        </div>
-      </div>
-    </div>
-    <div class="user-actions">
-      <ion-button color ="rgba(255, 255, 255, 0.4)">
-        <ion-icon name="cart"></ion-icon>
-        购物车
-      </ion-button>
-      <ion-button color="rgba(255, 255, 255, 0.4)">
-        <ion-icon name="document"></ion-icon>
-        我的订单
-      </ion-button>
-      <ion-button color="rgba(255, 255, 255, 0.4)">
-        <ion-icon name="time"></ion-icon>
-        浏览历史
-      </ion-button>
-    </div>
-  </div>
-  <div class="content">
-    <ion-segment>
-      <ion-segment-button value="works" checked>
-        作品
-      </ion-segment-button>
-      <ion-segment-button value="likes">
-        点赞
-      </ion-segment-button>
-      <ion-segment-button value="favorites">
-        收藏
-      </ion-segment-button>
-    </ion-segment>
+  <ion-segment [(ngModel)]="segmentModel">
+    <ion-segment-button value="aiRecommend">
+      AI推荐
+    </ion-segment-button>
+    <ion-segment-button value="seasonHot">
+      当季热门
+    </ion-segment-button>
+    <ion-segment-button value="styleChange">
+      风格转换
+    </ion-segment-button>
+    <ion-segment-button value="selectedProducts">
+      精选商品
+    </ion-segment-button>
+    <ion-segment-button value="favoriteProducts">
+      收藏商品
+    </ion-segment-button>
+  </ion-segment>
 
-    <ion-grid>
-      <ion-row>
-        <ion-col size="4" *ngFor="let item of items">
-          <div class="image-container">
-            <ion-card>
-              <img src="{{item.image}}" alt="Item Image">
-              <ion-card-content>
-                <ion-icon name="heart"></ion-icon> {{item.likes}}
-              </ion-card-content>
-            </ion-card>
-          </div>
-        </ion-col>
-      </ion-row>
-    </ion-grid>
-  </div>
-</ion-content>
+  <!-- Content for each segment -->
+  <ion-grid *ngIf="segmentModel === 'aiRecommend'">
+    <!-- AI推荐内容 -->
+    <ion-row>
+      <ion-col size="6" *ngFor="let item of aiRecommendItems">
+        <ion-card>
+          <img src="{{item.image}}" />
+          <ion-card-content>
+            <ion-label>{{item.label}}</ion-label>
+          </ion-card-content>
+        </ion-card>
+      </ion-col>
+    </ion-row>
+  </ion-grid>
 
-<ion-footer>
-  <ion-toolbar color="light">
-    <ion-buttons slot="start">
-      <ion-button [class.active]="selectedTab === 'home'" (click)="selectTab('home')">
-        <ion-button [routerLink]="'/tabs/tab1'" routerDirection="root">
-          <ion-icon name="home"></ion-icon>
-        </ion-button>
-      </ion-button>
-      <ion-button [class.active]="selectedTab === 'shop'" (click)="selectTab('shop')">
-        <ion-button [routerLink]="'/tabs/tab2'" routerDirection="root">
-          <ion-icon name="cart"></ion-icon>
-        </ion-button>
-      </ion-button>
-    </ion-buttons>
-    <ion-buttons slot="end">
-      <ion-button [class.active]="selectedTab === 'message'" (click)="selectTab('message')">
-        <ion-button [routerLink]="'/tabs/tab3'" routerDirection="root">
-          <ion-icon name="chatbox"></ion-icon>
-        </ion-button>
-      </ion-button>
-      <ion-button [class.active]="selectedTab === 'profile'" (click)="selectTab('profile')">
-        <ion-button [routerLink]="'/tabs/tab4'" routerDirection="root">
-          <ion-icon name="person"></ion-icon>
-        </ion-button>
-      </ion-button>
-    </ion-buttons>
-  </ion-toolbar>
-</ion-footer>
+  <ion-grid *ngIf="segmentModel === 'seasonHot'">
+    <!-- 当季热门内容 -->
+  </ion-grid>
+
+  <ion-grid *ngIf="segmentModel === 'styleChange'">
+    <!-- 风格转换内容 -->
+  </ion-grid>
+
+  <ion-grid *ngIf="segmentModel === 'selectedProducts'">
+    <!-- 精选商品内容 -->
+  </ion-grid>
+
+  <ion-grid *ngIf="segmentModel === 'favoriteProducts'">
+    <!-- 收藏商品内容 -->
+  </ion-grid>
+</ion-content>

+ 28 - 80
src/app/tab2/tab2.page.scss

@@ -1,92 +1,40 @@
 ion-content {
-  background-color: #ffffff;
+  background-color: #fff;
 }
 
-ion-card {
-  width: 150px;
-  height: 210px;
+ion-segment-button {
+  color: black;
 }
 
-.image-container{
-  position: relative;
-  overflow: hidden;
-}
-.image-container img{
-  width: 100%;
-  height: 80%;
-  background-color: #000000;
-  object-fit: contain;
-  object-position: center;
+ion-grid {
+  height: 100%;
 }
-.header {
-  --background: rgba(166, 66, 253, 0.7); /* 设置顶部工具栏背景色为紫白色渐变的半透明色 */
-  color: #000000; /* 设置文字颜色为白色 */
+ion-content {
+  background-color: #fff;
 }
 
-.user-profile {
-  background: linear-gradient(to bottom, #a870da, #d6d5d6);
-  color: #ffffff;
-  padding: 20px;
-
-  .user-info {
-    text-align: center;
-
-    img {
-      border-radius: 50%;
-      width: 100px;
-      height: 100px;
-    }
-
-    h3 {
-      margin: 10px 0;
-    }
-
-    input {
-      border: 1px solid #ffffff;
-      border-radius: 2px;
-      padding: 5px 10px;
-      margin-bottom: 10px;
-    }
-
-    .info-icons {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-
-      .icon-wrapper {
-        display: flex;
-        align-items: center;
-        margin-right: 10px;
-
-        ion-icon {
-          margin-right: 5px;
-        }
-      }
-
-      .action-buttons {
-        display: flex;
-        span {
-          margin-right: 10px;
-        }
-      }
-    }
-  }
+ion-card {
+  margin: 10px;
+}
 
-  .user-actions {
-    display: flex;
-    justify-content: center;
-    margin-top: 20px;
+img {
+  width: 100%;
+  height: auto;
+}
 
-    ion-button {
-      background-color: rgba(255, 255, 255, 0.3);
-      color: #000000;
-      border: 1px solid rgba(255, 255, 255, 0.3);
-      margin: 1 10px;
-      width: 190px;
-      height: 50px;
-    }
-  }
-  .user-actions ion-button:hover {
-    background-color: rgba(255, 255, 255, 0.2); /* 鼠标悬停时按钮背景色变为更浅的白色半透明 */
+ion-label {
+  text-align: center;
+}
+.user-actions {
+  display: flex;
+  justify-content: center;
+  margin-top: 5px;
+  margin-bottom: 5px;
+  ion-button{
+    margin: 1 10px;
+    margin-top: 5px;
+    margin-bottom: 5px;
+    color: #000000;
+    background-color: white;
   }
 }

+ 1 - 1
src/app/tab2/tab2.page.spec.ts

@@ -5,7 +5,7 @@ import { ExploreContainerComponentModule } from '../explore-container/explore-co
 
 import { Tab2Page } from './tab2.page';
 
-describe('Tab2Page', () => {
+describe('tab2Page', () => {
   let component: Tab2Page;
   let fixture: ComponentFixture<Tab2Page>;
 

+ 8 - 7
src/app/tab2/tab2.page.ts

@@ -6,17 +6,18 @@ import { Component } from '@angular/core';
   styleUrls: ['tab2.page.scss'],
 })
 export class Tab2Page {
-  selectedTab = 'profile';
-  items: any[] = [
-    { image: 'assets/image1.jpg', likes: 100 },
-    { image: 'assets/image2.jpg', likes: 150 },
-    { image: 'assets/image4.jpg', likes: 120 },
-    // 添加更多项目
+  segmentModel = 'aiRecommend';
+  selectedTab = 'shop';
+
+  aiRecommendItems = [
+    { image: 'assets/image4.jpg', label: 'Label 1' },
+    { image: 'assets/image2.jpg', label: 'Label 2' },
+    // Add more items as needed
   ];
 
   constructor() {}
+
   selectTab(tab: string) {
     this.selectedTab = tab;
   }
-
 }

+ 26 - 100
src/app/tab3/tab3.page.html

@@ -1,110 +1,36 @@
 <ion-header>
-  <ion-toolbar color="light">
-    <ion-searchbar placeholder="搜索"></ion-searchbar>
-    <ion-buttons slot="end">
-      <ion-button>
-        <ion-icon name="ellipsis-horizontal"></ion-icon>
-      </ion-button>
-    </ion-buttons>
-    
-  </ion-toolbar>
-  <div class="user-actions">
-    <ion-button color="light">
-      <ion-icon name="document"></ion-icon>
-      我的订单
-    </ion-button>
-    <ion-button color="light">
-      <ion-icon name="cart"></ion-icon>
-      购物车
-    </ion-button>
-    <ion-button color="light">
-      <ion-icon name="ticket"></ion-icon>
-      红包/卡券
-    </ion-button>
-    <ion-button color="light">
-      <ion-icon name="time"></ion-icon>
-      浏览记录
-    </ion-button>
-  </div>
-  
-</ion-header>
-
-<ion-content>
-  <ion-segment [(ngModel)]="segmentModel">
-    <ion-segment-button value="aiRecommend">
-      AI推荐
-    </ion-segment-button>
-    <ion-segment-button value="seasonHot">
-      当季热门
-    </ion-segment-button>
-    <ion-segment-button value="styleChange">
-      风格转换
-    </ion-segment-button>
-    <ion-segment-button value="selectedProducts">
-      精选商品
-    </ion-segment-button>
-    <ion-segment-button value="favoriteProducts">
-      收藏商品
-    </ion-segment-button>
-  </ion-segment>
-
-  <!-- Content for each segment -->
-  <ion-grid *ngIf="segmentModel === 'aiRecommend'">
-    <!-- AI推荐内容 -->
-    <ion-row>
-      <ion-col size="6" *ngFor="let item of aiRecommendItems">
-        <ion-card>
-          <img src="{{item.image}}" />
-          <ion-card-content>
-            <ion-label>{{item.label}}</ion-label>
-          </ion-card-content>
-        </ion-card>
-      </ion-col>
-    </ion-row>
-  </ion-grid>
-
-  <ion-grid *ngIf="segmentModel === 'seasonHot'">
-    <!-- 当季热门内容 -->
-  </ion-grid>
-
-  <ion-grid *ngIf="segmentModel === 'styleChange'">
-    <!-- 风格转换内容 -->
-  </ion-grid>
-
-  <ion-grid *ngIf="segmentModel === 'selectedProducts'">
-    <!-- 精选商品内容 -->
-  </ion-grid>
-
-  <ion-grid *ngIf="segmentModel === 'favoriteProducts'">
-    <!-- 收藏商品内容 -->
-  </ion-grid>
-</ion-content>
-
-<ion-footer>
   <ion-toolbar color="light">
     <ion-buttons slot="start">
-      <ion-button [class.active]="selectedTab === 'home'" (click)="selectTab('home')">
-        <ion-button [routerLink]="'/tabs/tab1'" routerDirection="root">
-          <ion-icon name="home"></ion-icon>
-        </ion-button>
-      </ion-button>
-      <ion-button [class.active]="selectedTab === 'shop'" (click)="selectTab('shop')">
-        <ion-button [routerLink]="'/tabs/tab2'" routerDirection="root">
-          <ion-icon name="cart"></ion-icon>
-        </ion-button>
+      <ion-button>
+        消息 ({{unreadMessages}})
       </ion-button>
     </ion-buttons>
     <ion-buttons slot="end">
-      <ion-button [class.active]="selectedTab === 'message'" (click)="selectTab('message')">
-        <ion-button [routerLink]="'/tabs/tab3'" routerDirection="root">
-          <ion-icon name="chatbox"></ion-icon>
-        </ion-button>
+      <ion-button (click)="search()">
+        <ion-icon name="search"></ion-icon>
       </ion-button>
-      <ion-button [class.active]="selectedTab === 'profile'" (click)="selectTab('profile')">
-        <ion-button [routerLink]="'/tabs/tab4'" routerDirection="root">
-          <ion-icon name="person"></ion-icon>
-        </ion-button>
+      <ion-button>
+        <ion-icon name="people-outline"></ion-icon>
+      </ion-button>
+      <ion-button (click)="addNewMessage()">
+        <ion-icon name="add"></ion-icon>
       </ion-button>
     </ion-buttons>
   </ion-toolbar>
-</ion-footer>
+</ion-header>
+
+<ion-content>
+  <ion-list>
+    <ion-item *ngFor="let message of messages">
+      <ion-avatar slot="start">
+        <img *ngIf="message.avatar" [src]="message.avatar" />
+        <ion-icon *ngIf="!message.avatar" name="person-circle"></ion-icon>
+      </ion-avatar>
+      <ion-label>
+        <h2>{{message.title}}</h2>
+        <p>{{message.content}}</p>
+      </ion-label>
+      <ion-label slot="end">{{message.time}}</ion-label>
+    </ion-item>
+  </ion-list>
+</ion-content>

+ 11 - 28
src/app/tab3/tab3.page.scss

@@ -2,39 +2,22 @@ ion-content {
   background-color: #fff;
 }
 
-ion-segment-button {
-  color: black;
+ion-card {
+  margin:5px 0px;
 }
 
-ion-grid {
-  height: 100%;
-}
-ion-content {
-  background-color: #fff;
+ion-avatar {
+  width: 50px;
+  height: 50px;
 }
 
-ion-card {
-  margin: 10px;
+ion-item {
+  --inner-padding-end: 60px; /* Adjust as needed */
 }
-
-img {
-  width: 100%;
-  height: auto;
+ion-button {
+  --border-radius: 0;
 }
 
-ion-label {
-  text-align: center;
-}
-.user-actions {
-  display: flex;
-  justify-content: center;
-  margin-top: 5px;
-  margin-bottom: 5px;
-  ion-button{
-    margin: 1 10px;
-    margin-top: 5px;
-    margin-bottom: 5px;
-    color: #000000;
-    background-color: white;
-  }
+ion-card-subtitle {
+  margin-left: auto;
 }

+ 1 - 1
src/app/tab3/tab3.page.spec.ts

@@ -5,7 +5,7 @@ import { ExploreContainerComponentModule } from '../explore-container/explore-co
 
 import { Tab3Page } from './tab3.page';
 
-describe('Tab3Page', () => {
+describe('tab3Page', () => {
   let component: Tab3Page;
   let fixture: ComponentFixture<Tab3Page>;
 

+ 17 - 6
src/app/tab3/tab3.page.ts

@@ -6,17 +6,28 @@ import { Component } from '@angular/core';
   styleUrls: ['tab3.page.scss'],
 })
 export class Tab3Page {
-  segmentModel = 'aiRecommend';
-  selectedTab = 'shop';
+  unreadMessages = 3; // Example value, update with actual unread tab3s count
+  selectedTab = 'message';
 
-  aiRecommendItems = [
-    { image: 'assets/image4.jpg', label: 'Label 1' },
-    { image: 'assets/image2.jpg', label: 'Label 2' },
-    // Add more items as needed
+  messages = [
+    { avatar: 'assets/image4.jpg', title: '交易物流', content: '您购买的宝贝已签收', time: '星期二' },
+    { avatar: 'avatar_url_2', title: 'Message 2', content: 'Content of message 2', time: '11:30 AM' },
+    { avatar: 'avatar_url_2', title: 'Message 3', content: 'Content of message 3', time: '11:30 AM' },
+    { avatar: 'avatar_url_2', title: 'Message 4', content: 'Content of message 4', time: '11:30 AM' },
+    { avatar: 'avatar_url_2', title: 'Message 5', content: 'Content of message 5', time: '11:30 AM' },
+    // Add more tab3s as needed
   ];
 
   constructor() {}
 
+  search() {
+    // Implement search functionality
+  }
+
+  addNewMessage() {
+    // Implement adding new tab3 functionality
+  }
+
   selectTab(tab: string) {
     this.selectedTab = tab;
   }

+ 65 - 48
src/app/tab4/tab4.page.html

@@ -1,65 +1,82 @@
 <ion-header>
-  <ion-toolbar color="light">
+  <ion-toolbar color="" class="header">
     <ion-buttons slot="start">
       <ion-button>
-        消息 ({{unreadMessages}})
+        <ion-icon name="menu"></ion-icon>
       </ion-button>
     </ion-buttons>
+    <ion-title>User tab4</ion-title>
     <ion-buttons slot="end">
-      <ion-button (click)="search()">
-        <ion-icon name="search"></ion-icon>
-      </ion-button>
       <ion-button>
-        <ion-icon name="people-outline"></ion-icon>
+        <ion-icon name="scan"></ion-icon>
       </ion-button>
-      <ion-button (click)="addNewMessage()">
-        <ion-icon name="add"></ion-icon>
+      <ion-button>
+        <ion-icon name="settings"></ion-icon>
       </ion-button>
     </ion-buttons>
   </ion-toolbar>
 </ion-header>
 
 <ion-content>
-  <ion-list>
-    <ion-item *ngFor="let message of messages">
-      <ion-avatar slot="start">
-        <img *ngIf="message.avatar" [src]="message.avatar" />
-        <ion-icon *ngIf="!message.avatar" name="person-circle"></ion-icon>
-      </ion-avatar>
-      <ion-label>
-        <h2>{{message.title}}</h2>
-        <p>{{message.content}}</p>
-      </ion-label>
-      <ion-label slot="end">{{message.time}}</ion-label>
-    </ion-item>
-  </ion-list>
-</ion-content>
-
-<ion-footer>
-  <ion-toolbar color="light">
-    <ion-buttons slot="start">
-      <ion-button [class.active]="selectedTab === 'home'" (click)="selectTab('home')">
-        <ion-button [routerLink]="'/tabs/tab1'" routerDirection="root">
-          <ion-icon name="home"></ion-icon>
-        </ion-button>
-      </ion-button>
-      <ion-button [class.active]="selectedTab === 'shop'" (click)="selectTab('shop')">
-        <ion-button [routerLink]="'/tabs/tab2'" routerDirection="root">
-          <ion-icon name="cart"></ion-icon>
-        </ion-button>
+  <div class="user-tab4">
+    <div class="user-info">
+      <img src="assets/user-avatar.jpg" alt="User Avatar">
+      <h3>不吃粉面菜蛋</h3>
+      <p>ID:0210033</p>
+      <p>个人简介</p>
+      <div class="info-icons">
+        <div class="icon-wrapper">
+          <ion-icon name="male"></ion-icon>
+          <span>21</span>
+        </div>
+        <div class="action-buttons">
+          <span>关注 104</span>
+          <span>粉丝 62</span>
+          <span>获赞 896</span>
+        </div>
+      </div>
+    </div>
+    <div class="user-actions">
+      <ion-button color ="rgba(255, 255, 255, 0.4)">
+        <ion-icon name="cart"></ion-icon>
+        购物车
       </ion-button>
-    </ion-buttons>
-    <ion-buttons slot="end">
-      <ion-button [class.active]="selectedTab === 'message'" (click)="selectTab('message')">
-        <ion-button [routerLink]="'/tabs/tab3'" routerDirection="root">
-          <ion-icon name="chatbox"></ion-icon>
-        </ion-button>
+      <ion-button color="rgba(255, 255, 255, 0.4)">
+        <ion-icon name="document"></ion-icon>
+        我的订单
       </ion-button>
-      <ion-button [class.active]="selectedTab === 'profile'" (click)="selectTab('profile')">
-        <ion-button [routerLink]="'/tabs/tab4'" routerDirection="root">
-          <ion-icon name="person"></ion-icon>
-        </ion-button>
+      <ion-button color="rgba(255, 255, 255, 0.4)">
+        <ion-icon name="time"></ion-icon>
+        浏览历史
       </ion-button>
-    </ion-buttons>
-  </ion-toolbar>
-</ion-footer>
+    </div>
+  </div>
+  <div class="content">
+    <ion-segment>
+      <ion-segment-button value="works" checked>
+        作品
+      </ion-segment-button>
+      <ion-segment-button value="likes">
+        点赞
+      </ion-segment-button>
+      <ion-segment-button value="favorites">
+        收藏
+      </ion-segment-button>
+    </ion-segment>
+
+    <ion-grid>
+      <ion-row>
+        <ion-col size="4" *ngFor="let item of items">
+          <div class="image-container">
+            <ion-card>
+              <img src="{{item.image}}" alt="Item Image">
+              <ion-card-content>
+                <ion-icon name="heart"></ion-icon> {{item.likes}}
+              </ion-card-content>
+            </ion-card>
+          </div>
+        </ion-col>
+      </ion-row>
+    </ion-grid>
+  </div>
+</ion-content>

+ 87 - 12
src/app/tab4/tab4.page.scss

@@ -1,23 +1,98 @@
 ion-content {
-  background-color: #fff;
+  background-color: #ffffff;
 }
 
 ion-card {
-  margin:5px 0px;
+  width: 120px;
+  height: 200px;
 }
 
-ion-avatar {
-  width: 50px;
-  height: 50px;
+.image-container{
+  position: relative;
+  overflow: hidden;
 }
-
-ion-item {
-  --inner-padding-end: 60px; /* Adjust as needed */
+.image-container img{
+  width: 100%;
+  height: 75%;
+  background-color: #000000;
+  object-fit: contain;
+  object-position: center;
 }
-ion-button {
-  --border-radius: 0;
+.header {
+  --background: rgba(166, 66, 253, 0.7); /* 设置顶部工具栏背景色为紫白色渐变的半透明色 */
+  color: #000000; /* 设置文字颜色为白色 */
 }
 
-ion-card-subtitle {
-  margin-left: auto;
+.user-tab4 {
+  background: linear-gradient(to bottom, #a870da, #d6d5d6);
+  color: #ffffff;
+  padding: 20px;
+
+  .user-info {
+    text-align: center;
+
+    img {
+      border-radius: 50%;
+      width: 100px;
+      height: 100px;
+    }
+
+    h3 {
+      margin: 10px 0;
+    }
+
+    input {
+      border: 1px solid #ffffff;
+      border-radius: 2px;
+      padding: 5px 10px;
+      margin-bottom: 10px;
+    }
+
+    .info-icons {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      .icon-wrapper {
+        display: flex;
+        align-items: center;
+        margin-right: 10px;
+
+        ion-icon {
+          margin-right: 5px;
+        }
+      }
+
+      .action-buttons {
+        display: flex;
+        span {
+          margin-right: 10px;
+        }
+      }
+    }
+  }
+
+  .user-actions {
+    display: flex;
+    justify-content: center;
+    margin-top: 20px;
+
+    ion-button {
+      background-color: rgba(255, 255, 255, 0.3);
+      color: #000000;
+      border: 1px solid rgba(255, 255, 255, 0.3);
+      margin: 1 10px;
+      width: 130px;
+      height: 50px;
+    }
+  }
+  .user-actions ion-button:hover {
+    background-color: rgba(255, 255, 255, 0.2); /* 鼠标悬停时按钮背景色变为更浅的白色半透明 */
+  }
+}
+.content{
+  justify-content: center;
+  ion-card{
+    margin: auto;
+  }
 }

+ 1 - 1
src/app/tab4/tab4.page.spec.ts

@@ -5,7 +5,7 @@ import { ExploreContainerComponentModule } from '../explore-container/explore-co
 
 import { Tab4Page } from './tab4.page';
 
-describe('Tab4Page', () => {
+describe('tab4Page', () => {
   let component: Tab4Page;
   let fixture: ComponentFixture<Tab4Page>;
 

+ 7 - 19
src/app/tab4/tab4.page.ts

@@ -6,29 +6,17 @@ import { Component } from '@angular/core';
   styleUrls: ['tab4.page.scss'],
 })
 export class Tab4Page {
-  unreadMessages = 3; // Example value, update with actual unread messages count
-  selectedTab = 'message';
-
-  messages = [
-    { avatar: 'assets/image4.jpg', title: '交易物流', content: '您购买的宝贝已签收', time: '星期二' },
-    { avatar: 'avatar_url_2', title: 'Message 2', content: 'Content of message 2', time: '11:30 AM' },
-    { avatar: 'avatar_url_2', title: 'Message 3', content: 'Content of message 3', time: '11:30 AM' },
-    { avatar: 'avatar_url_2', title: 'Message 4', content: 'Content of message 4', time: '11:30 AM' },
-    { avatar: 'avatar_url_2', title: 'Message 5', content: 'Content of message 5', time: '11:30 AM' },
-    // Add more messages as needed
+  selectedTab = 'profile';
+  items: any[] = [
+    { image: 'assets/image1.jpg', likes: 100 },
+    { image: 'assets/image2.jpg', likes: 150 },
+    { image: 'assets/image4.jpg', likes: 120 },
+    // 添加更多项目
   ];
 
   constructor() {}
-
-  search() {
-    // Implement search functionality
-  }
-
-  addNewMessage() {
-    // Implement adding new message functionality
-  }
-
   selectTab(tab: string) {
     this.selectedTab = tab;
   }
+
 }

+ 8 - 8
src/app/tabs/tabs.page.html

@@ -2,22 +2,22 @@
 
   <ion-tab-bar slot="bottom">
     <ion-tab-button tab="tab1" href="/tabs/tab1">
-      <ion-icon aria-hidden="true" name="triangle"></ion-icon>
-      <ion-label>Tab 1</ion-label>
+      <ion-icon aria-hidden="true" name="home"></ion-icon>
+      <ion-label>首页</ion-label>
     </ion-tab-button>
 
     <ion-tab-button tab="tab2" href="/tabs/tab2">
-      <ion-icon aria-hidden="true" name="ellipse"></ion-icon>
-      <ion-label>Tab 2</ion-label>
+      <ion-icon aria-hidden="true" name="cart"></ion-icon>
+      <ion-label>购物</ion-label>
     </ion-tab-button>
 
     <ion-tab-button tab="tab3" href="/tabs/tab3">
-      <ion-icon aria-hidden="true" name="square"></ion-icon>
-      <ion-label>Tab 3</ion-label>
+      <ion-icon aria-hidden="true" name="chatbox"></ion-icon>
+      <ion-label>消息</ion-label>
     </ion-tab-button>
     <ion-tab-button tab="tab4" href="/tabs/tab4">
-      <ion-icon aria-hidden="true" name="star"></ion-icon>
-      <ion-label>Tab 4</ion-label>
+      <ion-icon aria-hidden="true" name="person"></ion-icon>
+      <ion-label>我的</ion-label>
     </ion-tab-button>
   </ion-tab-bar>