diff --git a/src/api/shop.js b/src/api/shop.js index 2068ef11f..fcffc9ed9 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -128,3 +128,11 @@ export function checkStoreEnterRule(params) { export function getMyStoreWhiteList() { return req.get('/distributor/whitelistByMember') } + + +// 获取Cookie政策 +export function getCookiePolicy() { + return req.get('/shops/protocol', { + type: 'cookie_privacy' + }) +} \ No newline at end of file diff --git a/src/components/cookie-consent/index.js b/src/components/cookie-consent/index.js index 5051a2492..b33914422 100644 --- a/src/components/cookie-consent/index.js +++ b/src/components/cookie-consent/index.js @@ -22,9 +22,7 @@ const CookieConsent = () => { const fetchCookiePolicy = async () => { try { - const { content } = await api.shop.getRuleInfo({ - type: 'cookie_privacy' - }) + const { content } = await api.shop.getCookiePolicy() if (content) { setPolicyData(content) setVisible(true)