itcast 4 сар өмнө
parent
commit
df84785fa6

+ 17 - 9
tailor-app/myapp/src/app/community/community.page.html

@@ -1,13 +1,21 @@
-<ion-header [translucent]="true">
+<!-- <ion-header>
   <ion-toolbar>
-    <ion-title>community</ion-title>
+    <ion-title>社区帖子</ion-title>
   </ion-toolbar>
 </ion-header>
 
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">community</ion-title>
-    </ion-toolbar>
-  </ion-header>
-</ion-content>
+<ion-content>
+  <ion-list>
+    <ion-item *ngFor="let post of posts">
+      <ion-avatar slot="start">
+        <img [src]="post.avatarUrl" alt="Author Avatar">
+      </ion-avatar>
+      <ion-label>
+        <h2>{{ post.title }}</h2>
+        <p>{{ post.author }}</p>
+        <p>{{ post.contentSnippet }}</p>
+        <ion-text color="medium">{{ post.timestamp | date: 'short' }}</ion-text>
+      </ion-label>
+    </ion-item>
+  </ion-list>
+</ion-content> -->

+ 17 - 2
tailor-app/myapp/src/app/community/community.page.ts

@@ -1,14 +1,14 @@
 import { Component, OnInit } from '@angular/core';
 import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
-import { IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';
+import { IonContent, IonHeader, IonTitle, IonToolbar, IonButton, IonLabel, IonItem, IonList, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemOption, IonItemSliding, IonInput, IonCheckbox, IonRadio, IonToggle, IonRadioGroup, IonSearchbar,IonSegment,IonSegmentButton,IonDatetime,IonFooter,IonCardContent,IonCardTitle,IonCardHeader,IonCard,IonCol,IonRow,IonGrid,IonChip,IonText } from '@ionic/angular/standalone';
 
 @Component({
   selector: 'app-community',
   templateUrl: './community.page.html',
   styleUrls: ['./community.page.scss'],
   standalone: true,
-  imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule]
+  imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule, IonButton,  IonLabel, IonLabel, IonList, IonItem, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemSliding, IonItemOption, IonItemOptions,IonInput,IonCheckbox,IonRadio,IonToggle,IonRadioGroup,IonSearchbar,IonSegment,IonSegmentButton,IonDatetime,IonFooter,IonCardContent,IonCardTitle,IonCardHeader,IonCard,IonCol,IonRow,IonGrid,IonChip,IonText ]
 })
 export class CommunityPage implements OnInit {
 
@@ -16,5 +16,20 @@ export class CommunityPage implements OnInit {
 
   ngOnInit() {
   }
+  // interface Post {
+  //   id: number;
+  //   title: string;
+  //   author: string;
+  //   contentSnippet: string;
+  //   avatarUrl: string;
+  //   timestamp: Date;
+  // }
+   
+  // // 然后,使用这个接口来类型化posts数组
+  // posts: Post[] = [
+  //   { id: 1, title: '帖子标题1', author: '作者1', contentSnippet: '内容摘要1', avatarUrl: 'url_to_avatar1', timestamp: new Date() },
+  //   { id: 2, title: '帖子标题2', author: '作者2', contentSnippet: '内容摘要2', avatarUrl: 'url_to_avatar2', timestamp: new Date() },
+  //   { id: 3, title: '帖子标题3', author: '作者3', contentSnippet: '内容摘要3', avatarUrl: 'url_to_avatar3', timestamp: new Date() },
+  // ];
 
 }

+ 4 - 3
tailor-app/myapp/src/app/customization/customization.page.ts

@@ -142,7 +142,7 @@ export class CustomizationPage implements OnInit {
 
   }
 
-  userPrompt: string = "飞码产品LOGO,独角兽头部形象,极简风格,棱角分明,线条勾勒,蓝色紫色搭配。"
+  userPrompt: string = ""
   promptInput(ev: any) {
     this.userPrompt = ev.detail.value;
   }
@@ -151,14 +151,15 @@ export class CustomizationPage implements OnInit {
   constructor(
   ) {
     // 示例任务,自己生成图片后请存储新的ID
-    this.imagineWork = new ImagineWork("lpJGiFwWeA");
+    console.log('ImagineWork instance:', this.imagineWork);
+    this.imagineWork = new ImagineWork("EXOVSbrmMK");
     this.imagineWork.fetchTask().then(work => {
       this.images = this.imagineWork?.images || [];
     })
   }
   picdetail: string = ""
   async createImage() {
-    let promotTemplate = `您是一名专业的没事画家,请您根据服装描述内容,将其描述的服装细节描述出来,服装描述如下:${this.gptre}`
+    let promotTemplate = `您是一名专业的美术画家,请您根据服装描述内容,将其描述的服装细节描述出来,服装描述如下:${this.gptre}`
     let completion = new FmodeChatCompletion([
       { role: "system", content: "" },
       { role: "user", content: promotTemplate }

+ 100 - 77
tailor-app/myapp/src/app/yiyun/yiyun.page.html

@@ -1,17 +1,17 @@
-  <!-- 页面顶部导航栏 -->
-  <ion-header class="ion-no-border" style="background-color: rgb(231, 244, 247);;" >
-    <ion-toolbar  >
-      <ion-searchbar  animated="true" placeholder="Animated"></ion-searchbar>
-      <ion-buttons slot="end">
-        <!-- <ion-button size="small">登录/注册</ion-button> -->
-        <!-- <ion-button size="small">商家后台入口</ion-button> -->
-      </ion-buttons>
-    </ion-toolbar>
-  </ion-header>
+<!-- 页面顶部导航栏 -->
+<ion-header class="ion-no-border" style="background-color: rgb(231, 244, 247);;">
+  <ion-toolbar  style="background-color: rgb(231, 244, 247);;">
+    <ion-searchbar animated="true" placeholder="Animated"></ion-searchbar>
+    <ion-buttons slot="end">
+      <!-- <ion-button size="small">登录/注册</ion-button> -->
+      <!-- <ion-button size="small">商家后台入口</ion-button> -->
+    </ion-buttons>
+  </ion-toolbar>
+</ion-header>
 
-  <!-- 品牌展示区 -->
-  <ion-content>
-    <!-- <ion-slides>
+<!-- 品牌展示区 -->
+<ion-content>
+  <!-- <ion-slides>
       <ion-slide>
         <img src="最新服装定制案例图片路径" alt="服装定制案例">
       </ion-slide>
@@ -19,50 +19,50 @@
         <img src="时尚活动照片路径" alt="时尚活动">
       </ion-slide>
     </ion-slides> -->
-    <ion-grid>
-      <ion-row >
-        <ion-col *ngFor="let item of items; let i = index" class="custom-padding" >
-          <div class="button-container">
-            <ion-icon size="large" [name]="item.image"></ion-icon>
-            <p class="item-text">{{ item.text }}</p>
-          </div>
-        </ion-col>
-      </ion-row>
-    </ion-grid>
+  <ion-grid>
+    <ion-row>
+      <ion-col *ngFor="let item of items; let i = index" class="custom-padding">
+        <div class="button-container">
+          <ion-icon size="large" [name]="item.image"></ion-icon>
+          <p class="item-text" style="font-weight: bolder;">{{ item.text }}</p>
+        </div>
+      </ion-col>
+    </ion-row>
+  </ion-grid>
 
-    <ion-grid style="justify-content: center;display: flex;">
-      <ion-row style="background-color: white;width: 90%;border-radius: 10px;" >
-        <ion-card style="width: 44%;box-shadow: none;">
-          <ion-card-header>
-            <img src="assets/img/ding.png" alt="">
-            <ion-card-title style="font-size: 17px;font-weight:bolder;">定制服务</ion-card-title>
-          </ion-card-header>
-          <!-- <ion-card-content>
+  <ion-grid style="justify-content: center;display: flex;">
+    <ion-row style="background-color: white;width: 90%;border-radius: 10px;">
+      <ion-card style="width: 44%;box-shadow: none;">
+        <ion-card-header>
+          <img src="assets/img/ding.png" alt="">
+          <ion-card-title style="font-size: 17px;font-weight:bolder;">定制服务</ion-card-title>
+        </ion-card-header>
+        <!-- <ion-card-content>
             <ion-button expand="block">点击参与最新定制活动</ion-button>
           </ion-card-content> -->
-        </ion-card>
-    
-        <!-- 用户定制入口 -->
-        <ion-card style="width: 44%;box-shadow: none;">
-          <ion-card-header>
-            <img src="assets/img/3d.png" alt="">
-            <ion-card-title style="font-size: 17px;font-weight:bolder;">3D试衣服务</ion-card-title>
-          </ion-card-header>
-          
-        </ion-card>
-      </ion-row>
-    </ion-grid>
+      </ion-card>
+
+      <!-- 用户定制入口 -->
+      <ion-card style="width: 44%;box-shadow: none;">
+        <ion-card-header>
+          <img src="assets/img/3d.png" alt="">
+          <ion-card-title style="font-size: 17px;font-weight:bolder;">3D试衣服务</ion-card-title>
+        </ion-card-header>
+
+      </ion-card>
+    </ion-row>
+  </ion-grid>
 
-    <!-- 商家管理入口 -->
-    <ion-card>
-      <ion-card-content>
-        
-        <ion-button expand="block"><ion-icon name="camera"></ion-icon> 一键入库</ion-button>
-        <p>智能库存管理,让生意更简单</p>
-      </ion-card-content>
-    </ion-card>
+  <!-- 商家管理入口 -->
+  <ion-card style="width: 90%;margin: auto;margin-bottom: 10px;margin-top: 10px;">
+    <ion-card-content>
 
-    <!-- 特色服务展示
+      <ion-button expand="block"><ion-icon name="camera"></ion-icon> 一键入库</ion-button>
+      <p>智能库存管理,让生意更简单</p>
+    </ion-card-content>
+  </ion-card>
+
+  <!-- 特色服务展示
     <ion-grid>
       <ion-row>
         <ion-col size="6">
@@ -84,32 +84,55 @@
       </ion-row>
     </ion-grid> -->
 
-    <!-- 用户评价和案例展示 -->
-    <!-- <ion-list>
-      <ion-item>
-        <ion-avatar slot="start">
-          <img src="示例用户照片路径" alt="用户头像">
-        </ion-avatar>
-        <ion-label>
-          <h2>衣服非常合身,面料舒适,非常满意!</h2>
-          <img src="用户定制的服装照片路径" alt="定制案例">
-        </ion-label>
-      </ion-item>
-    </ion-list> -->
+  <!-- 用户评价和案例展示 -->
+
+<ion-list style="width: 90%;margin: auto;">
+  <ion-item>
+    <h1 style="font-weight: bolder;">用户评价和案例展示</h1>
+  </ion-item>
+    <ion-item>
+
+      <ion-label>
+        <ion-grid>
+          <ion-row>
+            <ion-col size="auto" >
+              
+            </ion-col>
+            <ion-col width-10>
+              <ion-avatar style="width: 30px;height: 30px;display: inline-block;vertical-align: middle;margin-right: 10px;">
+                <img src="assets/shapes.svg" alt="用户头像" >
+              </ion-avatar>
+              <h2 style="font-weight: bolder;display: inline-block;">小林</h2>
+              <div style="margin-top: 10px;margin-bottom: 10px;">
+                衣服非常合身,面料舒适,非常满意!这件服装简直是时尚与艺术的完美融合,让人一眼难忘!从设计到剪裁,每一个细节都透露着匠人的精湛技艺与独到眼光。面料质感丝滑,穿着舒适亲肤,色彩搭配既经典又不失前卫感,完美衬托出穿着者的独特气质。
+              </div>
+            </ion-col>
+          </ion-row>
+          <ion-row>
+            <img src="assets/img/shi.png" alt="定制案例">
+
+          </ion-row>
+        </ion-grid>
+      </ion-label>
+    </ion-item>
+  </ion-list> 
+
+
+  
 
-    <!-- 最新时尚资讯 -->
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>2024年春季流行趋势</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        <p>本季流行色、面料及搭配建议一览</p>
-        <ion-button expand="block">了解更多</ion-button>
-      </ion-card-content>
-    </ion-card>
+  <!-- 最新时尚资讯 -->
+  <ion-card>
+    <ion-card-header>
+      <ion-card-title>2024年春季流行趋势</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <p>本季流行色、面料及搭配建议一览</p>
+      <ion-button expand="block">了解更多</ion-button>
+    </ion-card-content>
+  </ion-card>
 
-    <!-- 页面底部 -->
-    <!-- <ion-footer>
+  <!-- 页面底部 -->
+  <!-- <ion-footer>
       <ion-toolbar>
         <ion-label>© 2024 个性化定制服装平台</ion-label>
         <ion-buttons slot="end">
@@ -120,4 +143,4 @@
         </ion-buttons>
       </ion-toolbar>
     </ion-footer> -->
-  </ion-content>
+</ion-content>

+ 8 - 1
tailor-app/myapp/src/app/yiyun/yiyun.page.scss

@@ -38,4 +38,11 @@ ion-searchbar {
   ion-content {
     --background: rgb(231, 244, 247);
   }
-  
+  // ion-avatar{
+  //   position: absolute;
+  //   top: 0;
+  // }
+  
+  ion-toolbar {
+    --background:rgb(231, 244, 247);;; /* 使用CSS变量设置背景色 */
+  }

+ 10 - 10
tailor-app/myapp/src/app/yiyun/yiyun.page.ts

@@ -3,30 +3,30 @@ import { CommonModule } from '@angular/common';
 import { FormsModule } from '@angular/forms';
 import { ItemReorderEventDetail } from '@ionic/angular/standalone';
 import { addIcons } from 'ionicons';
-import { camera} from 'ionicons/icons';
-import { IonContent, IonHeader, IonTitle, IonToolbar, IonButton, IonLabel, IonItem, IonList, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemOption, IonItemSliding, IonInput, IonCheckbox, IonRadio, IonToggle, IonRadioGroup, IonSearchbar,IonSegment,IonSegmentButton,IonDatetime,IonFooter,IonCardContent,IonCardTitle,IonCardHeader,IonCard,IonCol,IonRow,IonGrid } from '@ionic/angular/standalone';
-addIcons({camera})
-
+import { camera,trendingUpOutline,sparklesOutline,cloudyOutline,diceOutline} from 'ionicons/icons';
+import { IonContent, IonHeader, IonTitle, IonToolbar, IonButton, IonLabel, IonItem, IonList, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemOption, IonItemSliding, IonInput, IonCheckbox, IonRadio, IonToggle, IonRadioGroup, IonSearchbar,IonSegment,IonSegmentButton,IonDatetime,IonFooter,IonCardContent,IonCardTitle,IonCardHeader,IonCard,IonCol,IonRow,IonGrid,IonChip } from '@ionic/angular/standalone';
+addIcons({camera,trendingUpOutline,sparklesOutline,cloudyOutline,diceOutline})
 @Component({
   selector: 'app-yiyun',
   templateUrl: './yiyun.page.html',
   styleUrls: ['./yiyun.page.scss'],
   standalone: true,
-  imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule, IonButton,  IonLabel, IonLabel, IonList, IonItem, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemSliding, IonItemOption, IonItemOptions,IonInput,IonCheckbox,IonRadio,IonToggle,IonRadioGroup,IonSearchbar,IonSegment,IonSegmentButton,IonDatetime,IonFooter,IonCardContent,IonCardTitle,IonCardHeader,IonCard,IonCol,IonRow,IonGrid ]
+  imports: [IonContent, IonHeader, IonTitle, IonToolbar, CommonModule, FormsModule, IonButton,  IonLabel, IonLabel, IonList, IonItem, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemSliding, IonItemOption, IonItemOptions,IonInput,IonCheckbox,IonRadio,IonToggle,IonRadioGroup,IonSearchbar,IonSegment,IonSegmentButton,IonDatetime,IonFooter,IonCardContent,IonCardTitle,IonCardHeader,IonCard,IonCol,IonRow,IonGrid,IonChip ]
 
 })
+
+
 export class YiyunPage implements OnInit {
 
   constructor() { }
 
   ngOnInit() {
   }
-  
   public items = [
-    { image: 'camera', text: 'Button 1', page: '/page1' },
-    { image: 'camera', text: 'Button 2', page: '/page2' },
-    { image: 'camera', text: 'Button 3', page: '/page3' },
-    { image: 'camera', text: 'Button 4', page: '/page4' },
+    { text: '趋势分析', image: 'trending-up-outline', page: '/page1' },
+    { text: 'AI定制', image: 'dice-outline', page: '/page2' },
+    { text: '活动优惠', image: 'sparkles-outline', page: '/page3' },
+    { text: '虚拟试衣', image: 'cloudy-outline', page: '/page4' },
     
   ];
   // 打开登陆页面

BIN
tailor-app/myapp/src/assets/img/shi.png