tab3.page.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { Component } from '@angular/core';
  2. @Component({
  3. selector: 'app-tab3',
  4. templateUrl: 'tab3.page.html',
  5. styleUrls: ['tab3.page.scss'],
  6. })
  7. export class Tab3Page {
  8. unreadMessages = 3; // Example value, update with actual unread tab3s count
  9. selectedTab = 'message';
  10. messages = [
  11. { avatar: 'assets/truck.jpg', title: '交易物流', content: '您购买的宝贝已签收', time: '昨天' },
  12. { avatar: 'assets/user-avatar1.jpg', title: 'abab', content: '来自abab的穿搭分享', time: '昨天' },
  13. { avatar: 'assets/image2.jpg', title: '客服机器人2号', content: '请确认收货地址', time: '星期五' },
  14. { avatar: 'assets/user-avatar2.jpg', title: '穿搭小助手', content: '为您推荐', time: '星期四' },
  15. { avatar: 'assets/user-avatar3.jpg', title: 'iakz', content: '互关', time: '星期一' },
  16. // Add more tab3s as needed
  17. ];
  18. constructor() {}
  19. search() {
  20. // Implement search functionality
  21. }
  22. addNewMessage() {
  23. // Implement adding new tab3 functionality
  24. }
  25. selectTab(tab: string) {
  26. this.selectedTab = tab;
  27. }
  28. }