From 373bb777f28d8a92f4631aa3629386e233629b0b Mon Sep 17 00:00:00 2001 From: zhangjing1 Date: Tue, 25 Nov 2025 11:29:13 +0800 Subject: [PATCH] bug(custom): cookie --- src/api/shop.js | 8 ++++++++ src/components/cookie-consent/index.js | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) 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)