Browse Source

Merge branch 'master' of http://git.fmode.cn:3000/4u/workspace

19136808282 3 months ago
parent
commit
3d0dadd649
55 changed files with 260 additions and 1598 deletions
  1. 0 3
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.html
  2. 0 0
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.scss
  3. 0 15
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.ts
  4. 0 39
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164909.scss
  5. 0 39
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164930.scss
  6. 0 14
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164931.html
  7. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217165144.ts
  8. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217165208.ts
  9. 0 53
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183550.scss
  10. 0 41
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183617.html
  11. 0 20
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183929.html
  12. 0 29
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184007.html
  13. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184013.ts
  14. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184057.ts
  15. 0 40
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184947.html
  16. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193359.html
  17. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193717.ts
  18. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193720.html
  19. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193742.html
  20. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218194414.html
  21. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218194849.ts
  22. 0 53
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218195200.scss
  23. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218203144.html
  24. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218205727.ts
  25. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241219161716.ts
  26. 0 35
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223214953.html
  27. 0 68
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223214958.ts
  28. 0 66
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223232115.ts
  29. 0 66
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223232614.ts
  30. 0 67
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223233228.ts
  31. 0 67
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223235522.ts
  32. 0 67
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223235734.ts
  33. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224003203.html
  34. 0 35
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224003220.html
  35. 2 2
      soul-app/src/app/consult-picture/consult-picture.component.html
  36. 2 2
      soul-app/src/app/consult-picture/consult-picture.component.ts
  37. 2 2
      soul-app/src/app/page-psysurvey/page-psysurvey.component.html
  38. 8 17
      soul-app/src/app/page-psysurvey/page-psysurvey.component.ts
  39. 9 9
      soul-app/src/app/page-publishsurvey/page-publishsurvey.component.ts
  40. 13 1
      soul-app/src/app/report-modal/report-modal.component.html
  41. 17 49
      soul-app/src/app/report-modal/report-modal.component.ts
  42. 0 1
      soul-app/src/app/tab1/tab1.page.ts
  43. 1 1
      soul-app/src/app/tab2/README.md
  44. 0 1
      soul-app/src/app/tab2/tab2.page.html
  45. 28 53
      soul-app/src/app/tab2/tab2.page.scss
  46. 2 47
      soul-app/src/app/tab2/tab2.page.ts
  47. 1 1
      soul-app/src/app/tab3/tab3.page.html
  48. 4 33
      soul-app/src/app/tab3/tab3.page.ts
  49. 3 2
      soul-app/src/app/tabs/tabs.page.ts
  50. 5 0
      soul-app/src/app/tabs/tabs.routes.ts
  51. 1 1
      soul-app/src/app/user-evaluate/user-evaluate.component.html
  52. 2 1
      soul-app/src/app/user-evaluate/user-evaluate.component.ts
  53. 6 7
      soul-app/src/app/user.service.ts
  54. 52 0
      soul-app/src/lib/cloud.evaluate.ts
  55. 102 107
      soul-app/src/lib/ncloud.ts

+ 0 - 3
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.html

@@ -1,3 +0,0 @@
-<p>
-  page-psysurvey works!
-</p>

+ 0 - 0
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.scss


+ 0 - 15
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.ts

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

+ 0 - 39
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164909.scss

@@ -1,39 +0,0 @@
-/* 设置页面背景色 */
-ion-content {
-    --background: #ffffff; /* 白色背景 */
-  }
-  ion-title {
-    font-size: 24px; /* 增大字体大小 */
-    font-weight: bold; /* 加粗 */
-  }
-  /* 设置卡片的样式 */
-  ion-list {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-button {
-    font-size: 15px; /* 增大字体大小 */
-    margin-top: 8px; /* 上间距,仅在需要时添加 */
-    text-transform: none; /* 按钮文字不变形 */
-    height: 35px;
-  }
-  
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  
-  /* 设置按钮的样式(如果按钮不在顶部方框内) */
-  
-  ion-toolbar {
-  margin: auto;
-  }
-  .title-text{
-  position: absolute;
-  display: flex;
-  left: 65px;
-  margin: auto;
-  top: 10px;
-  }
-  

+ 0 - 39
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164930.scss

@@ -1,39 +0,0 @@
-/* 设置页面背景色 */
-ion-content {
-    --background: #ffffff; /* 白色背景 */
-  }
-  ion-title {
-    font-size: 24px; /* 增大字体大小 */
-    font-weight: bold; /* 加粗 */
-  }
-  /* 设置卡片的样式 */
-  ion-list {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-button {
-    font-size: 15px; /* 增大字体大小 */
-    margin-top: 8px; /* 上间距,仅在需要时添加 */
-    text-transform: none; /* 按钮文字不变形 */
-    height: 35px;
-  }
-  
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  
-  /* 设置按钮的样式(如果按钮不在顶部方框内) */
-  
-  ion-toolbar {
-  margin: auto;
-  }
-  .title-text{
-  position: absolute;
-  display: flex;
-  left: 125px;
-  margin: auto;
-  top: 10px;
-  }
-  

+ 0 - 14
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164931.html

@@ -1,14 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>

+ 0 - 27
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217165144.ts

@@ -1,27 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader, IonTitle, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,ExploreContainerComponent,
-      IonList,IonListHeader,IonItem,
-      IonLabel,IonIcon,IonButton,
-      IonInput,IonSearchbar,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-  ngOnInit() {}
-
-}

+ 0 - 27
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217165208.ts

@@ -1,27 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader, IonTitle, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,
-      IonLabel,IonIcon,IonButton,
-      IonInput,IonSearchbar,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-  ngOnInit() {}
-
-}

+ 0 - 53
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183550.scss

