Browse Source

Merge branch 'master' of http://git.fmode.cn:3000/0225273/APPmy

0225273 4 months ago
parent
commit
476b4e68d4

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

@@ -17,8 +17,13 @@ const routes: Routes = [
   {
   {
     path: 'feedback',
     path: 'feedback',
     loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
     loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
+  },
+  {
+    path: 'settings',
+    loadChildren: () => import('./settings/settings.module').then( m => m.SettingsPageModule)
   }
   }
 
 
+
 ];
 ];
 @NgModule({
 @NgModule({
   imports: [
   imports: [

+ 17 - 0
src/app/settings/settings-routing.module.ts

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

+ 20 - 0
src/app/settings/settings.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 { SettingsPageRoutingModule } from './settings-routing.module';
+
+import { SettingsPage } from './settings.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    SettingsPageRoutingModule
+  ],
+  declarations: [SettingsPage]
+})
+export class SettingsPageModule {}

+ 51 - 0
src/app/settings/settings.page.html

@@ -0,0 +1,51 @@
+<ion-header>
+  <ion-toolbar color="primary">
+    <ion-buttons slot="start">
+      <ion-back-button defaultHref="/tabs/tab3"></ion-back-button>
+    </ion-buttons>
+    <ion-title>设置页面</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <!-- 设置页面内容 -->
+  <ion-item (click)="editProfile()">
+    <ion-icon slot="start" name="person-circle"></ion-icon>
+    <ion-label>个人信息设置</ion-label>
+  </ion-item>
+
+  <ion-item (click)="selectNotification()">
+    <ion-icon slot="start" name="notifications"></ion-icon>
+    <ion-label>通知设置</ion-label>
+  </ion-item>
+
+  <ion-item (click)="managePrivacy()">
+    <ion-icon slot="start" name="lock-closed"></ion-icon>
+    <ion-label>隐私设置</ion-label>
+  </ion-item>
+
+  <ion-item (click)="selectTheme()">
+    <ion-icon slot="start" name="color-palette"></ion-icon>
+    <ion-label>主题设置</ion-label>
+  </ion-item>
+
+  <ion-item (click)="manageSecurity()">
+    <ion-icon slot="start" name="shield-checkmark"></ion-icon>
+    <ion-label>账号安全</ion-label>
+  </ion-item>
+
+  <ion-item (click)="selectLanguage()">
+    <ion-icon slot="start" name="globe"></ion-icon>
+    <ion-label>语言设置</ion-label>
+  </ion-item>
+
+  <ion-item (click)="getHelp()">
+    <ion-icon slot="start" name="help-buoy"></ion-icon>
+    <ion-label>帮助与反馈</ion-label>
+  </ion-item>
+
+  <ion-item (click)="viewAboutPage()">
+    <ion-icon slot="start" name="information-circle"></ion-icon>
+    <ion-label>关于页面</ion-label>
+  </ion-item>
+</ion-content>

+ 5 - 0
src/app/settings/settings.page.scss

@@ -0,0 +1,5 @@
+ion-item {
+    ion-label {
+      font-weight: bold;
+    }
+  }

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

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

+ 45 - 0
src/app/settings/settings.page.ts

@@ -0,0 +1,45 @@
+import { Component, OnInit } from '@angular/core';
+import { NavController } from '@ionic/angular';
+@Component({
+  selector: 'app-settings',
+  templateUrl: './settings.page.html',
+  styleUrls: ['./settings.page.scss'],
+})
+export class SettingsPage implements OnInit {
+
+  constructor(private navCtrl: NavController) { }
+  ngOnInit() {
+  }
+   editProfile() {
+    // 编辑个人信息
+  }
+
+  selectNotification() {
+    // 选择通知设置
+  }
+
+  managePrivacy() {
+    // 管理隐私设置
+  }
+
+  selectTheme() {
+    // 选择主题设置
+  }
+
+  manageSecurity() {
+    // 管理账号安全
+  }
+
+  selectLanguage() {
+    // 选择语言设置
+  }
+
+  getHelp() {
+    // 获取帮助与反馈
+  }
+
+  viewAboutPage() {
+    // 查看关于页面
+  }
+
+}

+ 3 - 3
src/app/tab3/tab3.page.html

@@ -11,6 +11,7 @@
 </ion-header>
 </ion-header>
 
 
 <ion-content>
 <ion-content>
+  <ion-searchbar placeholder="输入关键字搜索"></ion-searchbar>
   <ion-card>
   <ion-card>
     <ion-card-header>
     <ion-card-header>
       <ion-card-title>最新推荐</ion-card-title>
       <ion-card-title>最新推荐</ion-card-title>
@@ -19,13 +20,12 @@
       <ion-avatar slot="start">
       <ion-avatar slot="start">
         <ion-img src="https://wx4.sinaimg.cn/mw690/006GBbhsgy1hqa92rfo7tj30qo0qo76t.jpg"></ion-img>
         <ion-img src="https://wx4.sinaimg.cn/mw690/006GBbhsgy1hqa92rfo7tj30qo0qo76t.jpg"></ion-img>
       </ion-avatar>
       </ion-avatar>
-      <ion-label>用户名</ion-label>
-      <ion-label>标签</ion-label>
+      <ion-label>用户名</ion-label><br>
+      <ion-label>标签</ion-label><br>
       <ion-label>聊天内容</ion-label>
       <ion-label>聊天内容</ion-label>
       <ion-button expand="block">免费提问</ion-button>
       <ion-button expand="block">免费提问</ion-button>
     </ion-card-content>
     </ion-card-content>
   </ion-card>
   </ion-card>
-  <ion-searchbar placeholder="输入关键字搜索"></ion-searchbar>
   <div style="display: flex; flex-direction: column;">
   <div style="display: flex; flex-direction: column;">
    <ion-segment [ngModelOptions]="{standalone:true}" [(ngModel)]="activeTab" (ionChange)="changeTab($event)">
    <ion-segment [ngModelOptions]="{standalone:true}" [(ngModel)]="activeTab" (ionChange)="changeTab($event)">
     <ion-segment-button value="explore">
     <ion-segment-button value="explore">

+ 1 - 2
src/app/tab3/tab3.page.scss

@@ -1,5 +1,5 @@
 ion-card {
 ion-card {
-  top: 25px;
+  top: 1px;
   margin: 10px;
   margin: 10px;
 }
 }
 
 
@@ -10,4 +10,3 @@ ion-card-title {
 ion-avatar {
 ion-avatar {
   margin-right: 10px;
   margin-right: 10px;
 }
 }
-

+ 2 - 2
src/app/tab3/tab3.page.spec.ts

@@ -1,7 +1,7 @@
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { IonicModule } from '@ionic/angular';
 import { IonicModule } from '@ionic/angular';
 
 
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
+//import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
 
 
 import { Tab3Page } from './tab3.page';
 import { Tab3Page } from './tab3.page';
 
 
@@ -12,7 +12,7 @@ describe('Tab3Page', () => {
   beforeEach(async () => {
   beforeEach(async () => {
     await TestBed.configureTestingModule({
     await TestBed.configureTestingModule({
       declarations: [Tab3Page],
       declarations: [Tab3Page],
-      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
+      //imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
     }).compileComponents();
     }).compileComponents();
 
 
     fixture = TestBed.createComponent(Tab3Page);
     fixture = TestBed.createComponent(Tab3Page);

+ 3 - 2
src/app/tab3/tab3.page.ts

@@ -10,7 +10,7 @@ import { ToastController } from '@ionic/angular';
 })
 })
 export class Tab3Page {
 export class Tab3Page {
 
 
-  constructor(private toastController: ToastController) {}
+  constructor(private toastController: ToastController,private router: Router) {}
 
 
   activeTab:string = 'explore';
   activeTab:string = 'explore';
   likedPosts: number[] = [];
   likedPosts: number[] = [];
@@ -21,7 +21,8 @@ export class Tab3Page {
     
     
   }
   }
   openSettingsPage() {
   openSettingsPage() {
-    // 打开设置页面
+    // 打开设置页面 
+    this.router.navigate(['/settings']);
   }
   }
   // navigateToPage(page: string) {
   // navigateToPage(page: string) {
   //   this.router.navigate([`/tabs/${page}`]);
   //   this.router.navigate([`/tabs/${page}`]);

+ 0 - 0
src/app/tab4/assets/avatar.jpg