update
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { MenuTypes } from "@/src/types/Menu";
|
import { MenuTypes } from "@/./types/Menu";
|
||||||
|
|
||||||
|
|
||||||
export const menuData: MenuTypes = [
|
export const menuData: MenuTypes = [
|
||||||
|
|||||||
1
src/components/layout/home/BoxDeal/ProductItem.tsx
Normal file
1
src/components/layout/home/BoxDeal/ProductItem.tsx
Normal file
@@ -0,0 +1 @@
|
|||||||
|
const ProductItem = ({ item }: { item: Product }) => {};
|
||||||
1572
src/components/layout/home/BoxDeal/productDealData.ts
Normal file
1572
src/components/layout/home/BoxDeal/productDealData.ts
Normal file
File diff suppressed because it is too large
Load Diff
179
src/types/TypeListProductDeal.ts
Normal file
179
src/types/TypeListProductDeal.ts
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
interface ImageInfo {
|
||||||
|
small: string;
|
||||||
|
large: string;
|
||||||
|
original: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ProductImage {
|
||||||
|
image: ImageInfo;
|
||||||
|
alt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface BrandInfo {
|
||||||
|
id: number;
|
||||||
|
brand_index: string;
|
||||||
|
name: string;
|
||||||
|
image: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ReviewInfo {
|
||||||
|
rate: number;
|
||||||
|
total: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SaleRules {
|
||||||
|
price: string;
|
||||||
|
normal_price: number;
|
||||||
|
min_purchase: string;
|
||||||
|
max_purchase: string;
|
||||||
|
remain_quantity: number;
|
||||||
|
from_time: string;
|
||||||
|
to_time: string;
|
||||||
|
type: string;
|
||||||
|
type_id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface OfferItem {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
type: string;
|
||||||
|
thumbnail: string;
|
||||||
|
cash_value: number;
|
||||||
|
quantity: number;
|
||||||
|
from_time: string;
|
||||||
|
to_time: string;
|
||||||
|
url: string;
|
||||||
|
description: string;
|
||||||
|
status: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface SpecialOffer {
|
||||||
|
other?: OfferItem[];
|
||||||
|
all?: OfferItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ProductTypeFlags {
|
||||||
|
isNew: number;
|
||||||
|
isHot: number;
|
||||||
|
isBestSale: number;
|
||||||
|
isSaleOff: number;
|
||||||
|
"online-only": number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ProductTypeExtend {
|
||||||
|
buy_count?: string,
|
||||||
|
pixel_code?: string,
|
||||||
|
review_count?: string,
|
||||||
|
review_score?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DealListItem {
|
||||||
|
id: string;
|
||||||
|
pro_id: string;
|
||||||
|
title: string;
|
||||||
|
price: string;
|
||||||
|
quantity: string;
|
||||||
|
min_purchase: string;
|
||||||
|
max_purchase: string;
|
||||||
|
is_featured: string;
|
||||||
|
from_time: string;
|
||||||
|
to_time: string;
|
||||||
|
is_started: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PricingTrace {
|
||||||
|
price: string;
|
||||||
|
type: string;
|
||||||
|
type_id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Category {
|
||||||
|
id: string;
|
||||||
|
catPath: string;
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ProductInfo {
|
||||||
|
id: number;
|
||||||
|
productId: number;
|
||||||
|
priceUnit: string;
|
||||||
|
marketPrice: number;
|
||||||
|
price: string;
|
||||||
|
price_off: number | string;
|
||||||
|
currency: string;
|
||||||
|
sale_rules: SaleRules;
|
||||||
|
lastUpdate: string;
|
||||||
|
warranty: string;
|
||||||
|
productName: string;
|
||||||
|
productSummary: string;
|
||||||
|
package_accessory: string;
|
||||||
|
productImage: ImageInfo;
|
||||||
|
imageCollection: ProductImage[];
|
||||||
|
productUrl: string;
|
||||||
|
brand: BrandInfo;
|
||||||
|
visit: number;
|
||||||
|
rating: number;
|
||||||
|
reviewCount: number;
|
||||||
|
review: ReviewInfo;
|
||||||
|
comment: ReviewInfo;
|
||||||
|
quantity: number;
|
||||||
|
productSKU: string;
|
||||||
|
productModel: string;
|
||||||
|
hasVAT: number;
|
||||||
|
condition: string;
|
||||||
|
config_count: number;
|
||||||
|
configurable: number;
|
||||||
|
component_count: number;
|
||||||
|
specialOffer: SpecialOffer;
|
||||||
|
specialOfferGroup: [];
|
||||||
|
productType: ProductTypeFlags;
|
||||||
|
bulk_price: [];
|
||||||
|
thum_poster: string;
|
||||||
|
thum_poster_type: string;
|
||||||
|
addon: [];
|
||||||
|
variants: [];
|
||||||
|
variant_option: [];
|
||||||
|
extend: ProductTypeExtend;
|
||||||
|
weight: number;
|
||||||
|
promotion_price: null;
|
||||||
|
deal_list: DealListItem[];
|
||||||
|
pricing_traces: PricingTrace[];
|
||||||
|
categories: Category[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DealType {
|
||||||
|
id: string;
|
||||||
|
pro_id: string;
|
||||||
|
title: string;
|
||||||
|
price: string;
|
||||||
|
customer_group_price: string;
|
||||||
|
quantity: string;
|
||||||
|
min_purchase: string;
|
||||||
|
max_purchase: string;
|
||||||
|
from_time: string;
|
||||||
|
to_time: string;
|
||||||
|
is_featured: string;
|
||||||
|
last_update: string;
|
||||||
|
last_update_by: string;
|
||||||
|
ordering: string;
|
||||||
|
sale_order: string;
|
||||||
|
sale_quantity: string;
|
||||||
|
views: string;
|
||||||
|
rating: string;
|
||||||
|
review_count: string;
|
||||||
|
auto_renew: string;
|
||||||
|
auto_renew_history: null | string;
|
||||||
|
counter: number;
|
||||||
|
request_path: string;
|
||||||
|
deal_time_happen: number;
|
||||||
|
deal_time_left: number;
|
||||||
|
is_start: number;
|
||||||
|
is_end: number;
|
||||||
|
is_active: string;
|
||||||
|
product_info: ProductInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export type TypeListProductDeal = DealType[];
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./*"],
|
"@/*": ["./src/*"],
|
||||||
"@components/*": ["./src/components/*"],
|
"@components/*": ["./src/components/*"],
|
||||||
"@types/*": ["./src/types/*"],
|
"@types/*": ["./src/types/*"],
|
||||||
"@styles/*": ["./src/styles/*"]
|
"@styles/*": ["./src/styles/*"]
|
||||||
|
|||||||
Reference in New Issue
Block a user