import { Component } from '@angular/core';

@Component({
  selector: 'app-tab3',
  templateUrl: 'tab3.page.html',
  styleUrls: ['tab3.page.scss']
})
export class Tab3Page {

  messages: BookMessage[] = [];
  constructor() {
    this.messages = [
      { title: '三体', author: '刘慈欣', id:"202407091001", status: '派送中', deliveryTime: new Date('2024-07-09T07:20:00') },
      { title: '狂人日记', author: '鲁迅', id:"202407091002", status: '订单处理中', deliveryTime: new Date('2024-07-09T08:30:00') },
      { title: '天龙八部', author: '金庸', id:"202407091003", status: '已签收', deliveryTime: new Date('2024-07-09T09:45:00') },
      { title: '老人与海', author: '海明威', id:"202407091004", status: '已送至指定地点', deliveryTime: new Date('2024-07-09T10:55:00') }
    ];
  }
  confirmDelivery(message: BookMessage): void {
    message.status = '已签收';
  }
  
}
interface BookMessage {
  title: string;
  author: string;
  id:string;
  status: '派送中' | '订单处理中' | '已签收' | '已送至指定地点';
  deliveryTime: Date;
}
