|  | @@ -1,10 +1,11 @@
 | 
	
		
			
				|  |  |  import { Component,CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
 | 
	
		
			
				|  |  |  import { IonHeader, IonToolbar, IonTitle, IonContent, IonAvatar, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonLabel, IonList,
 | 
	
		
			
				|  |  | -   IonItem,IonIcon,IonCardTitle,IonInput,IonSearchbar} from '@ionic/angular/standalone';
 | 
	
		
			
				|  |  | +   IonItem,IonIcon,IonInput,IonSearchbar} from '@ionic/angular/standalone';
 | 
	
		
			
				|  |  |  import { ExploreContainerComponent } from '../explore-container/explore-container.component';
 | 
	
		
			
				|  |  |  import { CommonModule } from '@angular/common';
 | 
	
		
			
				|  |  | -import { EditDetailComponent } from '../edit-detail/edit-detail.component';
 | 
	
		
			
				|  |  | +import {  TopicDetailComponent } from '../topic-detail/topic-detail.component';
 | 
	
		
			
				|  |  |  import { Router } from '@angular/router';
 | 
	
		
			
				|  |  | +import { TopicDetail2Component } from '../topic-detail2/topic-detail2.component';
 | 
	
		
			
				|  |  |  @Component({
 | 
	
		
			
				|  |  |    selector: 'app-tab1',
 | 
	
		
			
				|  |  |    templateUrl: 'tab1.page.html',
 | 
	
	
		
			
				|  | @@ -12,9 +13,9 @@ import { Router } from '@angular/router';
 | 
	
		
			
				|  |  |    standalone: true,
 | 
	
		
			
				|  |  |    imports: [IonHeader,IonToolbar,IonTitle,IonContent,ExploreContainerComponent,
 | 
	
		
			
				|  |  |      IonButtons,IonButton,IonIcon,
 | 
	
		
			
				|  |  | -    IonCard,IonCardContent,IonCardHeader,IonCardTitle,
 | 
	
		
			
				|  |  | +    IonCard,IonCardContent,IonCardHeader,
 | 
	
		
			
				|  |  |      IonLabel,IonList,IonItem,IonAvatar,IonInput,IonSearchbar,
 | 
	
		
			
				|  |  | -    CommonModule,EditDetailComponent
 | 
	
		
			
				|  |  | +    CommonModule,TopicDetailComponent,TopicDetail2Component
 | 
	
		
			
				|  |  |    ],
 | 
	
		
			
				|  |  |    schemas: [CUSTOM_ELEMENTS_SCHEMA],
 | 
	
		
			
				|  |  |  })
 | 
	
	
		
			
				|  | @@ -45,17 +46,20 @@ export class Tab1Page {
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |        id: 1,
 | 
	
		
			
				|  |  |        title: '如何管理焦虑情绪',
 | 
	
		
			
				|  |  | -      description: '了解焦虑的来源及应对策略。'
 | 
	
		
			
				|  |  | +      description: '了解焦虑的来源及应对策略',
 | 
	
		
			
				|  |  | +      detailRoute: 'topic-detail',
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |        id: 2,
 | 
	
		
			
				|  |  |        title: '克服抑郁的有效方法',
 | 
	
		
			
				|  |  | -      description: '探索抑郁症的应对技巧。'
 | 
	
		
			
				|  |  | +      description: '探索抑郁症的应对技巧',
 | 
	
		
			
				|  |  | +      detailRoute: 'topic-detail2'
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |        id: 3,
 | 
	
		
			
				|  |  |        title: '提升自信心的技巧',
 | 
	
		
			
				|  |  | -      description: '学习如何建立自信。'
 | 
	
		
			
				|  |  | +      description: '学习如何建立自信',
 | 
	
		
			
				|  |  | +      detailRoute: 'topic-detail2'
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    ];
 | 
	
		
			
				|  |  |    reviews = [
 | 
	
	
		
			
				|  | @@ -75,11 +79,28 @@ export class Tab1Page {
 | 
	
		
			
				|  |  |        rating: 4
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    ];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    constructor(private router: Router) {
 | 
	
		
			
				|  |  |      // 其他构造函数代码
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | -  viewDetails(){//查看详情
 | 
	
		
			
				|  |  | -    this.router.navigate(['/tabs/detail'])
 | 
	
		
			
				|  |  | +  viewDetails(topicId: number): void {
 | 
	
		
			
				|  |  | +    let route: string;
 | 
	
		
			
				|  |  | +    switch (topicId) {
 | 
	
		
			
				|  |  | +      case 1:
 | 
	
		
			
				|  |  | +        route = 'topic-detail';
 | 
	
		
			
				|  |  | +        break;
 | 
	
		
			
				|  |  | +      case 2:
 | 
	
		
			
				|  |  | +        route = 'topic-detail2';
 | 
	
		
			
				|  |  | +        break;
 | 
	
		
			
				|  |  | +      case 3:
 | 
	
		
			
				|  |  | +        // 如果有第三个详情页面
 | 
	
		
			
				|  |  | +        route = 'another-detail';
 | 
	
		
			
				|  |  | +        break;
 | 
	
		
			
				|  |  | +      default:
 | 
	
		
			
				|  |  | +        route = 'topic-detail'; // 默认路由
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    // 导航到指定的路由,并可以传递参数(如果需要)
 | 
	
		
			
				|  |  | +    this.router.navigate([`tabs/${route}`, { id: topicId }]);
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    bookConsultation(consultant: any) {
 | 
	
		
			
				|  |  |      // 预约咨询逻辑
 |