焦怡璇 1 éve
szülő
commit
cef6d888a8
41 módosított fájl, 911 hozzáadás és 250 törlés
  1. 2 5
      .vscode/settings.json
  2. 172 0
      README.md
  3. 20 0
      heartVoice-prod/README.md
  4. 3 0
      heartvoice-app/src/app/feedback/feedback.component.html
  5. 0 0
      heartvoice-app/src/app/feedback/feedback.component.scss
  6. 22 0
      heartvoice-app/src/app/feedback/feedback.component.spec.ts
  7. 15 0
      heartvoice-app/src/app/feedback/feedback.component.ts
  8. 1 1
      heartvoice-app/src/app/gexinhualiaotian/gexinhualiaotian.component.html
  9. 10 6
      heartvoice-app/src/app/gexinhualiaotian/gexinhualiaotian.component.scss
  10. 2 4
      heartvoice-app/src/app/gexinhualiaotian/gexinhualiaotian.component.ts
  11. 1 1
      heartvoice-app/src/app/interlocution/interlocution.component.html
  12. 1 8
      heartvoice-app/src/app/interlocution/interlocution.component.scss
  13. 11 2
      heartvoice-app/src/app/personality-test/personality-test.component.scss
  14. 3 0
      heartvoice-app/src/app/report/report.component.html
  15. 0 0
      heartvoice-app/src/app/report/report.component.scss
  16. 22 0
      heartvoice-app/src/app/report/report.component.spec.ts
  17. 32 0
      heartvoice-app/src/app/report/report.component.ts
  18. 112 0
      heartvoice-app/src/app/review/review.component.html
  19. 86 0
      heartvoice-app/src/app/review/review.component.scss
  20. 22 0
      heartvoice-app/src/app/review/review.component.spec.ts
  21. 29 0
      heartvoice-app/src/app/review/review.component.ts
  22. 1 1
      heartvoice-app/src/app/tab1/tab1.page.html
  23. 16 10
      heartvoice-app/src/app/tab1/tab1.page.scss
  24. 3 106
      heartvoice-app/src/app/tab2/tab2.page.html
  25. 13 69
      heartvoice-app/src/app/tab2/tab2.page.scss
  26. 26 14
      heartvoice-app/src/app/tab2/tab2.page.ts
  27. 14 8
      heartvoice-app/src/app/tab3/tab3.page.html
  28. 37 10
      heartvoice-app/src/app/tab3/tab3.page.scss
  29. 6 1
      heartvoice-app/src/app/tab3/tab3.page.ts
  30. 1 1
      heartvoice-app/src/app/tabs/tabs.page.html
  31. 15 0
      heartvoice-app/src/app/tabs/tabs.routes.ts
  32. BIN
      heartvoice-app/src/assets/img/10.jpg
  33. BIN
      heartvoice-app/src/assets/img/9.jpg
  34. 42 0
      heartvoice-app/src/lib/user/modal-hint/modal-hint.component.html
  35. 54 0
      heartvoice-app/src/lib/user/modal-hint/modal-hint.component.scss
  36. 22 0
      heartvoice-app/src/lib/user/modal-hint/modal-hint.component.spec.ts
  37. 66 0
      heartvoice-app/src/lib/user/modal-hint/modal-hint.component.ts
  38. 2 2
      heartvoice-app/src/lib/user/modal-user-edit/modal-user-edit.component.html
  39. 13 0
      heartvoice-app/src/lib/user/modal-user-edit/modal-user-edit.component.scss
  40. 1 1
      heartvoice-app/src/lib/user/modal-user-login/modal-user-login.component.html
  41. 13 0
      heartvoice-app/src/lib/user/modal-user-login/modal-user-login.component.scss

+ 2 - 5
.vscode/settings.json

@@ -1,6 +1,3 @@
 {
-    "plantuml.server": "http://192.168.1.100:8080",
-    "plantuml.render": "PlantUMLServer",
-    "liveServer.settings.port": 5501,
-
-}
+    "plantuml.server":"http://www.plantuml.com/plantuml"
+    } 

+ 172 - 0
README.md

@@ -0,0 +1,172 @@
+表结构
+heartvoiceuser(用户表)
+objectId (唯一标识)
+createdAt (创建时间)
+username (用户名)
+password (密码)
+realrame (真实姓名)
+phoneNumber (手机号)
+
+Questions(问题表)
+objectId (唯一标识)
+createdAt (创建时间)
+questionText (问题文本)
+dimension (维度,例如 E/I, S/N, T/F, J/P):string
+
+option(选项表)
+objectId (唯一标识)
+createdAt (创建时间)
+question (Pointer) (关联的题目)
+optionText (选项文本)
+weight (权重,取值为 1, 0.5, 0, -0.5, -1):string
+
+UserResponse(用户性格表)
+objectId (唯一标识)
+createdAt (创建时间)
+user (Pointer) (关联的用户)
+mbtiType (用户的MBTI类型)
+
+Chat(聊天记录表)
+objectId (唯一标识)
+createdAt (创建时间)
+user (Pointer) (关联的用户)
+chatContent (聊天内容)
+chatTime (聊天时间)
+emotion (情绪状态)
+
+PersonalityReport(个性化心理报告表)
+objectId (唯一标识)
+createdAt (创建时间)
+user (Pointer) (关联的用户)
+mbtiType (用户的MBTI类型)
+reportContent (报告内容)
+emotion (情绪状态)
+
+Feedback(用户反馈表)
+objectId (唯一标识)
+createdAt (创建时间)
+user (Pointer) (关联的用户)
+feedbackContent (反馈内容)
+
+Review (用户评价表)
+objectId (唯一标识)
+createdAt (创建时间)
+user (Pointer) (关联的用户)
+feedbackContent (评价内容)
+star (星级)
+
+
+
+```plantuml
+@startuml
+class heartvoiceuser {
+    - objectId: String
+    - createdAt: Date
+    - username: String
+    - password: String
+    - realname: String
+    - phoneNumber: String
+}
+
+class Questions {
+    - objectId: String
+    - createdAt: Date
+    - questionText: String
+    - dimension: String
+}
+
+class Option {
+    - objectId: String
+    - createdAt: Date
+    - question: Questions
+    - optionText: String
+    - weight: String
+}
+
+class UserResponse {
+    - objectId: String
+    - createdAt: Date
+    - user: heartvoiceuser
+    - mbtiType: String
+}
+
+class Chat {
+    - objectId: String
+    - createdAt: Date
+    - user: heartvoiceuser
+    - chatContent: String
+    - chatTime: Date
+    - emotion: String
+}
+
+class PersonalityReport {
+    - objectId: String
+    - createdAt: Date
+    - user: heartvoiceuser
+    - mbtiType: String
+    - reportContent: String
+    - emotion: String
+}
+
+class Feedback {
+    - objectId: String
+    - createdAt: Date
+    - user: heartvoiceuser
+    - feedbackContent: String
+}
+
+class Review {
+    - objectId: String
+    - createdAt: Date
+    - user: heartvoiceuser
+    - feedbackContent: String
+    - star: String
+}
+
+heartvoiceuser "1" -- "n" UserResponse 
+heartvoiceuser "1" -- "n" Chat 
+heartvoiceuser "1" -- "n" PersonalityReport 
+heartvoiceuser "1" -- "n" Feedback 
+heartvoiceuser "1" -- "n" Review 
+Questions "1" -- "n" Option 
+@enduml
+```
+
+
+```plantuml
+@startuml 
+left to right direction
+
+actor User
+actor AI
+
+
+rectangle "性格测试" {
+  User --> (做选择题)
+  (做选择题) --> (分析 MBTI 性格)
+  (分析 MBTI 性格) --> (保存结果)
+}
+
+rectangle "聊天" {
+  User --> (与 AI 聊天)
+  (与 AI 聊天) --> (保存聊天记录)
+  (保存聊天记录) --> (分析情绪)
+}
+
+rectangle "报告生成" {
+  User --> (生成心理报告)
+  (生成心理报告) --> (调用 MBTI 和情绪)
+}
+
+rectangle "反馈" {
+  User --> (提交反馈)
+}
+
+rectangle "评价" {
+  User --> (提交评价)
+}
+
+@enduml
+```
+
+

