Explorar el Código

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

cainiao-hue hace 3 meses
padre
commit
efbcbe226a
Se han modificado 66 ficheros con 1545 adiciones y 1008 borrados
  1. 3 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224092344.html
  2. 0 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224092344.scss
  3. 15 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224092344.ts
  4. 18 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224093226.scss
  5. 18 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224093252.scss
  6. 0 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094441.html
  7. 23 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094535.ts
  8. 12 12
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094638.ts
  9. 14 0
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094716.scss
  10. 14 1
      .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094747.scss
  11. 44 0
      .history/soul-app/src/app/info-modal/info-modal.component_20241224103556.html
  12. 0 3
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.html
  13. 0 15
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.ts
  14. 0 39
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164909.scss
  15. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217165144.ts
  16. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217165208.ts
  17. 0 41
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183617.html
  18. 0 29
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184007.html
  19. 0 27
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184013.ts
  20. 0 40
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184947.html
  21. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193359.html
  22. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193717.ts
  23. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193720.html
  24. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218193742.html
  25. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218194414.html
  26. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218194849.ts
  27. 0 36
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218203144.html
  28. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218205727.ts
  29. 0 30
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241219161716.ts
  30. 0 35
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223214953.html
  31. 0 68
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223214958.ts
  32. 0 66
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223232115.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. 0 0
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224094739.scss
  36. 1 1
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224095049.ts
  37. 8 17
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224102715.ts
  38. 8 17
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224103358.ts
  39. 11 19
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224103825.ts
  40. 58 0
      .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224105250.ts
  41. 74 0
      .history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224095041.ts
  42. 74 0
      .history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224100252.ts
  43. 74 0
      .history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224100351.ts
  44. 74 0
      .history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224102704.ts
  45. 121 0
      .history/soul-app/src/app/tab1/tab1.page_20241224093033.ts
  46. 76 0
      .history/soul-app/src/app/tab1/tab1.page_20241224093034.html
  47. 71 0
      .history/soul-app/src/app/tabs/tabs.routes_20241224093030.ts
  48. 154 0
      .history/soul-server/lib/ncloud_20241218212656.js
  49. 154 0
      .history/soul-server/lib/ncloud_20241224095657.js
  50. 154 0
      .history/soul-server/lib/ncloud_20241224095740.js
  51. 0 6
      soul-app/src/app/drift-bottle/drift-bottle.component.html
  52. 28 1
      soul-app/src/app/drift-bottle/drift-bottle.component.scss
  53. 22 0
      soul-app/src/app/drift-bottle/drift-bottle.component.spec.ts
  54. 27 0
      soul-app/src/app/drift-bottle/drift-bottle.component.ts
  55. 3 0
      soul-app/src/app/info-modal/info-modal.component.html
  56. 2 2
      soul-app/src/app/page-psysurvey/page-psysurvey.component.html
  57. 10 19
      soul-app/src/app/page-psysurvey/page-psysurvey.component.ts
  58. 9 9
      soul-app/src/app/page-publishsurvey/page-publishsurvey.component.ts
  59. 1 1
      soul-app/src/app/tab1/tab1.page.html
  60. 3 0
      soul-app/src/app/tab1/tab1.page.ts
  61. 5 0
      soul-app/src/app/tabs/tabs.routes.ts
  62. 2 1
      soul-app/src/app/user-evaluate/user-evaluate.component.ts
  63. 6 7
      soul-app/src/app/user.service.ts
  64. 52 0
      soul-app/src/lib/cloud.evaluate.ts
  65. 102 107
      soul-app/src/lib/ncloud.ts
  66. BIN
      soul-prod/img/漂流瓶.jpg

+ 3 - 0
.history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224092344.html

@@ -0,0 +1,3 @@
+<p>
+  drift-bottle works!
+</p>

+ 0 - 0
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217163938.scss → .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224092344.scss


+ 15 - 0
.history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224092344.ts

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

+ 18 - 0
.history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224093226.scss

@@ -0,0 +1,18 @@
+/* drift-bottle.component.scss */
+:host {
+    display: block;
+    background-image: url('/assets/images/background.jpg'); /* 设置背景图片路径 */
+    background-size: cover; /* 使背景图片覆盖整个元素 */
+    background-position: center; /* 将背景图片居中 */
+    background-repeat: no-repeat; /* 防止背景图片重复 */
+    min-height: 100vh; /* 确保背景图片至少覆盖整个视口高度 */
+  }
+  
+  ion-content {
+    padding: 20px;
+    color: white; /* 如果需要,可以调整文字颜色以提高可读性 */
+  }
+  
+  
+  
+  

+ 18 - 0
.history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224093252.scss

@@ -0,0 +1,18 @@
+/* drift-bottle.component.scss */
+:host {
+    display: block;
+    background-image: url('/soul-prod/img/漂流瓶.jpg'); /* 设置背景图片路径 */
+    background-size: cover; /* 使背景图片覆盖整个元素 */
+    background-position: center; /* 将背景图片居中 */
+    background-repeat: no-repeat; /* 防止背景图片重复 */
+    min-height: 100vh; /* 确保背景图片至少覆盖整个视口高度 */
+  }
+  
+  ion-content {
+    padding: 20px;
+    color: white; /* 如果需要,可以调整文字颜色以提高可读性 */
+  }
+  
+  
+  
+  

+ 0 - 0
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164931.html → .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094441.html


+ 23 - 0
.history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094535.ts

@@ -0,0 +1,23 @@
+import { Component, OnInit } from '@angular/core';
+import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
+  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
+
+@Component({
+  selector: 'app-drift-bottle',
+  templateUrl: './drift-bottle.component.html',
+  styleUrls: ['./drift-bottle.component.scss'],
+  standalone: true,
+  imports: [IonHeader,IonToolbar,IonTitle,IonContent,
+        IonList,IonListHeader,IonItem,IonCardTitle,
+        IonLabel,IonIcon,IonButton,IonCardContent,
+        IonInput,IonSearchbar,IonCard,IonCardHeader
+        
+      ]
+})
+export class DriftBottleComponent  implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

