Browse Source

fix: new files

15207938132 3 months ago
parent
commit
0ef4a80699
43 changed files with 1867 additions and 202 deletions
  1. 4 1
      fashion-app/angular.json
  2. 641 14
      fashion-app/package-lock.json
  3. 1 0
      fashion-app/package.json
  4. 1 0
      fashion-app/src/app/app.component.html
  5. 8 0
      fashion-app/src/app/edit-rating-star/edit-rating-star.component.html
  6. 10 0
      fashion-app/src/app/edit-rating-star/edit-rating-star.component.scss
  7. 22 0
      fashion-app/src/app/edit-rating-star/edit-rating-star.component.spec.ts
  8. 54 0
      fashion-app/src/app/edit-rating-star/edit-rating-star.component.ts
  9. 1 0
      fashion-app/src/app/edit-tag/README.md
  10. 7 0
      fashion-app/src/app/edit-tag/edit-tag.component.html
  11. 0 0
      fashion-app/src/app/edit-tag/edit-tag.component.scss
  12. 22 0
      fashion-app/src/app/edit-tag/edit-tag.component.spec.ts
  13. 34 0
      fashion-app/src/app/edit-tag/edit-tag.component.ts
  14. BIN
      fashion-app/src/app/images/1..jpg
  15. BIN
      fashion-app/src/app/images/2.jpg
  16. BIN
      fashion-app/src/app/images/touxiang.jpg
  17. 39 0
      fashion-app/src/app/page-evaluate/page-evaluate.component.html
  18. 64 0
      fashion-app/src/app/page-evaluate/page-evaluate.component.scss
  19. 22 0
      fashion-app/src/app/page-evaluate/page-evaluate.component.spec.ts
  20. 60 0
      fashion-app/src/app/page-evaluate/page-evaluate.component.ts
  21. 29 0
      fashion-app/src/app/page-test/page-test.component.html
  22. 5 0
      fashion-app/src/app/page-test/page-test.component.scss
  23. 22 0
      fashion-app/src/app/page-test/page-test.component.spec.ts
  24. 42 0
      fashion-app/src/app/page-test/page-test.component.ts
  25. 16 0
      fashion-app/src/app/tab1/tab1.module.ts
  26. 33 83
      fashion-app/src/app/tab1/tab1.page.html
  27. 24 0
      fashion-app/src/app/tab1/tab1.page.scss
  28. 18 58
      fashion-app/src/app/tab1/tab1.page.ts
  29. 25 13
      fashion-app/src/app/tab2/tab2.page.html
  30. 36 6
      fashion-app/src/app/tab2/tab2.page.ts
  31. 15 0
      fashion-app/src/app/tab3/tab3.module.ts
  32. 123 8
      fashion-app/src/app/tab3/tab3.page.html
  33. 104 0
      fashion-app/src/app/tab3/tab3.page.scss
  34. 119 3
      fashion-app/src/app/tab3/tab3.page.ts
  35. 90 12
      fashion-app/src/app/tab4/tab4.page.html
  36. 121 0
      fashion-app/src/app/tab4/tab4.page.scss
  37. 5 3
      fashion-app/src/app/tab4/tab4.page.ts
  38. 4 1
      fashion-app/src/app/tabs/tabs.page.scss
  39. 15 0
      fashion-app/src/app/tabs/tabs.routes.ts
  40. 15 0
      fashion-app/src/main.ts
  41. 1 0
      fashion-app/tsconfig.json
  42. 3 0
      fashion-prod/.vscode/settings.json
  43. 12 0
      fashion-prod/README.md

+ 4 - 1
fashion-app/angular.json

