课堂监控项目策划书 1 سال پیش
والد
کامیت
f0143e42f9

+ 17 - 0
ballfire/src/app/Training/tab5.html

@@ -0,0 +1,17 @@
+<ion-header>
+    <ion-toolbar>
+      <ion-title>训练备忘录</ion-title>
+      <ion-buttons slot="end">
+        <ion-button (click)="close()">关闭</ion-button>
+      </ion-buttons>
+    </ion-toolbar>
+  </ion-header>
+  
+  <ion-content>
+    <ion-item>
+      <ion-label position="floating">记录您的训练心得</ion-label>
+      <ion-textarea [(ngModel)]="memoContent" rows="6"></ion-textarea>
+    </ion-item>
+    
+    <ion-button expand="full" (click)="saveMemo()" color="primary">保存备忘录</ion-button>
+  </ion-content>

+ 23 - 0
ballfire/src/app/Training/tab5.ts

@@ -0,0 +1,23 @@
+import { Component } from '@angular/core';
+import { ModalController } from '@ionic/angular';
+
+@Component({
+  selector: 'app-training-memo-modal',
+  templateUrl: './training-memo-modal.component.html',
+  styleUrls: ['./training-memo-modal.component.scss'],
+})
+export class TrainingMemoModalComponent {
+  memoContent: string = '';
+
+  constructor(private modalCtrl: ModalController) {}
+
+  saveMemo() {
+    // 保存备忘录逻辑
+    console.log('备忘录内容:', this.memoContent);
+    this.modalCtrl.dismiss({ memo: this.memoContent });
+  }
+
+  close() {
+    this.modalCtrl.dismiss();
+  }
+}

+ 2 - 1
ballfire/src/app/tab4/tab4.page.html

@@ -54,10 +54,11 @@
   </ion-card>
 
   @if(currentUser?.id){
-    <ion-card class="memo-card">
+    <ion-card class="memo-card" (click)="gototab5()">
       <h2 class="memo-title">训练备忘录</h2>
       <p class="memo-description">记录下您每次训练时的心得体会,及时做出改变加强训练</p>
     </ion-card>
   }
 
+
 </ion-content>

+ 4 - 0
ballfire/src/app/tab4/tab4.page.ts

@@ -78,4 +78,8 @@ export class Tab4Page {
     }
     this.editTags = ev;
   }
+  gototab5(){
+
+    this.router.navigate(["tabs/tab5"])
+  }
 }

+ 5 - 0
ballfire/src/app/tabs/tabs.routes.ts

@@ -26,6 +26,11 @@ export const routes: Routes = [
         loadComponent: () =>
           import('../tab4/tab4.page').then((m) => m.Tab4Page),
       },
+      {
+        path: 'tab5',
+        loadComponent: () =>
+          import('../test/test.component').then((m) => m.TestComponent),
+      },
       {
         path: '',
         redirectTo: '/tabs/tab1',

+ 8 - 0
ballfire/src/app/test/test.component.html

@@ -0,0 +1,8 @@
+<ion-header [translucent]="true">
+  <ion-toolbar class="custom-toolbar">
+    <ion-title class="custom-title">
+      我的
+    </ion-title>
+  </ion-toolbar>
+</ion-header>
+<ion-content [fullscreen]="true">

+ 0 - 0
ballfire/src/app/test/test.component.scss


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

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

+ 18 - 0
ballfire/src/app/test/test.component.ts

@@ -0,0 +1,18 @@
+import { Component, OnInit } from '@angular/core';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonCard, IonCardContent, IonButton, IonCardHeader, IonCardTitle, IonCardSubtitle, ModalController } from '@ionic/angular/standalone';
+@Component({
+  selector: 'app-test',
+  templateUrl: './test.component.html',
+  styleUrls: ['./test.component.scss'],
+  standalone: true,
+  imports: [IonHeader, IonToolbar, IonTitle, IonContent, 
+    IonCard, IonCardContent, IonButton, IonCardHeader, IonCardTitle, IonCardSubtitle,
+  ],
+})
+export class TestComponent  implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

+ 3 - 0
ballfire/src/app/zyz/zyz.component.html

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

+ 0 - 0
ballfire/src/app/zyz/zyz.component.scss


+ 22 - 0
ballfire/src/app/zyz/zyz.component.spec.ts

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

+ 15 - 0
ballfire/src/app/zyz/zyz.component.ts

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