+ 20 - 0
heartVoice-prod/README.md

@@ -86,3 +86,23 @@ System -> User: (Optional) Acknowledge feedback receipt
 
 
 
+表结构 heartvoiceuser(用户表) objectId (唯一标识) createdAt (创建时间) username (用户名) password (密码) realrame (真实姓名) phoneNumber (手机号)
+
+Questions(问题表) objectId (唯一标识) createdAt (创建时间) questionText (问题文本) dimension (维度,例如 E/I, S/N, T/F, J/P):string
+
+option(选项表) objectId (唯一标识) createdAt (创建时间) question (Pointer) (关联的题目) optionText (选项文本) weight (权重,取值为 1, 0.5, 0, -0.5, -1):string
+
+UserResponse(用户性格表) objectId (唯一标识) createdAt (创建时间) user (Pointer) (关联的用户) mbtiType (用户的MBTI类型)
+
+Chat(聊天记录表) objectId (唯一标识) createdAt (创建时间) user (Pointer) (关联的用户) chatContent (聊天内容) chatTime (聊天时间) emotion (情绪状态)
+
+PersonalityReport(个性化心理报告表) objectId (唯一标识) createdAt (创建时间) user (Pointer) (关联的用户) mbtiType (用户的MBTI类型) reportContent (报告内容) emotion (情绪状态)
+
+Feedback(用户反馈表) objectId (唯一标识) createdAt (创建时间) user (Pointer) (关联的用户) feedbackContent (反馈内容)
+
+Review (用户评价表) objectId (唯一标识) createdAt (创建时间) user (Pointer) (关联的用户) feedbackContent (评价内容) star (星级)
+
+项目功能 性格测试模块 通过用户做几十道选择题,AI系统分析得出mbti性格偏向,并保存到数据库中。并将性格输出给用户。 聊天模块 通过用户与AI进行聊天,保存用户输入的数据,通过AI系统分析其情绪类型,得出情绪类型并保存到数据库中。 生成个性化报告模块 通过在数据库中调用最近一次的mbti人格偏向以及情绪指数,运用AI系统导出个性化的心理报告。 反馈模块 用户在输入框里输入想提交的反馈,AI系统将其保存到数据库中。 用户评价模块 用户在评价输入框里输入对项目的评价,以及打星级(一星,二星,三星,四星,五星),AI系统将星级以及输入的数据保存到数据库 
+给出 用例图和 用例描述,用例描述包括 用例名称 用例描述 参与者表 前置条件 后置条件 基本操作流 可选操作流;参与者有用户和系统,详细一点。 设计类(按实际分析版型)和时序图(画出泳道) 按功能 实体类 1个,类图要画出1比n或n比n等的关系
+
+性格测试模块,聊天模块,生成个性化报告模块的状态图,和活动图(画出泳道)等根据具体项目 , 不要抄模板上的添加商品,查询 或登录注册等内容; 体现特色

+ 3 - 0
heartvoice-app/src/app/feedback/feedback.component.html

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

+ 0 - 0
heartvoice-app/src/app/feedback/feedback.component.scss


+ 22 - 0
heartvoice-app/src/app/feedback/feedback.component.spec.ts

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

+ 15 - 0
heartvoice-app/src/app/feedback/feedback.component.ts

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

+ 1 - 1
heartvoice-app/src/app/gexinhualiaotian/gexinhualiaotian.component.html

@@ -1,6 +1,6 @@
 <ion-header>
   <ion-toolbar>
-    <ion-title>心理支持聊天</ion-title>
+    <ion-title>开始聊天</ion-title>
     <ion-buttons slot="start">
       <ion-button routerLink="/my-page">返回</ion-button>
     </ion-buttons>

+ 10 - 6
heartvoice-app/src/app/gexinhualiaotian/gexinhualiaotian.component.scss

@@ -2,7 +2,7 @@
     background-color: #d1e7dd; /* 用户消息背景色 */
     text-align: right; /* 用户消息右对齐 */
     padding: 10px;
-    border-radius: 10px;
+    border-radius: 3px;
     margin: 5px 0;
   }
   
@@ -10,7 +10,7 @@
     background-color: #f8d7da; /* AI消息背景色 */
     text-align: left; /* AI消息左对齐 */
     padding: 10px;
-    border-radius: 10px;
+    border-radius: 3px;
     margin: 5px 0;
   }
 
@@ -18,9 +18,13 @@
 
   ion-button {
     --background: #f8d7da; /* 按钮背景色 */
-    --color: rgb(5, 5, 5); /* 按钮文字颜色 */
+    --color: #161616; /* 点击时按钮字体颜色 */
   }
-  
   ion-button:hover {
-    --background: #fafab5; /* 悬停时按钮背景色 */
-  }
+    --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+  }
+  ion-button:active {
+    --background: #f8d7da; /* 点击时按钮背景色 */
+    --color: #f96372; /* 点击时按钮字体颜色 */
+  }
+    

