1
0

2 Коміти 13776a5caf ... e0d5f6c59c

Автор SHA1 Опис Дата
  0225268 e0d5f6c59c Merge branch 'master' of http://git.fmode.cn:3000/0225273/APPmy 4 місяців тому
  0225268 9115e2ebaf tab3 4 місяців тому

+ 9 - 9
package-lock.json

@@ -23,7 +23,7 @@
         "@capacitor/status-bar": "6.0.0",
         "@ionic/angular": "^8.0.0",
         "ionicons": "^7.0.0",
-        "parse": "^5.2.0",
+        "parse": "^5.3.0",
         "rxjs": "~7.8.0",
         "tslib": "^2.3.0",
         "zone.js": "~0.14.2"
@@ -2525,9 +2525,9 @@
       }
     },
     "node_modules/@babel/runtime-corejs3": {
-      "version": "7.24.6",
-      "resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.24.6.tgz",
-      "integrity": "sha512-tbC3o8uHK9xMgMsvUm9qGqxVpbv6yborMBLbDteHIc7JDNHsTV0vDMQ5j1O1NXvO+BDELtL9KgoWYaUVIVGt8w==",
+      "version": "7.24.7",
+      "resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
+      "integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
       "dependencies": {
         "core-js-pure": "^3.30.2",
         "regenerator-runtime": "^0.14.0"
@@ -13427,11 +13427,11 @@
       }
     },
     "node_modules/parse": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmmirror.com/parse/-/parse-5.2.0.tgz",
-      "integrity": "sha512-FoD3kcLAQCw/2J1984sl3GUBzbHE2tA9mUcyw/EBWZ46WVZTzV+kjnA5tttXyzN4uodt21wSluzjbGnyLqreKw==",
+      "version": "5.3.0",
+      "resolved": "https://registry.npmmirror.com/parse/-/parse-5.3.0.tgz",
+      "integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
       "dependencies": {
-        "@babel/runtime-corejs3": "7.24.6",
+        "@babel/runtime-corejs3": "7.24.7",
         "idb-keyval": "6.2.1",
         "react-native-crypto-js": "1.0.0",
         "uuid": "10.0.0",
@@ -13439,7 +13439,7 @@
         "xmlhttprequest": "1.8.0"
       },
       "engines": {
-        "node": ">=18 <21"
+        "node": "18 || 19 || 20 || 22"
       },
       "optionalDependencies": {
         "crypto-js": "4.2.0"

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
     "@capacitor/status-bar": "6.0.0",
     "@ionic/angular": "^8.0.0",
     "ionicons": "^7.0.0",
-    "parse": "^5.2.0",
+    "parse": "^5.3.0",
     "rxjs": "~7.8.0",
     "tslib": "^2.3.0",
     "zone.js": "~0.14.2"

+ 40 - 28
src/app/app-routing.module.ts

@@ -1,34 +1,46 @@
-import { NgModule } from '@angular/core';
-import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
-
-const routes: Routes = [
-  {
-    path: '',
-    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
-  },
-  {
-    path: 'tab4',
-    loadChildren: () => import('./tab4/tab4.module').then( m => m.Tab4PageModule)
+import { NgModule } from '@angular/core';
+import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
+
+const routes: Routes = [
+  {
+    path: '',
+    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
+  },
+  {
+    path: 'tab4',
+    loadChildren: () => import('./tab4/tab4.module').then( m => m.Tab4PageModule)
+  },
+  {
+    path: 'feedback',
+    loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
+  },
+  {
+    path: 'settings',
+    loadChildren: () => import('./settings/settings.module').then( m => m.SettingsPageModule)
+  },
+  {
+    path: 'login',
+    loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
+  },
  {
+    path: 'edit-profile',
+    loadChildren: () => import('./edit-profile/edit-profile.module').then( m => m.EditProfilePageModule)
   },
   {
-    path: 'feedback',
-    loadChildren: () => import('./feedback/feedback.module').then( m => m.FeedbackPageModule)
+    path: 'notification-settings',
+    loadChildren: () => import('./notification-settings/notification-settings.module').then( m => m.NotificationSettingsPageModule)
   },
   {
-    path: 'settings',
-    loadChildren: () => import('./settings/settings.module').then( m => m.SettingsPageModule)
+    path: 'privacy',
+    loadChildren: () => import('./privacy/privacy.module').then( m => m.PrivacyPageModule)
   },
-  {
-    path: 'login',
-    loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
-  }
-
 
-];
-@NgModule({
-  imports: [
-    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
-  ],
-  exports: [RouterModule]
-})
-export class AppRoutingModule {}
+  
+
+];
+@NgModule({
+  imports: [
+    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
+  ],
+  exports: [RouterModule]
+})
+export class AppRoutingModule {}

+ 17 - 0
src/app/edit-profile/edit-profile-routing.module.ts

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

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

+ 29 - 0
src/app/edit-profile/edit-profile.page.html

@@ -0,0 +1,29 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-back-button slot="start" defaultHref="/settings"></ion-back-button>
+    <ion-title>个人信息设置</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-list>
+    <ion-item>
+      <ion-label position="floating">用户名</ion-label>
+      <ion-input type="text" [(ngModel)]="username"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label>头像</ion-label>
+      <ion-avatar slot="end">
+        <img [src]="avatarUrl" />
+      </ion-avatar>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="floating">个人简介</ion-label>
+      <ion-textarea [(ngModel)]="bio"></ion-textarea>
+    </ion-item>
+
+    <ion-button expand="block" (click)="saveChanges()">保存</ion-button>
+  </ion-list>
+</ion-content>

+ 8 - 0
src/app/edit-profile/edit-profile.page.scss

@@ -0,0 +1,8 @@
+ion-avatar {
+    width: 50px;
+    height: 50px;
+  }
+  
+  ion-textarea {
+    min-height: 100px;
+  }

+ 17 - 0
src/app/edit-profile/edit-profile.page.spec.ts

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

+ 23 - 0
src/app/edit-profile/edit-profile.page.ts

@@ -0,0 +1,23 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-edit-profile',
+  templateUrl: './edit-profile.page.html',
+  styleUrls: ['./edit-profile.page.scss'],
+})
+export class EditProfilePage implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+  username: string = 'JohnDoe';
+  avatarUrl: string = 'assets/avatar.jpg';
+  bio: string = 'Hello, I am a user of this app.';
+
+  saveChanges() {
+    // 在这里处理保存用户编辑后的个人信息逻辑
+    console.log('用户名:', this.username);
+    console.log('个人简介:', this.bio);
+  }
+}

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

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

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