+ 12 - 12
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218184057.ts → .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094638.ts

@@ -1,24 +1,24 @@
-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 { Router } from '@angular/router';
+  
 @Component({
-  selector: 'app-page-psysurvey',
-  templateUrl: './page-psysurvey.component.html',
-  styleUrls: ['./page-psysurvey.component.scss'],
+  selector: 'app-drift-bottle',
+  templateUrl: './drift-bottle.component.html',
+  styleUrls: ['./drift-bottle.component.scss'],
   standalone: true,
   imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
-      IonLabel,IonIcon,IonButton,IonCardContent,
-      IonInput,IonSearchbar,IonCard,IonCardHeader,
-      CommonModule
-    ]
+        IonList,IonListHeader,IonItem,IonCardTitle,
+        IonLabel,IonIcon,IonButton,IonCardContent,
+        IonInput,IonSearchbar,IonCard,IonCardHeader
+        
+      ]
 })
-export class PagePsysurveyComponent  implements OnInit {
+export class DriftBottleComponent  implements OnInit {
 
   constructor(private router: Router) { }
+
   goTab1(){
     this.router.navigate(['tabs/tab1']);
    }

+ 14 - 0
.history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094716.scss

@@ -0,0 +1,14 @@
+/* drift-bottle.component.scss */
+:host {
+    display: block;
+    background-image: url('/soul-prod/img/漂流瓶.jpg'); /* 设置背景图片路径 */
+    background-size: cover; /* 使背景图片覆盖整个元素 */
+    background-position: center; /* 将背景图片居中 */
+    background-repeat: no-repeat; /* 防止背景图片重复 */
+    min-height: 100vh; /* 确保背景图片至少覆盖整个视口高度 */
+  }
+  
+ 
+  
+  
+  

+ 14 - 1
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218195200.scss → .history/soul-app/src/app/drift-bottle/drift-bottle.component_20241224094747.scss

@@ -1,4 +1,14 @@
-/* 设置页面背景色 */
+/* drift-bottle.component.scss */
+:host {
+    display: block;
+    background-image: url('/soul-prod/img/漂流瓶.jpg'); /* 设置背景图片路径 */
+    background-size: cover; /* 使背景图片覆盖整个元素 */
+    background-position: center; /* 将背景图片居中 */
+    background-repeat: no-repeat; /* 防止背景图片重复 */
+    min-height: 100vh; /* 确保背景图片至少覆盖整个视口高度 */
+  }
+  
+ /* 设置页面背景色 */
 ion-content {
     --background: #ffffff; /* 白色背景 */
   }
@@ -50,4 +60,7 @@ ion-content {
   margin: auto;
   top: 10px;
   }
+  
+  
+  
   

+ 44 - 0
.history/soul-app/src/app/info-modal/info-modal.component_20241224103556.html

@@ -0,0 +1,44 @@
+<!-- 用户登录状态 -->
+<ion-card style="max-height: 400px; overflow-y: auto;">
+  <ion-card-header>
+    <ion-card-title>
+      用户名:{{currentUser?.get("username")}}
+    </ion-card-title>
+   </ion-card-header>
+<ion-card-content>
+  <ion-item>
+    <ion-label>姓名: {{ userData['realname'] }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>昵称: {{ userData['username'] }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>年龄: {{ userData['age'] }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>性别: {{ userData['gender'] }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>学校: {{ userData['school'] || '--' }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>学院: {{ userData['department'] || '--' }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>身份: {{ userData['identity'] || '--' }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>
+      {{ userData['identity'] === 'student' 
+        ? '学号:' + (userData['studentID'] || '--') 
+        : '工号:' + (userData['teacherID'] || '--') }}
+    </ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>邮箱: {{ userData['email'] }}</ion-label>
+  </ion-item>
+  <ion-item>
+    <ion-label>手机号: {{ userData['account'] }}</ion-label>
+  </ion-item>
+</ion-card-content>
+</ion-card>

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

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

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

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


+ 1 - 1
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223235734.ts → .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224095049.ts

@@ -47,7 +47,7 @@ export class PagePsysurveyComponent  implements OnInit {
   }
 
   getSurveys() {
-    this.http.get('http://127.0.0.1:4040/').subscribe(
+    this.http.get('https://dev.fmode.cn/parse').subscribe(
       (response: any) => {
         this.surveys = response; // 假设响应是问卷数组
         this.filterSurveys(); // 过滤问卷

+ 8 - 17
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223233228.ts → .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224102715.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('http://127.0.0.1:4040/apps/DevServer/browser/survey').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';
     });
   }
   

+ 8 - 17
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223235522.ts → .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224103358.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("department"); // 从用户数据中获取学院
       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);
-      }
-    );
+  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';
     });
   }
   

+ 11 - 19
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241223232614.ts → .history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224103825.ts

@@ -5,6 +5,8 @@ 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
+import { CloudQuery } from 'src/lib/ncloud';
 
 
   
@@ -15,7 +17,7 @@ import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,
   styleUrls: ['./page-psysurvey.component.scss'],
   standalone: true,
   imports: [IonHeader,IonToolbar,IonTitle,IonContent,
-      IonList,IonListHeader,IonItem,IonCardTitle,
+      IonList,IonListHeader,IonItem,IonCardTitle,FormsModule,
       IonLabel,IonIcon,IonButton,IonCardContent,
       IonInput,IonSearchbar,IonCard,IonCardHeader,
       CommonModule
@@ -24,7 +26,7 @@ import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,
 export class PagePsysurveyComponent  implements OnInit {
   surveys: any[] = []; // 存储问卷通知
   filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
+  userDepartment: string = '' ; // 当前用户的学院
 
   constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
   goTab1(){
@@ -36,29 +38,19 @@ export class PagePsysurveyComponent  implements OnInit {
 
    ngOnInit() {
     // 动态获取当前用户的学院信息
-    this.userService.getCurrentUser().subscribe(user => {
-      this.userApartment = user.apartment; // 从用户数据中获取学院
+    let user = this.userService.getCurrentUser()
+      this.userDepartment = user.get("department"); // 从用户数据中获取学院
       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);
-      }
-    );
+  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.userDepartment || survey.get("audience") === 'all';
     });
   }
   

+ 58 - 0
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241224105250.ts

@@ -0,0 +1,58 @@
+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
+import { CloudQuery, CloudUser } from 'src/lib/ncloud';
+
+
+  
+
+@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[] = []; // 存储过滤后的问卷
+  userDepartment: 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.getSurveys(); // 在获取到用户信息后获取问卷
+  }
+
+  async getSurveys() {
+      let query = new CloudQuery("Survey");
+      this.surveys = await query.find(); // 假设响应是问卷数组
+      this.filterSurveys(); // 过滤问卷
+  }
+  filterSurveys() {
+    let user = new CloudUser();
+    console.log(user)
+    this.filteredSurveys = this.surveys.filter(survey => {
+      console.log(survey.get("audience"), user.get("department"))
+      return (survey.get("audience") === user.get("department") || survey.get("audience") === 'all');
+    });
+  }
+  
+  
+}

+ 74 - 0
.history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224095041.ts

@@ -0,0 +1,74 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { IonHeader,IonButton, IonList, IonListHeader, IonItem,IonContent, IonIcon, IonLabel, IonCardHeader,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone';
+  import { CommonModule } from '@angular/common';
+  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+  import { HttpClient } from '@angular/common/http';
+
+
+@Component({
+  selector: 'app-page-publishsurvey',
+  templateUrl: './page-publishsurvey.component.html',
+  styleUrls: ['./page-publishsurvey.component.scss'],
+  standalone: true,
+  imports: [
+    IonHeader,IonToolbar,IonTitle,IonContent,IonSegment,IonSegmentButton,IonSelect,IonSelectOption,
+    FormsModule,IonList, IonListHeader, IonItem,
+    IonLabel,IonIcon,IonButton,IonCardContent,
+    IonInput,IonSearchbar,IonCard,IonCardHeader,
+    CommonModule,
+  ]
+})
+
+
+export class PagePublishsurveyComponent  implements OnInit {
+  category: string = 'school'; // 默认类别
+  surveyTitle: string = '';
+  surveyLink: string = '';
+  targetAudience: string = 'all'; // 默认面向对象
+  societySurveyTitle: string = '';
+  societySurveyLink: string = '';
+
+  onCategoryChange() {
+    console.log(`当前选择的类别: ${this.category}`);
+  }
+
+  publishSurvey() {
+    console.log('发布学校问卷:');
+    console.log(`标题: ${this.surveyTitle}`);
+    console.log(`链接: ${this.surveyLink}`);
+    console.log(`面向对象: ${this.targetAudience}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+    const surveyData = {
+      title: this.surveyTitle,
+      link: this.surveyLink,
+      audience: this.targetAudience,
+    };
+
+    this.http.post('https://dev.fmode.cn/parse', surveyData).subscribe(
+      response => {
+        console.log('问卷已成功发布:', response);
+        
+      },
+      error => {
+        console.error('发布问卷时出错:', error);
+      }
+    );
+  }
+
+  publishSocietySurvey() {
+    console.log('发布社会问卷:');
+    console.log(`标题: ${this.societySurveyTitle}`);
+    console.log(`链接: ${this.societySurveyLink}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+  }
+
+  constructor(private router: Router,private http: HttpClient) { }
+  goTab1(){
+    this.router.navigate(['tabs/page-psysurvey']);
+   }
+
+
+  ngOnInit() {}
+
+}

+ 74 - 0
.history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224100252.ts

@@ -0,0 +1,74 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { IonHeader,IonButton, IonList, IonListHeader, IonItem,IonContent, IonIcon, IonLabel, IonCardHeader,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone';
+  import { CommonModule } from '@angular/common';
+  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+  import { HttpClient } from '@angular/common/http';
+
+
+@Component({
+  selector: 'app-page-publishsurvey',
+  templateUrl: './page-publishsurvey.component.html',
+  styleUrls: ['./page-publishsurvey.component.scss'],
+  standalone: true,
+  imports: [
+    IonHeader,IonToolbar,IonTitle,IonContent,IonSegment,IonSegmentButton,IonSelect,IonSelectOption,
+    FormsModule,IonList, IonListHeader, IonItem,
+    IonLabel,IonIcon,IonButton,IonCardContent,
+    IonInput,IonSearchbar,IonCard,IonCardHeader,
+    CommonModule,
+  ]
+})
+
+
+export class PagePublishsurveyComponent  implements OnInit {
+  category: string = 'school'; // 默认类别
+  surveyTitle: string = '';
+  surveyLink: string = '';
+  targetAudience: string = 'all'; // 默认面向对象
+  societySurveyTitle: string = '';
+  societySurveyLink: string = '';
+
+  onCategoryChange() {
+    console.log(`当前选择的类别: ${this.category}`);
+  }
+
+  publishSurvey() {
+    console.log('发布学校问卷:');
+    console.log(`标题: ${this.surveyTitle}`);
+    console.log(`链接: ${this.surveyLink}`);
+    console.log(`面向对象: ${this.targetAudience}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+    const surveyData = {
+      title: this.surveyTitle,
+      link: this.surveyLink,
+      audience: this.targetAudience,
+    };
+
+    this.http.post('http://dev.fmode.cn:1337/parse/survey/', surveyData).subscribe(
+      response => {
+        console.log('问卷已成功发布:', response);
+        
+      },
+      error => {
+        console.error('发布问卷时出错:', error);
+      }
+    );
+  }
+
+  publishSocietySurvey() {
+    console.log('发布社会问卷:');
+    console.log(`标题: ${this.societySurveyTitle}`);
+    console.log(`链接: ${this.societySurveyLink}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+  }
+
+  constructor(private router: Router,private http: HttpClient) { }
+  goTab1(){
+    this.router.navigate(['tabs/page-psysurvey']);
+   }
+
+
+  ngOnInit() {}
+
+}

+ 74 - 0
.history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224100351.ts

@@ -0,0 +1,74 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { IonHeader,IonButton, IonList, IonListHeader, IonItem,IonContent, IonIcon, IonLabel, IonCardHeader,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone';
+  import { CommonModule } from '@angular/common';
+  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+  import { HttpClient } from '@angular/common/http';
+
+
+@Component({
+  selector: 'app-page-publishsurvey',
+  templateUrl: './page-publishsurvey.component.html',
+  styleUrls: ['./page-publishsurvey.component.scss'],
+  standalone: true,
+  imports: [
+    IonHeader,IonToolbar,IonTitle,IonContent,IonSegment,IonSegmentButton,IonSelect,IonSelectOption,
+    FormsModule,IonList, IonListHeader, IonItem,
+    IonLabel,IonIcon,IonButton,IonCardContent,
+    IonInput,IonSearchbar,IonCard,IonCardHeader,
+    CommonModule,
+  ]
+})
+
+
+export class PagePublishsurveyComponent  implements OnInit {
+  category: string = 'school'; // 默认类别
+  surveyTitle: string = '';
+  surveyLink: string = '';
+  targetAudience: string = 'all'; // 默认面向对象
+  societySurveyTitle: string = '';
+  societySurveyLink: string = '';
+
+  onCategoryChange() {
+    console.log(`当前选择的类别: ${this.category}`);
+  }
+
+  publishSurvey() {
+    console.log('发布学校问卷:');
+    console.log(`标题: ${this.surveyTitle}`);
+    console.log(`链接: ${this.surveyLink}`);
+    console.log(`面向对象: ${this.targetAudience}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+    const surveyData = {
+      title: this.surveyTitle,
+      link: this.surveyLink,
+      audience: this.targetAudience,
+    };
+
+    this.http.post('https://dev.fmode.cn/parse/survey', surveyData).subscribe(
+      response => {
+        console.log('问卷已成功发布:', response);
+        
+      },
+      error => {
+        console.error('发布问卷时出错:', error);
+      }
+    );
+  }
+
+  publishSocietySurvey() {
+    console.log('发布社会问卷:');
+    console.log(`标题: ${this.societySurveyTitle}`);
+    console.log(`链接: ${this.societySurveyLink}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+  }
+
+  constructor(private router: Router,private http: HttpClient) { }
+  goTab1(){
+    this.router.navigate(['tabs/page-psysurvey']);
+   }
+
+
+  ngOnInit() {}
+
+}

+ 74 - 0
.history/soul-app/src/app/page-publishsurvey/page-publishsurvey.component_20241224102704.ts

@@ -0,0 +1,74 @@
+import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { IonHeader,IonButton, IonList, IonListHeader, IonItem,IonContent, IonIcon, IonLabel, IonCardHeader,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone';
+  import { CommonModule } from '@angular/common';
+  import { FormsModule } from '@angular/forms'; // 导入 FormsModule
+  import { HttpClient } from '@angular/common/http';
+import { CloudObject } from 'src/lib/ncloud';
+
+
+@Component({
+  selector: 'app-page-publishsurvey',
+  templateUrl: './page-publishsurvey.component.html',
+  styleUrls: ['./page-publishsurvey.component.scss'],
+  standalone: true,
+  imports: [
+    IonHeader,IonToolbar,IonTitle,IonContent,IonSegment,IonSegmentButton,IonSelect,IonSelectOption,
+    FormsModule,IonList, IonListHeader, IonItem,
+    IonLabel,IonIcon,IonButton,IonCardContent,
+    IonInput,IonSearchbar,IonCard,IonCardHeader,
+    CommonModule,
+  ]
+})
+
+
+export class PagePublishsurveyComponent  implements OnInit {
+  category: string = 'school'; // 默认类别
+  surveyTitle: string = '';
+  surveyLink: string = '';
+  targetAudience: string = 'all'; // 默认面向对象
+  societySurveyTitle: string = '';
+  societySurveyLink: string = '';
+
+  onCategoryChange() {
+    console.log(`当前选择的类别: ${this.category}`);
+  }
+
+  publishSurvey() {
+    console.log('发布学校问卷:');
+    console.log(`标题: ${this.surveyTitle}`);
+    console.log(`链接: ${this.surveyLink}`);
+    console.log(`面向对象: ${this.targetAudience}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+    const surveyData = {
+      title: this.surveyTitle,
+      link: this.surveyLink,
+      audience: this.targetAudience,
+    };
+
+    let survey = new CloudObject("Survey");
+    survey.set(surveyData)
+    survey.save().then(data=>{
+      console.log('问卷已成功发布',data);
+    }).catch(err=>{
+      console.error('发布问卷时出错');
+    })
+
+  }
+
+  publishSocietySurvey() {
+    console.log('发布社会问卷:');
+    console.log(`标题: ${this.societySurveyTitle}`);
+    console.log(`链接: ${this.societySurveyLink}`);
+    // 这里可以添加逻辑将问卷发布到后端或其他处理
+  }
+
+  constructor(private router: Router,private http: HttpClient) { }
+  goTab1(){
+    this.router.navigate(['tabs/page-psysurvey']);
+   }
+
+
+  ngOnInit() {}
+
+}

+ 121 - 0
.history/soul-app/src/app/tab1/tab1.page_20241224093033.ts

@@ -0,0 +1,121 @@
+import { Component,CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonAvatar, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonLabel, IonList,
+   IonItem,IonIcon,IonInput,IonSearchbar} from '@ionic/angular/standalone';
+import { ExploreContainerComponent } from '../explore-container/explore-container.component';
+import { CommonModule } from '@angular/common';
+import {  TopicDetailComponent } from '../topic-detail/topic-detail.component';
+import { Router } from '@angular/router';
+import { TopicDetail2Component } from '../topic-detail2/topic-detail2.component';
+import { TopicDetail3Component } from '../topic-detail3/topic-detail3.component';
+import { CloudObject, CloudQuery, CloudUser } from 'src/lib/ncloud';
+import { ModalController } from '@ionic/angular/standalone';
+import { openUserEvaModal } from '../user-evaluate/user-evaluate.component';
+import { openUserLoginModal } from 'src/lib/user/modal-user-login/modal-user-login.component';
+@Component({
+  selector: 'app-tab1',
+  templateUrl: 'tab1.page.html',
+  styleUrls: ['tab1.page.scss'],
+  standalone: true,
+  imports: [IonHeader,IonToolbar,IonTitle,IonContent,ExploreContainerComponent,
+    IonButtons,IonButton,IonIcon,
+    IonCard,IonCardContent,IonCardHeader,
+    IonLabel,IonList,IonItem,IonAvatar,
+    IonInput,IonSearchbar,
+    CommonModule,
+    TopicDetailComponent,TopicDetail2Component,TopicDetail3Component
+  ],
+  schemas: [CUSTOM_ELEMENTS_SCHEMA],
+})
+export class Tab1Page {
+  onSearch(event: any) {
+    const searchTerm = event.target.value; // 获取用户输入的搜索内容
+    console.log('搜索内容:', searchTerm);
+    // 在这里添加搜索逻辑,例如过滤列表或导航到搜索结果页面
+  }
+  topics = [
+    {
+      id: 1,
+      title: '如何管理焦虑情绪',
+      description: '了解焦虑的来源及应对策略',
+      detailRoute: 'topic-detail',
+    },
+    {
+      id: 2,
+      title: '克服抑郁的有效方法',
+      description: '探索抑郁症的应对技巧',
+      detailRoute: 'topic-detail2'
+    },
+    {
+      id: 3,
+      title: '提升自信心的技巧',
+      description: '学习如何建立自信',
+      detailRoute: 'topic-detail2'
+    }
+  ];
+  
+  goPsysurvey() {
+    this.router.navigate(['tabs/page-psysurvey'])
+  }
+  goDriftbottle() {
+    this.router.navigate(['tabs/drift-bottle'])
+  }
+  
+  viewDetails(topicId: number): void {
+    let route: string;
+    switch (topicId) {
+      case 1:
+        route = 'topic-detail';
+        break;
+      case 2:
+        route = 'topic-detail2';
+        break;
+      case 3:
+        route = 'topic-detail3';
+        break;
+      default:
+        route = 'topic-detail'; // 默认路由
+    }
+    // 导航到指定的路由,并可以传递参数
+    this.router.navigate([`tabs/${route}`, { id: topicId }]);
+  }
+  constructor(private router: Router,private modalCtrl: ModalController) {
+    // 其他构造函数代码
+  }
+  matchedCounselor: { content: string; rating: number } | null = null;
+  review: any = { rating: 5 };  // 示例数据
+  // 创建一个方法,用于生成填充了 null 的数组
+  createFilledArray(length: number): any[] {
+    return Array(length).fill(null);
+  }
+  async evaluate() {
+    // 处理点击评价的逻辑
+    // 验证用户登录
+    let currentUser = new CloudUser();
+    let userPrompt = ``
+    if(!currentUser?.id){
+      console.log("用户未登录,请登录后重试")
+      let user = await openUserLoginModal(this.modalCtrl)
+      if(!user?.id){
+        console.log("用户登录失败");
+        return
+      } 
+      else {
+        console.log("当前用户ID:", currentUser.id);
+      }    
+    }
+     // 打开评价模态框
+     const evaluationResult = await openUserEvaModal(this.modalCtrl);
+     // 如果评价成功,重新加载评价列表
+     if (evaluationResult) {
+         await this.loadChatEvaluateList(); // 重新加载评价列表
+     }
+  }
+  ngOnInit() {
+    this.loadChatEvaluateList()
+  }
+  chatevaluateList:Array<CloudObject>=[]
+  async loadChatEvaluateList(){
+    let query = new CloudQuery("ChatEvaluate");
+    this.chatevaluateList = await query.find()
+  }
+}

+ 76 - 0
.history/soul-app/src/app/tab1/tab1.page_20241224093034.html

@@ -0,0 +1,76 @@
+<ion-header [translucent]="true">
+  <ion-toolbar>
+    <ion-item lines="none">
+      <!-- 图片 -->
+      <ion-avatar slot="start" class="image-container">
+        <img src="/assets/img/3.png" alt="Your Image" class="header-image">
+      </ion-avatar>
+ 
+      <!-- 搜索框 -->
+      <ion-searchbar slot="end" expand="with-icon"></ion-searchbar>
+    </ion-item>
+  </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 style="font-size: 16px;">{{ 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-toolbar color="light" class="button-toolbar" style="margin-top: 10px; padding: 0;">
+  <ion-buttons slot="start" class="button-container">
+    <ion-button expand="full" (click)="goPsysurvey()">心理普查</ion-button>
+    <ion-button expand="full" (click)="goDriftbottle()">漂流瓶</ion-button>
+    <ion-button expand="full" >心协</ion-button>
+    <ion-button expand="full" >更多</ion-button>
+  </ion-buttons>
+</ion-toolbar>
+
+<section>
+  <ion-card>
+    <ion-card-header>
+      <ion-toolbar>
+      <ion-card-title>用户评价</ion-card-title>
+      <ion-buttons slot="end">
+        <ion-button (click)="evaluate()" color="primary" fill="solid">
+          <span class="button-text">进入评价</span>
+        </ion-button>
+      </ion-buttons>
+    </ion-toolbar>
+    </ion-card-header>
+    <ion-card-content>
+      <ion-list>
+        <ion-item *ngFor="let chatevaluate of chatevaluateList">
+          <ion-avatar slot="start">
+            <img [src]="chatevaluate.get('avatar') || '/assets/img/2.png'"/>
+          </ion-avatar>
+          <ion-label>
+            <p style="font-size: 16px;">{{ chatevaluate.get('content') }}</p>
+            <ion-icon name="star" *ngFor="let star of createFilledArray(chatevaluate.get('rating')); let i = index" [attr.aria-hidden]="true"></ion-icon>
+          </ion-label>
+        </ion-item>
+      </ion-list>
+    </ion-card-content>
+  </ion-card>
+</section>
+</ion-content>

+ 71 - 0
.history/soul-app/src/app/tabs/tabs.routes_20241224093030.ts

@@ -0,0 +1,71 @@
+import { Routes } from '@angular/router';
+import { TabsPage } from './tabs.page';
+
+export const routes: Routes = [
+  {
+    path: 'tabs',
+    component: TabsPage,
+    children: [
+      {
+        path: 'tab1',
+        loadComponent: () =>
+          import('../tab1/tab1.page').then((m) => m.Tab1Page),
+      },
+      {
+        path: 'tab2',
+        loadComponent: () =>
+          import('../tab2/tab2.page').then((m) => m.Tab2Page),
+      },
+      {
+        path: 'tab3',
+        loadComponent: () =>
+          import('../tab3/tab3.page').then((m) => m.Tab3Page),
+      },
+      {
+        path: 'topic-detail',
+        loadComponent: () =>
+          import('../topic-detail/topic-detail.component').then((m) => m.TopicDetailComponent),
+      },
+      {
+        path: 'topic-detail2',
+        loadComponent: () =>
+          import('../topic-detail2/topic-detail2.component').then((m) => m.TopicDetail2Component),
+      },
+      {
+        path: 'topic-detail3',
+        loadComponent: () =>
+          import('../topic-detail3/topic-detail3.component').then((m) => m.TopicDetail3Component),
+      },
+      {
+        path: 'page-psysurvey',
+        loadComponent: () =>
+          import('../page-psysurvey/page-psysurvey.component').then((m) => m.PagePsysurveyComponent),
+      },
+      {
+        path: 'page-publishsurvey',
+        loadComponent: () =>
+          import('../page-publishsurvey/page-publishsurvey.component').then((m) => m.PagePublishsurveyComponent),
+      },
+      {
+        path: 'consult-picture',
+        loadComponent: () =>
+          import('../consult-picture/consult-picture.component').then((m) => m.ConsultPictureComponent),
+      },
+      {
+        path: '',
+        redirectTo: '/tabs/tab1',
+        pathMatch: 'full',
+      },
+      {
+        path: 'drift-bottle',
+        loadComponent: () =>
+          import('../drift-bottle/drift-bottle.component').then((m) => m.DriftBottleComponent),
+      },
+    ],
+  },
+  {
+    path: '',
+    redirectTo: '/tabs/tab1',
+    pathMatch: 'full',
+  },
+];

+ 154 - 0
.history/soul-server/lib/ncloud_20241218212656.js

@@ -0,0 +1,154 @@
+class CloudObject{
+    id // 编号
+    className // 名称
+    data ={} // 属性、内容
+    constructor(className){
+        this.className = className
+    }
+    toPointer(){
+      return {"__type":"Pointer","className":this.className,"objectId":this.id} 
+    }
+    set(json){
+        Object.keys(json).forEach(key=>{
+        if(["objectId","id","createdAt","updatedAt","ACL"].indexOf(key)>-1){
+          return
+        }
+          this.data[key] = json[key]
+        })
+    }
+    get(key){
+        return this.data[key] || null
+    }
+    // 更新
+    async save(){
+        let method = "POST"
+        let url = "http://dev.fmode.cn:1337/parse/classes/" + this.className; //默认
+        if(this.id){
+            url += "/"+this.id
+            method = "PUT"
+        } 
+        let body = JSON.stringify(this.data)
+        let response = await fetch(url, {
+        "headers": {
+          "content-type": "application/json;charset=UTF-8",
+          "x-parse-application-id": "dev"
+        },
+        "body": body,
+        "method": method,
+        "mode": "cors",
+        "credentials": "omit"
+      });
+      let result = await response?.json();
+      if(result?.objectId){this.id = result?.objectId}
+      return this
+    }
+    // 删除
+    async destory(){
+        if(!this.id) return
+        let response = await fetch("http://dev.fmode.cn:1337/parse/classes/"+this.id, {
+            "headers": {
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "DELETE",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let result = await response?.json();
+          if(result){
+            this.id = null
+          }
+          return true
+    }
+
+}
+// 查询
+class CloudQuery{
+    className
+    constructor(className){
+        this.className = className
+
+    }
+    whereOptions = {}
+    equalTo(key,value){
+        this.whereOptions[key] = value
+    }
+    greaterThan(key,value){
+      if(!this.whereOptions[key]) this.whereOptions[key] = {}
+      this.whereOptions[key]["$gt"] = value
+    }
+    greaterThanAndEqualTo(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+        this.whereOptions[key]["$gte"] = value
+    }
+    lessThan(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+        this.whereOptions[key]["$lt"] = value
+    }
+    lessThanAndEqualTo(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+    }
+    async get(id){ // 通过id查询
+        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"/"+id+"?"
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          return json || {}
+    }
+    async find(){ // 直接查询
+        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"?"
+        if(Object.keys(this.whereOptions)?.length){
+            let whereStr = JSON.stringify(this.whereOptions)
+            url += `where=${whereStr}`
+        }
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          return json?.results || []
+    }
+    async first(){ // 只查询第一项
+        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"?"
+        if(Object.keys(this.whereOptions)?.length){
+            let whereStr = JSON.stringify(this.whereOptions)
+            url += `where=${whereStr}`
+        }
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          let exists = json?.results?.[0] || null
+          if(exists){
+            let existsObject = new CloudObject(this.className)
+            existsObject.set(exists)
+            existsObject.id = exists.objectId
+            existsObject.createdAt = exists.createdAt
+            existsObject.updateAt = exists.updateAt
+            return existsObject
+          }
+    }
+}
+module.exports.CloudObject = CloudObject
+module.exports.CloudQuery = CloudQuery

+ 154 - 0
.history/soul-server/lib/ncloud_20241224095657.js

@@ -0,0 +1,154 @@
+class CloudObject{
+    id // 编号
+    className // 名称
+    data ={} // 属性、内容
+    constructor(className){
+        this.className = className
+    }
+    toPointer(){
+      return {"__type":"Pointer","className":this.className,"objectId":this.id} 
+    }
+    set(json){
+        Object.keys(json).forEach(key=>{
+        if(["objectId","id","createdAt","updatedAt","ACL"].indexOf(key)>-1){
+          return
+        }
+          this.data[key] = json[key]
+        })
+    }
+    get(key){
+        return this.data[key] || null
+    }
+    // 更新
+    async save(){
+        let method = "POST"
+        let url = "https://dev.fmode.cn/parse" + this.className; //默认
+        if(this.id){
+            url += "/"+this.id
+            method = "PUT"
+        } 
+        let body = JSON.stringify(this.data)
+        let response = await fetch(url, {
+        "headers": {
+          "content-type": "application/json;charset=UTF-8",
+          "x-parse-application-id": "dev"
+        },
+        "body": body,
+        "method": method,
+        "mode": "cors",
+        "credentials": "omit"
+      });
+      let result = await response?.json();
+      if(result?.objectId){this.id = result?.objectId}
+      return this
+    }
+    // 删除
+    async destory(){
+        if(!this.id) return
+        let response = await fetch("https://dev.fmode.cn/parse"+this.id, {
+            "headers": {
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "DELETE",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let result = await response?.json();
+          if(result){
+            this.id = null
+          }
+          return true
+    }
+
+}
+// 查询
+class CloudQuery{
+    className
+    constructor(className){
+        this.className = className
+
+    }
+    whereOptions = {}
+    equalTo(key,value){
+        this.whereOptions[key] = value
+    }
+    greaterThan(key,value){
+      if(!this.whereOptions[key]) this.whereOptions[key] = {}
+      this.whereOptions[key]["$gt"] = value
+    }
+    greaterThanAndEqualTo(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+        this.whereOptions[key]["$gte"] = value
+    }
+    lessThan(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+        this.whereOptions[key]["$lt"] = value
+    }
+    lessThanAndEqualTo(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+    }
+    async get(id){ // 通过id查询
+        let url = "https://dev.fmode.cn/parse"+this.className+"/"+id+"?"
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          return json || {}
+    }
+    async find(){ // 直接查询
+        let url = "https://dev.fmode.cn/parse"+this.className+"?"
+        if(Object.keys(this.whereOptions)?.length){
+            let whereStr = JSON.stringify(this.whereOptions)
+            url += `where=${whereStr}`
+        }
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          return json?.results || []
+    }
+    async first(){ // 只查询第一项
+        let url = "https://dev.fmode.cn/parse"+this.className+"?"
+        if(Object.keys(this.whereOptions)?.length){
+            let whereStr = JSON.stringify(this.whereOptions)
+            url += `where=${whereStr}`
+        }
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          let exists = json?.results?.[0] || null
+          if(exists){
+            let existsObject = new CloudObject(this.className)
+            existsObject.set(exists)
+            existsObject.id = exists.objectId
+            existsObject.createdAt = exists.createdAt
+            existsObject.updateAt = exists.updateAt
+            return existsObject
+          }
+    }
+}
+module.exports.CloudObject = CloudObject
+module.exports.CloudQuery = CloudQuery

+ 154 - 0
.history/soul-server/lib/ncloud_20241224095740.js

@@ -0,0 +1,154 @@
+class CloudObject{
+    id // 编号
+    className // 名称
+    data ={} // 属性、内容
+    constructor(className){
+        this.className = className
+    }
+    toPointer(){
+      return {"__type":"Pointer","className":this.className,"objectId":this.id} 
+    }
+    set(json){
+        Object.keys(json).forEach(key=>{
+        if(["objectId","id","createdAt","updatedAt","ACL"].indexOf(key)>-1){
+          return
+        }
+          this.data[key] = json[key]
+        })
+    }
+    get(key){
+        return this.data[key] || null
+    }
+    // 更新
+    async save(){
+        let method = "POST"
+        let url = "http://dev.fmode.cn:1337/parse/classes/" + this.className; //默认
+        if(this.id){
+            url += "/"+this.id
+            method = "PUT"
+        } 
+        let body = JSON.stringify(this.data)
+        let response = await fetch(url, {
+        "headers": {
+          "content-type": "application/json;charset=UTF-8",
+          "x-parse-application-id": "dev"
+        },
+        "body": body,
+        "method": method,
+        "mode": "cors",
+        "credentials": "omit"
+      });
+      let result = await response?.json();
+      if(result?.objectId){this.id = result?.objectId}
+      return this
+    }
+    // 删除
+    async destory(){
+        if(!this.id) return
+        let response = await fetch("http://dev.fmode.cn:1337/parse/classes/"+this.id, {
+            "headers": {
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "DELETE",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let result = await response?.json();
+          if(result){
+            this.id = null
+          }
+          return true
+    }
+
+}
+// 查询
+class CloudQuery{
+    className
+    constructor(className){
+        this.className = className
+
+    }
+    whereOptions = {}
+    equalTo(key,value){
+        this.whereOptions[key] = value
+    }
+    greaterThan(key,value){
+      if(!this.whereOptions[key]) this.whereOptions[key] = {}
+      this.whereOptions[key]["$gt"] = value
+    }
+    greaterThanAndEqualTo(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+        this.whereOptions[key]["$gte"] = value
+    }
+    lessThan(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+        this.whereOptions[key]["$lt"] = value
+    }
+    lessThanAndEqualTo(key,value){
+        if(!this.whereOptions[key]) this.whereOptions[key] = {}
+    }
+    async get(id){ // 通过id查询
+        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"/"+id+"?"
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          return json || {}
+    }
+    async find(){ // 直接查询
+        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"?"
+        if(Object.keys(this.whereOptions)?.length){
+            let whereStr = JSON.stringify(this.whereOptions)
+            url += `where=${whereStr}`
+        }
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          return json?.results || []
+    }
+    async first(){ // 只查询第一项
+        let url = "http://dev.fmode.cn:1337/parse/classes/"+this.className+"?"
+        if(Object.keys(this.whereOptions)?.length){
+            let whereStr = JSON.stringify(this.whereOptions)
+            url += `where=${whereStr}`
+        }
+        let response = await fetch(url, {
+            "headers": {
+              "if-none-match": "W/\"22c-NGsQZp5SnqjXTAX+NXjLAv6LaLA\"",
+              "x-parse-application-id": "dev"
+            },
+            "body": null,
+            "method": "GET",
+            "mode": "cors",
+            "credentials": "omit"
+          });
+          let json = await response?.json();
+          let exists = json?.results?.[0] || null
+          if(exists){
+            let existsObject = new CloudObject(this.className)
+            existsObject.set(exists)
+            existsObject.id = exists.objectId
+            existsObject.createdAt = exists.createdAt
+            existsObject.updateAt = exists.updateAt
+            return existsObject
+          }
+    }
+}
+module.exports.CloudObject = CloudObject
+module.exports.CloudQuery = CloudQuery

+ 0 - 6
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241218183929.html → soul-app/src/app/drift-bottle/drift-bottle.component.html

@@ -12,9 +12,3 @@
     </div>
   </ion-toolbar>
 </ion-header>
-
-<ion-content [fullscreen]="true">
-
-  
-
-</ion-content>

+ 28 - 1
.history/soul-app/src/app/page-psysurvey/page-psysurvey.component_20241217164930.scss → soul-app/src/app/drift-bottle/drift-bottle.component.scss

@@ -1,7 +1,31 @@
-/* 设置页面背景色 */
+/* drift-bottle.component.scss */
+:host {
+    display: block;
+    background-image: url('/soul-prod/img/漂流瓶.jpg'); /* 设置背景图片路径 */
+    background-size: cover; /* 使背景图片覆盖整个元素 */
+    background-position: center; /* 将背景图片居中 */
+    background-repeat: no-repeat; /* 防止背景图片重复 */
+    min-height: 100vh; /* 确保背景图片至少覆盖整个视口高度 */
+  }
+  
+ /* 设置页面背景色 */
 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; /* 加粗 */
@@ -36,4 +60,7 @@ ion-content {
   margin: auto;
   top: 10px;
   }
+  
+  
+  
   

+ 22 - 0
soul-app/src/app/drift-bottle/drift-bottle.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { DriftBottleComponent } from './drift-bottle.component';
+
+describe('DriftBottleComponent', () => {
+  let component: DriftBottleComponent;
+  let fixture: ComponentFixture<DriftBottleComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [DriftBottleComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(DriftBottleComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 27 - 0
soul-app/src/app/drift-bottle/drift-bottle.component.ts

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

+ 3 - 0
soul-app/src/app/info-modal/info-modal.component.html

@@ -21,6 +21,9 @@
   <ion-item>
     <ion-label>学校: {{ userData['school'] || '--' }}</ion-label>
   </ion-item>
+  <ion-item>
+    <ion-label>学院: {{ userData['department'] || '--' }}</ion-label>
+  </ion-item>
   <ion-item>
     <ion-label>身份: {{ userData['identity'] || '--' }}</ion-label>
   </ion-item>

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

+ 10 - 19
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, CloudUser } from 'src/lib/ncloud';
 
 
   
@@ -25,7 +26,7 @@ import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,
 export class PagePsysurveyComponent  implements OnInit {
   surveys: any[] = []; // 存储问卷通知
   filteredSurveys: any[] = []; // 存储过滤后的问卷
-  userApartment: string = '' ; // 当前用户的学院
+  userDepartment: string = '' ; // 当前用户的学院
 
   constructor(private router: Router,private http: HttpClient,private userService: UserService) { }
   goTab1(){
@@ -36,30 +37,20 @@ export class PagePsysurveyComponent  implements OnInit {
    }
 
    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);
-      }
-    );
+  async getSurveys() {
+      let query = new CloudQuery("Survey");
+      this.surveys = await query.find(); // 假设响应是问卷数组
+      this.filterSurveys(); // 过滤问卷
   }
   filterSurveys() {
+    let user = new CloudUser();
+    console.log(user)
     this.filteredSurveys = this.surveys.filter(survey => {
-      return survey.audience === this.userApartment || survey.audience === 'all';
+      console.log(survey.get("audience"), user.get("department"))
+      return (survey.get("audience") === user.get("department") || 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('http://127.0.0.1:4040/', 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() {

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

@@ -40,7 +40,7 @@
 <ion-toolbar color="light" class="button-toolbar" style="margin-top: 10px; padding: 0;">
   <ion-buttons slot="start" class="button-container">
     <ion-button expand="full" (click)="goPsysurvey()">心理普查</ion-button>
-    <ion-button expand="full" >漂流瓶</ion-button>
+    <ion-button expand="full" (click)="goDriftbottle()">漂流瓶</ion-button>
     <ion-button expand="full" >心协</ion-button>
     <ion-button expand="full" >更多</ion-button>
   </ion-buttons>

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

@@ -56,6 +56,9 @@ export class Tab1Page {
   goPsysurvey() {
     this.router.navigate(['tabs/page-psysurvey'])
   }
+  goDriftbottle() {
+    this.router.navigate(['tabs/drift-bottle'])
+  }
   
   viewDetails(topicId: number): void {
     let route: string;

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

@@ -61,6 +61,11 @@ export const routes: Routes = [
         redirectTo: '/tabs/tab1',
         pathMatch: 'full',
       },
+      {
+        path: 'drift-bottle',
+        loadComponent: () =>
+          import('../drift-bottle/drift-bottle.component').then((m) => m.DriftBottleComponent),
+      },
     ],
   },
   {

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

BIN
soul-prod/img/漂流瓶.jpg