topic-detail.component.ts 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { CommonModule } from '@angular/common';
  2. import { Component, OnInit } from '@angular/core';
  3. import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,
  4. IonListHeader, IonTitle, IonToolbar,IonInput,IonSearchbar } from '@ionic/angular/standalone';
  5. import { ExploreContainerComponent } from '../explore-container/explore-container.component';
  6. import { Router } from '@angular/router';
  7. @Component({
  8. selector: 'app-topic-detail',
  9. templateUrl: './topic-detail.component.html',
  10. styleUrls: ['./topic-detail.component.scss'],
  11. standalone: true,
  12. imports: [IonHeader,IonToolbar,IonTitle,IonContent,ExploreContainerComponent,
  13. IonList,IonListHeader,IonItem,
  14. IonLabel,IonIcon,IonButton,
  15. IonInput,IonSearchbar,
  16. CommonModule
  17. ]
  18. })
  19. export class TopicDetailComponent implements OnInit {
  20. tips = [
  21. {
  22. title: '深呼吸',
  23. description: '通过深呼吸来放松身心,缓解焦虑',
  24. details: '深呼吸可以帮助你放慢心率,增加氧气摄入,改善心理状态',
  25. expanded: false,
  26. },
  27. {
  28. title: '运动',
  29. description: '规律的运动有助于释放压力和焦虑',
  30. details: '运动可以释放内啡肽,提升你的情绪',
  31. expanded: false,
  32. },
  33. {
  34. title: '正念冥想',
  35. description: '通过正念练习来关注当下,减少焦虑',
  36. details: '正念冥想可以帮助你更好地管理情绪,提升专注力',
  37. expanded: false,
  38. },
  39. ];
  40. tools = [
  41. {
  42. name: '焦虑管理APP',
  43. description: '帮助你记录情绪,提供放松练习',
  44. link: 'https://www.18183.com/down/2968763.html',
  45. buttonText: '下载APP',
  46. },
  47. {
  48. name: '在线冥想课程',
  49. description: '提供多种冥想练习,帮助你减轻焦虑',
  50. link: 'https://www.bilibili.com/video/BV1gdUpYyEiw/',
  51. buttonText: '查看视频',
  52. },
  53. ];
  54. resources = [
  55. {
  56. title: '控制焦虑的方法',
  57. link: 'https://m.baidu.com/bh/m/detail/ar_13481633186713755563',
  58. buttonText: '查看更多',
  59. },
  60. {
  61. title: '克服焦虑的方法',
  62. link: 'https://m.baidu.com/bh/m/detail/ar_4824212419687234431',
  63. buttonText: '阅读更多',
  64. },
  65. {
  66. title: '焦虑管理技巧',
  67. link: 'https://www.bilibili.com/video/BV1Kj2KYJEYU/',
  68. buttonText: '观看视频',
  69. },
  70. ];
  71. discussions = [
  72. {
  73. title: '分享你的焦虑管理经验',
  74. link: 'https://example.com/community',
  75. },
  76. ];
  77. constructor(private router: Router) {
  78. }
  79. goTab1(){
  80. this.router.navigate(['tabs/tab1']);
  81. }
  82. ngOnInit() {}
  83. }