فهرست منبع

Merge branch 'master' of http://git.fmode.cn:3000/5230275/FilmTraceExplore

5230240 4 ماه پیش
والد
کامیت
7ee9129ca9

+ 2 - 1
angular.json

@@ -136,7 +136,8 @@
   "cli": {
     "schematicCollections": [
       "@ionic/angular-toolkit"
-    ]
+    ],
+    "analytics": false
   },
   "schematics": {
     "@ionic/angular-toolkit:component": {

+ 4 - 0
src/app/app-routing.module.ts

@@ -5,6 +5,10 @@ const routes: Routes = [
   {
     path: '',
     loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
+  },
+  {
+    path: 'setting',
+    loadChildren: () => import('./setting/setting.module').then(m => m.SettingPageModule)
   }
 ];
 @NgModule({

+ 3 - 3
src/app/person/person-routing.module.ts

@@ -1,13 +1,13 @@
 import { NgModule } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
-
 import { PersonPage } from './person.page';
 
 const routes: Routes = [
   {
     path: '',
-    component: PersonPage
-  }
+    component: PersonPage,
+  },
+   
 ];
 
 @NgModule({

+ 1 - 1
src/app/person/person.page.html

@@ -13,7 +13,7 @@
       <div class="container">
         <div class="icon-group">
           <ion-icon name="mail-outline" class="icon"></ion-icon>
-          <ion-icon name="settings-outline" class="icon"></ion-icon>
+          <ion-icon name="settings-outline" class="icon" (click)="goToSettingPage()"></ion-icon>
         </div>
       </div>
     </ion-card-content>

+ 12 - 1
src/app/person/person.page.ts

@@ -1,18 +1,29 @@
 import { Component, OnInit } from '@angular/core';
 import { NavController } from '@ionic/angular';
+import { Router } from '@angular/router';
+
+
 
 @Component({
   selector: 'app-person',
   templateUrl: './person.page.html',
   styleUrls: ['./person.page.scss'],
 })
+
+
+
 export class PersonPage  {
 
-  constructor(private navCtrl: NavController) {}
+  constructor(private navCtrl: NavController,private router: Router) {}
 
   goToBlankPage() {
     // 导航到空白页面
     console.log('Navigating to Blank page');
   }
 
+  goToSettingPage() {
+    this.router.navigate(['/setting']); // 替换成你的 setting 页面路由路径
+  }
+
+
 }

+ 1 - 7
src/app/place/place.page.ts

@@ -1,5 +1,4 @@
 import { Component, OnInit } from '@angular/core';
-import { NavController } from '@ionic/angular';
 
 import { Router } from '@angular/router';
 import { NavController } from '@ionic/angular';
@@ -22,10 +21,5 @@ export class PlacePage implements OnInit {
     // 处理显示更多城市的逻辑
     console.log('显示更多城市');
   }
-
-  goToBlankPage() {
-    // 导航到空白页面
-    console.log('Navigating to Blank page');
-  }
-
+  ngOnInit() {}
 }

+ 18 - 0
src/app/setting/setting-routing.module.ts

@@ -0,0 +1,18 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { SettingPage } from './setting.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: SettingPage
+  },
+  
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class SettingPageRoutingModule {}

+ 20 - 0
src/app/setting/setting.module.ts

@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { SettingPageRoutingModule } from './setting-routing.module';
+
+import { SettingPage } from './setting.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    SettingPageRoutingModule
+  ],
+  declarations: [SettingPage]
+})
+export class SettingPageModule {}

+ 13 - 0
src/app/setting/setting.page.html

@@ -0,0 +1,13 @@
+<ion-header [translucent]="true">
+  <ion-toolbar>
+    <ion-title>setting</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content [fullscreen]="true">
+  <ion-header collapse="condense">
+    <ion-toolbar>
+      <ion-title size="large">setting</ion-title>
+    </ion-toolbar>
+  </ion-header>
+</ion-content>

+ 0 - 0
src/app/setting/setting.page.scss


+ 17 - 0
src/app/setting/setting.page.spec.ts

@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { SettingPage } from './setting.page';
+
+describe('SettingPage', () => {
+  let component: SettingPage;
+  let fixture: ComponentFixture<SettingPage>;
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SettingPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 15 - 0
src/app/setting/setting.page.ts

@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-setting',
+  templateUrl: './setting.page.html',
+  styleUrls: ['./setting.page.scss'],
+})
+export class SettingPage implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}

+ 4 - 0
src/app/tabs/tabs-routing.module.ts

@@ -27,6 +27,10 @@ const routes: Routes = [
         path: 'person',
         loadChildren: () => import('../person/person.module').then( m => m.PersonPageModule)
       },
+      // {
+      //   path: 'setting',
+      //   loadChildren: () => import('../setting/setting.module').then( m => m.SettingPageModule)
+      // },
       {
         path: '',
         redirectTo: '/tabs/tab1',