inquiry-human.component.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. import { Component, OnInit } from '@angular/core';
  2. import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton, IonChip, IonIcon, IonBadge, IonText, IonCard, IonSegmentButton, IonSegment, IonCol, IonRow, IonGrid } from '@ionic/angular/standalone';
  3. import { ExploreContainerComponent } from '../../explore-container/explore-container.component';
  4. import { addIcons } from 'ionicons';
  5. import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
  6. import { Router } from '@angular/router';
  7. import { CommonModule } from '@angular/common';
  8. import { FormsModule } from '@angular/forms';
  9. addIcons({ airplane, bluetooth, call, wifi });
  10. interface Doctor {
  11. avatar: string;
  12. name: string;
  13. title: string;
  14. department: string;
  15. hospital: string;
  16. hospitalLevel: string;
  17. hospitalType: string;
  18. expertise: string;
  19. rating: number;
  20. consultations: string;
  21. recommendations: number;
  22. prices: {
  23. text: number;
  24. voice: number;
  25. video: number;
  26. }
  27. }
  28. @Component({
  29. selector: 'inquiry-human',
  30. templateUrl: './inquiry-human.component.html',
  31. styleUrls: ['./inquiry-human.component.scss'],
  32. standalone: true,
  33. imports: [
  34. IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,CommonModule,
  35. IonLabel,IonItem,IonList,IonAvatar,IonLabel,IonButton,IonChip,IonIcon,IonBadge,
  36. IonText,IonCard,IonSegment,IonSegmentButton, FormsModule,IonCol,IonRow,IonGrid
  37. ]
  38. })
  39. export class InquiryHumanComponent implements OnInit {
  40. constructor(
  41. private router: Router
  42. ) { }
  43. ngOnInit() {}
  44. back:string = "<";
  45. backhome(){
  46. this.router.navigate(['/tabs/tab1']);
  47. }
  48. selectedSegment = '全部';
  49. segments = ['全部', '妇科', '儿科', '皮肤性病科', '内科',];
  50. doctors: Doctor[] = [
  51. {
  52. avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor7.png',
  53. name: '张伟',
  54. title: '主任医师',
  55. department: '消化内科',
  56. hospital: '首都医科大学附属北京友谊..',
  57. hospitalLevel: '三甲',
  58. hospitalType: '百强医院',
  59. expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
  60. rating: 5.0,
  61. consultations: '1.1万',
  62. recommendations: 100,
  63. prices: {
  64. text: 100,
  65. voice: 150,
  66. video: 300
  67. },
  68. },
  69. {
  70. avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor6.png',
  71. name: '张伟',
  72. title: '主任医师',
  73. department: '消化内科',
  74. hospital: '首都医科大学附属北京友谊..',
  75. hospitalLevel: '三甲',
  76. hospitalType: '百强医院',
  77. expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
  78. rating: 5.0,
  79. consultations: '1.1万',
  80. recommendations: 100,
  81. prices: {
  82. text: 100,
  83. voice: 150,
  84. video: 300
  85. },
  86. },{
  87. avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor5.png',
  88. name: '张伟',
  89. title: '主任医师',
  90. department: '消化内科',
  91. hospital: '首都医科大学附属北京友谊..',
  92. hospitalLevel: '三甲',
  93. hospitalType: '百强医院',
  94. expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
  95. rating: 5.0,
  96. consultations: '1.1万',
  97. recommendations: 100,
  98. prices: {
  99. text: 100,
  100. voice: 150,
  101. video: 300
  102. },
  103. },{
  104. avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor7.png',
  105. name: '张伟',
  106. title: '主任医师',
  107. department: '消化内科',
  108. hospital: '首都医科大学附属北京友谊..',
  109. hospitalLevel: '三甲',
  110. hospitalType: '百强医院',
  111. expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
  112. rating: 5.0,
  113. consultations: '1.1万',
  114. recommendations: 100,
  115. prices: {
  116. text: 100,
  117. voice: 150,
  118. video: 300
  119. },
  120. }
  121. ];
  122. goToDoctorDetail(doctor: Doctor) {
  123. // this.router.navigate(['/doctor-detail'], { state: { doctor: doctor } });
  124. }
  125. segmentChanged(event: any) {
  126. this.selectedSegment = event.detail.value;
  127. console.log(this.selectedSegment);
  128. }
  129. }