+ 32 - 0
src/app/notification-settings/notification-settings.page.html

@@ -0,0 +1,32 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-back-button slot="start" defaultHref="/settings"></ion-back-button>
+    <ion-title>通知设置</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-list>
+    <ion-item>
+      <ion-label>消息通知</ion-label>
+      <ion-toggle slot="end"></ion-toggle>
+    </ion-item>
+
+    <ion-item>
+      <ion-label>评论通知</ion-label>
+      <ion-toggle slot="end"></ion-toggle>
+    </ion-item>
+
+    <ion-item>
+      <ion-label>点赞通知</ion-label>
+      <ion-toggle slot="end"></ion-toggle>
+    </ion-item>
+
+    <ion-item>
+      <ion-label>关注通知</ion-label>
+      <ion-toggle slot="end"></ion-toggle>
+    </ion-item>
+  </ion-list>
+
+  <ion-button expand="block" (click)="saveSettings()">保存设置</ion-button>
+</ion-content>

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


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

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

+ 18 - 0
src/app/notification-settings/notification-settings.page.ts

@@ -0,0 +1,18 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-notification-settings',
+  templateUrl: './notification-settings.page.html',
+  styleUrls: ['./notification-settings.page.scss'],
+})
+export class NotificationSettingsPage implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+  saveSettings() {
+    // 在这里处理保存通知设置的逻辑
+    console.log('保存通知设置');
+  }
+}

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

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

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

+ 50 - 0
src/app/privacy/privacy.page.html

@@ -0,0 +1,50 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-back-button slot="start" defaultHref="/settings"></ion-back-button>
+    <ion-title>隐私设置</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-list>
+    <ion-item>
+      <ion-icon slot="start" name="person-circle-outline"></ion-icon>
+      <ion-label>个人资料隐私设置</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="videocam-outline"></ion-icon>
+      <ion-label>视频隐私设置</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="chatbubble-ellipses-outline"></ion-icon>
+      <ion-label>评论和互动设置</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="lock-closed-outline"></ion-icon>
+      <ion-label>账号安全设置</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="document-text-outline"></ion-icon>
+      <ion-label>隐私政策和条款</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="share-social-outline"></ion-icon>
+      <ion-label>数据分享设置</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="notifications-outline"></ion-icon>
+      <ion-label>通知设置</ion-label>
+    </ion-item>
+
+    <ion-item>
+      <ion-icon slot="start" name="shield-checkmark-outline"></ion-icon>
+      <ion-label>隐私与安全建议</ion-label>
+    </ion-item>
+  </ion-list>
+</ion-content>

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

@@ -0,0 +1,5 @@
+ion-item {
+    ion-icon {
+      color: var(--ion-color-primary);
+    }
+  }

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

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

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

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

+ 5 - 1
src/app/settings/settings.page.ts

@@ -1,5 +1,6 @@
 import { Component, OnInit } from '@angular/core';
 import { NavController } from '@ionic/angular';
+import { Router } from '@angular/router';
 @Component({
   selector: 'app-settings',
   templateUrl: './settings.page.html',
@@ -7,19 +8,22 @@ import { NavController } from '@ionic/angular';
 })
 export class SettingsPage implements OnInit {
 
-  constructor(private navCtrl: NavController) { }
+  constructor(private navCtrl: NavController,private router: Router) { }
   ngOnInit() {
   }
    editProfile() {
     // 编辑个人信息
+    this.router.navigate(['/edit-profile']);
   }
 
   selectNotification() {
     // 选择通知设置
+    this.router.navigate(['/notification-settings']);
   }
 
   managePrivacy() {
     // 管理隐私设置
+    this.router.navigate(['/privacy']);
   }
 
   selectTheme() {