@@ -1,53 +0,0 @@
-/* 设置页面背景色 */
-ion-content {
-    --background: #ffffff; /* 白色背景 */
-  }
-
-  ion-card {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-card-title {
-    font-weight:bold;
-  }
-  
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  ion-title {
-    font-size: 24px; /* 增大字体大小 */
-    font-weight: bold; /* 加粗 */
-  }
-  /* 设置卡片的样式 */
-  ion-list {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-button {
-    font-size: 15px; /* 增大字体大小 */
-    margin-top: 8px; /* 上间距,仅在需要时添加 */
-    text-transform: none; /* 按钮文字不变形 */
-    height: 35px;
-  }
-  
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  
-  /* 设置按钮的样式(如果按钮不在顶部方框内) */
-  
-  ion-toolbar {
-  margin: auto;
-  }
-  .title-text{
-  position: absolute;
-  display: flex;
-  left: 125px;
-  margin: auto;
-  top: 10px;
-  }
-  

+ 0 - 41
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183617.html

@@ -1,41 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>热门话题</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        <ion-list>
-          <ion-item *ngFor="let topic of topics">
-            <ion-label>
-              <h2>{{ topic.title }}</h2>
-              <p>{{ topic.description }}</p>
-            </ion-label>
-            <ion-buttons slot="end">
-            <ion-button color="primary" fill="solid" (click)="viewDetails(topic.id)">
-              <span class="button-text">查看详情</span>
-            </ion-button>
-          </ion-buttons>
-          </ion-item>
-        </ion-list>
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-</ion-content>

+ 0 - 20
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183929.html

@@ -1,20 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  
-
-</ion-content>

+ 0 - 29
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184007.html

@@ -1,29 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>热门话题</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-</ion-content>

+ 0 - 27
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184013.ts

@@ -1,27 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-  ngOnInit() {}
-
-}

+ 0 - 27
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184057.ts

@@ -1,27 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-  ngOnInit() {}
-
-}

+ 0 - 40
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184947.html

@@ -1,40 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>问卷通知</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>发布问卷</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-</ion-content>

+ 0 - 36
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193359.html

@@ -1,36 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>心理问卷调查通知</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button  expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 0 - 30
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193717.ts

@@ -1,30 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/publishsurvey'])
-   }
-  ngOnInit() {}
-
-}

+ 0 - 36
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193720.html

@@ -1,36 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>心理问卷调查通知</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 0 - 36
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193742.html

@@ -1,36 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>心理问卷调查通知</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 0 - 36
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218194414.html

@@ -1,36 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>心理问卷调查通知</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-  
-    <ion-button class="publish" (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  
-
-
-</ion-content>

+ 0 - 30
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218194849.ts

@@ -1,30 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-  ngOnInit() {}
-
-}

+ 0 - 53
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218195200.scss

@@ -1,53 +0,0 @@
-/* 设置页面背景色 */
-ion-content {
-    --background: #ffffff; /* 白色背景 */
-  }
-
-  ion-card {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-card-title {
-    font-weight:bold;
-  }
-  
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  ion-title {
-    font-size: 24px; /* 增大字体大小 */
-    font-weight: bold; /* 加粗 */
-  }
-  /* 设置卡片的样式 */
-  ion-list {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-button {
-    font-size: 15px; /* 增大字体大小 */
-    margin-top: 8px; /* 上间距,仅在需要时添加 */
-    text-transform: none; /* 按钮文字不变形 */
-    height: 35px;
-  }
-  
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  
-  /* 设置按钮的样式(如果按钮不在顶部方框内) */
-  
-  ion-toolbar {
-  margin: auto;
-  }
-  .title-text{
-  position: absolute;
-  display: flex;
-  left: 125px;
-  margin: auto;
-  top: 10px;
-  }
-  

+ 0 - 36
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218203144.html

@@ -1,36 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-
-  <section>
-    <ion-card>
-      <ion-card-header>
-        <ion-card-title>心理问卷调查通知</ion-card-title>
-      </ion-card-header>
-      <ion-card-content>
-        
-      </ion-card-content>
-    </ion-card>
-  </section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 0 - 30
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218205727.ts

@@ -1,30 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/publishsurvey'])
-   }
-  ngOnInit() {}
-
-}

+ 0 - 30
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241219161716.ts

@@ -1,30 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-
-  constructor(private router: Router) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-  ngOnInit() {}
-
-}

+ 0 - 35
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223214953.html

@@ -1,35 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-<section *ngIf="filteredSurveys.length > 0">
-  <ion-card *ngFor="let survey of filteredSurveys">
-    <ion-card-header>
-      <ion-card-title>{{ survey.title }}</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <p>链接: <a [href]="survey.link" target="_blank">{{ survey.link }}</a></p>
-    </ion-card-content>
-  </ion-card>
-</section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 0 - 68
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223214958.ts

@@ -1,68 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit, Injectable } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-  import { HttpClient } from '@angular/common/http';
-  import { UserService } from '../user.service'; // 确保路径正确
-
-
-  @Injectable({
-    providedIn: 'root'
-  })
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule,HttpClient,Injectable
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-  surveys: any[] = []; // 存储问卷通知
-  filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
-
-  constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-
-   ngOnInit() {
-    // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
-      this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
-  }
-
-  getSurveys() {
-    this.http.get('http://127.0.0.1:4040/apps/DevServer/browser/survey').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
-  }
-  filterSurveys() {
-    this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
-    });
-  }
-  
-  
-}

+ 0 - 66
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223232115.ts

@@ -1,66 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-  import { HttpClient } from '@angular/common/http';
-  import { UserService } from '../user.service'; // 确保路径正确
-
-
-  
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule,HttpClient
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-  surveys: any[] = []; // 存储问卷通知
-  filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
-
-  constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-
-   ngOnInit() {
-    // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
-      this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
-  }
-
-  getSurveys() {
-    this.http.get('http://127.0.0.1:4040/apps/DevServer/browser/survey').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
-  }
-  filterSurveys() {
-    this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
-    });
-  }
-  
-  
-}

+ 0 - 66
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223232614.ts

@@ -1,66 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-  import { HttpClient } from '@angular/common/http';
-  import { UserService } from '../user.service'; // 确保路径正确
-
-
-  
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-  surveys: any[] = []; // 存储问卷通知
-  filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
-
-  constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-
-   ngOnInit() {
-    // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
-      this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
-  }
-
-  getSurveys() {
-    this.http.get('http://127.0.0.1:4040/apps/DevServer/browser/survey').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
-  }
-  filterSurveys() {
-    this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
-    });
-  }
-  
-  
-}

+ 0 - 67
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223233228.ts

@@ -1,67 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-  import { HttpClient } from '@angular/common/http';
-  import { UserService } from '../user.service'; // 确保路径正确
-  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
-
-
-  
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,FormsModule,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-  surveys: any[] = []; // 存储问卷通知
-  filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
-
-  constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-
-   ngOnInit() {
-    // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
-      this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
-  }
-
-  getSurveys() {
-    this.http.get('http://127.0.0.1:4040/apps/DevServer/browser/survey').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
-  }
-  filterSurveys() {
-    this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
-    });
-  }
-  
-  
-}