+ 2 - 4
heartvoice-app/src/app/gexinhualiaotian/gexinhualiaotian.component.ts

@@ -50,11 +50,11 @@ export class GexinhualiaotianComponent implements OnInit {
     ACL[currentUser?.id] = { read: true, write: true }; // 当前用户 可读 可写
     let chatContentString = this.userInput;
     let now = new Date();
-    let dateStr = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
+
     // 设置聊天内容和用户信息
     chatObject.set({
       chatContent: chatContentString,
-      createdAt: dateStr, // 使用 Date 对象
+      chatTime: now, // 使用 Date 对象
       user: currentUser.toPointer(),
     });
 
@@ -106,5 +106,3 @@ export class GexinhualiaotianComponent implements OnInit {
 
 
 
-
-

+ 1 - 1
heartvoice-app/src/app/interlocution/interlocution.component.html

@@ -1,6 +1,6 @@
 <ion-content>
   <h1>MBTI</h1>
-<img src="assets/img/1.png" alt="  " width="100%" height="200"/> 
+<img src="assets/img/9.jpg" alt="  " width="100%" height="200"/> 
 <!-- 展示:返回消息内容 -->
 <div>{{responseMsg}}</div>
 </ion-content>

+ 1 - 8
heartvoice-app/src/app/interlocution/interlocution.component.scss

@@ -28,14 +28,7 @@ ion-content {
     min-height: 100px; /* 设置文本域的最小高度 */
   }
   
-  ion-button {
-    margin-top: 16px; /* 按钮的顶部外边距 */
-    background-color: #282c32; /* 按钮背景色 */
-    color: white; /* 按钮文字颜色 */
-    border-radius: 8px; /* 按钮圆角 */
-    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 按钮阴影效果 */
-    font-size: 18px; /* 按钮字体大小 */
-  }
+
   
   div {
     margin-top: 20px; /* 消息展示的顶部外边距 */

+ 11 - 2
heartvoice-app/src/app/personality-test/personality-test.component.scss

@@ -12,7 +12,7 @@
   }
   
   .option-button.selected {
-    background-color: red; // 选中时变为红色
+    background-color: #f8d7da; // 选中时变为红色
   }
 
 
@@ -62,9 +62,18 @@ h3 {
     font-size: 1.2em; // 调整标题字体大小
 }
 
+/* 提交反馈按钮的样式 */
 ion-button {
+  margin-top: 10px; /* 上边距 */
   --background: #f8d7da; /* 按钮背景色 */
-  --color: rgb(5, 5, 5); /* 按钮文字颜色 */
+  --color: #161616; /* 点击时按钮字体颜色 */
+}
+ion-button:hover {
+  --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+}
+ion-button:active {
+  --background: #f8d7da; /* 点击时按钮背景色 */
+  --color: #f96372; /* 点击时按钮字体颜色 */
 }
 
 ion-button:hover {

+ 3 - 0
heartvoice-app/src/app/report/report.component.html

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

+ 0 - 0
heartvoice-app/src/app/report/report.component.scss


+ 22 - 0
heartvoice-app/src/app/report/report.component.spec.ts

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

+ 32 - 0
heartvoice-app/src/app/report/report.component.ts

@@ -0,0 +1,32 @@
+import { Component, OnInit } from '@angular/core';
+import { ActivatedRoute } from '@angular/router';
+
+@Component({
+  selector: 'app-report',
+  templateUrl: './report.component.html',
+  styleUrls: ['./report.component.scss'],
+  standalone: true,
+})
+export class ReportComponent  implements OnInit {
+  data: any; // 用于存储接收到的数据
+
+  constructor(private route: ActivatedRoute) {}
+
+  ngOnInit() {
+    // 从路由参数中获取数据
+    this.route.params.subscribe(params => {
+      if (params['data']) {
+        try {
+          this.data = JSON.parse(params['data']); // 尝试解析数据
+          console.log('成功返回数据:', this.data); // 打印成功消息和接收到的数据
+        } catch (error) {
+          console.error('解析数据时发生错误:', error); // 捕获解析错误
+        }
+      } else {
+        this.data = null;
+        console.log('没有接收到数据。'); // 打印没有接收到数据的消息
+      }
+    });
+  }
+
+}

+ 112 - 0
heartvoice-app/src/app/review/review.component.html

@@ -0,0 +1,112 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-title>用户评价</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-card>
+    <ion-card-header>
+      <ion-card-title>最新评价</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <ion-list>
+        <ion-item>
+          <ion-avatar slot="start">
+            <img src="assets/img/1.png" alt="用户1" width="50" height="50"/>
+          </ion-avatar>
+          <ion-label>
+            <h2>用户234253</h2>
+            <p>这个平台让我感到被理解,帮助我缓解了很多压力。</p>
+          </ion-label>
+        </ion-item>
+        <ion-item>
+          <ion-avatar slot="start">
+            <img src="assets/img/3.jpg" alt="用户2" width="50" height="50"/>
+          </ion-avatar>
+          <ion-label>
+            <h2>北方的好吃不</h2>
+            <p>性格测试很有趣,聊天服务也很贴心。</p>
+          </ion-label>
+        </ion-item>
+        <ion-item>
+          <ion-avatar slot="start">
+            <img src="assets/img/1.png" alt="用户3" width="50" height="50"/>
+          </ion-avatar>
+          <ion-label>
+            <h2>含英咀华</h2>
+            <p>虽然AI的回答有时不够准确,但整体体验还是很不错的,值得一试。</p>
+          </ion-label>
+        </ion-item>
+        <ion-item>
+          <ion-avatar slot="start">
+            <img src="assets/img/2.png" alt="用户4" width="50" height="50"/>
+          </ion-avatar>
+          <ion-label>
+            <h2>还挺好玩</h2>
+            <p>希望能增加更多的测试类型,整体体验还是很好的,期待后续更新!</p>
+          </ion-label>
+        </ion-item>
+        <ion-item>
+          <ion-avatar slot="start">
+            <img src="assets/img/6.png" alt="用户5" width="50" height="50"/>
+          </ion-avatar>
+          <ion-label>
+            <h2>高大哥二狗狗</h2>
+            <p>这个平台让我意识到心理健康的重要性,推荐给身边的朋友们!</p>
+          </ion-label>
+        </ion-item>
+        <ion-item>
+          <ion-avatar slot="start">
+            <img src="assets/img/7.png" alt="用户6" width="50" height="50"/>
+          </ion-avatar>
+          <ion-label>
+            <h2>用户5243255</h2>
+            <p>整体体验非常好,但希望能有更多的互动活动,增加用户粘性。</p>
+          </ion-label>
+          </ion-item>
+          <ion-item>
+            <ion-avatar slot="start">
+              <img src="assets/img/4.jpg" alt="用户6" width="50" height="50"/>
+            </ion-avatar>
+            <ion-label>
+              <h2>梵蒂冈</h2>
+              <p>界面简洁友好,使用起来非常方便,性格测试的结果让我受益匪浅。</p>
+            </ion-label>
+            </ion-item>
+            <ion-item>
+              <ion-avatar slot="start">
+                <img src="assets/img/5.jpg" alt="用户6" width="50" height="50"/>
+              </ion-avatar>
+              <ion-label>
+                <h2>用户9888755</h2>
+                <p>AI聊天服务让我感到很放松,随时随地都能与它交流,缓解了我很多压力。。</p>
+              </ion-label>
+              </ion-item>
+              <ion-item>
+                <ion-avatar slot="start">
+                  <img src="assets/img/1.png" alt="用户6" width="50" height="50"/>
+                </ion-avatar>
+                <ion-label>
+                  <h2>感觉都好看</h2>
+                  <p>我在这里找到了一个可以倾诉的地方,感觉很温暖,感谢这个平台!。</p>
+                </ion-label>
+                </ion-item>
+      </ion-list>
+      <h2>我要评分</h2>
+      <h2>星级:</h2>
+      <edit-rating-star 
+  [score]="currentScore" 
+  [scoreMax]="5" 
+  (onScoreChange)="handleScoreChange($event)">
+</edit-rating-star>
+      <ion-button expand="full" routerLink="/chat">提交</ion-button>
+    </ion-card-content>
+  </ion-card>
+</ion-content>
+
+<ion-footer>
+  <ion-toolbar>
+    <ion-title id="a">© 2024 心理健康服务平台</ion-title>
+  </ion-toolbar>
+</ion-footer>

+ 86 - 0
heartvoice-app/src/app/review/review.component.scss

@@ -0,0 +1,86 @@
+ion-toolbar {
+    --background: #f8d7da; /* 顶部工具栏背景色 */
+  }
+  
+  ion-content {
+      --background: #eefae7; /* 设置背景颜色 */
+      padding: 20px; /* 添加内边距 */
+      display: flex;
+      flex-direction: column;
+      align-items: center; /* 居中对齐内容 */
+    }
+    ion-card {
+      width: 100%; /* 卡片宽度 */
+      max-width: 600px; /* 最大宽度 */
+      margin: 20px 0; /* 卡片的上下外边距 */
+      border-radius: 10px; /* 卡片圆角 */
+      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 卡片阴影效果 */
+    }
+    
+    ion-card-header {
+      background-color: #f2f6f2; /* 卡片头部背景色 */
+      border-top-left-radius: 10px; /* 左上角圆角 */
+      border-top-right-radius: 10px; /* 右上角圆角 */
+    }
+    
+    ion-card-title {
+      font-size: 22px; /* 标题字体大小 */
+      color: #333; /* 标题颜色 */
+    }
+    
+    ion-item {
+      margin: 10px 0; /* 列表项的上下外边距 */
+      border-radius: 8px; /* 列表项圆角 */
+      background-color: rgba(255, 221, 51, 0.1); /* 列表项背景色 */
+      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 列表项阴影效果 */
+    }
+    ion-title{
+      font-family: "宋体";
+      font-weight: bold;
+      font-size: 30px;
+      text-align: center; /* 文本居中 */
+    }
+  
+    ion-avatar {
+      border-radius: 50%; /* 头像圆形 */
+    }
+    
+    h2 {
+      font-size: 18px; /* 小标题字体大小 */
+      color: #444; /* 小标题颜色 */
+      margin: 5px 0; /* 小标题的上下外边距 */
+    }
+    
+    p {
+      font-size: 14px; /* 段落字体大小 */
+      color: #666; /* 段落颜色 */
+    }
+    
+    edit-rating-star {
+      margin: 20px 0; /* 评分组件的上下外边距 */
+    }
+    
+    ion-button {
+      margin-top: 16px; /* 按钮的顶部外边距 */
+      background-color: #f8d7da; /* 按钮背景色 */
+      --color: #161616; /* 点击时按钮字体颜色 */
+      border-radius: 8px; /* 按钮圆角 */
+    }
+  
+  ion-button:hover {
+    --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+  }
+  ion-button:active {
+    --background: #f8d7da; /* 点击时按钮背景色 */
+    --color: #f96372; /* 点击时按钮字体颜色 */
+  }
+    
+    ion-footer {
+      background-color: #fff; /* 页脚背景色 */
+      border-top: 1px solid #ccc; /* 页脚顶部边框 */
+    }
+    
+    ion-title {
+      font-size: 16px; /* 页脚标题字体大小 */
+      color: #333; /* 页脚标题颜色 */
+    }

+ 22 - 0
heartvoice-app/src/app/review/review.component.spec.ts

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

+ 29 - 0
heartvoice-app/src/app/review/review.component.ts

@@ -0,0 +1,29 @@
+import { Component,OnInit } from '@angular/core';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton, IonList, IonItem, IonAvatar, IonLabel, IonCardHeader, 
+  IonCardContent, IonInput, IonFooter, IonButtons, IonCard, IonCardTitle } from '@ionic/angular/standalone';
+import { ExploreContainerComponent } from '../explore-container/explore-container.component';
+import { EditRatingStarComponent } from '../edit-rating-star/edit-rating-star.component';
+
+@Component({
+  selector: 'app-review',
+  templateUrl: './review.component.html',
+  styleUrls: ['./review.component.scss'],
+  standalone: true,
+  imports: [IonHeader,IonToolbar, IonTitle, IonContent,IonList,IonItem,IonAvatar,IonLabel,IonCard,IonCardHeader,IonCardContent,
+    IonCardTitle,IonInput,IonFooter,IonButtons,IonButton,ExploreContainerComponent,EditRatingStarComponent,]
+})
+export class ReviewComponent  implements OnInit {
+
+  currentScore: number = 0; // 初始分值
+
+  handleScoreChange(newScore: number) {
+    this.currentScore = newScore;
+    console.log('新分值:', newScore); // 处理分值变化
+  }
+
+  ngOnInit() {}
+
+  constructor() {}
+
+
+}

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

@@ -42,7 +42,7 @@
             <ion-card-title>开始聊天</ion-card-title>
           </ion-card-header>
           <ion-card-content>
-            我们提供个性化心理疏通对话。    
+            我们提供个性化心理疏通对话。    
           </ion-card-content>
           <ion-button expand="full" (click)="liaoTian()">开始聊天</ion-button>
         </ion-card>

+ 16 - 10
heartvoice-app/src/app/tab1/tab1.page.scss

@@ -9,6 +9,7 @@ ion-header {
     font-family: "宋体";
     font-weight: bold;
     font: size 20px;
+    text-align: center;
   }
   ion-toolbar {
     --background: #f8d7da; /* 顶部工具栏背景色 */
@@ -71,16 +72,21 @@ ion-header {
   
   ion-footer ion-title {
     font-size: 0.9rem; /* 底部标题字体大小 */
-  }
-  
-  ion-button {
-    --background: #f8d7da; /* 按钮背景色 */
-    --color: rgb(5, 5, 5); /* 按钮文字颜色 */
-  }
-  
-  ion-button:hover {
-    --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
-  }
+    text-align: center;
+  }
+  
+/* 提交反馈按钮的样式 */
+ion-button {
+  --background: #f8d7da; /* 按钮背景色 */
+  --color: #161616; /* 点击时按钮字体颜色 */
+}
+ion-button:hover {
+  --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+}
+ion-button:active {
+  --background: #f8d7da; /* 点击时按钮背景色 */
+  --color: #f96372; /* 点击时按钮字体颜色 */
+}
   
   /* 响应式设计 */
   @media (max-width: 576px) {

+ 3 - 106
heartvoice-app/src/app/tab2/tab2.page.html

@@ -1,112 +1,9 @@
 <ion-header>
   <ion-toolbar>
-    <ion-title>用户评价</ion-title>
+    <ion-title>生成个性化心理报告</ion-title>
   </ion-toolbar>
 </ion-header>
 
 <ion-content>
-  <ion-card>
-    <ion-card-header>
-      <ion-card-title>最新评价</ion-card-title>
-    </ion-card-header>
-    <ion-card-content>
-      <ion-list>
-        <ion-item>
-          <ion-avatar slot="start">
-            <img src="assets/img/1.png" alt="用户1" width="50" height="50"/>
-          </ion-avatar>
-          <ion-label>
-            <h2>用户234253</h2>
-            <p>这个平台让我感到被理解,帮助我缓解了很多压力。</p>
-          </ion-label>
-        </ion-item>
-        <ion-item>
-          <ion-avatar slot="start">
-            <img src="assets/img/3.jpg" alt="用户2" width="50" height="50"/>
-          </ion-avatar>
-          <ion-label>
-            <h2>北方的好吃不</h2>
-            <p>性格测试很有趣,聊天服务也很贴心。</p>
-          </ion-label>
-        </ion-item>
-        <ion-item>
-          <ion-avatar slot="start">
-            <img src="assets/img/1.png" alt="用户3" width="50" height="50"/>
-          </ion-avatar>
-          <ion-label>
-            <h2>含英咀华</h2>
-            <p>虽然AI的回答有时不够准确,但整体体验还是很不错的,值得一试。</p>
-          </ion-label>
-        </ion-item>
-        <ion-item>
-          <ion-avatar slot="start">
-            <img src="assets/img/2.png" alt="用户4" width="50" height="50"/>
-          </ion-avatar>
-          <ion-label>
-            <h2>还挺好玩</h2>
-            <p>希望能增加更多的测试类型,整体体验还是很好的,期待后续更新!</p>
-          </ion-label>
-        </ion-item>
-        <ion-item>
-          <ion-avatar slot="start">
-            <img src="assets/img/6.png" alt="用户5" width="50" height="50"/>
-          </ion-avatar>
-          <ion-label>
-            <h2>高大哥二狗狗</h2>
-            <p>这个平台让我意识到心理健康的重要性,推荐给身边的朋友们!</p>
-          </ion-label>
-        </ion-item>
-        <ion-item>
-          <ion-avatar slot="start">
-            <img src="assets/img/7.png" alt="用户6" width="50" height="50"/>
-          </ion-avatar>
-          <ion-label>
-            <h2>用户5243255</h2>
-            <p>整体体验非常好,但希望能有更多的互动活动,增加用户粘性。</p>
-          </ion-label>
-          </ion-item>
-          <ion-item>
-            <ion-avatar slot="start">
-              <img src="assets/img/4.jpg" alt="用户6" width="50" height="50"/>
-            </ion-avatar>
-            <ion-label>
-              <h2>梵蒂冈</h2>
-              <p>界面简洁友好,使用起来非常方便,性格测试的结果让我受益匪浅。</p>
-            </ion-label>
-            </ion-item>
-            <ion-item>
-              <ion-avatar slot="start">
-                <img src="assets/img/5.jpg" alt="用户6" width="50" height="50"/>
-              </ion-avatar>
-              <ion-label>
-                <h2>用户9888755</h2>
-                <p>AI聊天服务让我感到很放松,随时随地都能与它交流,缓解了我很多压力。。</p>
-              </ion-label>
-              </ion-item>
-              <ion-item>
-                <ion-avatar slot="start">
-                  <img src="assets/img/1.png" alt="用户6" width="50" height="50"/>
-                </ion-avatar>
-                <ion-label>
-                  <h2>感觉都好看</h2>
-                  <p>我在这里找到了一个可以倾诉的地方,感觉很温暖,感谢这个平台!。</p>
-                </ion-label>
-                </ion-item>
-      </ion-list>
-      <h2>我要评分</h2>
-      <h2>星级:</h2>
-      <edit-rating-star 
-  [score]="currentScore" 
-  [scoreMax]="5" 
-  (onScoreChange)="handleScoreChange($event)">
-</edit-rating-star>
-      <ion-button expand="full" routerLink="/chat">提交</ion-button>
-    </ion-card-content>
-  </ion-card>
-</ion-content>
-
-<ion-footer>
-  <ion-toolbar>
-    <ion-title id="a">© 2024 心理健康服务平台</ion-title>
-  </ion-toolbar>
-</ion-footer>
+  <ion-button expand="full" (click)="openModal()">生成报告</ion-button>
+</ion-content>

+ 13 - 69
heartvoice-app/src/app/tab2/tab2.page.scss

@@ -2,77 +2,21 @@ ion-toolbar {
   --background: #f8d7da; /* 顶部工具栏背景色 */
 }
 
-ion-content {
-    --background: #eefae7; /* 设置背景颜色 */
-    padding: 20px; /* 添加内边距 */
-    display: flex;
-    flex-direction: column;
-    align-items: center; /* 居中对齐内容 */
-  }
-  ion-card {
-    width: 100%; /* 卡片宽度 */
-    max-width: 600px; /* 最大宽度 */
-    margin: 20px 0; /* 卡片的上下外边距 */
-    border-radius: 10px; /* 卡片圆角 */
-    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 卡片阴影效果 */
-  }
-  
-  ion-card-header {
-    background-color: #f2f6f2; /* 卡片头部背景色 */
-    border-top-left-radius: 10px; /* 左上角圆角 */
-    border-top-right-radius: 10px; /* 右上角圆角 */
-  }
-  
-  ion-card-title {
-    font-size: 22px; /* 标题字体大小 */
-    color: #333; /* 标题颜色 */
-  }
-  
-  ion-item {
-    margin: 10px 0; /* 列表项的上下外边距 */
-    border-radius: 8px; /* 列表项圆角 */
-    background-color: rgba(255, 221, 51, 0.1); /* 列表项背景色 */
-    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 列表项阴影效果 */
-  }
-  ion-title{
-    font-family: "宋体";
-    font-weight: bold;
-    font-size: 30px;
-    text-align: center; /* 文本居中 */
-  }
 
-  ion-avatar {
-    border-radius: 50%; /* 头像圆形 */
-  }
-  
-  h2 {
-    font-size: 18px; /* 小标题字体大小 */
-    color: #444; /* 小标题颜色 */
-    margin: 5px 0; /* 小标题的上下外边距 */
-  }
-  
-  p {
-    font-size: 14px; /* 段落字体大小 */
-    color: #666; /* 段落颜色 */
-  }
-  
-  edit-rating-star {
-    margin: 20px 0; /* 评分组件的上下外边距 */
-  }
-  
   ion-button {
+    border-radius: 10px;
     margin-top: 16px; /* 按钮的顶部外边距 */
-    background-color: #f8d7da; /* 按钮背景色 */
-    color: white; /* 按钮文字颜色 */
-    border-radius: 8px; /* 按钮圆角 */
-  }
-  
-  ion-footer {
-    background-color: #fff; /* 页脚背景色 */
-    border-top: 1px solid #ccc; /* 页脚顶部边框 */
+    --background: #f8d7da; /* 按钮背景色 */
+    --color: #161616; /* 点击时按钮字体颜色 */
+     /* 按钮圆角 */
   }
+
+ion-button:hover {
+  --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+}
+ion-button:active {
+  --background: #f8d7da; /* 点击时按钮背景色 */
+  --color: #f96372; /* 点击时按钮字体颜色 */
+}
   
-  ion-title {
-    font-size: 16px; /* 页脚标题字体大小 */
-    color: #333; /* 页脚标题颜色 */
-  }
+ 

+ 26 - 14
heartvoice-app/src/app/tab2/tab2.page.ts

@@ -1,28 +1,40 @@
 import { Component } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton, IonList, IonItem, IonAvatar, IonLabel, IonCardHeader, IonCardContent, IonInput, IonFooter, IonButtons, IonCard, IonCardTitle } from '@ionic/angular/standalone';
-import { ExploreContainerComponent } from '../explore-container/explore-container.component';
-import { EditRatingStarComponent } from '../edit-rating-star/edit-rating-star.component';
-
-
-
-
+import { ModalHintComponent } from 'src/lib/user/modal-hint/modal-hint.component'; // 确保路径正确
+import { IonButton, IonContent, IonHeader, IonTitle, IonToolbar,ModalController } from '@ionic/angular/standalone';
+import {  Router } from '@angular/router';
 @Component({
   selector: 'app-tab2',
   templateUrl: 'tab2.page.html',
   styleUrls: ['tab2.page.scss'],
   standalone: true,
-  imports: [IonHeader,IonToolbar, IonTitle, IonContent,IonList,IonItem,IonAvatar,IonLabel,IonCard,IonCardHeader,IonCardContent,IonCardTitle,IonInput,IonFooter,IonButtons,IonButton,ExploreContainerComponent,EditRatingStarComponent]
+  imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonButton], // 确保导入 IonicModule
 })
 export class Tab2Page {
-  currentScore: number = 0; // 初始分值
+  constructor(private modalCtrl: ModalController,private router: Router) {}
 
-  handleScoreChange(newScore: number) {
-    this.currentScore = newScore;
-    console.log('新分值:', newScore); // 处理分值变化
-  }
+  async openModal() {
+    const modal = await this.modalCtrl.create({
+      component: ModalHintComponent,
+      breakpoints: [0.7, 1.0],
+      initialBreakpoint: 0.7
+    });
+    await modal.present();
+
+    const { data, role } = await modal.onWillDismiss();
 
+    if (role === 'confirm') {
+      console.log('接收到的数据:', data); // 处理返回的数据
+      // 这里可以根据需要进一步处理 data.data1 和 data.data2
+    }
 
+    
 
-  constructor() {}
+   
+    this.router.navigate(['/tabs/report']);
+  
+      const data1 = { data: data }; // 需要发送的数据
+      this.router.navigate(['/tabs/report', { data: JSON.stringify(data1) }]); // 发送数据
+    
 
+  }
 }

+ 14 - 8
heartvoice-app/src/app/tab3/tab3.page.html

@@ -27,9 +27,7 @@
     @if(currentUser?.id) {
       <ion-card>
       <ion-card-header>
-        <div>
             <ion-card-title>个人信息</ion-card-title>
-          </div>
         </ion-card-header>
         <ion-card-content>
           <ion-item>
@@ -43,19 +41,27 @@
               <p>年龄: {{currentUser?.get("age") || "-"}}</p>
             </ion-label>
           </ion-item>
+          <ion-button expand="block" (click)="editUser()" >编辑资料</ion-button>
+        <ion-button expand="block" (click)="logout()" >登出</ion-button>
         </ion-card-content>
       </ion-card>
     }
 
     <ion-card-content>
       @if(!currentUser?.id) {
-        <ion-button expand="block" (click)="signup()" color="success">注册</ion-button>
-        <ion-button expand="block" (click)="login()" color="success">登录</ion-button>
-      }
-      @if(currentUser?.id) {
-        <ion-button expand="block" (click)="editUser()" color="success">编辑资料</ion-button>
-        <ion-button expand="block" (click)="logout()" color="medium">登出</ion-button>
+        <ion-button expand="block" (click)="signup()" >注册</ion-button>
+        <ion-button expand="block" (click)="login()" >登录</ion-button>
       }
     </ion-card-content>
   </ion-card>
+
+@if(currentUser?.id) {
+  <ion-card class="memo-card">
+    @if(currentUser?.id) {
+      <ion-button expand="block" (click)="review()" >用户评价</ion-button>
+      <ion-button expand="block" (click)="feedback()" >提交反馈</ion-button>
+    }
+  </ion-card>
+}
+  
 </ion-content>

+ 37 - 10
heartvoice-app/src/app/tab3/tab3.page.scss

@@ -10,13 +10,13 @@ ion-toolbar {
   }
   /* 个人信息名片的样式 */
   ion-card {
-    margin: 16px; /* 外边距 */
+    margin: 5px; /* 外边距 */
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 阴影效果 */
   }
   
   /* 个人信息名片内容的样式 */
   ion-card-content {
-    padding: 16px; /* 内边距 */
+    padding: 5px; /* 内边距 */
   }
   
   /* 列表项的悬浮效果 */
@@ -26,7 +26,7 @@ ion-toolbar {
   
   /* 显示历史记录和反馈问题的卡片样式 */
   ion-card {
-    margin: 16px; /* 外边距 */
+    margin: 10px; /* 外边距 */
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 阴影效果 */
   }
   
@@ -41,13 +41,40 @@ ion-toolbar {
     color: #666; /* 描述字体颜色 */
   }
   
-  /* 提交反馈按钮的样式 */
-  ion-button {
-    margin-top: 10px; /* 上边距 */
-  }
-  
+ /* 提交反馈按钮的样式 */
+ion-button {
+  margin-top: 10px; /* 上边距 */
+  --background: #f8d7da; /* 按钮背景色 */
+  --color: #161616; /* 点击时按钮字体颜色 */
+}
+ion-button:hover {
+  --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+}
+ion-button:active {
+  --background: #f8d7da; /* 点击时按钮背景色 */
+  --color: #f96372; /* 点击时按钮字体颜色 */
+}
   /* 控制卡片的显示效果 */
   ion-card-header {
-    background-color: #e0e0e0; /* 背景色 */
-    border-bottom: 1px solid #ccc; /* 底部边框 */
+    // background-color: #e0e0e0; /* 背景色 */
+    // border-bottom: 1px solid #ccc; /* 底部边框 */
+    margin: 0; /* 去掉默认外边距 */
+  }
+
+  ion-card-title {
+    font-size: 1.5rem; /* 字体大小 */
+    font-weight: bold; /* 字体加粗 */
+    
+    color: #333; /* 字体颜色 */
+    margin-bottom: 0; /* 底部边距 */
+    text-align: center; /* 左对齐 */
+    text-transform: uppercase; /* 大写字母 */
+  }
+  
+  /* 可选:为 ion-card-title 添加背景色和边框 */
+  ion-card-title {
+    background-color: #f8d7da;
+    padding: 5px; /* 内边距 */
+    border-radius: 5px; /* 圆角 */
+    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
   }

+ 6 - 1
heartvoice-app/src/app/tab3/tab3.page.ts

@@ -24,7 +24,12 @@ export class Tab3Page {
       event.target.complete();
     }, 2000);
   }
-
+  review(){
+    this.router.navigate(['/tabs/review'])
+   }
+   feedback(){
+    this.router.navigate(['/tabs/feedback'])
+   }
   goToCollection(){
     console.log("goToCollection");
   }

+ 1 - 1
heartvoice-app/src/app/tabs/tabs.page.html

@@ -7,7 +7,7 @@
 
     <ion-tab-button tab="tab2" href="/tabs/tab2">
       <ion-icon aria-hidden="true" name="planet"></ion-icon>
-      <ion-label>评价</ion-label>
+      <ion-label>报告</ion-label>
     </ion-tab-button>
 
     <ion-tab-button tab="tab3" href="/tabs/tab3">

+ 15 - 0
heartvoice-app/src/app/tabs/tabs.routes.ts

@@ -36,6 +36,21 @@ export const routes: Routes = [
         loadComponent: () =>
           import('../personality-test/personality-test.component').then((m) => m.PersonalityTestComponent),
       },
+      {
+        path: 'review',
+        loadComponent: () =>
+          import('../review/review.component').then((m) => m.ReviewComponent),
+      },
+      {
+        path: 'feedback',
+        loadComponent: () =>
+          import('../feedback/feedback.component').then((m) => m.FeedbackComponent),
+      },
+      {
+        path: 'report',
+        loadComponent: () =>
+          import('../report/report.component').then((m) => m.ReportComponent),
+      },
       {
         path: '',
         redirectTo: '/tabs/tab1',

BIN
heartvoice-app/src/assets/img/10.jpg


BIN
heartvoice-app/src/assets/img/9.jpg


+ 42 - 0
heartvoice-app/src/lib/user/modal-hint/modal-hint.component.html

@@ -0,0 +1,42 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-title>提示</ion-title>
+    <ion-buttons slot="end">
+      <ion-button (click)="cancel()">关闭</ion-button>
+    </ion-buttons>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-card>
+    <ion-card-header>
+      <ion-card-title>是否使用上一次测试的mbti性格偏向</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <ion-item>
+        <ion-label class="option-label" [ngClass]="{'selected': answer1 === 'yes'}" (click)="selectAnswer(1, 'yes')">是</ion-label>
+        <ion-label class="option-label" [ngClass]="{'selected': answer1 === 'no'}" (click)="selectAnswer(1, 'no')">否</ion-label>
+      </ion-item>
+      <ion-item *ngIf="answer1 === 'no'">
+        <ion-input 
+             [placeholder]="inputData ? '' : '请填写您的mbti性格,若不清楚可填无'" 
+             [(ngModel)]="inputData">
+        </ion-input>
+      </ion-item>
+    </ion-card-content>
+  </ion-card>
+
+  <ion-card>
+    <ion-card-header>
+      <ion-card-title>是否使用上一次的聊天数据分析</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <ion-item>
+        <ion-label class="option-label" [ngClass]="{'selected': answer2 === 'yes'}" (click)="selectAnswer(2, 'yes')">是</ion-label>
+        <ion-label class="option-label" [ngClass]="{'selected': answer2 === 'no'}" (click)="selectAnswer(2, 'no')">否</ion-label>
+      </ion-item>
+    </ion-card-content>
+  </ion-card>
+
+  <ion-button expand="full" (click)="submit()">确定</ion-button>
+</ion-content>

+ 54 - 0
heartvoice-app/src/lib/user/modal-hint/modal-hint.component.scss

@@ -0,0 +1,54 @@
+
+ion-button {
+  margin-top: 16px; /* 按钮的顶部外边距 */
+  --background: #f8d7da; /* 按钮背景色 */
+  --color: #161616; /* 点击时按钮字体颜色 */
+  border-radius: 8px; /* 按钮圆角 */
+  
+}
+
+ion-button:hover {
+--background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+}
+ion-button:active {
+--background: #f8d7da; /* 点击时按钮背景色 */
+--color: #f96372; /* 点击时按钮字体颜色 */
+}
+
+/* 设置选项标签的基本样式 */
+.option-label {
+  cursor: pointer; /* 鼠标悬停时显示为可点击 */
+  padding: 5px; /* 内边距 */
+  transition: background-color 0.3s; /* 背景颜色过渡效果 */
+
+}
+ion-label{
+  text-align: center;
+}
+
+/* 选中状态的样式 */
+.option-label.selected {
+  background-color: #f8d7da; /* 选中时的背景颜色 */
+  color: rgb(7, 7, 7); /* 选中时的文字颜色 */
+  border-radius: 5px; /* 圆角 */
+}
+
+
+/* 卡片的样式 */
+ion-card {
+  margin: 10px; /* 卡片的外边距 */
+  border-radius: 10px; /* 卡片的圆角 */
+  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 卡片阴影效果 */
+}
+
+/* 卡片标题的样式 */
+ion-card-title {
+  font-size: 18px; /* 字体大小 */
+  font-weight: bold; /* 字体加粗 */
+}
+
+/* 卡片内容的样式 */
+ion-card-content {
+  font-size: 16px; /* 字体大小 */
+  color: #666; /* 字体颜色 */
+}

+ 22 - 0
heartvoice-app/src/lib/user/modal-hint/modal-hint.component.spec.ts

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

+ 66 - 0
heartvoice-app/src/lib/user/modal-hint/modal-hint.component.ts

@@ -0,0 +1,66 @@
+import { Input, OnInit } from '@angular/core';
+import { Component } from '@angular/core';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonCard, IonCardContent, IonButton, IonCardHeader, IonCardTitle, IonCardSubtitle, ModalController, IonInput, IonItem, IonSegment, IonSegmentButton, IonLabel, IonButtons } from '@ionic/angular/standalone';
+import { CloudUser } from 'src/lib/ncloud';
+import {  Router } from '@angular/router';
+import { FormsModule } from '@angular/forms';
+import { CommonModule } from '@angular/common';
+
+
+
+@Component({
+  selector: 'app-modal-hint',
+  templateUrl: './modal-hint.component.html',
+  styleUrls: ['./modal-hint.component.scss'],
+  standalone: true,
+  imports: [IonHeader, IonToolbar, IonTitle, IonContent, 
+    IonCard,IonCardContent,IonButton,IonCardHeader,IonCardTitle,IonCardSubtitle,
+    IonInput,IonItem,
+    IonSegment,IonSegmentButton,IonLabel,IonButtons,CommonModule, FormsModule
+  ],
+})
+export class ModalHintComponent  implements OnInit {
+  answer1: string | null = null; // 第一个问题的答案
+  answer2: string | null = null; // 第二个问题的答案
+  inputData: string = ''; // 输入框数据
+
+  constructor(private modalCtrl: ModalController) {}
+
+  ngOnInit() {}
+
+  // 选择答案
+  selectAnswer(question: number, answer: string) {
+    if (question === 1) {
+      this.answer1 = answer;
+      if (answer === 'yes') {
+        this.inputData = ''; // 如果选择“是”,清空输入框
+      }
+    } else if (question === 2) {
+      this.answer2 = answer;
+    }
+  }
+
+  // 提交数据
+  submit() {
+    let dataToSend1: any;
+    let dataToSend2: any;
+
+    // 处理第一个问题
+    if (this.answer1 === 'no') {
+      dataToSend1 = this.inputData; // 如果选择“否”,发送输入框数据
+    } else {
+      dataToSend1 = 'yes'; // 如果选择“是”,发送字符 'yes'
+    }
+
+    // 处理第二个问题
+    dataToSend2 = this.answer2 === 'no' ? 'no' : 'yes'; // 发送字符 'no' 或 'yes'
+
+    // 关闭模态框并传递数据
+    this.modalCtrl.dismiss({ data1: dataToSend1, data2: dataToSend2 }, 'confirm');
+  }
+
+  cancel() {
+    this.modalCtrl.dismiss(null, 'cancel');
+  }
+
+}

+ 2 - 2
heartvoice-app/src/lib/user/modal-user-edit/modal-user-edit.component.html

@@ -17,9 +17,9 @@
   <ion-item>
      <ion-input [value]="userData['gender']" (ionChange)="userDataChange('gender',$event)" label="性别" placeholder="请您输入男/女"></ion-input>
     </ion-item>
-    <ion-item>
+    <!-- <ion-item>
       <ion-input [value]="userData['avatar']" (ionChange)="userDataChange('avatar',$event)" label="头像" placeholder="请您输入头像地址"></ion-input>
-     </ion-item>
+     </ion-item> -->
 
    <ion-button expand="block" (click)="save()">保存</ion-button>
    <ion-button expand="block" (click)="cancel()">取消</ion-button>

+ 13 - 0
heartvoice-app/src/lib/user/modal-user-edit/modal-user-edit.component.scss

@@ -0,0 +1,13 @@
+/* 提交反馈按钮的样式 */
+ion-button {
+    margin-top: 10px; /* 上边距 */
+    --background: #f8d7da; /* 按钮背景色 */
+    --color: #161616; /* 点击时按钮字体颜色 */
+  }
+  ion-button:hover {
+    --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+  }
+  ion-button:active {
+    --background: #f8d7da; /* 点击时按钮背景色 */
+    --color: #f96372; /* 点击时按钮字体颜色 */
+  }

+ 1 - 1
heartvoice-app/src/lib/user/modal-user-login/modal-user-login.component.html

@@ -23,7 +23,7 @@
 
     @if(type=="signup"){
       <ion-item>
-        <ion-input [value]="password2" (ionChange)="password2Change($event)" label="密码二次" type="password" value="password"></ion-input>
+        <ion-input [value]="password2" (ionChange)="password2Change($event)" label="再次输入" type="password" value="password"></ion-input>
       </ion-item>
     }
     @if(type=="login"){

+ 13 - 0
heartvoice-app/src/lib/user/modal-user-login/modal-user-login.component.scss

@@ -0,0 +1,13 @@
+/* 提交反馈按钮的样式 */
+ion-button {
+    margin-top: 10px; /* 上边距 */
+    --background: #f8d7da; /* 按钮背景色 */
+    --color: #161616; /* 点击时按钮字体颜色 */
+  }
+  ion-button:hover {
+    --background: rgba(255, 221, 51, 0.1); /* 悬停时按钮背景色 */
+  }
+  ion-button:active {
+    --background: #f8d7da; /* 点击时按钮背景色 */
+    --color: #f96372; /* 点击时按钮字体颜色 */
+  }