|
@@ -1,12 +1,18 @@
|
|
|
import { Component } from '@angular/core';
|
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList } from '@ionic/angular/standalone';
|
|
|
+import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail } from '@ionic/angular/standalone';
|
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
|
import { IonButton } from '@ionic/angular/standalone';
|
|
|
import { IonIcon } from '@ionic/angular/standalone';
|
|
|
import { Router } from '@angular/router';
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
-
|
|
|
-
|
|
|
+import { ModalController } from '@ionic/angular';
|
|
|
+import { HttpClient } from '@angular/common/http';
|
|
|
+import { addIcons } from 'ionicons';
|
|
|
+import { documentText, chatbubbles, person, calendar, newspaper,
|
|
|
+ medkit,clipboard, podium, videocam, people } from 'ionicons/icons';
|
|
|
+addIcons({ documentText, chatbubbles, person, calendar, newspaper,
|
|
|
+ medkit,clipboard, podium, videocam, people
|
|
|
+ });
|
|
|
@Component({
|
|
|
selector: 'app-tab1',
|
|
|
templateUrl: 'tab1.page.html',
|
|
@@ -14,15 +20,18 @@ import { CommonModule } from '@angular/common';
|
|
|
standalone: true,
|
|
|
imports: [
|
|
|
IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
|
|
|
- IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule
|
|
|
+ IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule,IonCard,IonCardHeader,IonCardTitle,IonCardSubtitle,
|
|
|
+ IonCardContent, IonThumbnail,
|
|
|
],
|
|
|
})
|
|
|
export class Tab1Page {
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- constructor(private router: Router) {}
|
|
|
-
|
|
|
+ constructor(
|
|
|
+ private router: Router,
|
|
|
+ // private modalController: ModalController,
|
|
|
+ // private navCtrl: NavController,
|
|
|
+ // private http: HttpClient // 注入 HttpClient
|
|
|
+ ) {}
|
|
|
/**
|
|
|
* Go to the ai page
|
|
|
*/
|
|
@@ -57,6 +66,27 @@ export class Tab1Page {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 功能按钮数据
|
|
|
+ functionItems1 = [
|
|
|
+ { label: '我的健康', icon: 'document-text', route: '/medical-records' },
|
|
|
+ { label: '健康档案', icon: 'person', route: '/health-profile' },
|
|
|
+ { label: '电话问诊', icon: 'calendar', route: '/appointment' },
|
|
|
+ { label: '购买药品', icon: 'medkit', route: '/telemedicine' },
|
|
|
+ ];
|
|
|
+
|
|
|
+ functionItems2 = [
|
|
|
+ { label: '专业男科', icon: 'clipboard', route: '/medicine-purchase' },
|
|
|
+ { label: '权威专家', icon: 'podium', route: '/expert-lectures' },
|
|
|
+ { label: '健康资讯', icon: 'newspaper', route: '/health-news' },
|
|
|
+ { label: '智慧社区', icon: 'people', route: '/health-community' }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 导航到指定路由
|
|
|
+ navigateTo(route: string) {
|
|
|
+ // this.router.navigate([route]);
|
|
|
+ console.log("route: ",route)
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
ngOnInit() {}
|
|
|
}
|