+ 0 - 67
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223235522.ts

@@ -1,67 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-  import { HttpClient } from '@angular/common/http';
-  import { UserService } from '../user.service'; // 确保路径正确
-  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
-
-
-  
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,FormsModule,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-  surveys: any[] = []; // 存储问卷通知
-  filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
-
-  constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-
-   ngOnInit() {
-    // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
-      this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
-  }
-
-  getSurveys() {
-    this.http.get('http://127.0.0.1:4040/apps/DevServer/browser/survey').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
-  }
-  filterSurveys() {
-    this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
-    });
-  }
-  
-  
-}

+ 0 - 67
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223235734.ts

@@ -1,67 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
-  import { HttpClient } from '@angular/common/http';
-  import { UserService } from '../user.service'; // 确保路径正确
-  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
-
-
-  
-
-@Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
-  standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,FormsModule,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
-})
-export class PagePsysurveyComponent  implements OnInit {
-  surveys: any[] = []; // 存储问卷通知
-  filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
-
-  constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
-  goTab1(){
-    this.router.navigate(['tabs/tab1']);
-   }
-   goPublishSurvey(){
-    this.router.navigate(['tabs/page-publishsurvey'])
-   }
-
-   ngOnInit() {
-    // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
-      this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
-  }
-
-  getSurveys() {
-    this.http.get('http://127.0.0.1:4040/').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
-  }
-  filterSurveys() {
-    this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
-    });
-  }
-  
-  
-}

+ 0 - 36
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224003203.html

@@ -1,36 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-<section *ngIf="filteredSurveys.length > 0">
-  <ion-card *ngFor="let survey of filteredSurveys">
-    <ion-card-header>
-      <ion-card-title>问卷通知</ion-card-title>
-      <ion-card-title>{{ survey.title }}</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <p>链接: <a [href]="survey.link" target="_blank">{{ survey.link }}</a></p>
-    </ion-card-content>
-  </ion-card>
-</section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 0 - 35
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224003220.html

@@ -1,35 +0,0 @@
-<ion-header>
-  <ion-toolbar>
-    <div class="toolbar-content">
-      <div class="button-container">
-        <ion-button (click)="goTab1()" fill="clear">
-          <ion-icon name="chevron-back" slot="start"></ion-icon>返回
-        </ion-button>
-      </div>
-      <ion-title class="title-text">
-        心理普查
-      </ion-title>
-    </div>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-<section *ngIf="filteredSurveys.length > 0">
-  <ion-card *ngFor="let survey of filteredSurveys">
-    <ion-card-header>
-      <ion-card-title>{{ survey.title }}</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <p>链接: <a [href]="survey.link" target="_blank">{{ survey.link }}</a></p>
-    </ion-card-content>
-  </ion-card>
-</section>
-
-  <div  style="display: flex; justify-content: center; margin-top: auto;">
-    <ion-button (click)="goPublishSurvey()" expand="full">
-      发布问卷
-    </ion-button>
-  </div>
-
-
-</ion-content>

+ 2 - 2
soul-app/src/app/consult-picture/consult-picture.component.html

@@ -1,7 +1,7 @@
 <ion-header [translucent]="true">
   <ion-toolbar>
     <ion-title>
-      示例:logo生成{{imagineWork?.progress || 0}}
+      示例:手机壁纸生成{{imagineWork?.progress || 0}}
     </ion-title> 
   </ion-toolbar>
 </ion-header>
@@ -9,7 +9,7 @@
 <ion-content [fullscreen]="true">
   <!-- 生成提示词 -->
   <ion-textarea [value]="userPrompt" (ionInput)="promptInput($event)" placeholder="图片提示词" autoGrow="true"></ion-textarea>
-  <ion-button (click)="createImage()" expand="block">生成logo</ion-button>
+  <ion-button (click)="createImage()" expand="block">生成414*896大小手机壁纸</ion-button>
   <!--logo画面提示词-->
 
   <div>

+ 2 - 2
soul-app/src/app/consult-picture/consult-picture.component.ts

