import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IonicModule } from '@ionic/angular';

@Component({
  selector: 'app-item-detail',
  templateUrl: './item-detail.page.html',
  styleUrls: ['./item-detail.page.scss'],
  standalone: true,
  imports: [CommonModule, IonicModule]
})
export class ItemDetailPage {
  item: any;

  constructor() {
    const navState = window.history.state;
    if (navState && navState.item) {
      this.item = navState.item;
      console.log('item-detail接收到item:', this.item);
    }
  }
}
