feat: 增强地址处理逻辑,支持日本地区并优化相关测试用例
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
FR: '/fr-address',
|
||||
US: '/',
|
||||
};
|
||||
const MEIGUODIZHI_SUPPORTED_COUNTRIES = new Set(Object.keys(MEIGUODIZHI_PATH_BY_COUNTRY));
|
||||
|
||||
function createPlusCheckoutBillingExecutor(deps = {}) {
|
||||
const {
|
||||
@@ -75,6 +76,9 @@
|
||||
if (typeof fetchImpl !== 'function') {
|
||||
return null;
|
||||
}
|
||||
if (!MEIGUODIZHI_SUPPORTED_COUNTRIES.has(countryCode)) {
|
||||
return null;
|
||||
}
|
||||
const path = MEIGUODIZHI_PATH_BY_COUNTRY[countryCode] || MEIGUODIZHI_PATH_BY_COUNTRY.DE;
|
||||
const city = normalizeText(fallbackSeed?.fallback?.city || fallbackSeed?.query || '');
|
||||
const response = await fetchImpl(MEIGUODIZHI_ADDRESS_ENDPOINT, {
|
||||
|
||||
Reference in New Issue
Block a user