|
@@ -1,15 +1,30 @@
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
+import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';
|
|
|
+import { CloudQuery } from 'src/lib/ncloud.';
|
|
|
|
|
|
@Component({
|
|
|
- selector: 'app-my-plan',
|
|
|
+ selector: 'my-plan',
|
|
|
templateUrl: './my-plan.component.html',
|
|
|
styleUrls: ['./my-plan.component.scss'],
|
|
|
standalone: true,
|
|
|
+ imports: [IonButton,IonCardContent,IonCardSubtitle,IonCardTitle,IonCardHeader,IonCard,IonContent,IonTitle,IonToolbar,IonHeader],
|
|
|
})
|
|
|
-export class MyPlanComponent implements OnInit {
|
|
|
+export class MyPlanComponent implements OnInit {
|
|
|
+ plan: any = null;
|
|
|
|
|
|
- constructor() { }
|
|
|
+ constructor() {}
|
|
|
|
|
|
- ngOnInit() {}
|
|
|
+ ngOnInit() {
|
|
|
+ this.loadPlan();
|
|
|
+ }
|
|
|
|
|
|
-}
|
|
|
+ async loadPlan() {
|
|
|
+ const query = new CloudQuery('UserResponse');
|
|
|
+ try {
|
|
|
+ const result = await query.first();
|
|
|
+ this.plan = result;
|
|
|
+ } catch (error) {
|
|
|
+ console.error('加载策划内容失败:', error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|