0225263 пре 4 месеци
родитељ
комит
2bd5499ec9

+ 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"

+ 21 - 6
src/app/app-routing.module.ts

@@ -22,13 +22,28 @@ const routes: Routes = [
   },
   // {
   //   path: 'login',
-  //   loadChildren: () => import('../modules/user/login/login.module').then( m => m.LoginPageModule)
+  //   loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
   // },
-    // 添加:
-    {
-      path: 'user',
-      loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
-    }
+  {
+    path: 'edit-profile',
+    loadChildren: () => import('./edit-profile/edit-profile.module').then( m => m.EditProfilePageModule)
+  },
+  {
+    path: 'notification-settings',
+    loadChildren: () => import('./notification-settings/notification-settings.module').then( m => m.NotificationSettingsPageModule)
+  },
+  {
+    path: 'privacy',
+    loadChildren: () => import('./privacy/privacy.module').then( m => m.PrivacyPageModule)
+  },
+    // 添加:
+    {
+      path: 'user',
+      loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
+    }
+
+  
+
 ];
 @NgModule({
   imports: [

+ 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() {

+ 15 - 1
src/app/tab1/tab1.page.html

@@ -106,7 +106,7 @@
   <div *ngIf="selectedSegment === 'explore'">
     <!-- 装修锦囊块 -->
     <ion-card class="card__content">
-      <ion-card-header class="card-title">
+      <ion-card-header class="price">
         装修锦囊
       </ion-card-header>
       <ion-card-content>
@@ -339,6 +339,20 @@
   <!-- 案例设计页 -->
   <div *ngIf="selectedSegment === 'case'">
     <!-- 案例设计内容 -->
+    <div class="carousel-container">
+      <div class="carousel">
+          <div class="card0">Card 1</div>
+          <div class="card0">Card 2</div>
+          <div class="card0">Card 3</div>
+          <div class="card0">Card 4</div>
+          <div class="card0">Card 5</div>
+          <div class="card0">Card 6</div>
+          <div class="card0">Card 7</div>
+          <div class="card0">Card 8</div>
+          <div class="card0">Card 9</div>
+          <div class="card0">Card 10</div>
+      </div>
+  </div>
     <img src="example2.jpg" alt="Example 1">
   </div>
 

+ 32 - 15
src/app/tab1/tab1.page.scss

@@ -1,10 +1,3 @@
-// ion-card {
-//   margin: 10px;
-//   padding: 15px;
-//   border-radius: 10px;
-//   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
-// }
-
 ion-card-header {
   ion-card-title {
     font-size: 2.4em;
@@ -281,14 +274,38 @@ p {
   box-shadow: 0px 0px 30px 1px rgba(0, 255, 117, 0.30);
  }
 
- .header {
+
+.price {
+  font-size: 2em;
+  font-weight: 600;
+  line-height: 2rem;
+  color: rgb(7, 7, 7)
+}
+
+.carousel-container {
+  width: 100%;
+  overflow: hidden;
+}
+
+.carousel {
   display: flex;
-  flex-direction: column;
+  overflow-x: auto;
+  scroll-behavior: smooth;
+  scrollbar-width: none; /* 隐藏滚动条 Firefox */
+  -ms-overflow-style: none; /* 隐藏滚动条 IE/Edge */
+}
+
+.carousel::-webkit-scrollbar {
+  display: none; /* 隐藏滚动条 Chrome/Safari */
+}
+
+.card0 {
+  flex: 0 0 auto;
+  width: 200px;
+  height: 200px;
+  margin-right: 10px;
+  background-color: #f9f9f9;
+  border-radius: 5px;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 }
 
-.price {
-  font-size: 3.75rem;
-  line-height: 1;
-  font-weight: 700;
-  color: #fff
-}

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

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