diff --git a/src/i18n/locales.js b/src/i18n/locales.js index 5cda75c..3e6a0ba 100644 --- a/src/i18n/locales.js +++ b/src/i18n/locales.js @@ -30,6 +30,8 @@ const zh = { pleaseEnter: '请输入', optional: '可选', required: '必填', + more: '更多', + collapse: '收起', addressFormat: '地址格式', phoneCode: '国际区号', mustMatchId: '需与证件一致,支持当地语言+英文', @@ -234,6 +236,8 @@ const en = { pleaseEnter: 'Please enter', optional: 'Optional', required: 'Required', + more: 'More', + collapse: 'Collapse', addressFormat: 'Address Format', phoneCode: 'Phone Code', mustMatchId: 'Must match ID, supports local language + English', @@ -436,6 +440,8 @@ const may = { pleaseEnter: 'Sila masukkan', optional: 'Pilihan', required: 'Diperlukan', + more: 'Lebih Banyak', + collapse: 'Tutup', addressFormat: 'Format Alamat', phoneCode: 'Kod Telefon', mustMatchId: 'Mesti sepadan dengan ID, menyokong bahasa tempatan + Inggeris', @@ -633,9 +639,14 @@ const fil = { pleaseEnter: 'Mangyaring ipasok', optional: 'Opsiyonal', required: 'Kinakailangan', + more: 'Higit Pa', + collapse: 'Itago', addressFormat: 'Format ng Address', phoneCode: 'Phone Code', - mustMatchId: 'Dapat tumugma sa ID, sumusuporta sa lokal na wika + Ingles' + mustMatchId: 'Dapat tumugma sa ID, sumusuporta sa lokal na wika + Ingles', + // 占位符文本 + placeholderAddressLine1: 'Mangyaring ipasok ang numero ng bahay, kalye, gusali', + placeholderAddressLine2: 'Mangyaring ipasok ang sahig, numero ng unit (opsyonal)' }, product: { selectCurrency: 'Pumili ng Currency at Wika', @@ -779,6 +790,8 @@ const th = { pleaseEnter: 'กรุณากรอก', optional: 'ไม่บังคับ', required: 'จำเป็น', + more: 'เพิ่มเติม', + collapse: 'ย่อ', addressFormat: 'รูปแบบที่อยู่', phoneCode: 'รหัสโทรศัพท์', mustMatchId: 'ต้องตรงกับบัตรประชาชน รองรับภาษาท้องถิ่น + อังกฤษ', @@ -979,6 +992,8 @@ const vie = { pleaseEnter: 'Vui lòng nhập', optional: 'Tùy chọn', required: 'Bắt buộc', + more: 'Thêm', + collapse: 'Thu gọn', addressFormat: 'Định Dạng Địa Chỉ', phoneCode: 'Mã Điện Thoại', mustMatchId: 'Phải khớp với ID, hỗ trợ ngôn ngữ địa phương + tiếng Anh', @@ -1176,9 +1191,14 @@ const id = { pleaseEnter: 'Silakan masukkan', optional: 'Opsional', required: 'Diperlukan', + more: 'Lebih Banyak', + collapse: 'Tutup', addressFormat: 'Format Alamat', phoneCode: 'Kode Telepon', - mustMatchId: 'Harus sesuai dengan ID, mendukung bahasa lokal + Inggris' + mustMatchId: 'Harus sesuai dengan ID, mendukung bahasa lokal + Inggris', + // 占位符文本 + placeholderAddressLine1: 'Silakan masukkan nomor rumah, jalan, gedung', + placeholderAddressLine2: 'Silakan masukkan lantai, nomor unit (opsional)' }, product: { selectCurrency: 'Pilih Mata Uang dan Bahasa', diff --git a/src/router/index.js b/src/router/index.js index 9124d1c..378a294 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -44,12 +44,14 @@ const routes = [ { path: '/create-order', name: 'CreateOrder', - component: CreateOrder + component: CreateOrder, + meta: { isCustomerPage: true } // 标记为客户页面,不显示导航栏 }, { path: '/order/confirm', name: 'OrderConfirm', - component: () => import('../views/OrderConfirm.vue') + component: () => import('../views/OrderConfirm.vue'), + meta: { isCustomerPage: true } // 标记为客户页面,不显示导航栏 }, { path: '/paypal/success', diff --git a/src/utils/countryConfig.js b/src/utils/countryConfig.js index 4763762..7012f8f 100644 --- a/src/utils/countryConfig.js +++ b/src/utils/countryConfig.js @@ -25,8 +25,9 @@ export const countryConfigs = { phoneCode: '+65', postcodeLength: 6, postcodePattern: /^\d{6}$/, - requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', 'shippingCity', - 'shippingAddressLine1', 'shippingBlockNumber', 'shippingUnitNumber', 'shippingPostcode'], + // 新加坡:城市和邮编是PayPal要求必填的 + requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', + 'shippingCity', 'shippingAddressLine1', 'shippingBlockNumber', 'shippingUnitNumber', 'shippingPostcode'], specialFields: ['shippingBlockNumber', 'shippingUnitNumber'], fieldLabels: { shippingBlockNumber: '组屋号 (Block Number)', @@ -45,8 +46,9 @@ export const countryConfigs = { phoneCode: '+60', postcodeLength: 5, postcodePattern: /^\d{5}$/, - requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', 'shippingCity', - 'shippingStateMalaysia', 'shippingAddressLine1', 'shippingPostcode'], + // 马来西亚:城市和邮编是PayPal要求必填的;州属放入更多按钮中,改为非必填 + requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', + 'shippingCity', 'shippingAddressLine1', 'shippingPostcode'], specialFields: ['shippingStateMalaysia'], fieldLabels: { shippingStateMalaysia: '州属 (State)', @@ -64,8 +66,9 @@ export const countryConfigs = { phoneCode: '+63', postcodeLength: 4, postcodePattern: /^\d{4}$/, - requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', 'shippingCity', - 'shippingState', 'shippingBarangay', 'shippingAddressLine1', 'shippingPostcode'], + // 菲律宾:城市和邮编是PayPal要求必填的;省放入更多按钮中,改为非必填 + requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', + 'shippingCity', 'shippingBarangay', 'shippingAddressLine1', 'shippingPostcode'], specialFields: ['shippingBarangay'], fieldLabels: { shippingBarangay: 'Barangay(社区编号)', @@ -84,8 +87,9 @@ export const countryConfigs = { phoneCode: '+66', postcodeLength: 5, postcodePattern: /^\d{5}$/, - requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', 'shippingCity', - 'shippingState', 'shippingAddressLine1', 'shippingPostcode', 'shippingAddressThai'], + // 泰国:城市和邮编是PayPal要求必填的;府放入更多按钮中,改为非必填 + requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', + 'shippingCity', 'shippingAddressLine1', 'shippingAddressThai', 'shippingPostcode'], specialFields: ['shippingAddressThai', 'shippingAdministrativeArea'], fieldLabels: { shippingAddressThai: '泰文地址 (Thai Address)', @@ -105,8 +109,9 @@ export const countryConfigs = { phoneCode: '+84', postcodeLength: 5, postcodePattern: /^\d{5}$/, - requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', 'shippingProvince', - 'shippingDistrict', 'shippingWard', 'shippingAddressLine1', 'shippingPostcode'], + // 越南:使用省/市/郡/区/坊代替城市;邮编是PayPal要求必填的 + requiredFields: ['shippingName', 'shippingPhone', 'shippingCountry', + 'shippingProvince', 'shippingDistrict', 'shippingWard', 'shippingAddressLine1', 'shippingPostcode'], specialFields: ['shippingProvince', 'shippingDistrict', 'shippingWard'], fieldLabels: { shippingProvince: '省 (Tỉnh)', diff --git a/src/views/CreateOrder.vue b/src/views/CreateOrder.vue index 133d334..9705712 100644 --- a/src/views/CreateOrder.vue +++ b/src/views/CreateOrder.vue @@ -21,20 +21,20 @@ fit="cover" class="product-info-image" /> -
-
{{ productInfo.name }}
-
- SKU: - {{ productInfo.sku }} -
-
- {{ $t('product.unitPrice') }}: - {{ productInfo.currency }} {{ formatPrice(productInfo.price) }} - {{ $t('product.quantity') }}: - x{{ productInfo.quantity }} - {{ $t('order.subtotal') }}: - {{ productInfo.currency }} {{ formatPrice(productInfo.price * productInfo.quantity) }} -
+
{{ productInfo.name }}
+
+
+
+ SKU: + {{ productInfo.sku }} +
+
+ {{ $t('product.unitPrice') }}: + {{ productInfo.currency }} {{ formatPrice(productInfo.price) }} + {{ $t('product.quantity') }}: + x{{ productInfo.quantity }} + {{ $t('order.subtotal') }}: + {{ productInfo.currency }} {{ formatPrice(productInfo.price * productInfo.quantity) }}
@@ -76,50 +76,74 @@ {{ $t('order.shippingAddress') }} - - + + +
+ + + + + {{ currentCountryConfig.name }}{{ t('order.postcodeHint').replace('{0}', currentCountryConfig.postcodeLength) }} + +
- - + + +
+ + + +
- - - - - - - - - - - - - - + +