Ver Fonte

改版备忘录和ai对话,未接入ai

未来全栈 há 5 meses atrás
pai
commit
0473809cac
95 ficheiros alterados com 379 adições e 2115 exclusões
  1. 0 29
      app/app-routing.module.ts
  2. 0 3
      app/app.component.html
  3. 0 0
      app/app.component.scss
  4. 0 21
      app/app.component.spec.ts
  5. 0 15
      app/app.component.ts
  6. 0 29
      app/app.module.ts
  7. 0 17
      app/calendar/calendar-routing.module.ts
  8. 0 20
      app/calendar/calendar.module.ts
  9. 0 13
      app/calendar/calendar.page.html
  10. 0 0
      app/calendar/calendar.page.scss
  11. 0 17
      app/calendar/calendar.page.spec.ts
  12. 0 15
      app/calendar/calendar.page.ts
  13. 0 4
      app/explore-container/explore-container.component.html
  14. 0 27
      app/explore-container/explore-container.component.scss
  15. 0 24
      app/explore-container/explore-container.component.spec.ts
  16. 0 12
      app/explore-container/explore-container.component.ts
  17. 0 14
      app/explore-container/explore-container.module.ts
  18. 0 16
      app/tab1/tab1-routing.module.ts
  19. 0 20
      app/tab1/tab1.module.ts
  20. 0 107
      app/tab1/tab1.page.html
  21. 0 138
      app/tab1/tab1.page.scss
  22. 0 27
      app/tab1/tab1.page.spec.ts
  23. 0 32
      app/tab1/tab1.page.ts
  24. 0 16
      app/tab2/tab2-routing.module.ts
  25. 0 27
      app/tab2/tab2.module.ts
  26. 0 44
      app/tab2/tab2.page.html
  27. 0 25
      app/tab2/tab2.page.scss
  28. 0 26
      app/tab2/tab2.page.spec.ts
  29. 0 32
      app/tab2/tab2.page.ts
  30. 0 16
      app/tab3/tab3-routing.module.ts
  31. 0 20
      app/tab3/tab3.module.ts
  32. 0 84
      app/tab3/tab3.page.html
  33. 0 21
      app/tab3/tab3.page.scss
  34. 0 26
      app/tab3/tab3.page.spec.ts
  35. 0 35
      app/tab3/tab3.page.ts
  36. 0 47
      app/tabs/tabs-routing.module.ts
  37. 0 19
      app/tabs/tabs.module.ts
  38. 0 23
      app/tabs/tabs.page.html
  39. 0 1
      app/tabs/tabs.page.scss
  40. 0 26
      app/tabs/tabs.page.spec.ts
  41. 0 24
      app/tabs/tabs.page.ts
  42. BIN
      assets/icon/favicon.png
  43. BIN
      assets/img/head.jpg
  44. 0 1
      assets/shapes.svg
  45. 0 3
      environments/environment.prod.ts
  46. 0 16
      environments/environment.ts
  47. 0 10
      modules/tab/tab-routing.module.ts
  48. 0 14
      modules/tab/tab.module.ts
  49. 0 17
      modules/tab/tree/tree-routing.module.ts
  50. 0 20
      modules/tab/tree/tree.module.ts
  51. 0 61
      modules/tab/tree/tree.page.html
  52. 0 81
      modules/tab/tree/tree.page.scss
  53. 0 25
      modules/tab/tree/tree.page.spec.ts
  54. 0 12
      modules/tab/tree/tree.page.ts
  55. 0 17
      modules/user/edit-info/edit-info-routing.module.ts
  56. 0 20
      modules/user/edit-info/edit-info.module.ts
  57. 0 47
      modules/user/edit-info/edit-info.page.html
  58. 0 0
      modules/user/edit-info/edit-info.page.scss
  59. 0 17
      modules/user/edit-info/edit-info.page.spec.ts
  60. 0 56
      modules/user/edit-info/edit-info.page.ts
  61. 0 17
      modules/user/login/login-routing.module.ts
  62. 0 20
      modules/user/login/login.module.ts
  63. 0 39
      modules/user/login/login.page.html
  64. 0 31
      modules/user/login/login.page.scss
  65. 0 17
      modules/user/login/login.page.spec.ts
  66. 0 86
      modules/user/login/login.page.ts
  67. 0 17
      modules/user/mine/mine-routing.module.ts
  68. 0 20
      modules/user/mine/mine.module.ts
  69. 0 16
      modules/user/mine/mine.page.html
  70. 0 27
      modules/user/mine/mine.page.scss
  71. 0 17
      modules/user/mine/mine.page.spec.ts
  72. 0 28
      modules/user/mine/mine.page.ts
  73. 0 14
      modules/user/user-routing.module.ts
  74. 0 14
      modules/user/user.module.ts
  75. 6 0
      src/app/app-routing.module.ts
  76. 11 6
      src/app/tab1/tab1.page.html
  77. 22 5
      src/app/tab1/tab1.page.scss
  78. 8 1
      src/app/tab1/tab1.page.ts
  79. 1 0
      src/app/tab2/tab2-routing.module.ts
  80. 36 33
      src/app/tab2/tab2.page.html
  81. 9 25
      src/app/tab2/tab2.page.scss
  82. 85 19
      src/app/tab2/tab2.page.ts
  83. 7 2
      src/app/tab3/tab3.page.html
  84. 18 4
      src/app/tab3/tab3.page.ts
  85. 4 0
      src/app/tabs/tabs-routing.module.ts
  86. 2 7
      src/app/tabs/tabs.page.html
  87. 13 1
      src/app/tabs/tabs.page.ts
  88. 0 0
      src/assets/img/tree.png
  89. 0 0
      src/assets/img/zilv.jpg
  90. 37 36
      src/modules/user/login/login.page.html
  91. 31 0
      src/modules/user/login/login.page.scss
  92. 49 56
      src/modules/user/login/login.page.ts
  93. 13 26
      src/modules/user/mine/mine.page.html
  94. 27 0
      src/modules/user/mine/mine.page.scss
  95. 0 2
      theme/variables.scss

+ 0 - 29
app/app-routing.module.ts

@@ -1,29 +0,0 @@
-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: 'calendar',
-    loadChildren: () => import('./calendar/calendar.module').then( m => m.CalendarPageModule)
-  },
-
-  {
-    path: 'user',
-    loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
-  },
-  {
-    path: "tree",
-    loadChildren: () => import('../modules/tab/tree/tree.module').then(m => m.TreePageModule)
-  },
-];
-@NgModule({
-  imports: [
-    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
-  ],
-  exports: [RouterModule]
-})
-export class AppRoutingModule {}

+ 0 - 3
app/app.component.html

@@ -1,3 +0,0 @@
-<ion-app>
-  <ion-router-outlet></ion-router-outlet>
-</ion-app>

+ 0 - 0
app/app.component.scss


+ 0 - 21
app/app.component.spec.ts

@@ -1,21 +0,0 @@
-import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
-import { TestBed } from '@angular/core/testing';
-
-import { AppComponent } from './app.component';
-
-describe('AppComponent', () => {
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [AppComponent],
-      schemas: [CUSTOM_ELEMENTS_SCHEMA],
-    }).compileComponents();
-  });
-
-  it('should create the app', () => {
-    const fixture = TestBed.createComponent(AppComponent);
-    const app = fixture.componentInstance;
-    expect(app).toBeTruthy();
-  });
-
-});

+ 0 - 15
app/app.component.ts

@@ -1,15 +0,0 @@
-import { Component } from '@angular/core';
-
-// 根组件顶部引用并初始化Parse服务
-import * as Parse from "parse";
-Parse.initialize("dev");
-(Parse as any).serverURL = 'http://web2023.fmode.cn:9999/parse'
-
-@Component({
-  selector: 'app-root',
-  templateUrl: 'app.component.html',
-  styleUrls: ['app.component.scss'],
-})
-export class AppComponent {
-  constructor() {}
-}

+ 0 - 29
app/app.module.ts

@@ -1,29 +0,0 @@
-import { NgModule } from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser';
-import { RouteReuseStrategy } from '@angular/router';
-
-import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
-
-import { AppRoutingModule } from './app-routing.module';
-import { AppComponent } from './app.component';
-import { FormsModule } from '@angular/forms';
-import { CalendarModule, DateAdapter } from 'angular-calendar';
-import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
-
-
-@NgModule({
-  declarations: [AppComponent],
-  imports: [
-    BrowserModule,
-    IonicModule.forRoot(),
-    AppRoutingModule,
-    FormsModule,
-    CalendarModule.forRoot({
-      provide: DateAdapter,
-      useFactory: adapterFactory,
-    }),
-  ],
-  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
-  bootstrap: [AppComponent],
-})
-export class AppModule {}

+ 0 - 17
app/calendar/calendar-routing.module.ts

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

+ 0 - 20
app/calendar/calendar.module.ts

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

+ 0 - 13
app/calendar/calendar.page.html

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

+ 0 - 0
app/calendar/calendar.page.scss


+ 0 - 17
app/calendar/calendar.page.spec.ts

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

+ 0 - 15
app/calendar/calendar.page.ts

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

+ 0 - 4
app/explore-container/explore-container.component.html

@@ -1,4 +0,0 @@
-<div id="container">
-  <strong>{{ name }}</strong>
-  <p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
-</div>

+ 0 - 27
app/explore-container/explore-container.component.scss

@@ -1,27 +0,0 @@
-#container {
-  text-align: center;
-
-  position: absolute;
-  left: 0;
-  right: 0;
-  top: 50%;
-  transform: translateY(-50%);
-}
-
-#container strong {
-  font-size: 20px;
-  line-height: 26px;
-}
-
-#container p {
-  font-size: 16px;
-  line-height: 22px;
-
-  color: #8c8c8c;
-
-  margin: 0;
-}
-
-#container a {
-  text-decoration: none;
-}

