|
@@ -1,5 +1,5 @@
|
|
|
import { Component } from '@angular/core';
|
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
|
|
|
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, NavController } from '@ionic/angular/standalone';
|
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
|
|
|
|
@Component({
|
|
@@ -7,8 +7,33 @@ import { ExploreContainerComponent } from '../explore-container/explore-containe
|
|
|
templateUrl: 'tab4.page.html',
|
|
|
styleUrls: ['tab4.page.scss'],
|
|
|
standalone: true,
|
|
|
- imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],
|
|
|
+ imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
|
|
|
+ IonList, IonItem, IonLabel, IonAvatar],
|
|
|
})
|
|
|
export class Tab4Page {
|
|
|
- constructor() {}
|
|
|
+
|
|
|
+
|
|
|
+ user: any = {
|
|
|
+ name: '张三',
|
|
|
+ email: 'zhangsan@example.com'
|
|
|
+ };
|
|
|
+
|
|
|
+ constructor(private navCtrl: NavController) {}
|
|
|
+
|
|
|
+ editProfile() {
|
|
|
+ // Navigate to the edit profile page
|
|
|
+ this.navCtrl.navigateForward('/edit-profile');
|
|
|
+ }
|
|
|
+
|
|
|
+ viewSettings() {
|
|
|
+ // Navigate to the settings page
|
|
|
+ this.navCtrl.navigateForward('/settings');
|
|
|
+ }
|
|
|
+
|
|
|
+ logout() {
|
|
|
+ // Perform logout actions
|
|
|
+ // For example, clear user data and navigate to the login page
|
|
|
+ // localStorage.removeItem('user');
|
|
|
+ this.navCtrl.navigateRoot('/login');
|
|
|
+ }
|
|
|
}
|