mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-11 22:15:32 +08:00
bug(custom): cookie
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -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": "رفض الكل"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user