bug(custom): cookie

This commit is contained in:
zhangjing1
2025-11-26 10:49:52 +08:00
parent 94c1ab5dd5
commit a0eb941cfe
4 changed files with 10 additions and 11 deletions

View File

@@ -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]
}

View File

@@ -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')
}

View File

@@ -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 = () => {
<SpHtml content={policyData} />
</View>
<View className='cookie-buttons'>
<Button className='accept-btn' onClick={handleAccept}>ACCEPT ALL</Button>
<Button className='reject-btn' onClick={handleReject}>REJECT ALL</Button>
<Button className='accept-btn' onClick={handleAccept}>接受所有</Button>
<Button className='reject-btn' onClick={handleReject}>拒绝所有</Button>
</View>
</View>
</View>

View File

@@ -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": "رفض الكل"
},