@@ -126,7 +126,10 @@
     }
   },
   "cli": {
-    "schematicCollections": ["@ionic/angular-toolkit"]
+    "schematicCollections": [
+      "@ionic/angular-toolkit"
+    ],
+    "analytics": false
   },
   "schematics": {
     "@ionic/angular-toolkit:component": {

File diff suppressed because it is too large
+ 641 - 14
fashion-app/package-lock.json


+ 1 - 0
fashion-app/package.json

@@ -27,6 +27,7 @@
     "@capacitor/keyboard": "6.0.3",
     "@capacitor/status-bar": "6.0.2",
     "@ionic/angular": "^8.0.0",
+    "fmode-ng": "^0.0.62",
     "ionicons": "^7.2.1",
     "rxjs": "~7.8.0",
     "tslib": "^2.3.0",

+ 1 - 0
fashion-app/src/app/app.component.html

@@ -1,3 +1,4 @@
 <ion-app>
   <ion-router-outlet></ion-router-outlet>
+  
 </ion-app>

+ 8 - 0
fashion-app/src/app/edit-rating-star/edit-rating-star.component.html

@@ -0,0 +1,8 @@
+<div class="star-rating">
+  <ng-container *ngFor="let star of starList; let i = index">
+    <ion-icon 
+      [name]="star ? 'star' : 'star-outline'" 
+      (click)="rate(i)">
+    </ion-icon>
+  </ng-container>
+</div>

+ 10 - 0
fashion-app/src/app/edit-rating-star/edit-rating-star.component.scss

@@ -0,0 +1,10 @@
+.star-rating {
+    display: flex;
+    cursor: pointer;
+  
+    ion-icon {
+      font-size: 40px; // 调整星星大小
+      color: gold; // 星星颜色
+      margin-right: 5px; // 星星间距
+    }
+  }

+ 22 - 0
fashion-app/src/app/edit-rating-star/edit-rating-star.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { EditRatingStarComponent } from './edit-rating-star.component';
+
+describe('EditRatingStarComponent', () => {
+  let component: EditRatingStarComponent;
+  let fixture: ComponentFixture<EditRatingStarComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [EditRatingStarComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(EditRatingStarComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 54 - 0
fashion-app/src/app/edit-rating-star/edit-rating-star.component.ts

@@ -0,0 +1,54 @@
+import { CommonModule } from '@angular/common';
+import { Component, OnInit } from '@angular/core';
+import { Input, Output, EventEmitter } from '@angular/core';
+import { IonIcon } from '@ionic/angular/standalone';
+import { addIcons } from 'ionicons';
+import { star,starOutline } from 'ionicons/icons';
+addIcons({star,starOutline})
+@Component({
+  selector: 'edit-rating-star',
+  templateUrl: './edit-rating-star.component.html',
+  styleUrls: ['./edit-rating-star.component.scss'],
+  standalone: true,
+  imports:[IonIcon,CommonModule]
+})
+export class EditRatingStarComponent  implements OnInit {
+  @Input() score: number = 0; // 默认分值为0
+  @Input() scoreMax: number = 5; // 最大分值
+  starList: boolean[] = []; // 星星状态数组
+
+  @Output() onScoreChange: EventEmitter<number> = new EventEmitter<number>();
+
+  constructor() {
+    this.updateStarList();
+  }
+  ngOnInit(): void {
+    this.updateStarList();
+  }
+
+  ngOnChanges() {
+    this.updateStarList();
+  }
+
+  // 更新星星数组
+  private updateStarList() {
+    this.starList = Array(this.scoreMax).fill(false);
+    for (let i = 0; i < this.score; i++) {
+      this.starList[i] = true;
+    }
+  }
+
+  // 打分方法
+  rate(index: number) {
+    if (this.score === index + 1) {
+      // 如果点击的是当前分值,清零
+      this.score = 0;
+    } else {
+      // 否则更新分值
+      this.score = index + 1;
+    }
+    this.updateStarList();
+    this.onScoreChange.emit(this.score); // 触发分值变化事件
+  }
+
+}

+ 1 - 0
fashion-app/src/app/edit-tag/README.md

@@ -0,0 +1 @@
+# 标签编辑组件

+ 7 - 0
fashion-app/src/app/edit-tag/edit-tag.component.html

@@ -0,0 +1,7 @@
+<ion-input [value]="userInputText" placeholder="请输入标签:" type="text" (ionInput)="onUserInput($event)"></ion-input>
+<p>你当前输入的值是:{{userInputText}}</p>
+<ion-button (click)="addTag()">添加标签</ion-button>
+
+@for (tag of tags;track tag;) {
+    <ion-chip>{{tag}}<span (click)="deleteTag(tag)">X</span></ion-chip>
+}

+ 0 - 0
fashion-app/src/app/edit-tag/edit-tag.component.scss


+ 22 - 0
fashion-app/src/app/edit-tag/edit-tag.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { EditTagComponent } from './edit-tag.component';
+
+describe('EditTagComponent', () => {
+  let component: EditTagComponent;
+  let fixture: ComponentFixture<EditTagComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [EditTagComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(EditTagComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 34 - 0
fashion-app/src/app/edit-tag/edit-tag.component.ts

@@ -0,0 +1,34 @@
+import { Component, EventEmitter, OnInit, Output } from '@angular/core';
+import { IonicModule } from '@ionic/angular'; // 导入 IonicModule
+@Component({
+  selector: 'app-edit-tag',
+  templateUrl: './edit-tag.component.html',
+  styleUrls: ['./edit-tag.component.scss'],
+  standalone: true,
+  imports:[IonicModule]
+})
+export class EditTagComponent  implements OnInit {
+  userInputText: string = '';
+  onUserInput(event: any){
+    console.log(event);
+    this.userInputText = event.detail.value;
+  }
+tags: Array<string> = [];
+  addTag(){
+    this.tags.push(this.userInputText);
+    this.userInputText = '';
+    this.onTagChange.emit(this.tags);
+  }
+  deleteTag(tag:string){
+    let idx=this.tags.findIndex(item=>item==tag);
+    this.tags.splice(idx,1);
+  }
+@Output()
+onTagChange:EventEmitter<Array<string>> = new EventEmitter<Array<string>>();
+
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

BIN
fashion-app/src/app/images/1..jpg


BIN
fashion-app/src/app/images/2.jpg


BIN
fashion-app/src/app/images/touxiang.jpg


+ 39 - 0
fashion-app/src/app/page-evaluate/page-evaluate.component.html

@@ -0,0 +1,39 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-button (click)="goBack()" fill="clear">
+        <ion-icon aria-hidden="true" name="chevron-back" style="color: black; font-size: 24px;"></ion-icon>
+      </ion-button>
+    </ion-buttons>
+    <ion-title>评价</ion-title>
+    <ion-buttons slot="end">
+      <ion-button (click)="submitEvaluation()" class="submit-button" color="light" id="present-alert">发表</ion-button>
+      <ion-alert
+  trigger="present-alert"
+  header="发表状态"
+  message="发表成功"
+  [buttons]="alertButtons"
+></ion-alert>
+    </ion-buttons>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <div class="rating-container">
+    <span class="rating-label">评分:</span>
+    <edit-rating-star 
+      [score]="currentScore" 
+      [scoreMax]="5" 
+      (onScoreChange)="handleScoreChange($event)">
+    </edit-rating-star>
+    <span class="actual-score">{{ getScoreDescription(currentScore) }}</span>
+  </div>
+  <div class="textbox">
+  <ion-textarea  placeholder="你可以从AI的使用体验、速度、准确性、实用性、创新性以及全面性等方面进行评价,晒图分享你的使用体验~"[autoGrow]="true"></ion-textarea>
+</div>
+
+<div class="imgbox">
+</div>
+
+
+</ion-content>

+ 64 - 0
fashion-app/src/app/page-evaluate/page-evaluate.component.scss

@@ -0,0 +1,64 @@
+.evaluation-content {
+    display: flex; /* 使用 flexbox 布局 */
+    flex-direction: column; /* 垂直方向排列 */
+    align-items: center; /* 水平方向居中 */
+    justify-content: center; /* 垂直方向居中 */
+    padding: 16px;
+    height: 100%; /* 填充整个内容区域 */
+  }
+  
+  ion-textarea {
+    width: 100%; /* 使文本区域宽度适应父容器 */
+    max-width: 500px; /* 设置最大宽度 */
+    min-height: 150px; /* 设置最小高度 */
+    margin-bottom: 16px; /* 文本区域和按钮之间的间距 */
+  }
+  
+  .submit-button {
+    background-color: orange; /* 橙色背景 */
+    color: white !important; /* 强制设置文字颜色为白色 */
+    border-radius: 20px; /* 椭圆形 */
+    padding: 6px 12px; /* 调整内边距以缩小按钮 */
+    font-size: 16px; /* 调整字体大小 */
+    height: auto; /* 自适应高度 */
+    min-width: 80px; /* 最小宽度 */
+  }
+  .rating-container {
+    display: flex; /* 使用 flexbox 布局 */
+    align-items: center; /* 垂直居中对齐 */
+   height:120px;
+    padding: 16px; /* 添加内边距 */
+    border-bottom: 1px solid grey; /* 只显示底部边框,设置为黑色 */
+    margin-bottom: 10px; /* 评分容器与文本之间的间距 */
+  }
+  
+  .rating-label {
+    display: flex; /* 使用 flexbox 布局 */
+    align-items: center; /* 垂直居中对齐 */
+    font-weight: bold; /* 加粗评分文本 */
+    font-size: 22px; /* 调整字体大小 */
+    margin-right: 5px; /* 评分文本与星星之间的间距 */
+  }
+  
+  .actual-score {
+    display: flex; /* 使用 flexbox 布局 */
+    align-items: center; /* 垂直居中对齐 */
+    margin-left: 50px; /* 分数与星星之间的间距 */
+    font-size: 15px; /* 调整字体大小 */
+    color: grey;
+  }
+
+  .textbox{
+    width: 100%; /* 使文本区域宽度适应父容器 */
+    height: 400px; /* 设置最大宽度 */
+    border-bottom: 1px solid grey; /* 只显示底部边框,设置为黑色 */
+  }
+
+  .imgbox{
+    width: 100%; /* 使文本区域宽度适应父容器 */
+    height: 200px; /* 设置最大宽度 */
+    background-image: url("../images/1..jpg");
+    background-size: contain; /* 图像填充方式 */
+  background-position: center; /* 图像居中 */
+  background-repeat: no-repeat; /* 不重复图像 */
+  }

+ 22 - 0
fashion-app/src/app/page-evaluate/page-evaluate.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { PageEvaluateComponent } from './page-evaluate.component';
+
+describe('PageEvaluateComponent', () => {
+  let component: PageEvaluateComponent;
+  let fixture: ComponentFixture<PageEvaluateComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [PageEvaluateComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(PageEvaluateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 60 - 0
fashion-app/src/app/page-evaluate/page-evaluate.component.ts

@@ -0,0 +1,60 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { IonicModule } from '@ionic/angular'; // 导入 IonicModule
+import { addIcons } from 'ionicons';
+import { chevronBack } from 'ionicons/icons';
+import { EditRatingStarComponent } from '../edit-rating-star/edit-rating-star.component';
+addIcons({chevronBack});
+
+@Component({
+  selector: 'app-page-evaluate',
+  templateUrl: './page-evaluate.component.html',
+  styleUrls: ['./page-evaluate.component.scss'],
+  standalone: true,
+
+  imports: [IonicModule,EditRatingStarComponent],
+  
+})
+export class PageEvaluateComponent  implements OnInit {
+
+  ngOnInit() {}
+  constructor(private router: Router) {}
+ 
+  // 返回按钮点击事件
+  goBack() {
+    this.router.navigate(['tabs/tab3']); 
+  }
+  submitEvaluation() {
+    // 处理评价提交逻辑
+    console.log('发表评价');
+    // 这里可以添加您希望执行的代码,例如将评价发送到服务器
+  }
+
+//星星打分
+currentScore: number = 0; // 初始分值
+
+handleScoreChange(newScore: number) {
+  this.currentScore = newScore;
+  console.log('新分值:', newScore); // 处理分值变化
+}
+
+getScoreDescription(score: number): string {
+  switch (score) {
+    case 1:
+      return '很差';
+    case 2:
+      return '差';
+    case 3:
+      return '一般';
+    case 4:
+      return '还不错';
+    case 5:
+      return '很满意';
+    default:
+      return ''; // 默认返回空字符串
+  }
+}
+alertButtons = ['退出'];
+
+
+}

+ 29 - 0
fashion-app/src/app/page-test/page-test.component.html

@@ -0,0 +1,29 @@
+<ion-content >
+<h1 align="center">这是测试页</h1>
+  <ion-button (click)="goToDetail()">点击按钮</ion-button>
+  <ion-button (mouseup)="goToDetail()">抬起按钮</ion-button>
+  <app-edit-tag  (onTagChange)="setTagsValue($event)"></app-edit-tag>
+
+  <h1>父级页面</h1>
+  <ul>
+   @for(tag of editTags;track tag){
+     <li>{{tag}}</li>
+   }
+  </ul>
+
+  <ion-button (click)="goTestPage()">进入测试页</ion-button>
+
+  <h1>星星打分组件演示,分值:{{currentScore}}</h1>
+  <edit-rating-star 
+ [score]="currentScore" 
+ [scoreMax]="5" 
+ (onScoreChange)="handleScoreChange($event)">
+</edit-rating-star>
+
+<ion-list>
+  <ion-item>
+    <ion-textarea label="请输入:" placeholder="具体描述你的感受" [autoGrow]="true"></ion-textarea>
+  </ion-item>
+
+</ion-list>
+</ion-content>

+ 5 - 0
fashion-app/src/app/page-test/page-test.component.scss

@@ -0,0 +1,5 @@
+button{
+    background-color: #007bff;
+    width: 50px;
+    height: 50px;
+}

+ 22 - 0
fashion-app/src/app/page-test/page-test.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { PageTestComponent } from './page-test.component';
+
+describe('PageTestComponent', () => {
+  let component: PageTestComponent;
+  let fixture: ComponentFixture<PageTestComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [PageTestComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(PageTestComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 42 - 0
fashion-app/src/app/page-test/page-test.component.ts

@@ -0,0 +1,42 @@
+import { Component, OnInit } from '@angular/core';
+import { IonicModule } from '@ionic/angular'; // 导入 IonicModule
+import {aperture,glasses,person, logoOctocat } from 'ionicons/icons';
+import { EditTagComponent } from '../edit-tag/edit-tag.component';
+import { Router } from '@angular/router';
+import { EditRatingStarComponent } from '../edit-rating-star/edit-rating-star.component';
+
+@Component({
+  selector: 'app-page-test',
+  templateUrl: './page-test.component.html',
+  styleUrls: ['./page-test.component.scss'],
+  standalone: true,
+  imports: [IonicModule,EditTagComponent,EditRatingStarComponent]
+})
+export class PageTestComponent  implements OnInit {
+
+  goToDetail(){
+    alert('hello ionic')
+  }
+  editTags:Array<string> = [];
+  setTagsValue(ev:any){
+    console.log("setTagsValue",ev)
+    this.editTags = ev;
+  }
+
+  constructor(private router: Router){}
+  ngOnInit(): void {
+    console.log('PageTestComponent ngOnInit');
+  }
+  // 跳转到测试页面
+goTestPage(){
+  this.router.navigate(['/tabs/test']);}
+  
+//星星打分
+  currentScore: number = 0; // 初始分值
+
+  handleScoreChange(newScore: number) {
+    this.currentScore = newScore;
+    console.log('新分值:', newScore); // 处理分值变化
+  }
+
+}

+ 16 - 0
fashion-app/src/app/tab1/tab1.module.ts

@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { IonicModule } from '@ionic/angular';
+import { Tab1Page } from './tab1.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule // 确保这里导入了 IonicModule
+  ],
+  declarations: [Tab1Page],
+
+})
+export class Tab1PageModule {}

+ 33 - 83
fashion-app/src/app/tab1/tab1.page.html

@@ -1,92 +1,42 @@
-<ion-header>
+<ion-header [translucent]="true">
   <ion-toolbar>
     <ion-buttons slot="start">
-      <ion-logo src="assets/logo.png"></ion-logo>
+      <ion-icon name="menu" style="color: black; font-size:30px"></ion-icon>
     </ion-buttons>
-    <ion-searchbar placeholder="搜索服装、品牌或灵感" debounce="300"></ion-searchbar>
+    <ion-title>
+      推荐
+    </ion-title>
     <ion-buttons slot="end">
-      <ion-button routerLink="/profile">
-        <ion-icon slot="icon-only" name="person-circle"></ion-icon>
+      <ion-button (click)="goSearchPage()">
+        <ion-icon name="search" style="color: black;font-size:30px"></ion-icon>
       </ion-button>
     </ion-buttons>
   </ion-toolbar>
 </ion-header>
 
-<ion-content>
-  <ion-card>
-    <ion-card-header>
-      <ion-card-title>欢迎回来,{{ userName }}!</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <p>您的体型:{{ userBodyType }}</p>
-      <p>肤色:{{ userSkinTone }}</p>
-    </ion-card-content>
-  </ion-card>
-
-
-    <ion-header>
-      <ion-toolbar>
-        <ion-title>根据您的风格推荐</ion-title>
-      </ion-toolbar>
-    </ion-header>
-    <ion-content>
-      <ion-grid>
-        <ion-row>
-          <ion-col size="6" *ngFor="let item of recommendedItems">
-            <ion-card>
-              <img [src]="item.image" alt="{{ item.name }}">
-              <ion-card-header>
-                <ion-card-title>{{ item.name }}</ion-card-title>
-                <ion-card-subtitle>{{ item.price | currency }}</ion-card-subtitle>
-              </ion-card-header>
-              <ion-card-content>
-                <ion-button expand="full" (click)="buyItem(item)">购买</ion-button>
-                <ion-button fill="clear" (click)="addToFavorites(item)">
-                  <ion-icon name="heart"></ion-icon>
-                </ion-button>
-                <ion-button fill="clear" (click)="viewDetails(item)">
-                  <ion-icon name="eye"></ion-icon>
-                </ion-button>
-              </ion-card-content>
-            </ion-card>
-          </ion-col>
-        </ion-row>
-      </ion-grid>
-    </ion-content>
-
-
-
-    <ion-header>
-      <ion-toolbar>
-        <ion-title>时尚灵感库</ion-title>
-      </ion-toolbar>
-    </ion-header>
-    <ion-content>
-      <ion-grid>
-        <ion-row>
-          <ion-col size="6" *ngFor="let inspiration of inspirations">
-            <ion-card>
-              <img [src]="inspiration.image" alt="{{ inspiration.description }}">
-              <ion-card-header>
-                <ion-card-title>{{ inspiration.description }}</ion-card-title>
-              </ion-card-header>
-              <ion-card-content>
-                <ion-button fill="clear" (click)="likeInspiration(inspiration)">
-                  <ion-icon name="thumbs-up"></ion-icon>
-                </ion-button>
-                <ion-button fill="clear" (click)="commentOnInspiration(inspiration)">
-                  <ion-icon name="chatbubbles"></ion-icon>
-                </ion-button>
-                <ion-button fill="clear" (click)="shareInspiration(inspiration)">
-                  <ion-icon name="share"></ion-icon>
-                </ion-button>
-              </ion-card-content>
-            </ion-card>
-          </ion-col>
-        </ion-row>
-      </ion-grid>
-    </ion-content>
-
-
-
-</ion-content>
+<ion-content class="ion-padding">
+  <ion-segment [(ngModel)]="selectedSegment" (ionChange)="segmentChanged($event)">
+    <ion-segment-button value="关注">
+      <ion-label>关注</ion-label>
+    </ion-segment-button>
+    <ion-segment-button value="发现">
+      <ion-label>发现</ion-label>
+    </ion-segment-button>
+    <ion-segment-button value="同城">
+      <ion-label>同城</ion-label>
+    </ion-segment-button>
+  </ion-segment>
+
+  <div *ngIf="selectedSegment === '关注'" class="content">
+    <h2>关注的内容</h2>
+    <p>这里是关注的内容,展示用户关注的项目、文章或其他信息。</p>
+  </div>
+  <div *ngIf="selectedSegment === '发现'" class="content">
+    <h2>发现的内容</h2>
+    <p>这里是发现的内容,展示推荐的项目或新发现的内容。</p>
+  </div>
+  <div *ngIf="selectedSegment === '同城'" class="content">
+    <h2>同城的内容</h2>
+    <p>这里是同城的内容,展示本地活动或信息。</p>
+  </div>
+</ion-content>

+ 24 - 0
fashion-app/src/app/tab1/tab1.page.scss

@@ -0,0 +1,24 @@
+.content {
+    padding: 16px;
+    border: 1px solid #ccc;
+    border-radius: 8px;
+    background-color: #f9f9f9;
+    margin-top: 16px;
+    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); // 添加阴影效果
+  }
+  
+  h2 {
+    color: #3880ff; // 使用 Ionic 的主色调
+    margin-bottom: 8px;
+  }
+  
+  .search-button {
+    --background: transparent; // 透明背景
+    --border-radius: 50%; // 圆形按钮
+    --padding: 8px; // 内边距
+  }
+  
+  .search-icon {
+    color: black; // 设置搜索图标颜色为黑色
+    font-size: 24px; // 设置图标大小
+  }

+ 18 - 58
fashion-app/src/app/tab1/tab1.page.ts

@@ -1,74 +1,34 @@
 import { Component } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonButtons } from '@ionic/angular/standalone';
-import { ExploreContainerComponent } from '../explore-container/explore-container.component';
-import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCol, IonFooter, IonGrid, IonIcon, IonRow, IonSearchbar, IonSelectOption } from '@ionic/angular';
+import { IonicModule } from '@ionic/angular'; // 导入 IonicModule
+import { aperture, glasses, person, logoOctocat, menu, search } from 'ionicons/icons';
+import { EditTagComponent } from '../edit-tag/edit-tag.component';
+import { Router } from '@angular/router';
+import { EditRatingStarComponent } from '../edit-rating-star/edit-rating-star.component';
+import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+import { addIcons } from 'ionicons';
+import { CommonModule } from '@angular/common';
+
+addIcons({ menu, search });
 
 @Component({
   selector: 'app-tab1',
   templateUrl: 'tab1.page.html',
   styleUrls: ['tab1.page.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
-    IonButtons,IonSearchbar,IonButton,IonIcon,IonCard,IonCardHeader,IonCardTitle,IonCardContent,
-    IonGrid,IonRow,IonCol,IonCardSubtitle,IonFooter,
-  ],
+  imports: [IonicModule, EditTagComponent, EditRatingStarComponent, FormsModule,CommonModule]
 })
 export class Tab1Page {
-  userName: string = '用户姓名'; // 用户姓名
-  userBodyType: string = '体型'; // 用户体型
-  userSkinTone: string = '肤色'; // 用户肤色
-
-  recommendedItems = [
-    {
-      name: '优雅的秋季外套',
-      price: 89.99,
-      image: 'https://example.com/image1.jpg', // 替换为实际图片链接
-    },
-    {
-      name: '经典白衬衫',
-      price: 49.99,
-      image: 'https://example.com/image2.jpg', // 替换为实际图片链接
-    },
-  ];
-
-  inspirations = [
-    {
-      description: '秋季搭配灵感:温暖的色调 + 层次感',
-      image: 'https://example.com/inspiration1.jpg', // 替换为实际图片链接
-    },
-    {
-      description: '夏日清新:白色连衣裙的搭配技巧',
-      image: 'https://example.com/inspiration2.jpg', // 替换为实际图片链接
-    },
-  ];
-
-  buyItem(item: any) {
-    console.log(`购买: ${item.name}`);
-    // 这里可以添加购买逻辑
-  }
+  selectedSegment: string = '发现'; // 默认选中“发现”
 
-  addToFavorites(item: any) {
-    console.log(`已收藏: ${item.name}`);
-    // 这里可以添加收藏逻辑
-  }
+  constructor(private router: Router) {}
 
-  viewDetails(item: any) {
-    console.log(`查看详情: ${item.name}`);
-    // 这里可以添加查看详情逻辑
+  segmentChanged(event: any) {
+    this.selectedSegment = event.detail.value; // 更新选中的值
   }
+goSearchPage(){
+  this.router.navigate(['/tabs/test']);
+}
 
-  likeInspiration(inspiration: any) {
-    console.log(`点赞灵感: ${inspiration.description}`);
-    // 这里可以添加点赞逻辑
-  }
 
-  commentOnInspiration(inspiration: any) {
-    console.log(`评论灵感: ${inspiration.description}`);
-    // 这里可以添加评论逻辑
   }
 
-  shareInspiration(inspiration: any) {
-    console.log(`分享灵感: ${inspiration.description}`);
-    // 这里可以添加分享逻辑
-  }
-}

+ 25 - 13
fashion-app/src/app/tab2/tab2.page.html

@@ -1,17 +1,29 @@
 <ion-header [translucent]="true">
-  <ion-toolbar>
-    <ion-title>
-      Tab 2
-    </ion-title>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
     <ion-toolbar>
-      <ion-title size="large">Tab 2</ion-title>
+      <ion-title>
+        示例:图片生成{{imagineWork?.progress || 0}}
+      </ion-title> 
     </ion-toolbar>
   </ion-header>
-
-  <app-explore-container name="Tab 2 page"></app-explore-container>
-</ion-content>
+  
+  <ion-content [fullscreen]="true">
+    <!-- 生成提示词 -->
+    <ion-textarea [value]="userPrompt" (ionInput)="promptInput($event)" placeholder="DALLE3图片提示词" autoGrow="true"></ion-textarea>
+    <ion-button (click)="createImage()" expand="block">生成图片</ion-button>
+    <!-- 生成结果 -->
+    @if(images.length) {
+      @for(imageUrl of images;track imageUrl){
+        <img [src]="imageUrl" alt="" srcset="">
+      }
+    }
+    <!-- 生成状态 -->
+    @if(!images.length){
+      @if(imagineWork){
+        <h1>生成中</h1>
+      }
+      @if(!imagineWork){
+        <h1>未开始</h1>
+      }
+    }
+  
+  </ion-content>

+ 36 - 6
fashion-app/src/app/tab2/tab2.page.ts

@@ -1,16 +1,46 @@
-import { Component } from '@angular/core';
+import { ChangeDetectorRef, Component } from '@angular/core';
 import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
-import { ExploreContainerComponent } from '../explore-container/explore-container.component';
+import { IonTextarea, IonButton } from "@ionic/angular/standalone";
+import { DalleOptions, ImagineWork } from 'fmode-ng';
 
 @Component({
-  selector: 'app-tab2',
+  selector: 'app-tab2', 
   templateUrl: 'tab2.page.html',
   styleUrls: ['tab2.page.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent]
+  imports: [
+    IonHeader, IonToolbar, IonTitle, IonContent, 
+    IonButton,
+    IonTextarea
+  ],
 })
 export class Tab2Page {
+  userPrompt:string = "飞码产品LOGO,独角兽头部形象,极简风格,棱角分明,线条勾勒,蓝色紫色搭配。"
+  promptInput(ev:any){
+    this.userPrompt = ev.detail.value;
+  }
+  imagineWork:ImagineWork|undefined
+  images:Array<string> = []
+  constructor(
+    private cdRef:ChangeDetectorRef
+  ){
+    // 示例任务,自己生成图片后请存储新的ID
+    this.imagineWork = new ImagineWork("lpJGiFwWeA");
+    this.imagineWork.fetchTask().then(work=>{
+      this.images = this.imagineWork?.images || [];
+    })
+  }
 
-  constructor() {}
+  async createImage(){
+    this.imagineWork = new ImagineWork();
+    let options:DalleOptions = {prompt:this.userPrompt}
+    this.imagineWork.draw(options).subscribe(work=>{
+      console.log("imagineWork",work?.toJSON())
+      console.log("images",work?.get("images"))
+      if(work?.get("images")?.length){
+        this.images = work?.get("images");
+      }
+    })
+  }
 
-}
+}

+ 15 - 0
fashion-app/src/app/tab3/tab3.module.ts

@@ -0,0 +1,15 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common'; // 导入 CommonModule
+import { FormsModule } from '@angular/forms';
+import { IonicModule } from '@ionic/angular';
+import { Tab3Page } from './tab3.page';
+
+@NgModule({
+  imports: [
+    CommonModule, // 添加到 imports
+    FormsModule,
+    IonicModule
+  ],
+  declarations: [Tab3Page]
+})
+export class Tab3PageModule {}

+ 123 - 8
fashion-app/src/app/tab3/tab3.page.html

@@ -1,17 +1,132 @@
+<div class="imgbox">
 <ion-header [translucent]="true">
   <ion-toolbar>
     <ion-title>
-      Tab 3
+      AI
     </ion-title>
   </ion-toolbar>
 </ion-header>
+</div>
 
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">Tab 3</ion-title>
-    </ion-toolbar>
-  </ion-header>
 
-  <app-explore-container name="Tab 3 page"></app-explore-container>
+<ion-content class="content-container">
+
+  <div class="bigbox">
+  <div class="option-box">
+    <p style="display: flex; align-items: center;">请选择季节:
+      <ion-list>
+        <ion-item>
+          <ion-select interface="popover" placeholder="请选择" [(ngModel)]="selectedSeason">
+            <ion-select-option value="春">春</ion-select-option>
+            <ion-select-option value="夏">夏</ion-select-option>
+            <ion-select-option value="秋">秋</ion-select-option>
+            <ion-select-option value="冬">冬</ion-select-option>
+          </ion-select>
+        </ion-item>
+      </ion-list>
+    </p>
+  </div>
+
+  <div class="option-box">
+    <p style="display: flex; align-items: center;">请选择性别:
+      <ion-list>
+        <ion-item>
+          <ion-select interface="popover" placeholder="请选择" [(ngModel)]="selectedGender">
+            <ion-select-option value="男">男</ion-select-option>
+            <ion-select-option value="女">女</ion-select-option>
+          </ion-select>
+        </ion-item>
+      </ion-list>
+    </p>
+  </div>
+
+  <div class="option-box">
+    <p style="display: flex; align-items: center;">请选择你的体型:
+      <ion-list>
+        <ion-item>
+          <ion-select interface="popover" placeholder="请选择" [(ngModel)]="selectedBodyType">
+            <ion-select-option value="偏胖">偏胖</ion-select-option>
+            <ion-select-option value="标准">标准</ion-select-option>
+            <ion-select-option value="偏瘦">偏瘦</ion-select-option>
+          </ion-select>
+        </ion-item>
+      </ion-list>
+    </p>
+  </div>
+
+  <div class="option-box">
+    <p style="display: flex; align-items: center;">请选择你的皮肤色调:
+      <ion-list>
+        <ion-item>
+          <ion-select interface="popover" placeholder="请选择" [(ngModel)]="selectedSkinTone">
+            <ion-select-option value="黑">黑</ion-select-option>
+            <ion-select-option value="黄">黄</ion-select-option>
+            <ion-select-option value="白">白</ion-select-option>
+          </ion-select>
+        </ion-item>
+      </ion-list>
+    </p>
+  </div>
+
+  <!-- 第一个颜色选择器 -->
+  <div class="option-box">
+    <div style="display: flex; align-items: center;">
+      <p style="margin: 0;">请选择你最喜欢的颜色:</p>
+      <div 
+           (click)="toggleColorPicker('favorite')" 
+           [style.backgroundColor]="selectedColorFavorite || 'white'" 
+           style="width: 30px; height: 30px; border-radius: 50%; border: 2px solid black; cursor: pointer; margin-left: 5px;">
+      </div>
+    </div>
+    <div *ngIf="showColorPickerFavorite" style="margin-top: 20px; display: flex; flex-wrap: wrap;">
+      <div *ngFor="let color of colors" 
+           (click)="selectColor(color, 'favorite')"
+           [style.backgroundColor]="color" 
+           style="width: 30px; height: 30px; border-radius: 50%; margin: 5px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid transparent;"
+           [style.borderColor]="selectedColorFavorite === color ? 'black' : 'transparent'">
+      </div>
+    </div>
+  </div>
+
+  <!-- 第二个颜色选择器 -->
+  <div class="option-box">
+    <div style="display: flex; align-items: center;">
+      <p style="margin: 0;">请选择您次要喜欢的颜色:</p>
+      <div 
+           (click)="toggleColorPicker('secondary')" 
+           [style.backgroundColor]="selectedColorSecondary || 'white'" 
+           style="width: 30px; height: 30px; border-radius: 50%; border: 2px solid black; cursor: pointer; margin-left: 5px;">
+      </div>
+    </div>
+    <div *ngIf="showColorPickerSecondary" style="margin-top: 20px; display: flex; flex-wrap: wrap;">
+      <div *ngFor="let color of colors" 
+           (click)="selectColor(color, 'secondary')"
+           [style.backgroundColor]="color" 
+           style="width: 30px; height: 30px; border-radius: 50%; margin: 5px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid transparent;"
+           [style.borderColor]="selectedColorSecondary === color ? 'black' : 'transparent'">
+      </div>
+    </div>
+  </div>
+
+  <div class="option-box">
+    <ion-item>
+      <ion-textarea  label="风格描述:" placeholder="可以从个人喜欢的衣服,兴趣爱好以及职业等等进行描述" [(ngModel)]="styleDescription" [autoGrow]="true"></ion-textarea>
+    </ion-item>
+  </div>
+
+  <ion-button (click)="sendMessage()" expand="block" class="buttonbox">穿搭建议</ion-button></div>
+
+  <!-- AI生成内容区域 -->
+<div class="bigbox1">
+<!-- 展示:返回消息内容 -->
+  <!-- 消息传输过程中,实时预览 -->
+  @if(!isComplete){
+    <div>{{responseMsg}}</div>
+  }
+  <!-- 消息传输完成后,实时预览Markdown格式 -->
+  @if(isComplete){
+    <fm-markdown-preview class="content-style" [content]="responseMsg"></fm-markdown-preview>
+  }
+</div>
+
 </ion-content>

+ 104 - 0
fashion-app/src/app/tab3/tab3.page.scss

@@ -0,0 +1,104 @@
+ion-content {
+  display: flex;
+  flex-direction: column; // 垂直布局
+  padding: 20px; // 增加内边距
+  background-color: grey; // 背景色为淡蓝色
+}
+
+
+
+.option-box {
+  background-color: #ffffff; // 背景色
+  border: 1px solid #e0e0e0; // 边框
+  border-radius: 12px; // 圆角
+  padding: 20px; // 盒子内边距
+  margin-bottom: 20px; // 盒子之间的间距
+  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); // 加强阴影效果
+  transition: box-shadow 0.3s, transform 0.3s; // 平滑过渡效果
+  font-size: 20px;
+  font-weight: bold;
+}
+
+.option-box:hover {
+  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); // 鼠标悬停时的阴影效果
+  transform: translateY(-2px); // 鼠标悬停时轻微上升
+}
+
+h1, h2, h3, p {
+  font-family: 'Arial', sans-serif; // 统一字体
+  color: #333; // 字体颜色
+  margin: 0; // 清除默认边距
+}
+
+ion-button {
+  margin-top: 20px; // 按钮与前面内容的间距
+
+  color: white; // 按钮文字颜色
+  border-radius: 24px; // 圆角按钮
+  padding: 12px 24px; // 按钮内边距
+  font-size: 16px; // 按钮字体大小
+
+}
+
+
+.bigbox1 {
+  width: 100%;
+  background-color: #ffffff; // 背景色
+  border: 1px solid #e0e0e0; // 边框
+  border-radius: 12px; // 圆角
+  padding: 20px; // 盒子内边距
+  margin-top: 20px; // 与上方内容的间距
+}
+
+.response-container {
+  background-color: #f9f9f9; // 背景色
+  border: 1px solid #e0e0e0; // 边框
+  border-radius: 12px; // 圆角
+  padding: 20px; // 内边距
+  margin-top: 20px; // 与上方内容的间距
+  max-height: 300px; // 最大高度
+  overflow-y: auto; // 超出部分滚动
+  position: relative; // 位置相对
+  z-index: 1; // 确保在其他内容上方
+}
+
+/* 颜色选择器样式 */
+.color-picker {
+  display: flex; 
+  align-items: center; 
+  margin-top: 10px; // 增加颜色选择器与文本的间距
+}
+
+.color-circle {
+  width: 30px; 
+  height: 30px; 
+  border-radius: 50%; 
+  border: 2px solid black; 
+  cursor: pointer; 
+  margin-left: 8px; 
+}
+
+.color-options {
+  margin-top: 10px; 
+  display: flex; 
+  flex-wrap: wrap; 
+}
+
+.color-option {
+  width: 30px; 
+  height: 30px; 
+  border-radius: 50%; 
+  margin: 5px; 
+  cursor: pointer; 
+  border: 2px solid transparent; 
+  transition: border-color 0.3s;
+}
+
+.color-option:hover {
+  border-color: black; // 鼠标悬停时边框变色
+}
+
+.font1{
+  font-size: 20px;
+  font-weight: bold;
+}

+ 119 - 3
fashion-app/src/app/tab3/tab3.page.ts

@@ -1,14 +1,130 @@
 import { Component } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonItem, IonList, IonSelect, IonSelectOption, IonLabel, IonButton, IonTextarea, AlertController } from '@ionic/angular/standalone';
 import { ExploreContainerComponent } from '../explore-container/explore-container.component';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+/** 引用:从fmode-ng库引用FmodeChatCompletion类 */
+import { FmodeChatCompletion, MarkdownPreviewModule } from 'fmode-ng';
+import { Router } from '@angular/router'; // 导入 Router
 
 @Component({
   selector: 'app-tab3',
   templateUrl: 'tab3.page.html',
   styleUrls: ['tab3.page.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],
+  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,IonItem,IonList,IonSelect,IonSelectOption,IonButton,CommonModule,IonTextarea,FormsModule,
+    MarkdownPreviewModule,],
 })
 export class Tab3Page {
-  constructor() {}
+  constructor(private alertController: AlertController, private router: Router) {}
+  colors: string[] = [
+    '#FF5733', '#33FF57', '#3357FF', '#F1C40F', '#8E44AD', 
+    '#E74C3C', '#3498DB', '#1ABC9C', '#2ECC71', '#9B59B6',
+    '#34495E', '#E67E22', '#F39C12', '#D35400', '#C0392B',
+    '#7F8C8D', '#BDC3C7', '#95A5A6', '#FFB6C1', '#FF4500',
+    '#FFD700', '#ADFF2F', '#00CED1', '#FF69B4', '#8A2BE2',
+    '#A52A2A', '#DEB887', '#5F9EA0', '#4682B4', '#D3D3D3',
+    '#FF1493', '#7FFF00', '#FF6347', '#B22222', '#FF8C00',
+    '#20B2AA', '#C71585', '#FFDAB9', '#F0E68C', '#FFFACD',
+    '#FFE4E1', '#FFF0F5', '#FFF5EE', '#F5F5F5', '#DCDCDC',
+    '#708090', '#778899',
+  ];
+
+  selectedColorFavorite: string = ''; // 第一个颜色选择器的选中颜色
+  selectedColorSecondary: string = ''; // 第二个颜色选择器的选中颜色
+  showColorPickerFavorite: boolean = false; // 控制第一个颜色选择器的显示
+  showColorPickerSecondary: boolean = false; // 控制第二个颜色选择器的显示
+
+  selectedSeason: string = ''; // 存储用户选择的季节
+  selectedGender: string = ''; // 存储用户选择的性别
+  selectedBodyType: string = ''; // 存储用户选择的体型
+  selectedSkinTone: string = ''; // 存储用户选择的皮肤色调
+  styleDescription: string = ''; // 存储用户的风格描述
+  isComplete:boolean = false; // 定义完成状态属性,用来标记是否补全完成
+
+  toggleColorPicker(type: string) {
+    if (type === 'favorite') {
+      this.showColorPickerFavorite = !this.showColorPickerFavorite; // 切换第一个颜色选择器的显示状态
+      this.showColorPickerSecondary = false; // 关闭第二个颜色选择器
+    } else if (type === 'secondary') {
+      this.showColorPickerSecondary = !this.showColorPickerSecondary; // 切换第二个颜色选择器的显示状态
+      this.showColorPickerFavorite = false; // 关闭第一个颜色选择器
+    }
+  }
+
+  selectColor(color: string, type: string) {
+    if (type === 'favorite') {
+      this.selectedColorFavorite = color; // 更新第一个颜色选择器的选中颜色
+    } else if (type === 'secondary') {
+      this.selectedColorSecondary = color; // 更新第二个颜色选择器的选中颜色
+    }
+    this.showColorPickerFavorite = false; // 选择颜色后关闭第一个颜色选择器
+    this.showColorPickerSecondary = false; // 选择颜色后关闭第二个颜色选择器
+  }
+
+  // 用户输入提示词
+  //userPrompt:string = '当前的季节是'+this.selectedSeason+',该用户性别是'+this.selectedGender+',体型是'+this.selectedBodyType+',皮肤色调是'+this.selectedSkinTone+',最喜欢的颜色是'+this.selectedColorFavorite+',次喜欢的颜色是'+this.selectedColorSecondary+',该用户的风格描述是'+this.styleDescription+',请你作为一名专业的服装穿搭大师,为该用户给出适合的服装搭配建议。'
+
+  // 属性:组件内用于展示消息内容的变量
+  responseMsg:any = ""
+  // 方法:实例化completion对象,传入消息数组,并订阅生成的可观察对象。
+  // 用户输入提示词
+  userPrompt:string = ''
+
+  //评价弹出框
+  async presentAlert() {
+    const alert = await this.alertController.create({
+        header: '希望你对本次AI进行评价',
+        buttons: [
+            {
+                text: '不了',
+                role: 'cancel',
+                handler: () => {
+                    console.log('用户选择留在本页面');
+                }
+            },
+            {
+                text: '去评价',
+                handler: () => {
+                    // 假设评价页面的路由是'/评价'
+                    // 您可以根据实际的路由路径进行调整
+                   
+                    this.router.navigate(['/tabs/evaluate']);
+                   
+                }
+            }
+        ]
+    });
+
+    await alert.present();
+}
+  sendMessage(){
+    // 每次点击按钮时清空之前的内容
+    this.responseMsg = ""; // 清空之前的消息
+    this.isComplete = false; // 重置完成状态
+
+    this.userPrompt = '当前的季节是' + this.selectedSeason + ',该用户性别是' + this.selectedGender + ',体型是' + this.selectedBodyType + ',皮肤色调是' + this.selectedSkinTone + ',最喜欢的颜色是' + this.selectedColorFavorite + ',次喜欢的颜色是' + this.selectedColorSecondary + ',该用户的风格描述是' + this.styleDescription + ',请你作为一名专业的服装穿搭大师,为该用户给出适合的服装搭配建议。';
+    
+    console.log("开始生成");
+    let completion = new FmodeChatCompletion([
+        { role: "system", content: "" },
+        { role: "user", content: this.userPrompt }
+    ]);
+
+    completion.sendCompletion().subscribe((message: any) => {
+        // 打印消息体
+        console.log(message.content);
+        // 赋值消息内容给组件内属性
+        this.responseMsg = message.content;
+        if (message?.complete) { // 判断message为完成状态,则设置isComplete为完成
+            this.isComplete = true;
+            this.presentAlert(); // 调用弹出框
+        }
+    });
+
+  }
+  goTestPage(){
+    this.router.navigate(['/tabs/test']);}
 }
+
+  

+ 90 - 12
fashion-app/src/app/tab4/tab4.page.html

@@ -1,17 +1,95 @@
-<ion-header [translucent]="true">
+<ion-header>
   <ion-toolbar>
-    <ion-title>
-      Tab 4
-    </ion-title>
+    <div class="profile-header">
+      <div class="avatar-container">
+        
+      </div>
+      <div class="user-info">
+        <h2 class="username">Squirrel</h2>
+        <div class="stats">
+          <span class="marginRight">0<span class="grey">粉丝</span></span>
+          <span class="marginRight">0<span class="grey">关注</span></span>
+          <span class="marginRight">0<span class="grey">获赞</span></span>
+        </div>
+      </div>
+    </div>
   </ion-toolbar>
 </ion-header>
 
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">Tab 4</ion-title>
-    </ion-toolbar>
-  </ion-header>
+<ion-content>
+  <div class="icon-container">
+    <div class="icon-grid">
+      <div class="icon-item">
+        <ion-icon aria-hidden="true" name="basket-Outline" class="bottem-outline" style="color: black; font-size: 40px;"></ion-icon>
+        <p>我的动态</p>
+      </div>
+      <div class="icon-item">
+        <ion-icon aria-hidden="true" name="star-outline" style="color: black; font-size: 40px;"></ion-icon>
+        <p>我的收藏</p>
+      </div>
+      <div class="icon-item">
+        <ion-icon aria-hidden="true" name="image-outline" style="color: black; font-size: 40px;"></ion-icon>
+        <p>我的相册</p>
+      </div>
+      <div class="icon-item">
+        <ion-icon aria-hidden="true" name="folder-outline" style="color: black; font-size: 40px;"></ion-icon>
+        <p>身材档案</p>
+      </div>
+      <div class="icon-item">
+        <ion-icon aria-hidden="true" name="heart-outline" style="color: black; font-size: 40px;"></ion-icon>
+        <p>我的点赞</p>
+      </div>
+    </div>
+  </div>
 
-  <app-explore-container name="Tab 4 page"></app-explore-container>
-</ion-content>
+
+<!-- 新增的圆角矩阵 -->
+<div class="icon-container">
+  <div class="row">
+    <div class="info-item">
+      <ion-icon aria-hidden="true" name="chatbubble-ellipses-outline" class="info-icon" style="color: black; font-size: 30px;"></ion-icon>
+      <span class="fontSize">我的消息</span></div>
+      <ion-icon name="chevron-forward-outline" class="arrow-icon"></ion-icon>
+    
+  </div>
+  <div class="row">
+    <div class="info-item">
+      <ion-icon aria-hidden="true" name="file-tray-full-outline" class="info-icon" style="color: black; font-size: 30px;"></ion-icon>
+      <span class="fontSize">我的券包</span></div>
+      <ion-icon name="chevron-forward-outline" class="arrow-icon"></ion-icon>
+    
+  </div>
+</div>
+
+
+<div class="icon-container">
+  <div class="row">
+    <div class="info-item">
+      <ion-icon aria-hidden="true" name="reader-outline" class="info-icon" style="color: black; font-size: 30px;"></ion-icon>
+      <span class="fontSize">意见反馈</span></div>
+      <ion-icon name="chevron-forward-outline" class="arrow-icon"></ion-icon>
+  </div>
+  <div class="row">
+    <div class="info-item">
+      <ion-icon aria-hidden="true" name="help-circle-outline" class="info-icon" style="color: black; font-size: 30px;"></ion-icon>
+      <span class="fontSize">常见问题</span></div>
+      <ion-icon name="chevron-forward-outline" class="arrow-icon"></ion-icon>
+  </div>
+  <div class="row">
+    <div class="info-item">
+      <ion-icon aria-hidden="true" name="people-outline" class="info-icon" style="color: black; font-size: 30px;"></ion-icon>
+      <span class="fontSize">邀请有礼</span></div>
+      <ion-icon name="chevron-forward-outline" class="arrow-icon"></ion-icon>
+    
+  </div>
+</div>
+
+<div class="icon-container1">
+<div class="row">
+  <div class="info-item">
+    <ion-icon aria-hidden="true" name="settings-outline" class="info-icon" style="color: black; font-size: 30px;"></ion-icon>
+    <span class="fontSize">系统设置</span></div>
+    <ion-icon name="chevron-forward-outline" class="arrow-icon"></ion-icon>
+  
+</div>
+</div>

+ 121 - 0
fashion-app/src/app/tab4/tab4.page.scss

@@ -0,0 +1,121 @@
+.profile-header {
+    height: 220px;
+    display: flex;
+    align-items: center;
+    background: linear-gradient(135deg, #f3f3a8, rgb(199, 151, 199));
+    border-bottom-left-radius: 20px;
+    border-bottom-right-radius: 20px;
+    padding: 16px;
+  }
+  
+  .avatar-container {
+    margin-right: 16px;
+    width: 100px; /* 头像大小 */
+    height: 100px; /* 头像大小 */
+    border-radius: 50%; /* 圆形头像 */
+    background-image: url('../images/touxiang.jpg');
+    background-size: cover; /* 图片大小 */
+  }
+  
+
+  
+  
+  .username {
+    margin: 0;
+    font-size: 2.3em; /* 用户名字体大小 */
+    color: black;
+    font-weight: bold;
+  }
+  
+  .stats {
+    display: flex;
+    justify-content: space-between;
+    font-size: 1.1em; /* 统计信息字体大小 */
+    margin-top: 4px;
+    color:black
+  }
+  .marginRight{
+    margin-right: 25px;
+  }
+
+  .grey{
+color: grey;
+margin-left: 5px;
+  }
+
+  .icon-container {
+    background-color: #ffffff; // 背景色
+  border: 1px solid #e0e0e0; // 边框
+  border-radius: 25px; // 圆角
+    padding: 16px; /* 内边距 */
+    margin: 16px; /* 外边距 */
+    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); // 加强阴影效果
+  transition: box-shadow 0.3s, transform 0.3s; // 平滑过渡效果
+  }
+
+  .icon-container1{
+    background-color: #ffffff; // 背景色
+  border: 1px solid #e0e0e0; // 边框
+  border-radius: 25px; // 圆角
+    padding: 10px 16px; /* 内边距 */
+    margin: 16px; /* 外边距 */
+    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); // 加强阴影效果
+  transition: box-shadow 0.3s, transform 0.3s; // 平滑过渡效果
+  }
+  
+  .icon-grid {
+    display: grid;
+    grid-template-columns: repeat(5, 1fr); /* 5列布局 */
+    gap: 16px; /* 每个图像之间的间距 */
+  }
+  
+  .icon-item {
+    text-align: center; /* 文字居中 */
+   
+    border-radius: 10px; /* 边框圆角 */
+    padding: 8px; /* 内边距 */
+    background-color: white; /* 图标项背景色为白色 */
+  }
+  
+  .icon-item p {
+    margin: 4px 0 0 0; /* 减小图标与文字之间的距离 */
+  }
+  
+  .bottem {
+    margin-bottom: 2px;
+  }
+
+  .row {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 10px 0; // 行内边距
+    border-bottom: 1px solid #e0e0e0; // 行分隔线
+  }
+  
+  .row:last-child {
+    border-bottom: none; // 最后一行不显示分隔线
+  }
+  
+  .info-item {
+    display: flex;
+    align-items: center;
+    margin-left: 12px;
+  }
+  
+  .info-icon {
+    color: black; // 图标颜色
+    font-size: 24px; // 图标大小
+    margin-right: 12px; // 图标与文本之间的间距
+  }
+  
+  .arrow-icon {
+    color: grey; // 箭头颜色
+    font-size: 25px; // 箭头大小
+    
+  }
+
+  .fontSize{
+    font-size: 19px;
+    font-family: '微软雅黑';
+  }

+ 5 - 3
fashion-app/src/app/tab4/tab4.page.ts

@@ -1,13 +1,15 @@
 import { Component } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonIcon, IonButton } from '@ionic/angular/standalone';
 import { ExploreContainerComponent } from '../explore-container/explore-container.component';
-
+import { addIcons } from 'ionicons';
+import { basketOutline,chatbubbleEllipsesOutline,chevronForwardOutline,fileTrayFullOutline,folderOutline,heartOutline,helpCircleOutline,imageOutline, peopleOutline, readerOutline, settingsOutline, starOutline } from 'ionicons/icons';
+addIcons({basketOutline,starOutline,imageOutline,heartOutline,folderOutline,chatbubbleEllipsesOutline,chevronForwardOutline,fileTrayFullOutline,readerOutline,helpCircleOutline,peopleOutline,settingsOutline});
 @Component({
   selector: 'app-tab4',
   templateUrl: 'tab4.page.html',
   styleUrls: ['tab4.page.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],
+  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,IonIcon,IonButton],
 })
 export class Tab4Page {
   constructor() {}

+ 4 - 1
fashion-app/src/app/tabs/tabs.page.scss

@@ -1 +1,4 @@
-
+ion-tab-bar {
+    --background: #ffffff; /* Tab 背景颜色 */
+    --color-selected: green; /* 选中 Tab 的颜色 */
+  }

+ 15 - 0
fashion-app/src/app/tabs/tabs.routes.ts

@@ -27,6 +27,21 @@ export const routes: Routes = [
           import('../tab4/tab4.page').then((m) => m.Tab4Page),
       },
       {
+        path: 'test',
+        loadComponent: () =>
+          import('../page-test/page-test.component').then((m) => m.PageTestComponent),
+      },
+      {
+        path: 'evaluate',
+        loadComponent: () =>
+          import('../page-evaluate/page-evaluate.component').then((m) => m.PageEvaluateComponent),
+      },
+      {
+        path: '',
+        redirectTo: '/tabs/tab1',
+        pathMatch: 'full',
+      },
+            {
         path: '',
         redirectTo: '/tabs/tab1',
         pathMatch: 'full',

+ 15 - 0
fashion-app/src/main.ts

@@ -4,11 +4,26 @@ import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalo
 
 import { routes } from './app/app.routes';
 import { AppComponent } from './app/app.component';
+// 引用HttpClient方法
+import { provideHttpClient } from '@angular/common/http';
+// 引用移动端授权检测供应器
+import { Diagnostic } from '@awesome-cordova-plugins/diagnostic/ngx';
+// 设置Parse服务属性
+import Parse from "parse";
+Parse.initialize("ncloudmaster");
+Parse.serverURL = "https://server.fmode.cn/parse";
+localStorage.setItem("NOVA_APIG_SERVER", 'aHR0cHMlM0ElMkYlMkZzZXJ2ZXIuZm1vZGUuY24lMkZhcGklMkZhcGlnJTJG')
 
+// 注意:替换Token 根据Token设置Parse服务帐套权限
+Parse.User.become("r:5abb1b0d289b97a2dedb8c6c3e96b986")
 bootstrapApplication(AppComponent, {
   providers: [
     { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
     provideIonicAngular(),
     provideRouter(routes, withPreloading(PreloadAllModules)),
+    // 添加HttpClient供应器
+    provideHttpClient(),
+    // 添加Diagnostic
+    Diagnostic,
   ],
 });

+ 1 - 0
fashion-app/tsconfig.json

@@ -2,6 +2,7 @@
 {
   "compileOnSave": false,
   "compilerOptions": {
+    "allowSyntheticDefaultImports":true,
     "baseUrl": "./",
     "outDir": "./dist/out-tsc",
     "forceConsistentCasingInFileNames": true,

+ 3 - 0
fashion-prod/.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "plantuml.server":"http://www.plantuml.com/plantuml"
+}

+ 12 - 0
fashion-prod/README.md

@@ -96,3 +96,15 @@
 虚拟试衣功能尚未全面推广,用户体验有待提升。
 ## FAQ:时尚智选
 
+
+```plantuml
+@startuml
+
+(First usecase)
+(Another usecase) as (UC2)
+usecase UC3
+usecase (Last\nusecase) as UC4
+
+@enduml
+```
+

Some files were not shown because too many files changed in this diff