TUSL 2 ヶ月 前
コミット
58ad291e74

+ 55 - 56
FitMind-app/src/app/tab2/tab2.page.html

@@ -1,58 +1,57 @@
 <ion-header>
-    <ion-toolbar>
-      <ion-title>运动计划生成</ion-title>
-    </ion-toolbar>
-  </ion-header>
+  <ion-toolbar>
+    <ion-title>运动计划生成</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <!-- 输入字段 -->
+  <ion-item>
+    <ion-label position="floating">体重</ion-label>
+    <ion-input [(ngModel)]="userWeight" type="number" placeholder="请输入您的体重"></ion-input>
+  </ion-item>
   
-  <ion-content>
-    <!-- 输入字段 -->
-    <ion-item>
-      <ion-label position="floating">体重</ion-label>
-      <ion-input [(ngModel)]="userWeight" type="number" placeholder="请输入您的体重"></ion-input>
-    </ion-item>
-    
-    <ion-item>
-      <ion-label position="floating">身高</ion-label>
-      <ion-input [(ngModel)]="userHeight" type="number" placeholder="请输入您的身高"></ion-input>
-    </ion-item>
-  
-    <ion-item>
-      <ion-label position="floating">运动偏好</ion-label>
-      <ion-select [(ngModel)]="userPreference" placeholder="选择您的运动偏好">
-        <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-item>
-      <ion-label position="floating">运动目标</ion-label>
-      <ion-select [(ngModel)]="userGoal" placeholder="选择您的目标">
-        <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-button expand="full" (click)="generatePlan()">生成运动计划</ion-button>
-  
-    <!-- 显示生成的运动计划 -->
-    <div *ngIf="responsePlan">
-      <ion-card>
-        <ion-card-header>
-          <ion-card-title>neno</ion-card-title>
-        </ion-card-header>
-        <ion-card-content>
-            @if(!isComplete){
-                <p>{{ responsePlan }}</p>
-            }
-          
-        </ion-card-content>
-      </ion-card>
-    </div>
-    @if(isComplete){
-    <fm-markdown-preview class="content-style" [content]="responsePlan"></fm-markdown-preview>
-    }
-</ion-content>
-  
+  <ion-item>
+    <ion-label position="floating">身高</ion-label>
+    <ion-input [(ngModel)]="userHeight" type="number" placeholder="请输入您的身高"></ion-input>
+  </ion-item>
+
+  <ion-item>
+    <ion-label position="floating">运动偏好</ion-label>
+    <ion-select [(ngModel)]="userPreference" placeholder="选择您的运动偏好">
+      <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-item>
+    <ion-label position="floating">运动目标</ion-label>
+    <ion-select [(ngModel)]="userGoal" placeholder="选择您的目标">
+      <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-button expand="full" (click)="generatePlan()">生成运动计划</ion-button>
+
+  <!-- 显示生成的运动计划 -->
+  <div *ngIf="responsePlan">
+    <ion-card>
+      <ion-card-header>
+        <ion-card-title>neno</ion-card-title>
+      </ion-card-header>
+      <ion-card-content>
+          @if(!isComplete){
+              <p>{{ responsePlan }}</p>
+          }
+        
+      </ion-card-content>
+    </ion-card>
+  </div>
+  @if(isComplete){
+  <fm-markdown-preview class="content-style" [content]="responsePlan"></fm-markdown-preview>
+  }
+</ion-content>

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

@@ -15,4 +15,4 @@ describe('Tab2Page', () => {
   it('should create', () => {
     expect(component).toBeTruthy();
   });
-});
+});

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

@@ -63,4 +63,4 @@ isComplete:boolean = false;
       }
     });
   }
-}
+}