+ 0 - 24
app/explore-container/explore-container.component.spec.ts

@@ -1,24 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { ExploreContainerComponent } from './explore-container.component';
-
-describe('ExploreContainerComponent', () => {
-  let component: ExploreContainerComponent;
-  let fixture: ComponentFixture<ExploreContainerComponent>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [ExploreContainerComponent],
-      imports: [IonicModule.forRoot()]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(ExploreContainerComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 12
app/explore-container/explore-container.component.ts

@@ -1,12 +0,0 @@
-import { Component, Input } from '@angular/core';
-
-@Component({
-  selector: 'app-explore-container',
-  templateUrl: './explore-container.component.html',
-  styleUrls: ['./explore-container.component.scss'],
-})
-export class ExploreContainerComponent {
-
-  @Input() name?: string;
-
-}

+ 0 - 14
app/explore-container/explore-container.module.ts

@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-
-import { IonicModule } from '@ionic/angular';
-
-import { ExploreContainerComponent } from './explore-container.component';
-
-@NgModule({
-  imports: [ CommonModule, FormsModule, IonicModule],
-  declarations: [ExploreContainerComponent],
-  exports: [ExploreContainerComponent]
-})
-export class ExploreContainerComponentModule {}

+ 0 - 16
app/tab1/tab1-routing.module.ts

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

+ 0 - 20
app/tab1/tab1.module.ts

@@ -1,20 +0,0 @@
-import { IonicModule } from '@ionic/angular';
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-import { Tab1Page } from './tab1.page';
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
-
-import { Tab1PageRoutingModule } from './tab1-routing.module';
-
-@NgModule({
-  imports: [
-    IonicModule,
-    CommonModule,
-    FormsModule,
-    ExploreContainerComponentModule,
-    Tab1PageRoutingModule
-  ],
-  declarations: [Tab1Page]
-})
-export class Tab1PageModule {}

+ 0 - 107
app/tab1/tab1.page.html

@@ -1,107 +0,0 @@
-<ion-header [translucent]="true">
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-searchbar placeholder="搜索"></ion-searchbar>
-    </ion-toolbar>
-  </ion-header>
-    
-  <!-- 方框 -->
-  <ion-card (click)="openModal()">
-    <ion-card-content>
-      <ion-grid>
-        <ion-row>
-          <ion-col size="3">
-            <div class="info-box">初始</div>
-            <div class="info-value">--KG</div>
-          </ion-col>
-          <ion-col size="3">
-            <div class="info-box">当前</div>
-            <div class="info-value">--KG</div>
-          </ion-col>
-          <ion-col size="3">
-            <div class="info-box">目标</div>
-            <div class="info-value">--KG</div>
-          </ion-col>
-          <ion-col size="3">
-            <div class="info-box">赏金</div>
-            <div class="info-value">--元</div>
-          </ion-col>
-        </ion-row>
-      </ion-grid>
-    </ion-card-content>
-  </ion-card>
-  
-<!-- 3D效果的圆 -->
-<div class="wave-container" (click)="navigateToTreePage()">
-  <div class="wave-circle">
-    <div class="wave">
-      <div class="wave-inner">
-        <span class="start-self-discipline">开始自律</span>
-      </div>
-    </div>
-  </div>
-</div>
-
-
-
-
-  <!-- 每日小习惯 -->
-  <div class="daily-habit">
-    <div class="daily-habit-line"></div>
-    <div class="daily-habit-text">每日小习惯</div>
-  </div>
-
-  
-   <!-- 大方框 -->
-  <ion-card>
-    <ion-card-content>
-      <ion-grid>
-        <ion-row>
-          <ion-col size="3">
-            <button class="habit-button" (click)="toggleButtonColor('运动')">
-              <ion-icon name="dumbbell"></ion-icon>
-              <div class="habit-label">运动</div>
-            </button>
-          </ion-col>
-          <ion-col size="3">
-            <ion-button shape="round" class="habit-button" (click)="toggleButtonColor('少吃')">
-              <ion-icon name="nutrition"></ion-icon>
-              <div>少吃</div>
-            </ion-button>
-          </ion-col>
-          <ion-col size="3">
-            <ion-button shape="round" class="habit-button" (click)="toggleButtonColor('喝水')">
-              <ion-icon name="water"></ion-icon>
-              <div>喝水</div>
-            </ion-button>
-          </ion-col>
-          <ion-col size="3">
-            <ion-button shape="round" class="habit-button" (click)="toggleButtonColor('吃蔬菜')">
-              <ion-icon name="leaf"></ion-icon>
-              <div>吃蔬菜</div>
-            </ion-button>
-          </ion-col>
-        </ion-row>
-        <ion-row>
-          <ion-col size="3">
-            <ion-button shape="round" class="habit-button" (click)="toggleButtonColor('水果')">
-              <ion-icon name="apple"></ion-icon>
-              <div>水果</div>
-            </ion-button>
-          </ion-col>
-          <ion-col size="3">
-            <ion-button shape="round" class="habit-button" (click)="toggleButtonColor('经常站立')">
-              <ion-icon name="walk"></ion-icon>
-              <div>经常站立</div>
-            </ion-button>
-          </ion-col>
-        </ion-row>
-      </ion-grid>
-    </ion-card-content>
-  </ion-card>
-</ion-content>
-  
-

+ 0 - 138
app/tab1/tab1.page.scss

@@ -1,138 +0,0 @@
-ion-searchbar {
-  --background: #f4f4f4;
-  margin: 10px;
-  border-radius: 10px;
-}
-
-.info-box {
-  text-align: center;
-  font-weight: bold;
-}
-
-.info-value {
-  text-align: center;
-  margin-top: 10px;
-  font-size: 1.2em;
-  color: #888;
-}
-
-.wave-container {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 200px;
-  position: relative;
-  margin: 20px 0;
-}
-
-.wave-circle {
-  width: 150px;
-  height: 150px;
-  background: radial-gradient(circle at 50% 50%, #6ec1e4, #378ab7);
-  border-radius: 50%;
-  position: relative;
-  overflow: hidden;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
-}
-
-.wave {
-  position: absolute;
-  width: 200%;
-  height: 200%;
-  top: -75%;
-  left: -50%;
-  background: rgba(255, 255, 255, 0.4);
-  border-radius: 50%;
-  animation: wave 4s infinite linear;
-}
-
-.wave-inner {
-  width: 120px;
-  height: 120px;
-  background-color: #3f51b5;
-  border-radius: 50%;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  cursor: pointer;
-  transition: transform 0.3s ease-in-out;
-  color: #ffffff;
-  font-size: 1.2rem;
-  font-weight: bold;
-  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
-}
-
-/* @keyframes wave {
-  0% {
-    transform: translateX(-50%) translateY(-50%) rotate(0deg);
-  }
-  100% {
-    transform: translateX(-50%) translateY(-50%) rotate(360deg);
-  }
-} */
-
-
-// 每日小习惯
-.daily-habit {
-  display: flex;
-  align-items: center;
-  margin: 20px 0;
-}
-
-.daily-habit-line {
-  width: 5px;
-  height: 20px;
-  background-color: green;
-  margin-right: 10px;
-}
-
-.daily-habit-text {
-  font-size: 1.2em;
-  color: #666;
-}
-
-.habit-button {
-  width: 60px;
-  height: 60px;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  font-size: 0.8em;
-  margin: 10px 0;
-  background-color: #fff;
-  border: 2px solid #000;
-  border-radius: 50%;
-  transition: background-color 0.3s;
-}
-
-.habit-button ion-icon {
-  font-size: 1.5em;
-}
-
-.habit-label {
-  text-align: center;
-  font-size: 0.8em;
-  color: #666;
-  margin-top: 5px;
-}
-
-.habit-button.blue {
-  background-color: #007bff; /* 蓝色背景 */
-}
-
-.habit-button.white {
-  background-color: #fff; /* 白色背景 */
-}
-
-// .habit-button div {
-//   font-size: 0.8em;
-//   margin-top: 5px;
-// }
-
-.habit-button:active {
-  transform: scale(0.9);
-  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
-}

+ 0 - 27
app/tab1/tab1.page.spec.ts

@@ -1,27 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
-import { Tab1Page } from './tab1.page';
-import{Component}from'@angular/core';
-
-
-
-describe('Tab1Page', () => {
-  let component: Tab1Page;
-  let fixture: ComponentFixture<Tab1Page>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [Tab1Page],
-      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(Tab1Page);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 32
app/tab1/tab1.page.ts

@@ -1,32 +0,0 @@
-import { Component } from '@angular/core';
-import { AlertController } from '@ionic/angular';
-import { Router } from '@angular/router';
-
-@Component({
-  selector: 'app-tab1',
-  templateUrl: 'tab1.page.html',
-  styleUrls: ['tab1.page.scss']
-})
-export class Tab1Page {
-
-  constructor(private alertController: AlertController,private router: Router) {}
-
-  async openModal() {
-    const alert = await this.alertController.create({
-      header: '提示',
-      message: '弹窗了',
-      buttons: ['确定']
-    });
-    await alert.present();
-  }
-  blueColor:boolean=false;
-  toggleButtonColor(habit:string){
-    this.blueColor=!this.blueColor;
-  }
-
-  //3d圆点击事件
-  navigateToTreePage() {
-    this.router.navigate(['/tabs/tree']);
-  }
-}
-

+ 0 - 16
app/tab2/tab2-routing.module.ts

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

+ 0 - 27
app/tab2/tab2.module.ts

@@ -1,27 +0,0 @@
-import { IonicModule } from '@ionic/angular';
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-import { Tab2Page } from './tab2.page';
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
-
-import { Tab2PageRoutingModule } from './tab2-routing.module';
-
-import { CalendarModule, DateAdapter } from 'angular-calendar';
-import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
-
-@NgModule({
-  imports: [
-    IonicModule,
-    CommonModule,
-    FormsModule,
-    ExploreContainerComponentModule,
-    Tab2PageRoutingModule,
-    CalendarModule.forRoot({
-      provide: DateAdapter,
-      useFactory: adapterFactory,
-    }),
-  ],
-  declarations: [Tab2Page]
-})
-export class Tab2PageModule {}

+ 0 - 44
app/tab2/tab2.page.html

@@ -1,44 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <ion-title>备忘录</ion-title>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content>
-  <!-- 搜索框 -->
-  <ion-item>
-    <ion-label position="floating">搜索备忘录</ion-label>
-    <ion-input [(ngModel)]="searchQuery"></ion-input>
-  </ion-item>
-
-  <!-- 备忘录输入 -->
-  <ion-item>
-    <ion-label position="floating">备忘录内容</ion-label>
-    <ion-input [(ngModel)]="memoContent"></ion-input>
-  </ion-item>
-  <ion-button expand="full" (click)="addMemo()">添加备忘录</ion-button>
-
-  <!-- 备忘录列表 -->
-  <ion-list>
-    <ion-item *ngFor="let memo of filteredMemos()">
-      {{ memo }}
-    </ion-item>
-  </ion-list>
-
-  <!-- 日历 -->
-  <!-- 日历 -->
-  <ion-card>
-    <ion-card-header>
-      <ion-card-title>日历</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <div class="calendar-container">
-        <mwl-calendar-month-view
-          [viewDate]="viewDate"
-          [events]="events"
-          (dayClicked)="dayClicked($event.day)">
-        </mwl-calendar-month-view>
-      </div>
-    </ion-card-content>
-  </ion-card>
-</ion-content>

+ 0 - 25
app/tab2/tab2.page.scss

@@ -1,25 +0,0 @@
-ion-card {
-      margin: 20px 0;
-    }
-    
-ion-item {
-      margin: 10px 0;
-    }
-    
-ion-button {
-      margin: 20px 0;
-    }
-.calendar-container {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      width: 100%;
-      overflow-x: auto;
-      padding: 20px 0;
-    }
-    
-::ng-deep mwl-calendar-month-view {
-      width: 100%;
-      max-width: 100%;
-    }
-    

+ 0 - 26
app/tab2/tab2.page.spec.ts

@@ -1,26 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
-
-import { Tab2Page } from './tab2.page';
-
-describe('Tab2Page', () => {
-  let component: Tab2Page;
-  let fixture: ComponentFixture<Tab2Page>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [Tab2Page],
-      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(Tab2Page);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 32
app/tab2/tab2.page.ts

@@ -1,32 +0,0 @@
-import { Component } from '@angular/core';
-import { CalendarEvent } from 'angular-calendar';
-@Component({
-  selector: 'app-tab2',
-  templateUrl: 'tab2.page.html',
-  styleUrls: ['tab2.page.scss']
-})
-
-export class Tab2Page {
-  memoContent: string = '';
-  searchQuery: string = '';
-  memos: string[] = [];
-  viewDate: Date = new Date();
-  events: CalendarEvent[] = [];
-
-  constructor() {}
-
-  addMemo() {
-    if (this.memoContent.trim() !== '') {
-      this.memos.push(this.memoContent);
-      this.memoContent = '';
-    }
-  }
-
-  filteredMemos() {
-    return this.memos.filter((memo) => memo.includes(this.searchQuery));
-  }
-
-  dayClicked(day: any) {
-    console.log('Day clicked:', day);
-  }
-}

+ 0 - 16
app/tab3/tab3-routing.module.ts

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

+ 0 - 20
app/tab3/tab3.module.ts

@@ -1,20 +0,0 @@
-import { IonicModule } from '@ionic/angular';
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-import { Tab3Page } from './tab3.page';
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
-
-import { Tab3PageRoutingModule } from './tab3-routing.module';
-
-@NgModule({
-  imports: [
-    IonicModule,
-    CommonModule,
-    FormsModule,
-    ExploreContainerComponentModule,
-    Tab3PageRoutingModule
-  ],
-  declarations: [Tab3Page]
-})
-export class Tab3PageModule {}

+ 0 - 84
app/tab3/tab3.page.html

@@ -1,84 +0,0 @@
-<ion-header [translucent]="true">
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <!-- <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">Tab 3</ion-title>
-    </ion-toolbar>
-  </ion-header> -->
-  
-  <!-- 个人信息板块 -->
-  <ion-card>
-    <ion-card-header>
-      <ion-avatar>
-        <img src="assets/img/head.jpg" class="avatar-img">
-      </ion-avatar>
-      <ion-card-title>昵称:鱼聪明</ion-card-title>
-      <ion-card-subtitle>个性签名:坚持不懈,直到成功</ion-card-subtitle>
-    </ion-card-header>
-
-    <ion-card-content>
-      <ion-grid>
-        <ion-row>
-          <ion-col size="6">
-            打卡天数: 天
-          </ion-col>
-          <ion-col size="6">
-            累计减重: kg
-          </ion-col>
-        </ion-row>
-        <ion-row>
-          <ion-col size="6">
-            当前赏金: 元
-          </ion-col>
-          <ion-col size="6">
-            BMI指数:
-          </ion-col>
-        </ion-row>
-      </ion-grid>
-    </ion-card-content>
-  </ion-card>
-
-  <!-- 功能菜单 -->
-  <ion-list>
-    <ion-item button (click)="onItemClick('我的目标')">
-      <ion-icon name="body" slot="start"></ion-icon>
-      我的目标
-    </ion-item>
-    <ion-item button (click)="onItemClick('减肥搭子')">
-      <ion-icon name="people" slot="start"></ion-icon>
-      减肥搭子
-    </ion-item>
-    <ion-item button (click)="onItemClick('赏金商店')">
-      <ion-icon name="cash" slot="start"></ion-icon>
-      赏金商店
-    </ion-item>
-    <ion-item button (click)="onItemClick('我的账户')">
-      <ion-icon name="person" slot="start"></ion-icon>
-      我的账户
-    </ion-item>
-    <ion-item button (click)="onItemClick('背景设置')">
-      <ion-icon name="settings" slot="start"></ion-icon>
-      背景设置
-    </ion-item>
-    <ion-item button (click)="onItemClick('操作手册')">
-      <ion-icon name="book" slot="start"></ion-icon>
-      操作手册
-    </ion-item>
-    <ion-item button (click)="onItemClick('数据备份')">
-      <ion-icon name="cloud-download" slot="start"></ion-icon>
-      数据备份
-    </ion-item>
-    <ion-item button (click)="onItemClick('数据下载')">
-      <ion-icon name="download" slot="start"></ion-icon>
-      数据下载
-    </ion-item>
-    <!-- 登出按钮 -->
-    <ion-item button (click)="logout()">
-      <ion-icon name="log-out" slot="start"></ion-icon>
-      登出
-    </ion-item>
-  </ion-list>
-  
-</ion-content>

+ 0 - 21
app/tab3/tab3.page.scss

@@ -1,21 +0,0 @@
-.avatar-img {
-      width: 100%;
-      height: 100%;
-      border-radius: 50%;
-      object-fit: cover;
-    }
-    
-    ion-item.button {
-      --background-hover: rgba(0, 0, 0, 0.1);
-      --background-activated: rgba(0, 0, 0, 0.2);
-      transition: background-color 0.2s;
-    
-      &:hover {
-        background-color: var(--background-hover);
-      }
-    
-      &:active {
-        background-color: var(--background-activated);
-      }
-    }
-    

+ 0 - 26
app/tab3/tab3.page.spec.ts

@@ -1,26 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-
-import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
-
-import { Tab3Page } from './tab3.page';
-
-describe('Tab3Page', () => {
-  let component: Tab3Page;
-  let fixture: ComponentFixture<Tab3Page>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [Tab3Page],
-      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(Tab3Page);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 35
app/tab3/tab3.page.ts

@@ -1,35 +0,0 @@
-import { Component } from '@angular/core';
-import { NavController, ToastController } from '@ionic/angular';
-import * as Parse from "parse";
-
-@Component({
-  selector: 'app-tab3',
-  templateUrl: './tab3.page.html',
-  styleUrls: ['./tab3.page.scss']
-})
-export class Tab3Page {
-
-  constructor(private navCtrl: NavController, private toastController: ToastController) {}
-
-  async onItemClick(item: string) {
-    const toast = await this.toastController.create({
-      message: `Clicked on ${item}`,
-      duration: 2000,
-    });
-    toast.present();
-  }
-
-  async logout() {
-    try {
-      await Parse.User.logOut();
-      this.navCtrl.navigateRoot('/tabs/calendar'); // 登出后跳转到登录界面
-    } catch (error: any) {
-      console.error("Logout failed:", error);
-      const toast = await this.toastController.create({
-        message: `登出失败: ${error.message}`,
-        duration: 2000,
-      });
-      toast.present();
-    }
-  }
-}

+ 0 - 47
app/tabs/tabs-routing.module.ts

@@ -1,47 +0,0 @@
-import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
-import { TabsPage } from './tabs.page';
-
-const routes: Routes = [
-  {
-    path: 'tabs',
-    component: TabsPage,
-    children: [
-      {
-        path: 'tab1',
-        loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
-      },
-      {
-        path: 'tab2',
-        loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
-      },
-      {
-        path: 'tab3',
-        loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
-      },
-      {
-        path: 'calendar',
-        loadChildren: () => import('../../modules/user/mine/mine.module').then(mod => mod.MinePageModule)
-      },
-      {
-        path: "tree",
-        loadChildren: () => import('../../modules/tab/tree/tree.module').then(mod => mod.TreePageModule)
-      },
-      {
-        path: '',
-        redirectTo: '/tabs/tab1',
-        pathMatch: 'full'
-      }
-    ]
-  },
-  {
-    path: '',
-    redirectTo: '/tabs/tab1',
-    pathMatch: 'full'
-  }
-];
-
-@NgModule({
-  imports: [RouterModule.forChild(routes)],
-})
-export class TabsPageRoutingModule {}

+ 0 - 19
app/tabs/tabs.module.ts

@@ -1,19 +0,0 @@
-import { IonicModule } from '@ionic/angular';
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-
-import { TabsPageRoutingModule } from './tabs-routing.module';
-
-import { TabsPage } from './tabs.page';
-
-@NgModule({
-  imports: [
-    IonicModule,
-    CommonModule,
-    FormsModule,
-    TabsPageRoutingModule
-  ],
-  declarations: [TabsPage]
-})
-export class TabsPageModule {}

+ 0 - 23
app/tabs/tabs.page.html

@@ -1,23 +0,0 @@
-<ion-tabs>
-  <ion-tab-bar slot="bottom">
-    <ion-tab-button tab="tab1" href="/tabs/tab1">
-      <ion-icon aria-hidden="true" name="home"></ion-icon>
-      <ion-label>首页</ion-label>
-    </ion-tab-button>
-
-    <ion-tab-button tab="tab2" href="/tabs/tab2">
-      <ion-icon aria-hidden="true" name="pencil"></ion-icon>
-      <ion-label>记录一下</ion-label>
-    </ion-tab-button>
-
-    <ion-tab-button (click)="checkLogin()">
-      <ion-icon aria-hidden="true" name="person"></ion-icon>
-      <ion-label>我的</ion-label>
-    </ion-tab-button>
-    
-    <!-- <ion-tab-button tab="calendar" href="/tabs/calendar">
-      <ion-icon aria-hidden="true" name="calendar"></ion-icon>
-      <ion-label>日历</ion-label>
-    </ion-tab-button> -->
-  </ion-tab-bar>
-</ion-tabs>

+ 0 - 1
app/tabs/tabs.page.scss

@@ -1 +0,0 @@
-

+ 0 - 26
app/tabs/tabs.page.spec.ts

@@ -1,26 +0,0 @@
-import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { TabsPage } from './tabs.page';
-
-describe('TabsPage', () => {
-  let component: TabsPage;
-  let fixture: ComponentFixture<TabsPage>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [TabsPage],
-      schemas: [CUSTOM_ELEMENTS_SCHEMA],
-    }).compileComponents();
-  });
-
-  beforeEach(() => {
-    fixture = TestBed.createComponent(TabsPage);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 24
app/tabs/tabs.page.ts

@@ -1,24 +0,0 @@
-import { Component } from '@angular/core';
-import { NavController } from '@ionic/angular';
-import * as Parse from "parse";
-
-@Component({
-  selector: 'app-tabs',
-  templateUrl: 'tabs.page.html',
-  styleUrls: ['tabs.page.scss']
-})
-export class TabsPage {
-
-  constructor(private navCtrl: NavController) {}
-
-  async checkLogin() {
-    const currentUser = Parse.User.current();
-    if (currentUser) {
-      // 如果已登录,跳转到“我的”界面
-      this.navCtrl.navigateForward('/tabs/tab3');
-    } else {
-      // 如果未登录,跳转到“登录”界面
-      this.navCtrl.navigateForward('/tabs/calendar');
-    }
-  }
-}

BIN
assets/icon/favicon.png


BIN
assets/img/head.jpg


+ 0 - 1
assets/shapes.svg

@@ -1 +0,0 @@
-<svg width="350" height="140" xmlns="http://www.w3.org/2000/svg" style="background:#f6f7f9"><g fill="none" fill-rule="evenodd"><path fill="#F04141" style="mix-blend-mode:multiply" d="M61.905-34.23l96.194 54.51-66.982 54.512L22 34.887z"/><circle fill="#10DC60" style="mix-blend-mode:multiply" cx="155.5" cy="135.5" r="57.5"/><path fill="#3880FF" style="mix-blend-mode:multiply" d="M208.538 9.513l84.417 15.392L223.93 93.93z"/><path fill="#FFCE00" style="mix-blend-mode:multiply" d="M268.625 106.557l46.332-26.75 46.332 26.75v53.5l-46.332 26.75-46.332-26.75z"/><circle fill="#7044FF" style="mix-blend-mode:multiply" cx="299.5" cy="9.5" r="38.5"/><rect fill="#11D3EA" style="mix-blend-mode:multiply" transform="rotate(-60 148.47 37.886)" x="143.372" y="-7.056" width="10.196" height="89.884" rx="5.098"/><path d="M-25.389 74.253l84.86 8.107c5.498.525 9.53 5.407 9.004 10.905a10 10 0 0 1-.057.477l-12.36 85.671a10.002 10.002 0 0 1-11.634 8.42l-86.351-15.226c-5.44-.959-9.07-6.145-8.112-11.584l13.851-78.551a10 10 0 0 1 10.799-8.219z" fill="#7044FF" style="mix-blend-mode:multiply"/><circle fill="#0CD1E8" style="mix-blend-mode:multiply" cx="273.5" cy="106.5" r="20.5"/></g></svg>

+ 0 - 3
environments/environment.prod.ts

@@ -1,3 +0,0 @@
-export const environment = {
-  production: true
-};

+ 0 - 16
environments/environment.ts

@@ -1,16 +0,0 @@
-// This file can be replaced during build by using the `fileReplacements` array.
-// `ng build` replaces `environment.ts` with `environment.prod.ts`.
-// The list of file replacements can be found in `angular.json`.
-
-export const environment = {
-  production: false
-};
-
-/*
- * For easier debugging in development mode, you can import the following file
- * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
- *
- * This import should be commented out in production mode because it will have a negative impact
- * on performance if an error is thrown.
- */
-// import 'zone.js/plugins/zone-error';  // Included with Angular CLI.

+ 0 - 10
modules/tab/tab-routing.module.ts

@@ -1,10 +0,0 @@
-import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
-
-const routes: Routes = [];
-
-@NgModule({
-  imports: [RouterModule.forChild(routes)],
-  exports: [RouterModule]
-})
-export class TabRoutingModule { }

+ 0 - 14
modules/tab/tab.module.ts

@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { TabRoutingModule } from './tab-routing.module';
-
-
-@NgModule({
-  declarations: [],
-  imports: [
-    CommonModule,
-    TabRoutingModule
-  ]
-})
-export class TabModule { }

+ 0 - 17
modules/tab/tree/tree-routing.module.ts

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

+ 0 - 20
modules/tab/tree/tree.module.ts

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

+ 0 - 61
modules/tab/tree/tree.page.html

@@ -1,61 +0,0 @@
-<ion-header [translucent]="true">
-  <!-- Header content for tree theme (optional customization) -->
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <!-- Tree image -->
-  <div class="image-container">
-    <img src="../../../assets/img/tree.png" alt="Tree">
-  </div>
-
-  <!-- Title and time display -->
-  <ion-row>
-    <ion-col>
-      <div class="info-container">
-        <h2>Tree</h2>
-      </div>
-    </ion-col>
-    <ion-col>
-      <div class="timer-display">
-        <span>00:00</span>
-      </div>
-    </ion-col>
-    <ion-col>
-      <div class="timer-icon">
-        <ion-icon name="timer-outline"></ion-icon>
-      </div>
-    </ion-col>
-  </ion-row>
-
-  <!-- Icon buttons -->
-  <div class="icon-buttons">
-    <ion-button class="i-button">
-      <ion-icon name="leaf"></ion-icon>
-    </ion-button>
-    <ion-button class="i-button">
-      <ion-icon name="water"></ion-icon>
-    </ion-button>
-    <ion-button class="i-button">
-      <ion-icon name="sunny"></ion-icon>
-    </ion-button>
-    <ion-button class="i-button">
-      <ion-icon name="cloudy"></ion-icon>
-    </ion-button>
-    <ion-button class="i-button">
-      <ion-icon name="flower"></ion-icon>
-    </ion-button>
-  </div>
-
-  <!-- Control buttons -->
-  <div class="control-buttons">
-    <ion-button fill="solid" class="ctrl-button">
-      <ion-icon name="play-back-outline"></ion-icon>
-    </ion-button>
-    <ion-button fill="solid" class="ctrl-button">
-      <ion-icon name="play-outline"></ion-icon>
-    </ion-button>
-    <ion-button fill="solid" class="ctrl-button">
-      <ion-icon name="play-forward-outline"></ion-icon>
-    </ion-button>
-  </div>
-</ion-content>

+ 0 - 81
modules/tab/tree/tree.page.scss

@@ -1,81 +0,0 @@
-ion-app {
-  --ion-background-color: #e1e1e1; /* Light grey */
-}
-
-.image-container {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  img {
-    margin-top: 40px;
-    width: 80%;
-    border-radius: 10px;
-  }
-}
-
-.info-container {
-  margin-top: 50px;
-  h2 {
-    width: 170px;
-    text-align: left;
-    margin-left: 30px;
-    font-size: 2.5rem;
-    color: #333;
-    font-weight: bold;
-  }
-}
-
-.timer-display {
-  margin-top: 50px;
-  justify-content: right;
-  font-size: 2.2rem;
-  color: #333;
-  border: 2px solid #c1c1c1;
-  border-radius: 10%;
-  padding: 5px 5px 5px 5px;
-}
-
-.timer-icon {
-  margin-top: 50px;
-  margin-left: 25px;
-  font-size: 2.5rem;
-  color: black;
-  border: 2px solid #c2c2c2;
-  border-radius: 10%;
-  width: 60%;
-  height: 50%;
-  padding: 5px 5px 0px 5px;
-}
-
-.icon-buttons {
-  display: flex;
-  justify-content: space-around;
-  margin: 45px 20px;
-  .i-button {
-    --background: #e1e1e1;
-    --border-radius: 50%;
-    --padding: 5px;
-    ion-icon {
-      font-size: 2.4rem;
-      color: rgb(178, 178, 178);
-    }
-  }
-}
-
-.control-buttons {
-  display: flex;
-  justify-content: space-around;
-  margin: 45px 20px;
-  .ctrl-button {
-    --background: #e1e1e1;
-    border-radius: 100%;
-    border: 5px wheat;
-    padding: 10px;
-    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.415),
-                -4px -4px 8px rgba(255, 255, 255, 0.914);
-    ion-icon {
-      font-size: 1.8rem;
-      color: #000000;
-    }
-  }
-}

+ 0 - 25
modules/tab/tree/tree.page.spec.ts

@@ -1,25 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { IonicModule } from '@ionic/angular';
-import { TreePage } from './tree.page';
-
-import { ExploreContainerComponentModule } from 'src/app/explore-container/explore-container.module';
-
-describe('TreePage', () => {
-  let component: TreePage;
-  let fixture: ComponentFixture<TreePage>;
-
-  beforeEach(async () => {
-    await TestBed.configureTestingModule({
-      declarations: [TreePage],
-      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(TreePage);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});

+ 0 - 12
modules/tab/tree/tree.page.ts

@@ -1,12 +0,0 @@
-import { Component } from '@angular/core';
-
-@Component({
-  selector: 'app-tree',
-  templateUrl: 'tree.page.html',
-  styleUrls: ['tree.page.scss']
-})
-export class TreePage {
-
-  constructor() {}
-
-}

+ 0 - 17
modules/user/edit-info/edit-info-routing.module.ts

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

+ 0 - 20
modules/user/edit-info/edit-info.module.ts

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

+ 0 - 47
modules/user/edit-info/edit-info.page.html

@@ -1,47 +0,0 @@
-<ion-header [translucent]="true">
-  <ion-toolbar>
-    <ion-title>资料编辑</ion-title>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">资料编辑</ion-title>
-    </ion-toolbar>
-  </ion-header>
-
-  <ion-card>
-    <ion-card-header>
-      <ion-card-title>{{currentUser?.get('username')}} - {{currentUser?.id}}</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <ion-list>
-        <ion-item>
-          <ion-input label="姓名" type="text" [(ngModel)]="userInfo.name"></ion-input>
-        </ion-item>
-        <ion-item>
-          <ion-input label="手机" type="tel" [(ngModel)]="userInfo.mobile"></ion-input>
-        </ion-item>
-        <ion-item>
-          <ion-select label="性别" [(ngModel)]="userInfo.gender">
-            <ion-select-option value="男">男</ion-select-option>
-            <ion-select-option value="女">女</ion-select-option>
-          </ion-select>
-        </ion-item>
-        <ion-item>
-          <ion-label>生日</ion-label>
-          <ion-datetime-button datetime="birthday"></ion-datetime-button>
-          <ion-modal [keepContentsMounted]="true">
-            <ng-template>
-              <ion-datetime id="birthday" displayFormat="MM/DD/YYYY" [(ngModel)]="userInfo.birthday"></ion-datetime>
-            </ng-template>
-          </ion-modal>
-        </ion-item>
-      </ion-list>
-    </ion-card-content>
-  </ion-card>
-
-  <ion-button expand="block" (click)="save()">保存</ion-button>
-  <ion-button expand="block" (click)="cancel()">取消</ion-button>
-</ion-content>

+ 0 - 0
modules/user/edit-info/edit-info.page.scss


+ 0 - 17
modules/user/edit-info/edit-info.page.spec.ts

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

+ 0 - 56
modules/user/edit-info/edit-info.page.ts

@@ -1,56 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { NavController } from '@ionic/angular';
-import * as Parse from 'parse';
-
-@Component({
-  selector: 'app-edit-info',
-  templateUrl: './edit-info.page.html',
-  styleUrls: ['./edit-info.page.scss'],
-})
-export class EditInfoPage implements OnInit {
-
-  userInfo: any = {
-    name: '',
-    mobile: '',
-    gender: '',
-    birthday: ''
-  };
-  currentUser:Parse.User|undefined
-  constructor(private navController: NavController) {}
-
-  ngOnInit() {
-    this.currentUser = Parse.User.current();
-    if (this.currentUser) {
-      // 修改uesrInfo赋值逻辑,仅加载被编辑的字段属性值
-      let json = this.currentUser.toJSON();
-      for (const key in json) {
-        if (this.userInfo.hasOwnProperty(key)) {
-          this.userInfo[key] = json[key]
-        }
-      }
-    }
-    console.log(this.userInfo)
-  }
-
-  save() {
-    this.currentUser = Parse.User.current();
-    if (this.currentUser) {
-      console.log(this.userInfo)
-      for (const key in this.userInfo) {
-        if (this.userInfo.hasOwnProperty(key)) {
-          this.currentUser.set(key, this.userInfo[key]);
-        }
-      }
-      this.currentUser.save().then(() => {
-        this.navController.back();
-      }).catch((error) => {
-        console.error('Error saving user data: ', error);
-      });
-    }
-  }
-
-  cancel() {
-    this.navController.back();
-  }
-
-}

+ 0 - 17
modules/user/login/login-routing.module.ts

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

+ 0 - 20
modules/user/login/login.module.ts

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

+ 0 - 39
modules/user/login/login.page.html

@@ -1,39 +0,0 @@
-<ion-content [fullscreen]="true" class="ion-text-center">
-  <div class="login-container">
-    <ion-card class="login-card">
-      <ion-card-header>
-        <ion-card-title>登录/注册</ion-card-title>
-      </ion-card-header>
-    
-      <ion-card-content>
-        <ion-list>
-          <ion-item lines="none">
-            <ion-label position="floating" class="label-login">账号</ion-label>
-            <ion-input [(ngModel)]="username" placeholder="请输入用户名"></ion-input>
-          </ion-item>
-          <ion-item lines="none">
-            <ion-label position="floating" class="label-login">密码</ion-label>
-            <ion-input [(ngModel)]="password" type="password" placeholder="请输入密码"></ion-input>
-          </ion-item>
-        </ion-list>
-      </ion-card-content>
-    
-      <ion-row class="ion-login">
-        <ion-col size="6">
-          <ion-button expand="block" (click)="login()" color="primary">登录</ion-button>
-        </ion-col>
-        <ion-col size="6">
-          <ion-button expand="block" (click)="register()" color="primary">注册</ion-button>
-        </ion-col>
-      </ion-row>
-  
-      <!-- 返回按钮 -->
-      <ion-row class="ion-back">
-        <ion-col size="12">
-          <ion-button expand="block" (click)="back()" color="primary">返回</ion-button>
-        </ion-col>
-      </ion-row>
-      
-    </ion-card>
-  </div>
-</ion-content>

+ 0 - 31
modules/user/login/login.page.scss

@@ -1,31 +0,0 @@
-//窗口居中
-.login-container {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 90vh; /* 使用视窗高度,保证内容居中且不畸形 */
-  padding: 0px; /* 可根据需要调整内边距 */
-  box-sizing: border-box; /* 确保内边距不影响总宽度 */
-}
-
-.login-card {
-  max-width: 400px; /* 设置最大宽度,避免内容过于扩展 */
-  width: 100%; /* 宽度100%,确保内容在容器内部居中 */
-  text-align: center; /* 文本居中 */
-}
-
-//登录注册
-.label-login{
-  font-size:30px;
-}
-
-
-//返回按钮
-.ion-login{
-  margin:0px 30px 0px 30px;
-  padding: auto;
-}
-.ion-back{
-  margin:0px 30px 10px 30px;
-  padding: auto;
-}

+ 0 - 17
modules/user/login/login.page.spec.ts

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

+ 0 - 86
modules/user/login/login.page.ts

@@ -1,86 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { AlertController, NavController } from '@ionic/angular';
-import * as Parse from "parse"
-
-@Component({
-  selector: 'app-login',
-  templateUrl: './login.page.html',
-  styleUrls: ['./login.page.scss'],
-})
-export class LoginPage implements OnInit {
-
-  username: string = ""
-  password: string = ""
-  
-  constructor(
-    private navCtrl: NavController,
-    private alertController: AlertController
-  ) { }
-
-  ngOnInit() { }
-
-  async login() {
-    let user;
-    try {
-      user = await Parse.User.logIn(this.username, this.password);
-    } catch (error: any) {
-      let message: string = "";
-      if (error?.message.indexOf("is required") > -1) {
-        message = "必须输入账号或邮箱";
-      }
-      if (error?.message.indexOf("Invalid username") > -1) {
-        message = "账号或密码错误,请检查";
-      }
-      this.presentAlert({
-        header: "登录失败",
-        subHeader: "状态码:" + error.code,
-        message: message || error.message
-      });
-    }
-    console.log(user);
-    if (user?.id) {
-      this.navCtrl.navigateForward('/tabs/tab3'); // 修改这里
-    }
-  }
-
-  async register() {
-    let user = new Parse.User();
-    user.set("username", this.username);
-    user.set("password", this.password);
-    try {
-      let result = await user.signUp();
-      console.log(result);
-      if (result?.id) {
-        this.navCtrl.navigateForward('/tabs/tab3'); // 修改这里
-      }
-    } catch (error: any) {
-      let message: string = "";
-      if (error?.message.indexOf("already exists") > -1) {
-        message = "该账号已存在请修改后重试";
-      }
-      if (error?.message.indexOf("empty") > -1) {
-        message = "账号不能为空请输入后重试";
-      }
-      this.presentAlert({
-        header: "注册失败",
-        subHeader: "状态码:" + error.code,
-        message: message || error.message
-      });
-    }
-  }
-
-  async presentAlert(options: { header: string, subHeader: string, message: string }) {
-    const alert = await this.alertController.create({
-      header: options?.header,
-      subHeader: options?.subHeader,
-      message: options?.message,
-      buttons: ['好的'],
-    });
-
-    await alert.present();
-  }
-
-  back() {
-    this.navCtrl.back();
-  }
-}

+ 0 - 17
modules/user/mine/mine-routing.module.ts

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

+ 0 - 20
modules/user/mine/mine.module.ts

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

+ 0 - 16
modules/user/mine/mine.page.html

@@ -1,16 +0,0 @@
-<ion-content [fullscreen]="true" class="ion-text-center ion-align-items-center">
-  <div class="login-container">
-    <img src="../../../assets/img/zilv.jpg" alt="Logo" class="app-logo">
-
-    <ion-card class="login-card">
-      <ion-card-header>
-        <ion-card-title>欢迎使用我们的App</ion-card-title>
-      </ion-card-header>
-
-      <ion-card-content class="ion-text-center">
-        <p>请登录或注册以继续使用我们的服务。</p>
-        <ion-button expand="block" color="primary" fill="solid" routerLink="/user/login">去登录</ion-button>
-      </ion-card-content>
-    </ion-card>
-  </div>
-</ion-content>

+ 0 - 27
modules/user/mine/mine.page.scss

@@ -1,27 +0,0 @@
-.ion-content {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  height: 0vh; /* 使用视窗高度,确保内容垂直居中 */
-}
-
-.login-container {
-  text-align: center; /* 文本居中 */
-  //max-width: 400px; /* 设置最大宽度,避免内容过于扩展 */
-  width: 100%; /* 宽度100%,确保内容在容器内部居中 */
-  padding: 0 10px; /* 可根据需要调整内边距 */
-  box-sizing: border-box; /* 确保内边距不影响总宽度 */
-}
-
-.login-card {
-  margin:0px 10px;
-  //max-width: 500px; /* 设置最大宽度,避免内容过于扩展 */
-  text-align: center; /* 文本居中 */
-}
-
-.app-logo {
-  padding-top: 100px;
-  max-width: 95%; /* 图片宽度最大为容器宽度 */
-  height: auto; /* 自动高度 */
-  padding-bottom: 20px;
-}

+ 0 - 17
modules/user/mine/mine.page.spec.ts

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

+ 0 - 28
modules/user/mine/mine.page.ts

@@ -1,28 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-// 由于Parse本身是js库,在ts中加载需要通过 * as Parse转换一下
-import * as Parse from "parse"
-@Component({
-  selector: 'app-mine',
-  templateUrl: './mine.page.html',
-  styleUrls: ['./mine.page.scss'],
-})
-export class MinePage implements OnInit {
-
-  constructor() {
-   
-  }
-
-  // 由于Parse.User.current()是随着localStorage变化的属性
-  // 为了避免首次复制后用户状态变化,页面不同步,通过get方法实现实时获取
-  user:Parse.User|undefined
-  async ngOnInit() {
-      this.user = await Parse.User.current()
-      setInterval(async ()=>{
-      this.user = await Parse.User.current()
-    },1000)
-  }
-  logout(){
-    Parse.User.logOut();
-  }
-
-}

+ 0 - 14
modules/user/user-routing.module.ts

@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
-
-const routes: Routes = [
-    {path: 'login', loadChildren: () => import('./login/login.module').then(mod => mod.LoginPageModule)},
-    {path: 'mine', loadChildren: () => import('./mine/mine.module').then(mod => mod.MinePageModule)},
-    {path: 'edit/info', loadChildren: () => import('./edit-info/edit-info.module').then(mod => mod.EditInfoPageModule)},
-];
-
-@NgModule({
-  imports: [RouterModule.forChild(routes)],
-  exports: [RouterModule]
-})
-export class UserRoutingModule { }

+ 0 - 14
modules/user/user.module.ts

@@ -1,14 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule } from '@angular/common';
-
-import { UserRoutingModule } from './user-routing.module';
-
-
-@NgModule({
-  declarations: [],
-  imports: [
-    CommonModule,
-    UserRoutingModule
-  ]
-})
-export class UserModule { }

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

@@ -15,6 +15,12 @@ const routes: Routes = [
     path: 'user',
     loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
   },
+  {
+    path: "tree",
+    loadChildren: () => import('../modules/tab/tree/tree.module').then(m => m.TreePageModule)
+  },
+
+
 ];
 @NgModule({
   imports: [

+ 11 - 6
src/app/tab1/tab1.page.html

@@ -33,15 +33,20 @@
       </ion-grid>
     </ion-card-content>
   </ion-card>
-
-  <!-- 3D效果的圆 -->
-  <div class="wave-container">
-    <div class="wave-circle">
-      <div class="wave">
-        <div class="wave-inner"></div>
+  
+<!-- 3D效果的圆 -->
+<div class="wave-container" (click)="navigateToTreePage()">
+  <div class="wave-circle">
+    <div class="wave">
+      <div class="wave-inner">
+        <span class="start-self-discipline">开始自律</span>
       </div>
     </div>
   </div>
+</div>
+
+
+
 
   <!-- 每日小习惯 -->
   <div class="daily-habit">

+ 22 - 5
src/app/tab1/tab1.page.scss

@@ -45,18 +45,35 @@ ion-searchbar {
   top: -75%;
   left: -50%;
   background: rgba(255, 255, 255, 0.4);
-  border-radius: 45%;
+  border-radius: 50%;
   animation: wave 4s infinite linear;
 }
 
-@keyframes wave {
+.wave-inner {
+  width: 120px;
+  height: 120px;
+  background-color: #3f51b5;
+  border-radius: 50%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  cursor: pointer;
+  transition: transform 0.3s ease-in-out;
+  color: #ffffff;
+  font-size: 1.2rem;
+  font-weight: bold;
+  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
+}
+
+/* @keyframes wave {
   0% {
-    transform: rotate(0deg);
+    transform: translateX(-50%) translateY(-50%) rotate(0deg);
   }
   100% {
-    transform: rotate(360deg);
+    transform: translateX(-50%) translateY(-50%) rotate(360deg);
   }
-}
+} */
+
 
 // 每日小习惯
 .daily-habit {

+ 8 - 1
src/app/tab1/tab1.page.ts

@@ -1,5 +1,7 @@
 import { Component } from '@angular/core';
 import { AlertController } from '@ionic/angular';
+import { Router } from '@angular/router';
+
 @Component({
   selector: 'app-tab1',
   templateUrl: 'tab1.page.html',
@@ -7,7 +9,7 @@ import { AlertController } from '@ionic/angular';
 })
 export class Tab1Page {
 
-  constructor(private alertController: AlertController) {}
+  constructor(private alertController: AlertController,private router: Router) {}
 
   async openModal() {
     const alert = await this.alertController.create({
@@ -21,5 +23,10 @@ export class Tab1Page {
   toggleButtonColor(habit:string){
     this.blueColor=!this.blueColor;
   }
+
+  //3d圆点击事件
+  navigateToTreePage() {
+    this.router.navigate(['/tabs/tree']);
+  }
 }
 

+ 1 - 0
src/app/tab2/tab2-routing.module.ts

@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
 import { Tab2Page } from './tab2.page';
 
+
 const routes: Routes = [
   {
     path: '',

+ 36 - 33
src/app/tab2/tab2.page.html

@@ -1,44 +1,47 @@
 <ion-header>
   <ion-toolbar>
-    <ion-title>备忘录</ion-title>
+    <ion-title>每日记录</ion-title>
   </ion-toolbar>
 </ion-header>
 
 <ion-content>
-  <!-- 搜索框 -->
-  <ion-item>
-    <ion-label position="floating">搜索备忘录</ion-label>
-    <ion-input [(ngModel)]="searchQuery"></ion-input>
-  </ion-item>
+  <ion-segment [(ngModel)]="segment">
+    <ion-segment-button value="memo">
+      <ion-label>备忘录</ion-label>
+    </ion-segment-button>
+    <ion-segment-button value="chat">
+      <ion-label>AI对话</ion-label>
+    </ion-segment-button>
+  </ion-segment>
 
-  <!-- 备忘录输入 -->
-  <ion-item>
-    <ion-label position="floating">备忘录内容</ion-label>
-    <ion-input [(ngModel)]="memoContent"></ion-input>
-  </ion-item>
-  <ion-button expand="full" (click)="addMemo()">添加备忘录</ion-button>
+  <div *ngIf="segment === 'memo'">
+    <ion-list>
+      <ion-item *ngFor="let memo of memos">
+        {{ memo }}
+        <ion-button slot="end" color="danger" (click)="confirmDeleteMemo(memo)">
+          删除
+        </ion-button>
+      </ion-item>
+    </ion-list>
 
-  <!-- 备忘录列表 -->
-  <ion-list>
-    <ion-item *ngFor="let memo of filteredMemos()">
-      {{ memo }}
+    <ion-item>
+      <ion-input placeholder="添加新备忘录" [(ngModel)]="newMemo"></ion-input>
+      <ion-button (click)="addMemo()">添加</ion-button>
     </ion-item>
-  </ion-list>
+  </div>
 
-  <!-- 日历 -->
-  <!-- 日历 -->
-  <ion-card>
-    <ion-card-header>
-      <ion-card-title>日历</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <div class="calendar-container">
-        <mwl-calendar-month-view
-          [viewDate]="viewDate"
-          [events]="events"
-          (dayClicked)="dayClicked($event.day)">
-        </mwl-calendar-month-view>
-      </div>
-    </ion-card-content>
-  </ion-card>
+  <div *ngIf="segment === 'chat'">
+    <ion-list>
+      <ion-item *ngFor="let message of messages">
+        <ion-label [ngClass]="{'ai': message.sender === 'ai', 'user': message.sender === 'user'}">
+          {{ message.text }}
+        </ion-label>
+      </ion-item>
+    </ion-list>
+
+    <ion-item>
+      <ion-input placeholder="输入消息" [(ngModel)]="newMessage"></ion-input>
+      <ion-button (click)="sendMessage()">发送</ion-button>
+    </ion-item>
+  </div>
 </ion-content>

+ 9 - 25
src/app/tab2/tab2.page.scss

@@ -1,25 +1,9 @@
-ion-card {
-      margin: 20px 0;
-    }
-    
-ion-item {
-      margin: 10px 0;
-    }
-    
-ion-button {
-      margin: 20px 0;
-    }
-.calendar-container {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      width: 100%;
-      overflow-x: auto;
-      padding: 20px 0;
-    }
-    
-::ng-deep mwl-calendar-month-view {
-      width: 100%;
-      max-width: 100%;
-    }
-    
+ion-label.ai {
+  color: blue;
+  text-align: left;
+}
+
+ion-label.user {
+  color: green;
+  text-align: right;
+}

+ 85 - 19
src/app/tab2/tab2.page.ts

@@ -1,32 +1,98 @@
-import { Component } from '@angular/core';
-import { CalendarEvent } from 'angular-calendar';
+import { Component,OnInit } from '@angular/core';
+import { AlertController } from '@ionic/angular';
 @Component({
   selector: 'app-tab2',
-  templateUrl: 'tab2.page.html',
-  styleUrls: ['tab2.page.scss']
+  templateUrl: './tab2.page.html',
+  styleUrls: ['./tab2.page.scss'],
 })
-
-export class Tab2Page {
-  memoContent: string = '';
-  searchQuery: string = '';
+export class Tab2Page implements OnInit {
+  segment: string = 'memo';
   memos: string[] = [];
-  viewDate: Date = new Date();
-  events: CalendarEvent[] = [];
+  newMemo: string = '';
+  messages: { sender: string, text: string }[] = [];
+  newMessage: string = '';
 
-  constructor() {}
+  constructor(private alertController: AlertController) {}
 
-  addMemo() {
-    if (this.memoContent.trim() !== '') {
-      this.memos.push(this.memoContent);
-      this.memoContent = '';
+  ngOnInit() {
+    this.loadMemos();
+  }
+  //加载备忘录
+  loadMemos() {
+    const memos = localStorage.getItem('memos');
+    if (memos) {
+      this.memos = JSON.parse(memos);
     }
   }
+  //保存备忘录
+  saveMemos() {
+    localStorage.setItem('memos', JSON.stringify(this.memos));
+  }
 
-  filteredMemos() {
-    return this.memos.filter((memo) => memo.includes(this.searchQuery));
+  //获取时间戳
+  getCurrentTimestamp(): string {
+    const now = new Date();
+    const year = now.getFullYear();
+    const month = (now.getMonth() + 1).toString().padStart(2, '0');
+    const day = now.getDate().toString().padStart(2, '0');
+    const hours = now.getHours().toString().padStart(2, '0');
+    const minutes = now.getMinutes().toString().padStart(2, '0');
+    return `${year}年${month}月${day}日${hours}:${minutes}`;
   }
 
-  dayClicked(day: any) {
-    console.log('Day clicked:', day);
+  //异步函数,添加备忘录
+  async addMemo() {
+    if (this.newMemo.trim().length > 0) {
+      this.memos.push(this.newMemo);
+      this.newMemo = '';
+      this.saveMemos();
+      const alert = await this.alertController.create({
+        header: '提示',
+        message: '添加成功',
+        buttons: ['确定']
+      });
+      await alert.present();
+    }
+  }
+  //异步函数,确认删除
+  async confirmDeleteMemo(memo: string) {
+    const alert = await this.alertController.create({
+      header: '确认删除',
+      message: `你确定要删除 "${memo}" 吗?`,
+      buttons: [
+        {
+          text: '取消',
+          role: 'cancel'
+        },
+        {
+          text: '删除',
+          handler: () => {
+            this.memos = this.memos.filter(m => m !== memo);
+            this.saveMemos();
+          }
+        }
+      ]
+    });
+    await alert.present();
   }
+
+  //删除备忘录
+  deleteMemo(memo: string) {
+    this.memos = this.memos.filter(m => m !== memo);
+    this.saveMemos();
+  }
+
+  //
+  sendMessage() {
+    if (this.newMessage.trim().length > 0) {
+      this.messages.push({ sender: 'user', text: this.newMessage });
+      this.newMessage = '';
+      
+      // 模拟AI回复
+      setTimeout(() => {
+        this.messages.push({ sender: 'ai', text: 'AI的回复' });
+      }, 1000);
+    }
+  }
+
 }

+ 7 - 2
src/app/tab3/tab3.page.html

@@ -2,11 +2,11 @@
 </ion-header>
 
 <ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
+  <!-- <ion-header collapse="condense">
     <ion-toolbar>
       <ion-title size="large">Tab 3</ion-title>
     </ion-toolbar>
-  </ion-header>
+  </ion-header> -->
   
   <!-- 个人信息板块 -->
   <ion-card>
@@ -74,6 +74,11 @@
       <ion-icon name="download" slot="start"></ion-icon>
       数据下载
     </ion-item>
+    <!-- 登出按钮 -->
+    <ion-item button (click)="logout()">
+      <ion-icon name="log-out" slot="start"></ion-icon>
+      登出
+    </ion-item>
   </ion-list>
   
 </ion-content>

+ 18 - 4
src/app/tab3/tab3.page.ts

@@ -1,14 +1,15 @@
 import { Component } from '@angular/core';
-import { ToastController } from '@ionic/angular';
+import { NavController, ToastController } from '@ionic/angular';
+import * as Parse from "parse";
 
 @Component({
   selector: 'app-tab3',
-  templateUrl: 'tab3.page.html',
-  styleUrls: ['tab3.page.scss']
+  templateUrl: './tab3.page.html',
+  styleUrls: ['./tab3.page.scss']
 })
 export class Tab3Page {
 
-  constructor(private toastController: ToastController) {}
+  constructor(private navCtrl: NavController, private toastController: ToastController) {}
 
   async onItemClick(item: string) {
     const toast = await this.toastController.create({
@@ -18,4 +19,17 @@ export class Tab3Page {
     toast.present();
   }
 
+  async logout() {
+    try {
+      await Parse.User.logOut();
+      this.navCtrl.navigateRoot('/tabs/calendar'); // 登出后跳转到登录界面
+    } catch (error: any) {
+      console.error("Logout failed:", error);
+      const toast = await this.toastController.create({
+        message: `登出失败: ${error.message}`,
+        duration: 2000,
+      });
+      toast.present();
+    }
+  }
 }

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

@@ -23,6 +23,10 @@ const routes: Routes = [
         path: 'calendar',
         loadChildren: () => import('../../modules/user/mine/mine.module').then(mod => mod.MinePageModule)
       },
+      {
+        path: "tree",
+        loadChildren: () => import('../../modules/tab/tree/tree.module').then(mod => mod.TreePageModule)
+      },
       {
         path: '',
         redirectTo: '/tabs/tab1',

+ 2 - 7
src/app/tabs/tabs.page.html

@@ -1,5 +1,4 @@
 <ion-tabs>
-
   <ion-tab-bar slot="bottom">
     <ion-tab-button tab="tab1" href="/tabs/tab1">
       <ion-icon aria-hidden="true" name="home"></ion-icon>
@@ -11,15 +10,11 @@
       <ion-label>记录一下</ion-label>
     </ion-tab-button>
 
-    <ion-tab-button tab="tab3" href="/tabs/tab3">
+    <ion-tab-button (click)="checkLogin()">
       <ion-icon aria-hidden="true" name="person"></ion-icon>
       <ion-label>我的</ion-label>
     </ion-tab-button>
     
-    <ion-tab-button tab="calendar" href="/tabs/calendar">
-      <ion-icon aria-hidden="true" name="calendar"></ion-icon>
-      <ion-label>日历</ion-label>
-    </ion-tab-button>
+   
   </ion-tab-bar>
-
 </ion-tabs>

+ 13 - 1
src/app/tabs/tabs.page.ts

@@ -1,4 +1,6 @@
 import { Component } from '@angular/core';
+import { NavController } from '@ionic/angular';
+import * as Parse from "parse";
 
 @Component({
   selector: 'app-tabs',
@@ -7,6 +9,16 @@ import { Component } from '@angular/core';
 })
 export class TabsPage {
 
-  constructor() {}
+  constructor(private navCtrl: NavController) {}
 
+  async checkLogin() {
+    const currentUser = Parse.User.current();
+    if (currentUser) {
+      // 如果已登录,跳转到“我的”界面
+      this.navCtrl.navigateForward('/tabs/tab3');
+    } else {
+      // 如果未登录,跳转到“登录”界面
+      this.navCtrl.navigateForward('/tabs/calendar');
+    }
+  }
 }

+ 0 - 0
assets/img/tree.png → src/assets/img/tree.png


+ 0 - 0
assets/img/zilv.jpg → src/assets/img/zilv.jpg


+ 37 - 36
src/modules/user/login/login.page.html

@@ -1,38 +1,39 @@
-<ion-header [translucent]="true">
-  <ion-toolbar>
-    <ion-title>登录/注册</ion-title>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">登录/注册</ion-title>
-    </ion-toolbar>
-  </ion-header>
-
-  <ion-card>
-    <ion-card-header>
-      <ion-card-title>登录/注册</ion-card-title>
-    </ion-card-header>
+<ion-content [fullscreen]="true" class="ion-text-center">
+  <div class="login-container">
+    <ion-card class="login-card">
+      <ion-card-header>
+        <ion-card-title>登录/注册</ion-card-title>
+      </ion-card-header>
+    
+      <ion-card-content>
+        <ion-list>
+          <ion-item lines="none">
+            <ion-label position="floating" class="label-login">账号</ion-label>
+            <ion-input [(ngModel)]="username" placeholder="请输入用户名"></ion-input>
+          </ion-item>
+          <ion-item lines="none">
+            <ion-label position="floating" class="label-login">密码</ion-label>
+            <ion-input [(ngModel)]="password" type="password" placeholder="请输入密码"></ion-input>
+          </ion-item>
+        </ion-list>
+      </ion-card-content>
+    
+      <ion-row class="ion-login">
+        <ion-col size="6">
+          <ion-button expand="block" (click)="login()" color="primary">登录</ion-button>
+        </ion-col>
+        <ion-col size="6">
+          <ion-button expand="block" (click)="register()" color="primary">注册</ion-button>
+        </ion-col>
+      </ion-row>
   
-    <ion-card-content>
-
-      <ion-list [inset]="true">
-        <ion-item>
-          <ion-input [(ngModel)]="username" label="账号" placeholder="请输入用户名"></ion-input>
-        </ion-item>
-        <ion-item>
-          <ion-input [(ngModel)]="password" label="密码" type="password" placeholder="请输入密码"></ion-input>
-        </ion-item>
-      </ion-list>
-     
-    </ion-card-content>
-  
-    <ion-button (click)="login()" fill="clear">登录</ion-button>
-    <ion-button (click)="register()" fill="clear">注册</ion-button>
-  </ion-card>
-
-  <!-- 新增路由返回逻辑,执行back函数 -->
-  <ion-button expand="block" (click)="back()">返回</ion-button>
+      <!-- 返回按钮 -->
+      <ion-row class="ion-back">
+        <ion-col size="12">
+          <ion-button expand="block" (click)="back()" color="primary">返回</ion-button>
+        </ion-col>
+      </ion-row>
+      
+    </ion-card>
+  </div>
 </ion-content>

+ 31 - 0
src/modules/user/login/login.page.scss

@@ -0,0 +1,31 @@
+//窗口居中
+.login-container {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 90vh; /* 使用视窗高度,保证内容居中且不畸形 */
+  padding: 0px; /* 可根据需要调整内边距 */
+  box-sizing: border-box; /* 确保内边距不影响总宽度 */
+}
+
+.login-card {
+  max-width: 400px; /* 设置最大宽度,避免内容过于扩展 */
+  width: 100%; /* 宽度100%,确保内容在容器内部居中 */
+  text-align: center; /* 文本居中 */
+}
+
+//登录注册
+.label-login{
+  font-size:30px;
+}
+
+
+//返回按钮
+.ion-login{
+  margin:0px 30px 0px 30px;
+  padding: auto;
+}
+.ion-back{
+  margin:0px 30px 10px 30px;
+  padding: auto;
+}

+ 49 - 56
src/modules/user/login/login.page.ts

@@ -1,7 +1,7 @@
 import { Component, OnInit } from '@angular/core';
 import { AlertController, NavController } from '@ionic/angular';
 import * as Parse from "parse"
-// 引用Router服务
+
 @Component({
   selector: 'app-login',
   templateUrl: './login.page.html',
@@ -9,70 +9,67 @@ import * as Parse from "parse"
 })
 export class LoginPage implements OnInit {
 
-  username:string = ""
-  password:string = ""
+  username: string = ""
+  password: string = ""
+  
   constructor(
-    // 新增:Router服务,用于路由跳转
-    private navCtrl:NavController,
-    private alertController:AlertController
+    private navCtrl: NavController,
+    private alertController: AlertController
   ) { }
 
-  ngOnInit() {
-  }
+  ngOnInit() { }
 
-  async login(){
-    let user
+  async login() {
+    let user;
     try {
-      user = await Parse.User.logIn(this.username,this.password)
-    } catch (error:any) {
-      let message:string = ""
-      // 新增提示词详情,根据Parse.User.login方法返回的不同英文提示词,增加对应的中文内容转换
-      if(error?.message.indexOf("is required")>-1){
-        message = "必须输入账号或邮箱"
+      user = await Parse.User.logIn(this.username, this.password);
+    } catch (error: any) {
+      let message: string = "";
+      if (error?.message.indexOf("is required") > -1) {
+        message = "必须输入账号或邮箱";
       }
-      if(error?.message.indexOf("Invalid username")>-1){
-        message = "账号或密码错误,请检查"
+      if (error?.message.indexOf("Invalid username") > -1) {
+        message = "账号或密码错误,请检查";
       }
       this.presentAlert({
-        header:"登录失败",
-        subHeader:"状态码:"+error.code,
-        message:message || error.message
-      })
+        header: "登录失败",
+        subHeader: "状态码:" + error.code,
+        message: message || error.message
+      });
     }
-    console.log(user)
-    if(user?.id){
-      this.navCtrl.back()
+    console.log(user);
+    if (user?.id) {
+      this.navCtrl.navigateForward('/tabs/tab3'); // 修改这里
     }
   }
-  async register(){
-    let user = new Parse.User()
-    user.set("username",this.username)
-    user.set("password",this.password)
+
+  async register() {
+    let user = new Parse.User();
+    user.set("username", this.username);
+    user.set("password", this.password);
     try {
-        let result = await user.signUp();
-        console.log(result)
-        if(result?.id){
-          this.navCtrl.back()
-        }
-        // Hooray! Let them use the app now.
-    } catch (error:any) {
-        // 新增提示词详情,根据Parse.User.signUp方法返回的不同英文提示词,增加对应的中文内容转换
-        let message:string = ""
-        if(error?.message.indexOf("already exists")>-1){
-          message = "该账号已存在请修改后重试"
-        }
-        if(error?.message.indexOf("empty")>-1){
-          message = "账号不能为空请输入后重试"
-        }
-        this.presentAlert({
-          header:"注册失败",
-          subHeader:"状态码:"+error.code,
-          message:message || error.message
-        })
+      let result = await user.signUp();
+      console.log(result);
+      if (result?.id) {
+        this.navCtrl.navigateForward('/tabs/tab3'); // 修改这里
+      }
+    } catch (error: any) {
+      let message: string = "";
+      if (error?.message.indexOf("already exists") > -1) {
+        message = "该账号已存在请修改后重试";
+      }
+      if (error?.message.indexOf("empty") > -1) {
+        message = "账号不能为空请输入后重试";
+      }
+      this.presentAlert({
+        header: "注册失败",
+        subHeader: "状态码:" + error.code,
+        message: message || error.message
+      });
     }
   }
 
-  async presentAlert(options:{header:string,subHeader:string,message:string}) {
+  async presentAlert(options: { header: string, subHeader: string, message: string }) {
     const alert = await this.alertController.create({
       header: options?.header,
       subHeader: options?.subHeader,
@@ -83,11 +80,7 @@ export class LoginPage implements OnInit {
     await alert.present();
   }
 
-  /**
-   * 返回上级页面函数
-   * @desc
-   */
-  back(){
-    this.navCtrl.back()
+  back() {
+    this.navCtrl.back();
   }
 }

+ 13 - 26
src/modules/user/mine/mine.page.html

@@ -1,29 +1,16 @@
-<ion-header [translucent]="true">
-  <ion-toolbar>
-    <ion-title>我的</ion-title>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <ion-header collapse="condense">
-    <ion-toolbar>
-      <ion-title size="large">我的</ion-title>
-    </ion-toolbar>
-  </ion-header>
-
-  <ion-card>
-    <img alt="" src="https://ionicframework.com/docs/img/demos/card-media.png" />
-    <ion-card-header>
-      <ion-card-title>{{user?.get("username") || '未登录'}}</ion-card-title>
-      <ion-card-subtitle *ngIf="!user?.id">请您登陆后继续使用</ion-card-subtitle>
-      <ion-card-subtitle *ngIf="user?.id">{{user?.get("name")}}-{{user?.get("gender")}}</ion-card-subtitle>
-    </ion-card-header>
- 
-    <!-- 新增:根据用户状态,显示登录/登出按钮,执行跳转或登出函数 -->
-    <ion-button *ngIf="!user?.id" fill="clear" routerLink="/user/login">登录</ion-button>
-    <ion-button *ngIf="user?.id" fill="clear" routerLink="/user/edit/info">编辑资料</ion-button>
-    <ion-button *ngIf="user?.id" fill="clear" (click)="logout()">登出</ion-button>
-  </ion-card>
+<ion-content [fullscreen]="true" class="ion-text-center ion-align-items-center">
+  <div class="login-container">
+    <img src="../../../assets/img/zilv.jpg" alt="Logo" class="app-logo">
 
+    <ion-card class="login-card">
+      <ion-card-header>
+        <ion-card-title>欢迎使用我们的App</ion-card-title>
+      </ion-card-header>
 
+      <ion-card-content class="ion-text-center">
+        <p>请登录或注册以继续使用我们的服务。</p>
+        <ion-button expand="block" color="primary" fill="solid" routerLink="/user/login">去登录</ion-button>
+      </ion-card-content>
+    </ion-card>
+  </div>
 </ion-content>

+ 27 - 0
src/modules/user/mine/mine.page.scss

@@ -0,0 +1,27 @@
+.ion-content {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 0vh; /* 使用视窗高度,确保内容垂直居中 */
+}
+
+.login-container {
+  text-align: center; /* 文本居中 */
+  //max-width: 400px; /* 设置最大宽度,避免内容过于扩展 */
+  width: 100%; /* 宽度100%,确保内容在容器内部居中 */
+  padding: 0 10px; /* 可根据需要调整内边距 */
+  box-sizing: border-box; /* 确保内边距不影响总宽度 */
+}
+
+.login-card {
+  margin:0px 10px;
+  //max-width: 500px; /* 设置最大宽度,避免内容过于扩展 */
+  text-align: center; /* 文本居中 */
+}
+
+.app-logo {
+  padding-top: 100px;
+  max-width: 95%; /* 图片宽度最大为容器宽度 */
+  height: auto; /* 自动高度 */
+  padding-bottom: 20px;
+}

+ 0 - 2
theme/variables.scss

@@ -1,2 +0,0 @@
-// For information on how to create your own theme, please see:
-// http://ionicframework.com/docs/theming/