diff --git a/src/api/req.js b/src/api/req.js index cd7973dc2..802e202cf 100644 --- a/src/api/req.js +++ b/src/api/req.js @@ -182,7 +182,8 @@ class API { const langMap = { zhcn: 'zh-CN', en: 'en-CN', - zhtw: 'zh-TW' + zhtw: 'zh-TW', + ar: 'ar' } query['country_code'] = langMap[lang || process.env.APP_COUNTRY_CODE] } diff --git a/src/api/shop.js b/src/api/shop.js index fcffc9ed9..56bf87926 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -132,7 +132,5 @@ export function getMyStoreWhiteList() { // 获取Cookie政策 export function getCookiePolicy() { - return req.get('/shops/protocol', { - type: 'cookie_privacy' - }) + return req.get('/company/privacy_setting_ck') } \ No newline at end of file diff --git a/src/components/cookie-consent/index.js b/src/components/cookie-consent/index.js index b33914422..7af718604 100644 --- a/src/components/cookie-consent/index.js +++ b/src/components/cookie-consent/index.js @@ -22,9 +22,9 @@ const CookieConsent = () => { const fetchCookiePolicy = async () => { try { - const { content } = await api.shop.getCookiePolicy() - if (content) { - setPolicyData(content) + const { h5_privacy_content } = await api.shop.getCookiePolicy() + if (h5_privacy_content) { + setPolicyData(h5_privacy_content) setVisible(true) // 延迟设置动画状态以触发 CSS transition setTimeout(() => { @@ -64,8 +64,8 @@ const CookieConsent = () => { - - + + diff --git a/src/subpages/i18n/lang/index.json b/src/subpages/i18n/lang/index.json index 719eac186..f3fc4d606 100644 --- a/src/subpages/i18n/lang/index.json +++ b/src/subpages/i18n/lang/index.json @@ -15181,13 +15181,13 @@ }, "cx7hgb4": { "zh-cn": "接受所有", - "en": "Accept all", + "en": "ACCEPT ALL", "zh-tw": "接受所有", "ar": "قبول الكل" }, "czrm8k4": { "zh-cn": "拒绝所有", - "en": "Reject all", + "en": "REJECT ALL", "zh-tw": "拒絕所有", "ar": "رفض الكل" },