@@ -16,7 +16,7 @@ import { DalleOptions, ImagineWork,FmodeChatCompletion } from 'fmode-ng';
 })
 export class ConsultPictureComponent  implements OnInit {
 
-  userPrompt:string = "app名称为...的logo,一个爱心,聊天气泡,易于识别,颜色方案应体现温暖感和清晰感,建议使用...色和...色等色调,极具美观性,可爱风格"
+  userPrompt:string = "生成一个414*896大小手机壁纸图片,在柔和的淡粉色和温暖的浅黄色交织中,油画风格,通过小爱心、小星星和小气泡点缀,营造出一种温馨和放松的氛围,让人感到心灵的宁静与舒适。"
   promptInput(ev:any){
     this.userPrompt = ev.detail.value;
   }
@@ -34,7 +34,7 @@ export class ConsultPictureComponent  implements OnInit {
   async createImage(){
     this.imagineWork = new ImagineWork();
     //文本生成
-    let PromptTemplate = `请你作为一名专业的设计师,结合logo的基础设计元素帮我设计一个贴切我项目的logo
+    let PromptTemplate = `请你作为一名专业的设计师,结合壁纸的基础设计元素帮我设计一个贴切我项目的手机壁纸
     要求如下:
     ${this.userPrompt}
     `

+ 2 - 2
soul-app/src/app/page-psysurvey/page-psysurvey.component.html

@@ -17,10 +17,10 @@
 <section *ngIf="filteredSurveys.length > 0">
   <ion-card *ngFor="let survey of filteredSurveys">
     <ion-card-header>
-      <ion-card-title>{{ survey.title }}</ion-card-title>
+      <ion-card-title>{{ survey.get('title') }}</ion-card-title>
     </ion-card-header>
     <ion-card-content>
-      <p>链接: <a [href]="survey.link" target="_blank">{{ survey.link }}</a></p>
+      <p>链接: <a [href]="survey.get('link')" target="_blank">{{ survey.get('link') }}</a></p>
     </ion-card-content>
   </ion-card>
 </section>

+ 8 - 17
soul-app/src/app/page-psysurvey/page-psysurvey.component.ts

@@ -6,6 +6,7 @@ import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,
   import { HttpClient } from '@angular/common/http';
   import { UserService } from '../user.service'; // 确保路径正确
   import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+import { CloudQuery } from 'src/lib/ncloud';
 
 
   
@@ -37,29 +38,19 @@ export class PagePsysurveyComponent  implements OnInit {
 
    ngOnInit() {
     // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
+    let user = this.userService.getCurrentUser()
+      this.userApartment = user.get("apartment"); // 从用户数据中获取学院
       this.getSurveys(); // 在获取到用户信息后获取问卷
-    }, error => {
-      console.error('获取用户信息时出错:', error);
-      // 可以设置一个默认值或处理错误
-    });
   }
 
-  getSurveys() {
-    this.http.get('https://dev.fmode.cn/parse').subscribe(
-      (response: any) => {
-        this.surveys = response; // 假设响应是问卷数组
-        this.filterSurveys(); // 过滤问卷
-      },
-      error => {
-        console.error('获取问卷时出错:', error);
-      }
-    );
+  async getSurveys() {
+      let query = new CloudQuery("Survey");
+      this.surveys = await query.find(); // 假设响应是问卷数组
+      this.filterSurveys(); // 过滤问卷
   }
   filterSurveys() {
     this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
+      return survey.get("audience") === this.userApartment || survey.get("audience") === 'all';
     });
   }
   

+ 9 - 9
soul-app/src/app/page-publishsurvey/page-publishsurvey.component.ts

@@ -4,6 +4,7 @@ import { IonHeader,IonButton, IonList, IonListHeader, IonItem,IonContent, IonIco
   import { CommonModule } from '@angular/common';
   import { FormsModule } from '@angular/forms'; // 导入 FormsModule
   import { HttpClient } from '@angular/common/http';
+import { CloudObject } from 'src/lib/ncloud';
 
 
 @Component({
@@ -45,15 +46,14 @@ export class PagePublishsurveyComponent  implements OnInit {
       audience: this.targetAudience,
     };
 
-    this.http.post('https://dev.fmode.cn/parse/survey', surveyData).subscribe(
-      response => {
-        console.log('问卷已成功发布:', response);
-        
-      },
-      error => {
-        console.error('发布问卷时出错:', error);
-      }
-    );
+    let survey = new CloudObject("Survey");
+    survey.set(surveyData)
+    survey.save().then(data=>{
+      console.log('问卷已成功发布',data);
+    }).catch(err=>{
+      console.error('发布问卷时出错');
+    })
+
   }
 
   publishSocietySurvey() {

+ 13 - 1
soul-app/src/app/report-modal/report-modal.component.html

@@ -8,5 +8,17 @@
 </ion-header>
 
 <ion-content>
-  <pre>{{ report }}</pre> <!-- 显示报告内容 -->
+<section>
+  <ion-card>
+    <ion-list>
+      <ion-item *ngFor="let chatrecord of chatrecordList">
+        <ion-label>
+          <p style="font-size: 18px; line-height: 1.5; color: #333; margin: 8px 0;" *ngFor="let contentItem of chatrecord.get('content')">
+            {{ contentItem.content }}
+          </p>
+        </ion-label>
+      </ion-item>
+    </ion-list>
+  </ion-card>
+</section>
 </ion-content>

+ 17 - 49
soul-app/src/app/report-modal/report-modal.component.ts

@@ -1,64 +1,32 @@
-import { Component, OnInit,Input } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { IonCard, IonItem, IonLabel, IonList } from '@ionic/angular/standalone';
 import { IonButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar, ModalController } from '@ionic/angular/standalone';
+import { CloudObject, CloudQuery } from 'src/lib/ncloud';
 
 @Component({
   selector: 'app-report-modal',
   templateUrl: './report-modal.component.html',
   styleUrls: ['./report-modal.component.scss'],
   standalone: true,
-  imports: [IonHeader,IonToolbar,IonTitle,
-    IonButtons,IonButton,IonContent
+  imports: [IonHeader,IonToolbar,IonTitle,CommonModule,
+    IonButtons,IonButton,IonContent,IonCard,IonList,IonItem,IonLabel
   ],
 })
 export class ReportModalComponent  implements OnInit {
 
-  @Input() report: string=''; // 接收报告内容
-  @Input() consult: any; // 接收 Consult 对象
-
-  constructor(private modalCtrl: ModalController) {}
-
-  async generateReport() {
-    if (!this.consult) {
-      console.error('Consult对象未定义');
-      return;
-    }
-    let chatContent = this.consult.get('content') || [];
-    let report = "聊天记录报告\n\n";
-    
-    if (chatContent.length === 0) {
-      report += "没有聊天记录。\n\n";
-    } else {
-      chatContent.forEach((message: any, index: number) => {
-        report += `消息 ${index + 1}:\n\n`;
-        report += `内容: ${message.content}\n\n`;
-        
-        const sentiment = this.analyzeSentiment(message.content);
-        report += `心晴分析: ${sentiment}\n\n`;
-      });
-    }
-    
-    this.report = report; // 更新报告内容
-  }
-
-  analyzeSentiment(text: string): string {
-    if (text.includes("好") || text.includes("喜欢")) {
-      return "积极";
-    } else if (text.includes("坏") || text.includes("不喜欢")) {
-      return "消极";
-    } else {
-      return "中性";
-    }
-  }
-
+  constructor(private modalCtrl: ModalController,private router: Router) {}
   closeModal() {
-    //this.modalCtrl.dismiss(); // 关闭模态框
-    this.modalCtrl.dismiss({ report: this.report }); // 关闭模态框并返回报告内容
+    this.router.navigate(['tabs/tab3']);
   }
-
-  ionViewWillEnter() {
-    this.generateReport(); // 页面进入时生成报告
+  chatrecordList:Array<CloudObject>=[]
+  async loadChatRecordList(){
+    let query = new CloudQuery("ChatRecord");
+    this.chatrecordList = await query.find();
+    console.log(this.chatrecordList.map(record => record.get('content')));
+  }
+  ngOnInit() {
+    this.loadChatRecordList()
   }
-
-  ngOnInit() {}
-
 }

+ 0 - 1
soul-app/src/app/tab1/tab1.page.ts

@@ -91,7 +91,6 @@ export class Tab1Page {
     // 处理点击评价的逻辑
     // 验证用户登录
     let currentUser = new CloudUser();
-    let userPrompt = ``
     if(!currentUser?.id){
       console.log("用户未登录,请登录后重试")
       let user = await openUserLoginModal(this.modalCtrl)

+ 1 - 1
soul-app/src/app/tab2/README.md

@@ -36,4 +36,4 @@
     - 问题三: “如何改善人际关系?”
         - 建议: “多与他人沟通,倾听对方的感受。”
 ##### 请您作为一名专业的Ionic前端工程师,帮我运用ionic v7 或v8及以上的angular版本standalone模式编写,选择合适的ionic组件来重构以上产品页面的各个区域和内容,如果涉及到图形效果请用ion-icon。并给出整个页面的tab2.page.html代码还有tab2.page.ts代码
-# Tab2 页面数据库建表
+# Tab2 页面数据库建表

+ 0 - 1
soul-app/src/app/tab2/tab2.page.html

@@ -12,7 +12,6 @@
   </ion-toolbar>
 </ion-header>
 
-
 <ion-content>
   <!-- 智能陪聊区 -->
   <section>

+ 28 - 53
soul-app/src/app/tab2/tab2.page.scss

@@ -1,61 +1,36 @@
-/* 设置页面背景色 */
 ion-content {
-  --background: #f9f9f9; /* 设置内容背景色 */
+  background: transparent !important; /* 确保ion-content透明 */
+  color: var(--ion-text-color); /* 保持文本颜色 */
 }
+
+ion-card {
+  background: transparent ; /* 确保卡片背景透明 */
+}
+
+ion-item {
+  background: transparent ; /* 确保列表项背景透明 */
+  
+}
+
 ion-avatar {
-    width: 50px; /* 或者你需要的任何尺寸 */
-    height: 50px; /* 保持宽高一致,避免变形 */
-  }
-   
-  ion-avatar img {
-    width: 100%; /* 让图片填满avatar */
-    height: auto; /* 保持图片比例 */
-  }
-  .header-image {
-    width: 100%;
-    height: auto; /* 保持图片比例 */
-    border-radius: 50%; /* 可选:将图片设置为圆形 */
-  }
-    /* 设置搜索框的样式 */
-    ion-searchbar {
-      padding: 10px; /* 内边距 */
-      border-radius: 4px; /* 圆角 */
-      font-size: 16px; /* 字体大小 */
-    }
-    /* 设置卡片的样式 */
-  ion-card {
-    margin: 10px; /* 卡片之间的间距 */
-    border-radius: 10px; /* 圆角效果 */
-    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 阴影效果 */
-  }
-  ion-card-title {
-    font-weight:bold;
-  }
-  ion-card-header {
-    --background: #ffffff; /* 使用CSS变量设置背景颜色为白色 */
-    /* 或者,如果你不使用CSS变量,可以直接使用background-color属性 */
-    position: relative; /* 设置相对定位 */
-  }
-  ion-toolbar {
-    --background: #ffffff; /* 同样使用CSS变量,但通常不是必需的 */
-  }
-  /* 设置列表项的样式 */
-  ion-item {
-    margin: 5px 0; /* 列表项之间的间距 */
-  }
-  ion-button {
-    font-size: 15px; /* 增大字体大小 */
-    margin-top: 8px; /* 上间距,仅在需要时添加 */
-    text-transform: none; /* 按钮文字不变形 */
-    height: 35px;
+  width: 50px ; /* 或者你需要的任何尺寸 */
+  height: 50px ; /* 保持宽高一致,避免变形 */
 }
 
+ion-avatar img {
+  width: 100% ; /* 让图片填满avatar */
+  height: auto ; /* 保持图片比例 */
+}
 
-.custom-searchbar {
-  --border-radius: 20px; /* 调整弯曲程度 */
-  --background: #f0f0f0; /* 可以自定义背景颜色 */
+ion-searchbar {
+  padding: 10px ; /* 内边距 */
+  border-radius: 4px ; /* 圆角 */
+  font-size: 16px ; /* 字体大小 */
 }
-ion-label p {
-  font-size: 1em; /* 调整字体大小,可以根据需要修改 */
-  line-height: 1.5; /* 调整行间距,使文本更易读 */
+
+ion-button {
+  font-size: 15px ; /* 增大字体大小 */
+  margin-top: 8px ; /* 上间距,仅在需要时添加 */
+  text-transform: none ; /* 按钮文字不变形 */
+  height: 35px ;
 }

+ 2 - 47
soul-app/src/app/tab2/tab2.page.ts

@@ -93,7 +93,7 @@ export class Tab2Page {
     let ACL: any = {
         "*": { read: true, write: true }
     };
-    this.consult.set({
+    consult.set({
         title: `${partner.get('expertise') || ""}领域聊天记录${dateStr}-${partner.get('name')}`,
         [isConsult ? 'chatpartner' : 'chatcompanion']: partner.toPointer(),
         user: currentUser.toPointer(),
@@ -125,7 +125,7 @@ export class Tab2Page {
             let content: any = message?.content;
             // 更新 consult 对象的内容
             consult.set({
-                content: chat.messageList, // 直接存储数组
+                content: chat.messageList, // 存储用户消息
             });
             // 仅在内容发生变化时保存
             consult.save();
@@ -137,51 +137,6 @@ export class Tab2Page {
     openChatPanelModal(this.modalCtrl, options);
 }
 
-// async generateReport() {
-//   if (!this.consult) {
-//     console.error('Consult对象未定义');
-//     return;
-//   }
-//   let chatContent = this.consult.get('content') || [];
-//   // 检查 chatContent 是否有效
-//   let report = "聊天记录报告\n\n";
-//   if (chatContent.length === 0) {
-//       report += "没有聊天记录。\n\n";
-//   } else {
-//       chatContent.forEach((message: any, index: number) => {
-//           report += `消息 ${index + 1}:\n\n`;
-//           report += `内容: ${message.content}\n\n`;
-          
-//           // 假设有一个情感分析函数 analyzeSentiment
-//           const sentiment = this.analyzeSentiment(message.content);
-//           report += `心晴分析: ${sentiment}\n\n`;
-//       });
-//   }
-//   // 显示报告
-//   await this.showReportModal(report);
-//   }
-//   analyzeSentiment(text:String) {
-//     // 这里可以使用简单的关键词匹配或更复杂的模型来分析情感
-//     if (text.includes("好") || text.includes("喜欢")) {
-//         return "积极";
-//     } else if (text.includes("坏") || text.includes("不喜欢")) {
-//         return "消极";
-//     } else {
-//         return "中性";
-//     }
-//   }
-//   extractKeywords(text:String): string[] {
-//     // 这里可以实现简单的关键词提取逻辑
-//     return text.split(/\s+/).filter(word => word.length > 0); // 示例:提取长度大于0的单词
-//   }
-//   async showReportModal(report: string) {
-//     const modal = await this.modalCtrl.create({
-//       component: ReportModalComponent, // 你需要创建这个组件来显示报告
-//       componentProps: { report }
-//     });
-//     return await modal.present();
-//   }
-
   questions = [
     {
       title: '如何应对焦虑?',

+ 1 - 1
soul-app/src/app/tab3/tab3.page.html

@@ -64,7 +64,7 @@
 
     <!-- 我的报告 -->
     <ion-item (click)="openReportModal()">
-      <ion-icon name="heart-outline" slot="start"></ion-icon>
+      <ion-icon name="book-outline" slot="start"></ion-icon>
       <ion-label>我的报告</ion-label>
       <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
     </ion-item>

+ 4 - 33
soul-app/src/app/tab3/tab3.page.ts

@@ -8,7 +8,7 @@ import { ModalController } from '@ionic/angular/standalone';
 import { openUserEditModal } from 'src/lib/user/modal-user-edit/modal-user-edit.component';
 import { openInfoModal } from '../info-modal/info-modal.component';
 import { openIdentityVerificationModal } from 'src/lib/user/modal-identity-verification/modal-identity-verification.component';
-import { ReportModalComponent } from '../report-modal/report-modal.component';
+import { Router } from '@angular/router';
 
 @Component({
   selector: 'app-tab3',
@@ -24,7 +24,7 @@ import { ReportModalComponent } from '../report-modal/report-modal.component';
 export class Tab3Page {
 
   currentUser:CloudUser|undefined
-  constructor(private modalCtrl:ModalController) {
+  constructor(private modalCtrl:ModalController,private router: Router) {
     this.currentUser = new CloudUser();
   }
   async login(){
@@ -53,36 +53,7 @@ export class Tab3Page {
   identityVerificationModal(){
     openIdentityVerificationModal(this.modalCtrl)
   }
-
-  async openReportModal() {
-    const modal = await this.modalCtrl.create({
-      component: ReportModalComponent,
-      componentProps: {
-        consult: this.getConsultData() // 传递 Consult 对象
-      }
-    });
-    
-    await modal.present();
-    const { data } = await modal.onWillDismiss();
-    if (data) {
-      console.log('生成的报告:', data.report);
-    }
-  }
-
-  getConsultData() {
-    // 这里返回 Consult 对象的逻辑
-    return {
-      get: (key: string) => {
-        // 模拟返回聊天记录
-        if (key === 'content') {
-          return [
-            { content: '我喜欢这项服务!' },
-            { content: '这真是太棒了!' },
-            { content: '我不喜欢这个选项。' }
-          ];
-        }
-        return null;
-      }
-    };
+  openReportModal() {
+    this.router.navigate(['tabs/report-modal'])
   }
 }

+ 3 - 2
soul-app/src/app/tabs/tabs.page.ts

@@ -6,7 +6,8 @@ import { home, chatbubbles, person,chevronBack, headset, personOutline, shieldCh
    informationCircleOutline,
    chevronDown,
    chevronUp,
-   star, } from 'ionicons/icons';
+   star,
+   bookOutline, } from 'ionicons/icons';
 
 
 @Component({
@@ -21,7 +22,7 @@ export class TabsPage {
 
   constructor() {
     addIcons({ home, chatbubbles, person ,chevronBack,headset,personOutline,shieldCheckmarkOutline,chevronForwardOutline,heartOutline,notificationsOutline,
-      settingsOutline,informationCircleOutline,chevronDown,chevronUp,star});
+      settingsOutline,informationCircleOutline,chevronDown,chevronUp,star,bookOutline});
   }
 
 }

+ 5 - 0
soul-app/src/app/tabs/tabs.routes.ts

@@ -51,6 +51,11 @@ export const routes: Routes = [
         loadComponent: () =>
           import('../consult-picture/consult-picture.component').then((m) => m.ConsultPictureComponent),
       },
+      {
+        path: 'report-modal',
+        loadComponent: () =>
+          import('../report-modal/report-modal.component').then((m) => m.ReportModalComponent),
+      },
       {
         path: '',
         redirectTo: '/tabs/tab1',

+ 1 - 1
soul-app/src/app/user-evaluate/user-evaluate.component.html

@@ -21,7 +21,7 @@
       [value]="userData['rating']" 
       (ionChange)="userDataChange('rating', $event)" 
       label="星星数量" 
-      placeholder="请您输入星星数量(1-5)" 
+      placeholder="请您输入星星数量(整数1-5)" 
       min="1" 
       max="5"></ion-input>
   </ion-item>

+ 2 - 1
soul-app/src/app/user-evaluate/user-evaluate.component.ts

@@ -3,7 +3,8 @@ import { ModalController } from '@ionic/angular/standalone';
 import { IonButton, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, 
   IonContent, IonHeader, IonInput, IonItem, IonLabel, IonSegment, IonSegmentButton,
    IonTitle, IonToolbar } from '@ionic/angular/standalone';
-import { CloudEvaluate, CloudUser } from 'src/lib/ncloud';
+import { CloudUser } from 'src/lib/ncloud';
+import { CloudEvaluate } from 'src/lib/cloud.evaluate';
 
 @Component({
   selector: 'app-user-evaluate',

+ 6 - 7
soul-app/src/app/user.service.ts

@@ -1,17 +1,16 @@
 import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { Observable } from 'rxjs';
-
+import { CloudUser } from 'src/lib/ncloud';
+import { Observable } from "rxjs"
 @Injectable({
   providedIn: 'root'
 })
 export class UserService {
-  private apiUrl = 'http://127.0.0.1:4040/apps/DevServer/browser/survey'; // 替换为你的 API URL
 
-  constructor(private http: HttpClient) {}
+  constructor() {}
 
   // 获取当前用户信息
-  getCurrentUser(): Observable<any> {
-    return this.http.get(`${this.apiUrl}/current-user`); // 假设这个 API 返回当前用户的信息
+  getCurrentUser(): CloudUser {
+    let user = new CloudUser()
+    return user
   }
 }

+ 52 - 0
soul-app/src/lib/cloud.evaluate.ts

@@ -0,0 +1,52 @@
+import { CloudObject, CloudUser } from './ncloud';
+
+// CloudEvaluate.ts
+export class CloudEvaluate extends CloudObject {
+    userData: Record<string, any>;
+    currentUser: CloudUser; // 添加当前用户的引用
+    modalCtrl: any; // 假设 modalCtrl 是通过构造函数传入的
+
+    constructor(userData: Record<string, any>, currentUser: CloudUser,modalCtrl: any) {
+        super("_ChatEvaluate"); 
+        this.userData = userData; // 保存用户评价数据
+        this.currentUser = currentUser; // 保存当前用户
+        this.modalCtrl = modalCtrl; // 保存模态控制器
+    }
+
+    /** 保存评价 */
+    override async save() {
+        // 确保 rating 是数字类型
+        if (this.userData['rating']) {
+            this.userData['rating'] = Number(this.userData['rating']);
+        }
+        console.log('保存评价被调用'); // 调试日志
+
+        // 调用后端 API 保存评价
+        const response = await fetch(`http://dev.fmode.cn:1337/parse/classes/ChatEvaluate`, {
+            headers: {
+                "x-parse-application-id": "dev",
+                "Content-Type": "application/json"
+            },
+            body: JSON.stringify({
+                content: this.userData['content'],
+                rating: this.userData['rating'],
+                avatar: this.currentUser.data?.['avatar'], // 假设用户头像存储在 data.avatar 中
+                user: { __type: "Pointer", className: "_User", objectId: this.currentUser.id } // 添加用户指针
+            }),
+            method: "POST"
+        });
+
+        const result = await response.json();
+        console.log('保存结果:', result); // 输出保存结果
+
+        if (result?.error) {
+            console.error(result?.error);
+            console.error('评价保存失败');
+            return null;
+        }
+
+        console.log('评价保存成功:', result);
+        this.modalCtrl.dismiss(result, "confirm"); // 关闭模态框并传递结果
+        return result; // 返回保存的结果
+    }
+}

