|
@@ -1,5 +1,3 @@
|
|
|
-<!-- tab3.page.html -->
|
|
|
-
|
|
|
<ion-header [translucent]="true">
|
|
|
<ion-toolbar class="custom-toolbar">
|
|
|
<ion-title class="custom-title">
|
|
@@ -11,103 +9,111 @@
|
|
|
<ion-content [fullscreen]="true" class="content-background">
|
|
|
<!-- 搜索栏 -->
|
|
|
<ion-searchbar
|
|
|
- placeholder="搜索"
|
|
|
- class="custom-searchbar"
|
|
|
- (ionInput)="searchProducts($event)">
|
|
|
-</ion-searchbar>
|
|
|
+ placeholder="搜索"
|
|
|
+ class="custom-searchbar"
|
|
|
+ (ionInput)="searchProducts($event)">
|
|
|
+ </ion-searchbar>
|
|
|
|
|
|
- <!-- 分类区域(可横向滑动) -->
|
|
|
-<div class="category-scroll">
|
|
|
- <div class="category-scroll-inner">
|
|
|
- <ion-grid>
|
|
|
- <ion-row class="category-row">
|
|
|
- <ion-col
|
|
|
- size="3"
|
|
|
- size-sm="3"
|
|
|
- size-md="3"
|
|
|
- size-lg="3"
|
|
|
- size-xl="3"
|
|
|
- *ngFor="let category of categories"
|
|
|
- class="category-col">
|
|
|
- <div class="category-item" (click)="onCategoryClick(category)">
|
|
|
- <div class="category-image-wrapper">
|
|
|
- <img [src]="category.image" alt="{{category.name}}" class="category-image">
|
|
|
+ <!-- 分类区域(可横向滑动) -->
|
|
|
+ <div class="category-scroll">
|
|
|
+ <div class="category-scroll-inner">
|
|
|
+ <ion-grid>
|
|
|
+ <ion-row class="category-row">
|
|
|
+ <ion-col
|
|
|
+ size="3"
|
|
|
+ size-sm="3"
|
|
|
+ size-md="3"
|
|
|
+ size-lg="3"
|
|
|
+ size-xl="3"
|
|
|
+ *ngFor="let category of categories"
|
|
|
+ class="category-col">
|
|
|
+ <div class="category-item" (click)="onCategoryClick(category)">
|
|
|
+ <div class="category-image-wrapper">
|
|
|
+ <img [src]="category.image" alt="{{category.name}}" class="category-image">
|
|
|
+ </div>
|
|
|
+ <div class="category-text">{{ category.name }}</div>
|
|
|
</div>
|
|
|
- <div class="category-text">{{ category.name }}</div>
|
|
|
- </div>
|
|
|
+ </ion-col>
|
|
|
+ </ion-row>
|
|
|
+ </ion-grid>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 热销模块 -->
|
|
|
+ <div class="marketing-section">
|
|
|
+ <h2>热销🔥🔥🔥</h2>
|
|
|
+ <ion-grid>
|
|
|
+ <ion-row>
|
|
|
+ <ion-col size="6" size-md="4" size-lg="3" *ngFor="let product of hotProducts | slice:0:4">
|
|
|
+ <ion-card class="product-card" (click)="openDetailModal(product)">
|
|
|
+ <ion-card-header class="product-card-header">
|
|
|
+ <div class="product-tag">{{ product.get('title') || '热销🔥🔥🔥' }}</div>
|
|
|
+ </ion-card-header>
|
|
|
+ <ion-card-content class="product-card-content">
|
|
|
+ <div class="product-image-wrapper">
|
|
|
+ <img [src]="product.get('image')" alt="{{product.get('name')}}" class="product-image">
|
|
|
+ </div>
|
|
|
+ <div class="product-info">
|
|
|
+ <h3 class="product-name">{{ product.get('name') }}</h3>
|
|
|
+ <div class="product-price">{{ product.get('price') }}</div>
|
|
|
+ </div>
|
|
|
+ </ion-card-content>
|
|
|
+ </ion-card>
|
|
|
</ion-col>
|
|
|
</ion-row>
|
|
|
</ion-grid>
|
|
|
- </div>
|
|
|
-</div>
|
|
|
-
|
|
|
-<!-- 热销模块 -->
|
|
|
-<div class="marketing-section">
|
|
|
- <h2>热销🔥🔥🔥</h2>
|
|
|
- <div class="product-container">
|
|
|
- <ng-container *ngFor="let product of hotProducts | slice:0:2">
|
|
|
- <ion-card class="product-card" (click)="openDetailModal(product)">
|
|
|
- <ion-card-header class="product-card-header">
|
|
|
- <div class="product-tag">{{ product.get('title') || '热销🔥🔥🔥' }}</div>
|
|
|
- </ion-card-header>
|
|
|
- <ion-card-content class="product-card-content">
|
|
|
- <div class="product-image-wrapper">
|
|
|
- <img [src]="product.get('image')" alt="{{product.get('name')}}" class="product-image">
|
|
|
- </div>
|
|
|
- <div class="product-info">
|
|
|
- <h3 class="product-name">{{ product.get('name') }}</h3>
|
|
|
- <div class="product-price">{{ product.get('price') }}</div>
|
|
|
- </div>
|
|
|
- </ion-card-content>
|
|
|
- </ion-card>
|
|
|
- </ng-container>
|
|
|
<ion-button fill="clear" (click)="viewMore('hot')">查看更多</ion-button>
|
|
|
</div>
|
|
|
-</div>
|
|
|
|
|
|
-<!-- 特价模块 -->
|
|
|
-<div class="marketing-section">
|
|
|
- <h2>特价优惠💰💰💰</h2>
|
|
|
- <div class="product-container">
|
|
|
- <ng-container *ngFor="let product of specialProducts | slice:0:2">
|
|
|
- <ion-card class="product-card" (click)="openDetailModal(product)">
|
|
|
- <ion-card-header class="product-card-header">
|
|
|
- <div class="product-tag">{{ product.get('title') || '特价优惠💰💰💰' }}</div>
|
|
|
- </ion-card-header>
|
|
|
- <ion-card-content class="product-card-content">
|
|
|
- <div class="product-image-wrapper">
|
|
|
- <img [src]="product.get('image')" alt="{{product.get('name')}}" class="product-image">
|
|
|
- </div>
|
|
|
- <div class="product-info">
|
|
|
- <h3 class="product-name">{{ product.get('name') }}</h3>
|
|
|
- <div class="product-price">{{ product.get('price') }}</div>
|
|
|
- </div>
|
|
|
- </ion-card-content>
|
|
|
- </ion-card>
|
|
|
- </ng-container>
|
|
|
+ <!-- 特价模块 -->
|
|
|
+ <div class="marketing-section">
|
|
|
+ <h2>特价优惠💰💰💰</h2>
|
|
|
+ <ion-grid>
|
|
|
+ <ion-row>
|
|
|
+ <ion-col size="6" size-md="4" size-lg="3" *ngFor="let product of specialProducts | slice:0:4">
|
|
|
+ <ion-card class="product-card" (click)="openDetailModal(product)">
|
|
|
+ <ion-card-header class="product-card-header">
|
|
|
+ <div class="product-tag">{{ product.get('title') || '特价优惠💰💰💰' }}</div>
|
|
|
+ </ion-card-header>
|
|
|
+ <ion-card-content class="product-card-content">
|
|
|
+ <div class="product-image-wrapper">
|
|
|
+ <img [src]="product.get('image')" alt="{{product.get('name')}}" class="product-image">
|
|
|
+ </div>
|
|
|
+ <div class="product-info">
|
|
|
+ <h3 class="product-name">{{ product.get('name') }}</h3>
|
|
|
+ <div class="product-price">{{ product.get('price') }}</div>
|
|
|
+ </div>
|
|
|
+ </ion-card-content>
|
|
|
+ </ion-card>
|
|
|
+ </ion-col>
|
|
|
+ </ion-row>
|
|
|
+ </ion-grid>
|
|
|
<ion-button fill="clear" (click)="viewMore('special')">查看更多</ion-button>
|
|
|
</div>
|
|
|
-</div>
|
|
|
|
|
|
-<!-- 商品卡片列表区域 -->
|
|
|
-<div class="product-container">
|
|
|
- <ng-container *ngFor="let product of products">
|
|
|
- <ion-card class="product-card" (click)="openDetailModal(product)">
|
|
|
- <ion-card-header class="product-card-header">
|
|
|
- <div class="product-tag">{{ product.get('title') || '药品详情' }}</div>
|
|
|
- </ion-card-header>
|
|
|
- <ion-card-content class="product-card-content">
|
|
|
- <div class="product-image-wrapper">
|
|
|
- <img [src]="product.get('image')" alt="{{product.get('name')}}" class="product-image">
|
|
|
- </div>
|
|
|
- <div class="product-info">
|
|
|
- <h3 class="product-name">{{ product.get('name') }}</h3>
|
|
|
- <div class="product-price">{{ product.get('price') }}</div>
|
|
|
- </div>
|
|
|
- </ion-card-content>
|
|
|
- </ion-card>
|
|
|
- </ng-container>
|
|
|
-</div>
|
|
|
+ <!-- 商品卡片列表区域 -->
|
|
|
+ <div class="product-container">
|
|
|
+ <ion-grid>
|
|
|
+ <ion-row>
|
|
|
+ <ion-col size="6" size-md="4" size-lg="3" *ngFor="let product of products">
|
|
|
+ <ion-card class="product-card" (click)="openDetailModal(product)">
|
|
|
+ <ion-card-header class="product-card-header">
|
|
|
+ <div class="product-tag">{{ product.get('title') || '药品详情' }}</div>
|
|
|
+ </ion-card-header>
|
|
|
+ <ion-card-content class="product-card-content">
|
|
|
+ <div class="product-image-wrapper">
|
|
|
+ <img [src]="product.get('image')" alt="{{product.get('name')}}" class="product-image">
|
|
|
+ </div>
|
|
|
+ <div class="product-info">
|
|
|
+ <h3 class="product-name">{{ product.get('name') }}</h3>
|
|
|
+ <div class="product-price">{{ product.get('price') }}</div>
|
|
|
+ </div>
|
|
|
+ </ion-card-content>
|
|
|
+ </ion-card>
|
|
|
+ </ion-col>
|
|
|
+ </ion-row>
|
|
|
+ </ion-grid>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 底部弹出模态 -->
|
|
|
<ion-modal [isOpen]="showDetailModal" cssClass="bottom-modal" backdropDismiss="true" (ionModalDidDismiss)="closeDetailModal()">
|