刘嘉轩 7 місяців тому
батько
коміт
6dbfaacf51

+ 0 - 4
smarteat-app/src/app/asf/asf.component.html

@@ -1,4 +0,0 @@
-<p>
-  asf works!
-  <img src="https://app.fmode.cn/dev/jxnu/202226701038/boluogulaorou.jpeg" alt="">
-</p>

+ 0 - 0
smarteat-app/src/app/asf/asf.component.scss


+ 0 - 22
smarteat-app/src/app/asf/asf.component.spec.ts

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

+ 0 - 15
smarteat-app/src/app/asf/asf.component.ts

@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-  selector: 'app-asf',
-  templateUrl: './asf.component.html',
-  styleUrls: ['./asf.component.scss'],
-  standalone: true,
-})
-export class AsfComponent  implements OnInit {
-
-  constructor() { }
-
-  ngOnInit() {}
-
-}

+ 0 - 3
smarteat-app/src/app/asx/asx.component.html

@@ -1,3 +0,0 @@
-<p>
-  asx works!
-</p>

+ 0 - 0
smarteat-app/src/app/asx/asx.component.scss


+ 0 - 22
smarteat-app/src/app/asx/asx.component.spec.ts

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

+ 0 - 15
smarteat-app/src/app/asx/asx.component.ts

@@ -1,15 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-
-@Component({
-  selector: 'app-asx',
-  templateUrl: './asx.component.html',
-  styleUrls: ['./asx.component.scss'],
-  standalone: true,
-})
-export class AsxComponent  implements OnInit {
-
-  constructor() { }
-
-  ngOnInit() {}
-
-}

+ 0 - 8
smarteat-app/src/app/health-tips/health-tips.component.html

@@ -1,8 +0,0 @@
-<!-- 文本域:生成提示词 -->
-<ion-textarea [value]="userPrompt" (ionInput)="promptInput($event)" placeholder="文本提示词" autoGrow="true"></ion-textarea>
-
-<!-- 按钮:执行消息生成函数 -->
-<ion-button (click)="sendMessage()" expand="block">消息生成</ion-button>
-  
-<!-- 展示:返回消息内容 -->
-<div>{{responseMsg}}</div>    

+ 0 - 0
smarteat-app/src/app/health-tips/health-tips.component.scss


+ 0 - 22
smarteat-app/src/app/health-tips/health-tips.component.spec.ts

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

+ 0 - 38
smarteat-app/src/app/health-tips/health-tips.component.ts

@@ -1,38 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { IonicModule } from '@ionic/angular';
-import { FmodeChatCompletion } from 'fmode-ng';
-
-@Component({
-  selector: 'app-health-tips',
-  templateUrl: './health-tips.component.html',
-  styleUrls: ['./health-tips.component.scss'],
-  standalone: true,
-  imports: [IonicModule
-    ],
-})
-export class HealthTipsComponent  implements OnInit {
-
-  constructor() {}
-  ngOnInit() {}
-  // 用户输入提示词
-   userPrompt:string = "飞码产品LOGO,独角兽头部形象,极简风格,棱角分明,线条勾勒,蓝色紫色搭配。"
-  promptInput(ev:any){
-    this.userPrompt = ev.detail.value;
-  }
-  // 属性:组件内用于展示消息内容的变量
-  responseMsg:any = ""
-  // 方法:实例化completion对象,传入消息数组,并订阅生成的可观察对象。
-  sendMessage(){
-    console.log("create")
-    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
-    })
-  }
-}

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

@@ -99,7 +99,7 @@
 
     <ion-row class="horizontal-row">
       <ion-col size="6">
-        <ion-button (click)="goToasx()">
+        <ion-button >
           <ion-icon slot="start" name="storefront-outline"></ion-icon>
           外卖推荐
         </ion-button>