Browse Source

选择商品卡片切换货币哦

main
Mac 2 weeks ago
parent
commit
7f5c736ac9
  1. 8
      app/screens/ProductCard.tsx
  2. 2
      app/services/api/productApi.ts

8
app/screens/ProductCard.tsx

@ -132,7 +132,7 @@ const ProductCard: React.FC<ProductCardProps> = ({
category_id: product?.category_id || 0,
price: item.offer_price || price || 0,
all_price: totalPrice || 0,
currency: currency || "",
currency: product.currency || "",
sku_id: item?.sku_id || 0,
quantity: (item?.size as number) || 0,
product_name: product?.subject || "",
@ -176,7 +176,7 @@ const ProductCard: React.FC<ProductCardProps> = ({
category_id: product?.category_id || 0,
price: item.offer_price || price || 0,
all_price: totalPrice || 0,
currency: currency || "",
currency: product.currency || "",
sku_id: item?.sku_id || 0,
quantity: (item?.size as number) || 0,
product_name: product?.subject || "",
@ -263,7 +263,7 @@ const ProductCard: React.FC<ProductCardProps> = ({
</View>
<View style={styles.price}>
<Text style={styles.priceInfoText}>{price}</Text>
<Text style={styles.priceInfoTextCon}>{currency}</Text>
<Text style={styles.priceInfoTextCon}>{product.currency}</Text>
</View>
</View>
<View style={styles.priceInfoClose}>
@ -760,7 +760,7 @@ const ProductCard: React.FC<ProductCardProps> = ({
<View style={styles.fixedBottomViewBoxRight}>
<Text style={styles.fixedBottomViewBoxRightText}>:</Text>
<Text style={styles.fixedBottomViewBoxPriceText}>
{totalPrice.toFixed(2)} {currency}
{totalPrice.toFixed(2)} {product.currency}
</Text>
</View>
</View>

2
app/services/api/productApi.ts

@ -56,6 +56,7 @@ export type Products = Product[]
"value_trans_en": string,
"sku_image_url": string,
'has_color'?: boolean,
currency:string
size?:number,
list:Sku[],
@ -85,6 +86,7 @@ export type Products = Product[]
export interface ProductDetailParams {
"offer_id": 0,
currency:string
"category_id": 0,
"price": number | string,
"subject": "string",

Loading…
Cancel
Save