+ 102 - 107
soul-app/src/lib/ncloud.ts

@@ -1,10 +1,10 @@
 // CloudObject.ts
 export class CloudObject {
-    id: string | null = null; // 编号
-    className: string; // 名称
+    className: string;
+    id: string | null = null;
     createdAt:any;
     updatedAt:any;
-    data: Record<string, any> = {}; // 属性、内容
+    data: Record<string, any> = {};
 
     constructor(className: string) {
         this.className = className;
@@ -29,7 +29,7 @@ export class CloudObject {
 
     async save() {
         let method = "POST";
-        let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}`;
+        let url = `https://dev.fmode.cn/parse/classes/${this.className}`;
 
         // 更新
         if (this.id) {
@@ -61,7 +61,7 @@ export class CloudObject {
 
     async destroy() {
         if (!this.id) return;
-        const response = await fetch(`http://dev.fmode.cn:1337/parse/classes/${this.className}/${this.id}`, {
+        const response = await fetch(`https://dev.fmode.cn/parse/classes/${this.className}/${this.id}`, {
             headers: {
                 "x-parse-application-id": "dev"
             },
@@ -88,7 +88,6 @@ export class CloudQuery {
         this.className = className;
     }
 
-    // 作用是将查询参数转换为对象
     include(...fileds:string[]) {
         this.queryParams["include"] = fileds;
     }
@@ -113,11 +112,12 @@ export class CloudQuery {
     }
 
     equalTo(key: string, value: any) {
+        if (!this.queryParams["where"]) this.queryParams["where"] = {};
         this.queryParams["where"][key] = value;
     }
 
     async get(id: string) {
-        const url = `http://dev.fmode.cn:1337/parse/classes/${this.className}/${id}?`;
+        const url = `https://dev.fmode.cn/parse/classes/${this.className}/${id}?`;
 
         const response = await fetch(url, {
             headers: {
@@ -131,34 +131,31 @@ export class CloudQuery {
         });
 
         const json = await response?.json();
-        // return json || {};
-        const exists = json?.results?.[0] || null;
-        if (exists) {
-            let existsObject = this.dataToObj(exists)
+        if (json) {
+            let existsObject = this.dataToObj(json)
             return existsObject;
         }
         return null
-
     }
 
-    async find() {
-        let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}?`;
+    async find():Promise<Array<CloudObject>> {
+        let url = `https://dev.fmode.cn/parse/classes/${this.className}?`;
 
         let queryStr = ``
         Object.keys(this.queryParams).forEach(key=>{
-            let paramStr = JSON.stringify(this.queryParams[key]); // 作用是将对象转换为JSON字符串
+            let paramStr = JSON.stringify(this.queryParams[key]);
             if(key=="include"){
                 paramStr = this.queryParams[key]?.join(",")
             }
-            if(key=="where"){
-                paramStr = JSON.stringify(this.queryParams[key]);
-            }
             if(queryStr) {
                 url += `${key}=${paramStr}`;
             }else{
                 url += `&${key}=${paramStr}`;
             }
         })
+        // if (Object.keys(this.queryParams["where"]).length) {
+            
+        // }
 
         const response = await fetch(url, {
             headers: {
@@ -179,7 +176,7 @@ export class CloudQuery {
 
 
     async first() {
-        let url = `http://dev.fmode.cn:1337/parse/classes/${this.className}?`;
+        let url = `https://dev.fmode.cn/parse/classes/${this.className}?`;
 
         if (Object.keys(this.queryParams["where"]).length) {
             const whereStr = JSON.stringify(this.queryParams["where"]);
@@ -199,14 +196,11 @@ export class CloudQuery {
 
         const json = await response?.json();
         const exists = json?.results?.[0] || null;
-         if (exists) {
-             let existsObject = this.dataToObj(exists)
-             return existsObject;
-         }
-         return null
-        //let list = json?.results || []
-        //let objList = list.map((item:any)=>this.dataToObj(item))
-        //return objList || [];
+        if (exists) {
+            let existsObject = this.dataToObj(exists)
+            return existsObject;
+        }
+        return null
     }
 
     dataToObj(exists:any):CloudObject{
@@ -242,11 +236,25 @@ export class CloudUser extends CloudObject {
             return null;
         }
         return this;
+        // const response = await fetch(`https://dev.fmode.cn/parse/users/me`, {
+        //     headers: {
+        //         "x-parse-application-id": "dev",
+        //         "x-parse-session-token": this.sessionToken // 使用sessionToken进行身份验证
+        //     },
+        //     method: "GET"
+        // });
+
+        // const result = await response?.json();
+        // if (result?.error) {
+        //     console.error(result?.error);
+        //     return null;
+        // }
+        // return result;
     }
 
     /** 登录 */
     async login(username: string, password: string):Promise<CloudUser|null> {
-        const response = await fetch(`http://dev.fmode.cn:1337/parse/login`, {
+        const response = await fetch(`https://dev.fmode.cn/parse/login`, {
             headers: {
                 "x-parse-application-id": "dev",
                 "Content-Type": "application/json"
@@ -255,10 +263,9 @@ export class CloudUser extends CloudObject {
             method: "POST"
         });
 
-        const result = await response.json();
-        console.log("响应状态:", response.status, "响应数据:", result); // 打印响应状态和数据
-        if (result?.error||response.status !== 200) {//检查响应状态
-            console.error(result?.error|| '登录请求失败');
+        const result = await response?.json();
+        if (result?.error) {
+            console.error(result?.error);
             return null;
         }
         
@@ -272,15 +279,52 @@ export class CloudUser extends CloudObject {
         return this;
     }
 
+    /** 登出 */
+    async logout() {
+        if (!this.sessionToken) {
+            console.error("用户未登录");
+            return;
+        }
+
+        const response = await fetch(`https://dev.fmode.cn/parse/logout`, {
+            headers: {
+                "x-parse-application-id": "dev",
+                "x-parse-session-token": this.sessionToken
+            },
+            method: "POST"
+        });
+
+        let result = await response?.json();
+
+        if (result?.error) {
+            console.error(result?.error);
+            if(result?.error=="Invalid session token"){
+                this.clearUserCache()
+                return true;
+            }
+            return false;
+        }
+
+        this.clearUserCache()
+        return true;
+    }
+    clearUserCache(){
+        // 清除用户信息
+        localStorage.removeItem("NCloud/dev/User")
+        this.id = null;
+        this.sessionToken = null;
+        this.data = {};
+    }
+
     /** 注册 */
     async signUp(username: string, password: string, additionalData: Record<string, any> = {}) {
         const userData = {
             username,
-            password,   
+            password,
             ...additionalData // 合并额外的用户数据
         };
 
-        const response = await fetch(`http://dev.fmode.cn:1337/parse/users`, {
+        const response = await fetch(`https://dev.fmode.cn/parse/users`, {
             headers: {
                 "x-parse-application-id": "dev",
                 "Content-Type": "application/json"
@@ -296,45 +340,18 @@ export class CloudUser extends CloudObject {
         }
 
         // 设置用户信息
+        // 缓存用户信息
+        console.log(result)
+        localStorage.setItem("NCloud/dev/User",JSON.stringify(result))
         this.id = result?.objectId;
         this.sessionToken = result?.sessionToken;
         this.data = result; // 保存用户数据
         return this;
     }
-    
-    /** 登出 */
-    async logout() {
-
-        if (!this.sessionToken) {
-            console.error("用户未登录");
-            return;
-        }
-
-        const response = await fetch(`http://dev.fmode.cn:1337/parse/logout`, {
-            headers: {
-                "x-parse-application-id": "dev",
-                "x-parse-session-token": this.sessionToken
-            },
-            method: "POST"
-        });
-
-        const result = await response?.json();
-        if (result?.error) {
-            console.error(result?.error);
-            return false;
-        }
-
-        // 清除用户信息
-        localStorage.removeItem("NCloud/dev/User")
-        this.id = null;
-        this.sessionToken = null;
-        this.data = {};
-        return true;
-    }
 
     override async save() {
         let method = "POST";
-        let url = `http://dev.fmode.cn:1337/parse/users`;
+        let url = `https://dev.fmode.cn/parse/users`;
     
         // 更新用户信息
         if (this.id) {
@@ -373,53 +390,31 @@ export class CloudUser extends CloudObject {
     }
 }
 
-// CloudEvaluate.ts
-export class CloudEvaluate extends CloudObject {
-    userData: Record<string, any>;
-    currentUser: CloudUser; // 添加当前用户的引用
-    modalCtrl: any; // 假设 modalCtrl 是通过构造函数传入的
-
-    constructor(userData: Record<string, any>, currentUser: CloudUser,modalCtrl: any) {
-        super("_ChatEvaluate"); 
-        this.userData = userData; // 保存用户评价数据
-        this.currentUser = currentUser; // 保存当前用户
-        this.modalCtrl = modalCtrl; // 保存模态控制器
-    }
-
-    /** 保存评价 */
-    override async save() {
-        // 确保 rating 是数字类型
-        if (this.userData['rating']) {
-            this.userData['rating'] = Number(this.userData['rating']);
-        }
-        console.log('保存评价被调用'); // 调试日志
+export class CloudApi{
+    async fetch(path:string,body:any,options?:{
+        method:string
+        body:any
+    }){
 
-        // 调用后端 API 保存评价
-        const response = await fetch(`http://dev.fmode.cn:1337/parse/classes/ChatEvaluate`, {
+        let reqOpts:any =  {
             headers: {
                 "x-parse-application-id": "dev",
                 "Content-Type": "application/json"
             },
-            body: JSON.stringify({
-                content: this.userData['content'],
-                rating: this.userData['rating'],
-                avatar: this.currentUser.data?.['avatar'], // 假设用户头像存储在 data.avatar 中
-                user: { __type: "Pointer", className: "_User", objectId: this.currentUser.id } // 添加用户指针
-            }),
-            method: "POST"
-        });
-
-        const result = await response.json();
-        console.log('保存结果:', result); // 输出保存结果
-
-        if (result?.error) {
-            console.error(result?.error);
-            console.error('评价保存失败');
-            return null;
+            method: options?.method || "POST",
+            mode: "cors",
+            credentials: "omit"
         }
-
-        console.log('评价保存成功:', result);
-        this.modalCtrl.dismiss(result, "confirm"); // 关闭模态框并传递结果
-        return result; // 返回保存的结果
+        if(body||options?.body){
+            reqOpts.body = JSON.stringify(body || options?.body);
+            reqOpts.json = true;
+        }
+        let host = `https://dev.fmode.cn`
+        // host = `http://127.0.0.1:1337`
+        let url = `${host}/api/`+path
+        console.log(url,reqOpts)
+        const response = await fetch(url,reqOpts);
+        let json = await response.json();
+        return json
     }
 }