tab3.page.ts 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import { Component } from '@angular/core';
  2. import { Router } from '@angular/router';
  3. @Component({
  4. selector: 'app-tab3',
  5. templateUrl: 'tab3.page.html',
  6. styleUrls: ['tab3.page.scss']
  7. })
  8. export class Tab3Page {
  9. selectedSegment: string = 'member';
  10. memberContent = [
  11. {
  12. // title: '私信内容标题1',
  13. // description: '这是私信内容的描述1',
  14. // imageUrl: 'https://example.com/image1.jpg'
  15. },
  16. {
  17. // title: '私信内容标题2',
  18. // description: '这是私信内容的描述2',
  19. // imageUrl: 'https://example.com/image1.jpg'
  20. },
  21. {
  22. // title: '私信内容标题3',
  23. // description: '这是私信内容的描述3',
  24. // imageUrl: 'https://example.com/image1.jpg'
  25. }
  26. ];
  27. orderContent = [
  28. {
  29. title: '用户1',
  30. description: '这是订单内容的描述1',
  31. imageUrl: 'https://example.com/image1.jpg'
  32. },
  33. {
  34. title: '用户2',
  35. description: '这是订单内容的描述2',
  36. imageUrl: 'https://example.com/image1.jpg'
  37. },
  38. {
  39. title: '用户3',
  40. description: '这是订单内容的描述3',
  41. imageUrl: 'https://example.com/image1.jpg'
  42. }
  43. ];
  44. interactionContent = [
  45. {
  46. title: '互动内容标题1',
  47. description: '这是互动内容的描述1',
  48. imageUrl: 'https://example.com/image1.jpg'
  49. },
  50. {
  51. title: '互动内容标题2',
  52. description: '这是互动内容的描述2',
  53. imageUrl: 'https://example.com/image1.jpg'
  54. },
  55. {
  56. title: '互动内容标题3',
  57. description: '这是互动内容的描述3',
  58. imageUrl: 'https://example.com/image1.jpg'
  59. }
  60. ];
  61. accountContent = [
  62. {
  63. title: '账户内容标题1',
  64. description: '这是账户内容的描述1',
  65. imageUrl: 'https://example.com/image1.jpg'
  66. },
  67. {
  68. title: '账户内容标题2',
  69. description: '这是账户内容的描述2',
  70. imageUrl: 'https://example.com/image1.jpg'
  71. },
  72. {
  73. title: '账户内容标题3',
  74. description: '这是账户内容的描述3',
  75. imageUrl: 'https://example.com/image1.jpg'
  76. }
  77. ];
  78. constructor(private router: Router) {}
  79. navigateTo(destination: string) {
  80. // 根据目标字符串执行相应的导航操作
  81. if (destination === 'yonghu1') {
  82. this.router.navigate(['/xiaoxi']);
  83. } else if (destination === '酒店') {
  84. this.router.navigate(['/jiudian']);
  85. } else if (destination === '机票') {
  86. this.router.navigate(['/feiji']);
  87. } else if (destination === '火车票') {
  88. this.router.navigate(['/huoche']);
  89. }
  90. }
  91. }