فهرست منبع

update:tab2 page

cainiao-hue 3 ماه پیش
والد
کامیت
25bf6d56ff
2فایلهای تغییر یافته به همراه23 افزوده شده و 18 حذف شده
  1. 3 3
      soul-app/src/app/tab2/tab2.page.html
  2. 20 15
      soul-app/src/app/tab2/tab2.page.ts

+ 3 - 3
soul-app/src/app/tab2/tab2.page.html

@@ -23,11 +23,11 @@
         <ion-list>
           <ion-item *ngFor="let consultant of consultants">
             <ion-avatar slot="start">
-              <img [src]="consultant.avatar" alt="{{ consultant.title }}"/>
+              <img [src]="consultant.avatar" alt="{{ consultant.name }}"/>
             </ion-avatar>
             <ion-label>
-              <h2>{{ consultant.title }}</h2>
-              <p>{{ consultant.tags.join(', ') }}</p>
+              <h2>{{ consultant.name }}</h2>
+              <p>{{ consultant.expertise.join(', ') }}</p>
             </ion-label>
             <ion-button slot="end" (click)="clickToConsult(consultant)">开始陪聊</ion-button>
           </ion-item>

+ 20 - 15
soul-app/src/app/tab2/tab2.page.ts

@@ -31,25 +31,22 @@ export class Tab2Page {
   }
   consultants = [
     {
-      name: '张衡',
-      desc:"是温柔学长,国家中级心理咨询师",
-      title: '中级心理咨询师',
+      name: '小娇陪聊师',
+      bio:"注于焦虑症的李晓慧,通过认知行为疗法帮助来访者重拾内心的平静与自信",
       avatar: '/assets/img/2.png',
-      tags: ['专业领域:焦虑']
+      expertise: ['专业领域:焦虑']
     },
     {
-      name: '王雅',
-      desc:"是热心学姐,国家中级心理咨询师",
-      title: '中级心理咨询师',
+      name: '小易陪聊师',
+      bio:"致力于抑郁症辅导,运用共情与认知疗法帮助来访者重建积极的生活态度",
       avatar: '/assets/img/4.png',
-      tags: ['专业领域:抑郁']
+      expertise: ['专业领域:抑郁']
     },
     {
-      name: '孙晴',
-      desc:"是活泼学妹,国家初级心理咨询师",
-      title: '初级心理咨询师',
+      name: '小雅陪聊师',
+      bio:"专注于压力管理,通过实用技巧帮助来访者提升自我效能,找到生活平衡",
       avatar: '/assets/img/5.png',
-      tags: ['专业领域:压力']
+      expertise: ['专业领域:压力']
     }
   ];
   clickToConsult(consultant:any) {
@@ -60,9 +57,8 @@ export class Tab2Page {
         console.log("onChatInit");
         console.log("预设角色", chat.role);
         chat.role.set("name", consultant.name);
-        chat.role.set("title", consultant.title);
-        chat.role.set("desc",consultant.desc);
-        chat.role.set("tags", consultant.tags);
+        chat.role.set("bio",consultant.bio);
+        chat.role.set("expertise", consultant.expertise);
         chat.role.set("avatar", consultant.avatar)
         chat.role.set("prompt", `
         # 角色设定
@@ -79,6 +75,7 @@ export class Tab2Page {
     // this.router.navigateByUrl("/chat/session/role/2DXJkRsjXK")
   }
   //selectedIssue:string='';
+
   matchedCounselor: { name: string; specialty: string } | null = null;
 
   questions = [
@@ -101,6 +98,14 @@ export class Tab2Page {
 
   matchCounselor() {
   }
+  putong = [
+    {
+      name: '小娇陪聊师',
+      bio:"注于焦虑症的李晓慧,通过认知行为疗法帮助来访者重拾内心的平静与自信",
+      avatar: '/assets/img/2.png',
+      expertise: ['专业领域:焦虑']
+    },
+  ]
   goChat(){
       this.router.navigateByUrl("/chat/session/role/2DXJkRsjXK")
   }