Browse Source

feat: 在订单预览页支付信息中显示姓名手机国家

main
Your Name (aider) 4 weeks ago
parent
commit
26d0a3784f
  1. 32
      app/screens/previewOrder/perviewOrder.tsx

32
app/screens/previewOrder/perviewOrder.tsx

@ -9,6 +9,9 @@ const AddressIcon = ({ size, color }) => <Text style={{fontSize: size, color: co
const AmountIcon = ({ size, color }) => <Text style={{fontSize: size, color: color}}>💰</Text>; // 示例图标
const ShippingIcon = ({ size, color }) => <Text style={{fontSize: size, color: color}}>🚚</Text>; // 示例图标
const WhatsAppIcon = ({ size, color }) => <Text style={{fontSize: size, color: color}}>💬</Text>; // 示例图标
const UserIcon = ({ size, color }) => <Text style={{fontSize: size, color: color}}>👤</Text>; // 示例图标 - 姓名
const PhoneIcon = ({ size, color }) => <Text style={{fontSize: size, color: color}}>📞</Text>; // 示例图标 - 手机
const GlobeIcon = ({ size, color }) => <Text style={{fontSize: size, color: color}}>🌍</Text>; // 示例图标 - 国家
export const PreviewOrder = () => {
const {orderData, setOrderData} = useCreateOrderStore();
@ -70,6 +73,28 @@ export const PreviewOrder = () => {
{/* Order Details Card */}
<View style={styles.card}>
<Text style={styles.cardTitle}></Text>
<View style={styles.detailRow}>
<UserIcon size={18} color="#555555" />
<Text style={styles.detailLabel}>:</Text>
<Text style={styles.detailValue}>{orderData?.receiver_name || "N/A"}</Text>
</View>
<View style={styles.detailRow}>
<PhoneIcon size={18} color="#555555" />
<Text style={styles.detailLabel}>:</Text>
<Text style={styles.detailValue}>{orderData?.receiver_phone || "N/A"}</Text>
</View>
{orderData?.whatsapp_phone && (
<View style={styles.detailRow}>
<WhatsAppIcon size={18} color="#555555" />
<Text style={styles.detailLabel}>WhatsApp:</Text>
<Text style={styles.detailValue}>{orderData.whatsapp_phone}</Text>
</View>
)}
<View style={styles.detailRow}>
<GlobeIcon size={18} color="#555555" />
<Text style={styles.detailLabel}>:</Text>
<Text style={styles.detailValue}>{orderData?.country || "N/A"}</Text>
</View>
<View style={styles.detailRow}>
<AddressIcon size={18} color="#555555" />
<Text style={styles.detailLabel}>:</Text>
@ -85,13 +110,6 @@ export const PreviewOrder = () => {
<Text style={styles.detailLabel}>:</Text>
<Text style={styles.detailValue}>{orderData?.shipping_fee ? `${orderData.currency || ''} ${orderData.shipping_fee}` : "N/A"}</Text>
</View>
{orderData?.whatsapp_phone && (
<View style={styles.detailRow}>
<WhatsAppIcon size={18} color="#555555" />
<Text style={styles.detailLabel}>WhatsApp:</Text>
<Text style={styles.detailValue}>{orderData.whatsapp_phone}</Text>
</View>
)}
</View>
</View>

Loading…
Cancel
Save