|
|
@ -213,519 +213,521 @@ const ProductCard: React.FC<ProductCardProps> = ({ |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<View style={styles.wrapper}> |
|
|
|
<View style={styles.wrapper}> |
|
|
|
<View style={styles.container}> |
|
|
|
<ScrollView style={{flex: 1}}> |
|
|
|
<View style={styles.productInfo}> |
|
|
|
<View style={styles.container}> |
|
|
|
<View style={styles.productBigImgBox}> |
|
|
|
<View style={styles.productInfo}> |
|
|
|
<Image source={{ uri: imgTitle }} style={styles.productBigImg} /> |
|
|
|
<View style={styles.productBigImgBox}> |
|
|
|
<View style={styles.cornerView}> |
|
|
|
<Image source={{ uri: imgTitle }} style={styles.productBigImg} /> |
|
|
|
<View style={styles.topRightIcon}> |
|
|
|
<View style={styles.cornerView}> |
|
|
|
<XIconTop size={6} /> |
|
|
|
<View style={styles.topRightIcon}> |
|
|
|
</View> |
|
|
|
<XIconTop size={6} /> |
|
|
|
<View style={styles.bottomLeftIcon}> |
|
|
|
</View> |
|
|
|
<XIconBottom size={6} /> |
|
|
|
<View style={styles.bottomLeftIcon}> |
|
|
|
</View> |
|
|
|
<XIconBottom size={6} /> |
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.productInfoBox}> |
|
|
|
|
|
|
|
<View style={styles.priceInfo}> |
|
|
|
|
|
|
|
<View style={styles.priceInfoBox}> |
|
|
|
|
|
|
|
<View style={styles.price}> |
|
|
|
|
|
|
|
<Text style={styles.priceInfoText}>{price}</Text> |
|
|
|
|
|
|
|
<Text style={styles.priceInfoTextCon}>FCFA</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
{vip_level > 0 && ( |
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
<View style={styles.priceInfoOffer}> |
|
|
|
|
|
|
|
<Image |
|
|
|
|
|
|
|
source={require("../../assets/img/折扣VIP1 (1).png")} |
|
|
|
|
|
|
|
style={styles.priceInfoOfferImg} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<View style={styles.discountTextContainer}> |
|
|
|
|
|
|
|
<Text style={styles.discountText}>-5%</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.priceInfoVip}> |
|
|
|
|
|
|
|
<ImageBackground |
|
|
|
|
|
|
|
source={require("../../assets/img/vip1.png")} |
|
|
|
|
|
|
|
style={styles.priceInfoVipImg} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text style={styles.vipStatusNumeric}> |
|
|
|
|
|
|
|
VIP {vip_level} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</ImageBackground> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.priceInfoClose}> |
|
|
|
|
|
|
|
<TouchableOpacity onPress={() => onClose()}> |
|
|
|
|
|
|
|
<CloseIcon size={fontSize(20)} /> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.productInfoBox}> |
|
|
|
<ScrollView |
|
|
|
<View style={styles.priceInfo}> |
|
|
|
horizontal |
|
|
|
<View style={styles.priceInfoBox}> |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
<View style={styles.price}> |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
<Text style={styles.priceInfoText}>{price}</Text> |
|
|
|
style={styles.priceInfoList} |
|
|
|
<Text style={styles.priceInfoTextCon}>{currency}</Text> |
|
|
|
> |
|
|
|
</View> |
|
|
|
{product && |
|
|
|
{vip_level > 0 && ( |
|
|
|
product.sale_info && |
|
|
|
<> |
|
|
|
product.sale_info.price_range_list && |
|
|
|
<View style={styles.priceInfoOffer}> |
|
|
|
product.sale_info.price_range_list.length > 0 |
|
|
|
<Image |
|
|
|
? product.sale_info.price_range_list.map((item, index) => { |
|
|
|
source={require("../../assets/img/折扣VIP1 (1).png")} |
|
|
|
return ( |
|
|
|
style={styles.priceInfoOfferImg} |
|
|
|
<View style={styles.priceList} key={index}> |
|
|
|
/> |
|
|
|
<View style={styles.priceListBox}> |
|
|
|
<View style={styles.discountTextContainer}> |
|
|
|
<Text style={styles.priceListBoxText}> |
|
|
|
<Text style={styles.discountText}>-5%</Text> |
|
|
|
{item.price} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text style={styles.priceListBoxTextCon}>FCFA</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={styles.priceListBoxPie}> |
|
|
|
</View> |
|
|
|
<Text style={styles.priceListBoxListText}> |
|
|
|
<View style={styles.priceInfoVip}> |
|
|
|
>= {item.min_quantity} <Text>硬币</Text> |
|
|
|
<ImageBackground |
|
|
|
|
|
|
|
source={require("../../assets/img/vip1.png")} |
|
|
|
|
|
|
|
style={styles.priceInfoVipImg} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text style={styles.vipStatusNumeric}> |
|
|
|
|
|
|
|
VIP {vip_level} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</ImageBackground> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
); |
|
|
|
</> |
|
|
|
}) |
|
|
|
)} |
|
|
|
: null} |
|
|
|
</View> |
|
|
|
</ScrollView> |
|
|
|
<View style={styles.priceInfoClose}> |
|
|
|
</View> |
|
|
|
<TouchableOpacity onPress={() => onClose()}> |
|
|
|
</View> |
|
|
|
<CloseIcon size={fontSize(20)} /> |
|
|
|
{/* 图片和文字 */} |
|
|
|
</TouchableOpacity> |
|
|
|
{hasImg && groupList.length > 1 && hasImg.has_image && ( |
|
|
|
|
|
|
|
<View style={styles.productBox}> |
|
|
|
|
|
|
|
{hasImg && ( |
|
|
|
|
|
|
|
<> |
|
|
|
|
|
|
|
<View style={styles.productTit}> |
|
|
|
|
|
|
|
<Text style={styles.productTitText}> |
|
|
|
|
|
|
|
{hasImg.attribute_name} :{" "} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text style={styles.productTitText}>{size}</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
<ScrollView |
|
|
|
|
|
|
|
style={styles.productBoxImgList} |
|
|
|
|
|
|
|
horizontal |
|
|
|
|
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
|
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{hasImg?.attributes?.map((item, index) => { |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={[ |
|
|
|
|
|
|
|
styles.productBoxImgListBox, |
|
|
|
|
|
|
|
item?.has_color && styles.productBoxImgListBoxActive, |
|
|
|
|
|
|
|
]} |
|
|
|
|
|
|
|
key={index} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleColorSelect( |
|
|
|
|
|
|
|
item?.value || '', |
|
|
|
|
|
|
|
index, |
|
|
|
|
|
|
|
item?.sku_image_url || '' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Image |
|
|
|
|
|
|
|
source={{ uri: item?.sku_image_url || '' }} |
|
|
|
|
|
|
|
style={styles.productBoxImgListBoxImg} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
{(item?.size ?? 0) > 0 && ( |
|
|
|
|
|
|
|
<View style={styles.fixedCornerView}> |
|
|
|
|
|
|
|
<Text style={styles.fixedCornerViewText}> |
|
|
|
|
|
|
|
x{item.size} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
})} |
|
|
|
|
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<View style={styles.productTit}> |
|
|
|
|
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
|
|
|
|
<ScrollView |
|
|
|
<ScrollView |
|
|
|
style={styles.sizePrice} |
|
|
|
horizontal |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
|
|
|
|
style={styles.priceInfoList} |
|
|
|
> |
|
|
|
> |
|
|
|
<View style={styles.sizePriceBox}> |
|
|
|
{product && |
|
|
|
{hasImg && |
|
|
|
product.sale_info && |
|
|
|
hasImg.attributes |
|
|
|
product.sale_info.price_range_list && |
|
|
|
?.find((item) => item?.has_color) |
|
|
|
product.sale_info.price_range_list.length > 0 |
|
|
|
?.list.map((list, index1) => ( |
|
|
|
? product.sale_info.price_range_list.map((item, index) => { |
|
|
|
<View style={styles.sizePriceBoxItems} key={index1}> |
|
|
|
return ( |
|
|
|
<View style={styles.sizePriceBoxItem}> |
|
|
|
<View style={styles.priceList} key={index}> |
|
|
|
<View style={styles.sizePriceBoxItemTextBox}> |
|
|
|
<View style={styles.priceListBox}> |
|
|
|
{(list?.size ?? 0) > 0 && ( |
|
|
|
<Text style={styles.priceListBoxText}> |
|
|
|
<Text style={styles.selectedNumText}> |
|
|
|
{item.price} |
|
|
|
x{list?.size} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<Text style={styles.priceText}> |
|
|
|
|
|
|
|
{list?.offer_price || price || 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text |
|
|
|
|
|
|
|
style={styles.sizePriceBoxItemText} |
|
|
|
|
|
|
|
numberOfLines={1} |
|
|
|
|
|
|
|
ellipsizeMode="tail" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text style={styles.priceListBoxTextCon}>{currency}</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={styles.sizePriceBoxStepForward}> |
|
|
|
<View style={styles.priceListBoxPie}> |
|
|
|
<TouchableOpacity |
|
|
|
<Text style={styles.priceListBoxListText}> |
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
>= {item.min_quantity} <Text>硬币</Text> |
|
|
|
onPress={() => |
|
|
|
</Text> |
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>-</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
))} |
|
|
|
); |
|
|
|
</View> |
|
|
|
}) |
|
|
|
|
|
|
|
: null} |
|
|
|
</ScrollView> |
|
|
|
</ScrollView> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
)} |
|
|
|
{/* 图片和文字 */} |
|
|
|
{/* 两个都是文字 */} |
|
|
|
{hasImg && groupList.length > 1 && hasImg.has_image && ( |
|
|
|
{hasImg && groupList.length > 1 && !hasImg.has_image && ( |
|
|
|
<View style={styles.productBox}> |
|
|
|
<View style={styles.productBox}> |
|
|
|
{hasImg && ( |
|
|
|
<View style={styles.productTit}> |
|
|
|
<> |
|
|
|
<Text style={styles.productTitText}>{hasImg?.attribute_name || ''}</Text> |
|
|
|
<View style={styles.productTit}> |
|
|
|
</View> |
|
|
|
<Text style={styles.productTitText}> |
|
|
|
|
|
|
|
{hasImg.attribute_name} :{" "} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text style={styles.productTitText}>{size}</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
{hasImg.attributes?.map((item, index) => { |
|
|
|
<ScrollView |
|
|
|
return ( |
|
|
|
style={styles.productBoxImgList} |
|
|
|
<TouchableOpacity |
|
|
|
horizontal |
|
|
|
style={[ |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
styles.noImgBoxs, |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
item?.has_color && styles.productBoxImgListBoxActive, |
|
|
|
> |
|
|
|
]} |
|
|
|
{hasImg?.attributes?.map((item, index) => { |
|
|
|
key={index} |
|
|
|
return ( |
|
|
|
onPress={() => { |
|
|
|
<TouchableOpacity |
|
|
|
handleColorSelect(item?.value || '', index, item?.sku_image_url || ''); |
|
|
|
style={[ |
|
|
|
}} |
|
|
|
styles.productBoxImgListBox, |
|
|
|
|
|
|
|
item?.has_color && styles.productBoxImgListBoxActive, |
|
|
|
|
|
|
|
]} |
|
|
|
|
|
|
|
key={index} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleColorSelect( |
|
|
|
|
|
|
|
item?.value || '', |
|
|
|
|
|
|
|
index, |
|
|
|
|
|
|
|
item?.sku_image_url || '' |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Image |
|
|
|
|
|
|
|
source={{ uri: item?.sku_image_url || '' }} |
|
|
|
|
|
|
|
style={styles.productBoxImgListBoxImg} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
{(item?.size ?? 0) > 0 && ( |
|
|
|
|
|
|
|
<View style={styles.fixedCornerView}> |
|
|
|
|
|
|
|
<Text style={styles.fixedCornerViewText}> |
|
|
|
|
|
|
|
x{item.size} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
})} |
|
|
|
|
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
</> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<View style={styles.productTit}> |
|
|
|
|
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
|
|
|
|
<ScrollView |
|
|
|
|
|
|
|
style={styles.sizePrice} |
|
|
|
|
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
|
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
> |
|
|
|
> |
|
|
|
{(item?.size ?? 0) > 0 && ( |
|
|
|
<View style={styles.sizePriceBox}> |
|
|
|
<Text style={styles.selectedNumText}>x{item?.size}</Text> |
|
|
|
{hasImg && |
|
|
|
)} |
|
|
|
hasImg.attributes |
|
|
|
<Text style={styles.noImgBoxsText}>{item?.value || ''}</Text> |
|
|
|
?.find((item) => item?.has_color) |
|
|
|
</TouchableOpacity> |
|
|
|
?.list.map((list, index1) => ( |
|
|
|
); |
|
|
|
<View style={styles.sizePriceBoxItems} key={index1}> |
|
|
|
})} |
|
|
|
<View style={styles.sizePriceBoxItem}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItemTextBox}> |
|
|
|
<View style={styles.productBox}> |
|
|
|
{(list?.size ?? 0) > 0 && ( |
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
<Text style={styles.selectedNumText}> |
|
|
|
</View> |
|
|
|
x{list?.size} |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
</Text> |
|
|
|
<ScrollView |
|
|
|
)} |
|
|
|
style={[styles.sizePrice]} |
|
|
|
<Text style={styles.priceText}> |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
{list?.offer_price || price || 0} |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBox}> |
|
|
|
|
|
|
|
{hasImg && |
|
|
|
|
|
|
|
hasImg.attributes |
|
|
|
|
|
|
|
?.find((item) => item?.has_color) |
|
|
|
|
|
|
|
?.list.map((list, index1) => ( |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItems} key={index1}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItem}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItemTextBox}> |
|
|
|
|
|
|
|
{(list?.size ?? 0) > 0 && ( |
|
|
|
|
|
|
|
<Text style={styles.selectedNumText}> |
|
|
|
|
|
|
|
x{list?.size} |
|
|
|
|
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
)} |
|
|
|
<Text |
|
|
|
<Text style={styles.priceText}> |
|
|
|
style={styles.sizePriceBoxItemText} |
|
|
|
{list?.offer_price || price || 0} |
|
|
|
numberOfLines={1} |
|
|
|
|
|
|
|
ellipsizeMode="tail" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text |
|
|
|
</View> |
|
|
|
style={styles.sizePriceBoxItemText} |
|
|
|
<View style={styles.sizePriceBoxStepForward}> |
|
|
|
numberOfLines={1} |
|
|
|
<TouchableOpacity |
|
|
|
ellipsizeMode="tail" |
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
<Text>-</Text> |
|
|
|
</Text> |
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={styles.sizePriceBoxStepForward}> |
|
|
|
))} |
|
|
|
<TouchableOpacity |
|
|
|
</View> |
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
</ScrollView> |
|
|
|
onPress={() => |
|
|
|
</View> |
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>-</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{/* 两个都是文字 */} |
|
|
|
{/* 只有一个文字 */} |
|
|
|
{hasImg && groupList.length > 1 && !hasImg.has_image && ( |
|
|
|
{noImgList && groupList.length === 1 && !flag && ( |
|
|
|
<View style={styles.productBox}> |
|
|
|
<View style={styles.productBox}> |
|
|
|
<View style={styles.productTit}> |
|
|
|
<View style={styles.productTit}> |
|
|
|
<Text style={styles.productTitText}>{hasImg?.attribute_name || ''}</Text> |
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{hasImg.attributes?.map((item, index) => { |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={[ |
|
|
|
|
|
|
|
styles.noImgBoxs, |
|
|
|
|
|
|
|
item?.has_color && styles.productBoxImgListBoxActive, |
|
|
|
|
|
|
|
]} |
|
|
|
|
|
|
|
key={index} |
|
|
|
|
|
|
|
onPress={() => { |
|
|
|
|
|
|
|
handleColorSelect(item?.value || '', index, item?.sku_image_url || ''); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{(item?.size ?? 0) > 0 && ( |
|
|
|
|
|
|
|
<Text style={styles.selectedNumText}>x{item?.size}</Text> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<Text style={styles.noImgBoxsText}>{item?.value || ''}</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
})} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<View style={styles.productBox}> |
|
|
|
|
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
|
|
|
|
<ScrollView |
|
|
|
|
|
|
|
style={[styles.sizePrice]} |
|
|
|
|
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
|
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBox}> |
|
|
|
|
|
|
|
{hasImg && |
|
|
|
|
|
|
|
hasImg.attributes |
|
|
|
|
|
|
|
?.find((item) => item?.has_color) |
|
|
|
|
|
|
|
?.list.map((list, index1) => ( |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItems} key={index1}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItem}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItemTextBox}> |
|
|
|
|
|
|
|
{(list?.size ?? 0) > 0 && ( |
|
|
|
|
|
|
|
<Text style={styles.selectedNumText}> |
|
|
|
|
|
|
|
x{list?.size} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<Text style={styles.priceText}> |
|
|
|
|
|
|
|
{list?.offer_price || price || 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text |
|
|
|
|
|
|
|
style={styles.sizePriceBoxItemText} |
|
|
|
|
|
|
|
numberOfLines={1} |
|
|
|
|
|
|
|
ellipsizeMode="tail" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxStepForward}> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>-</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
)} |
|
|
|
<ScrollView |
|
|
|
{/* 只有一个文字 */} |
|
|
|
style={[styles.sizePrice]} |
|
|
|
{noImgList && groupList.length === 1 && !flag && ( |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
<View style={styles.productBox}> |
|
|
|
> |
|
|
|
<View style={styles.productTit}> |
|
|
|
{noImgList && |
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
noImgList?.map((list, index1) => ( |
|
|
|
</View> |
|
|
|
<View style={styles.sizePriceBoxItems} key={index1}> |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<View style={styles.sizePriceBoxItem}> |
|
|
|
<ScrollView |
|
|
|
<View style={styles.sizePriceBoxItemTextBox}> |
|
|
|
style={[styles.sizePrice]} |
|
|
|
{(list?.size ?? 0) > 0 && ( |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
<Text style={styles.selectedNumText}> |
|
|
|
> |
|
|
|
x{list?.size} |
|
|
|
{noImgList && |
|
|
|
|
|
|
|
noImgList?.map((list, index1) => ( |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItems} key={index1}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItem}> |
|
|
|
|
|
|
|
<View style={styles.sizePriceBoxItemTextBox}> |
|
|
|
|
|
|
|
{(list?.size ?? 0) > 0 && ( |
|
|
|
|
|
|
|
<Text style={styles.selectedNumText}> |
|
|
|
|
|
|
|
x{list?.size} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
<Text style={styles.priceText}> |
|
|
|
|
|
|
|
{list?.offer_price || price || 0} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
)} |
|
|
|
<Text |
|
|
|
<Text style={styles.priceText}> |
|
|
|
style={styles.sizePriceBoxItemText} |
|
|
|
{list?.offer_price || price || 0} |
|
|
|
numberOfLines={1} |
|
|
|
|
|
|
|
ellipsizeMode="tail" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text |
|
|
|
</View> |
|
|
|
style={styles.sizePriceBoxItemText} |
|
|
|
<View style={styles.sizePriceBoxStepForward}> |
|
|
|
numberOfLines={1} |
|
|
|
<TouchableOpacity |
|
|
|
ellipsizeMode="tail" |
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
<Text>-</Text> |
|
|
|
</Text> |
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={styles.sizePriceBoxStepForward}> |
|
|
|
))} |
|
|
|
<TouchableOpacity |
|
|
|
</ScrollView> |
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
</View> |
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>-</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list?.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* 只有图片 */} |
|
|
|
{/* 只有图片 */} |
|
|
|
{noImgList && groupList.length === 1 && flag && ( |
|
|
|
{noImgList && groupList.length === 1 && flag && ( |
|
|
|
<View style={styles.productBox}> |
|
|
|
<View style={styles.productBox}> |
|
|
|
<View style={styles.productTit}> |
|
|
|
<View style={styles.productTit}> |
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
<Text style={styles.productTitText}>{sizeTitle}</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<View style={{ flex: 1 }}> |
|
|
|
<ScrollView |
|
|
|
<ScrollView |
|
|
|
style={[styles.sizePrice]} |
|
|
|
style={[styles.sizePrice]} |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
showsHorizontalScrollIndicator={false} |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
showsVerticalScrollIndicator={false} |
|
|
|
> |
|
|
|
> |
|
|
|
{noImgList.map((list, index1) => ( |
|
|
|
{noImgList.map((list, index1) => ( |
|
|
|
<View style={styles.allImageBox} key={index1}> |
|
|
|
<View style={styles.allImageBox} key={index1}> |
|
|
|
<View style={styles.allImageBoxImg}> |
|
|
|
<View style={styles.allImageBoxImg}> |
|
|
|
<Image |
|
|
|
<Image |
|
|
|
source={{ uri: list.attributes?.[0]?.sku_image_url }} |
|
|
|
source={{ uri: list.attributes?.[0]?.sku_image_url }} |
|
|
|
style={styles.allImageBoxImgImg} |
|
|
|
style={styles.allImageBoxImgImg} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
<View style={styles.allImageBoxList}> |
|
|
|
<View style={styles.allImageBoxList}> |
|
|
|
<View style={styles.allImageBoxListBox}> |
|
|
|
<View style={styles.allImageBoxListBox}> |
|
|
|
<View |
|
|
|
<View |
|
|
|
style={{ flexDirection: "row", alignItems: "center" }} |
|
|
|
style={{ flexDirection: "row", alignItems: "center" }} |
|
|
|
> |
|
|
|
|
|
|
|
<Text |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
fontSize: fontSize(16), |
|
|
|
|
|
|
|
fontWeight: "700", |
|
|
|
|
|
|
|
fontFamily: "Segoe UI", |
|
|
|
|
|
|
|
color: "red", |
|
|
|
|
|
|
|
marginRight: 5, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
{list?.offer_price || price || 0} |
|
|
|
<Text |
|
|
|
|
|
|
|
style={{ |
|
|
|
|
|
|
|
fontSize: fontSize(16), |
|
|
|
|
|
|
|
fontWeight: "700", |
|
|
|
|
|
|
|
fontFamily: "Segoe UI", |
|
|
|
|
|
|
|
color: "red", |
|
|
|
|
|
|
|
marginRight: 5, |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{list?.offer_price || price || 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
<Text |
|
|
|
|
|
|
|
style={styles.allImageBoxListBoxText} |
|
|
|
|
|
|
|
numberOfLines={1} |
|
|
|
|
|
|
|
ellipsizeMode="tail" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
<Text |
|
|
|
</View> |
|
|
|
style={styles.allImageBoxListBoxText} |
|
|
|
<View style={styles.allImageBoxListStop}> |
|
|
|
numberOfLines={1} |
|
|
|
<TouchableOpacity |
|
|
|
ellipsizeMode="tail" |
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
{list.attributes?.[0]?.value} |
|
|
|
<Text>-</Text> |
|
|
|
</Text> |
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
<Text style={styles.amountText}> |
|
|
|
|
|
|
|
库存 {list?.amount_on_sale ?? 0} |
|
|
|
|
|
|
|
</Text> |
|
|
|
|
|
|
|
</View> |
|
|
|
|
|
|
|
<View style={styles.allImageBoxListStop}> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"-", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>-</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
<TextInput |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardInput} |
|
|
|
|
|
|
|
keyboardType="numeric" |
|
|
|
|
|
|
|
value={list?.size?.toString() ?? "0"} |
|
|
|
|
|
|
|
onChangeText={(text) => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list.attributes?.[0]?.value, |
|
|
|
|
|
|
|
text, |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
|
|
|
style={styles.sizePriceBoxStepForwardButton} |
|
|
|
|
|
|
|
onPress={() => |
|
|
|
|
|
|
|
handleNoImgSizeSelect( |
|
|
|
|
|
|
|
list.attributes?.[0]?.value, |
|
|
|
|
|
|
|
"+", |
|
|
|
|
|
|
|
index1, |
|
|
|
|
|
|
|
list?.amount_on_sale ?? 0 |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Text>+</Text> |
|
|
|
|
|
|
|
</TouchableOpacity> |
|
|
|
|
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</ScrollView> |
|
|
|
</ScrollView> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</ScrollView> |
|
|
|
|
|
|
|
|
|
|
|
<View style={styles.fixedBottomView}> |
|
|
|
<View style={styles.fixedBottomView}> |
|
|
|
<View style={styles.fixedBottomViewBox}> |
|
|
|
<View style={styles.fixedBottomViewBox}> |
|
|
@ -738,7 +740,7 @@ const ProductCard: React.FC<ProductCardProps> = ({ |
|
|
|
<View style={styles.fixedBottomViewBoxRight}> |
|
|
|
<View style={styles.fixedBottomViewBoxRight}> |
|
|
|
<Text style={styles.fixedBottomViewBoxRightText}>总价:</Text> |
|
|
|
<Text style={styles.fixedBottomViewBoxRightText}>总价:</Text> |
|
|
|
<Text style={styles.fixedBottomViewBoxPriceText}> |
|
|
|
<Text style={styles.fixedBottomViewBoxPriceText}> |
|
|
|
{totalPrice.toFixed(2)} FCFA |
|
|
|
{totalPrice.toFixed(2)} {currency} |
|
|
|
</Text> |
|
|
|
</Text> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|