|
@@ -1,35 +1,57 @@
|
|
|
-import { Component,CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonSearchbar, IonicSlides, IonGrid, IonRow, IonCol, IonCard, IonCardHeader, IonCardTitle, IonCardContent, IonFooter, IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonInput } from '@ionic/angular/standalone';
|
|
|
+import { Component, ViewChild } from '@angular/core';
|
|
|
+import { IonicModule } from '@ionic/angular';
|
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
|
-import { CommonModule } from '@angular/common';
|
|
|
+import { IonAvatar, IonCard, IonCardContent, IonCardHeader, IonCol, IonContent, IonFab, IonFabButton, IonGrid, IonIcon, IonItem, IonLabel, IonList, IonRow, IonSearchbar, IonTab, IonTabBar, IonTabButton, IonTabs, IonThumbnail, IonToolbar } from '@ionic/angular/standalone';
|
|
|
+import { CommonModule } from '@angular/common'; // 导入 CommonModule 以使用 *ngFor
|
|
|
|
|
|
@Component({
|
|
|
selector: 'app-tab1',
|
|
|
templateUrl: 'tab1.page.html',
|
|
|
styleUrls: ['tab1.page.scss'],
|
|
|
standalone: true,
|
|
|
- imports: [IonHeader, IonToolbar, IonTitle, IonSearchbar,IonGrid,
|
|
|
- IonRow,IonCol,IonCard,IonCardHeader,IonCardTitle,IonCardContent,
|
|
|
- IonFooter,IonTabs,IonTabBar,IonTabButton,IonIcon,IonLabel,
|
|
|
- IonContent, ExploreContainerComponent,CommonModule,IonInput],
|
|
|
- schemas:[CUSTOM_ELEMENTS_SCHEMA],
|
|
|
+ imports: [
|
|
|
+ IonicModule,
|
|
|
+ IonContent, IonToolbar, IonGrid, IonRow, IonCard, IonCardContent, IonCardHeader,
|
|
|
+ IonCol, IonTab, IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel, IonList, IonItem,
|
|
|
+ IonThumbnail, IonAvatar, IonSearchbar, IonFab, IonFabButton,
|
|
|
+ ExploreContainerComponent,
|
|
|
+ CommonModule
|
|
|
+ ]
|
|
|
})
|
|
|
export class Tab1Page {
|
|
|
constructor() {}
|
|
|
|
|
|
- // 示例数据
|
|
|
- recommendedRoutes = [
|
|
|
- { id: 1, name: '庐山经典路线', difficulty: '中等', time: '5小时', image: 'assets/img/庐山.png' },
|
|
|
- { id: 2, name: '三清山挑战路线', difficulty: '困难', time: '8小时', image: 'assets/img/三清山.png' }
|
|
|
+ @ViewChild('slides') ionSlides: any; // 使用 ViewChild 获取 ion-slides 实例
|
|
|
+
|
|
|
+ slides: any[] = [
|
|
|
+ { image: 'src/assets/img/1.png' },
|
|
|
+ { image: 'src/assets/img/1.png' },
|
|
|
+ { image: 'src/assets/img/1.png' },
|
|
|
+ ];
|
|
|
+
|
|
|
+ hotRecommendations: any[] = [
|
|
|
+ { title: '滕王阁', description: '江南三大名楼之一', image: 'src/assets/img/1.png' },
|
|
|
+ { title: '八一广场', description: '南昌市中心广场', image: 'src/assets/img/1.png' },
|
|
|
+ // 更多推荐...
|
|
|
+ ];
|
|
|
+
|
|
|
+ events: any[] = [
|
|
|
+ { title: '南昌国际马拉松', description: '一年一度的国际体育赛事', image: 'src/assets/img/1.png' },
|
|
|
+ // 更多活动...
|
|
|
+ ];
|
|
|
+
|
|
|
+ personalizedRecommendations: any[] = [
|
|
|
+ { title: '红色旅游线路', description: '南昌起义纪念馆一日游', image: 'src/assets/img/1.png' },
|
|
|
+ // 更多个性化推荐...
|
|
|
];
|
|
|
|
|
|
- trainingPlans = [
|
|
|
- { id: 1, name: '初级体能训练', description: '适合初级登山者', image: 'assets/img/1.png' },
|
|
|
- { id: 2, name: '高级耐力提升', description: '为长期登山者设计', image: 'assets/img/1.png' }
|
|
|
+ travelGuides: any[] = [
|
|
|
+ { title: '一日游推荐', description: '南昌市区经典一日游路线', image: 'src/assets/img/1.png' },
|
|
|
+ // 更多攻略...
|
|
|
];
|
|
|
|
|
|
- educationalContent = [
|
|
|
- { id: 1, title: '江西山川文化', summary: '探索江西名山的历史与文化', image: 'assets/img/1.png' },
|
|
|
- { id: 2, title: '山地生态保护', summary: '了解山地生态的重要性', image: 'assets/img/1.png' }
|
|
|
+ travelPosts: any[] = [
|
|
|
+ { username: '张三', content: '今天去了滕王阁,真的很壮观!', avatar: 'src/assets/img/1.png' },
|
|
|
+ // 更多用户互动...
|
|
|
];
|
|
|
}
|