From 1b3dc6fbde997c9e53a719844c1e30359fd9cc0f Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 5 Sep 2024 18:32:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=85=8D=E7=BD=AE=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E5=90=8E=E6=8C=81=E7=BB=AD=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/OpenWrite.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/OpenWrite.js b/components/OpenWrite.js index de25813c806..eb068102553 100644 --- a/components/OpenWrite.js +++ b/components/OpenWrite.js @@ -19,11 +19,14 @@ const OpenWrite = () => { 'OPEN_WRITE_BTN_TEXT', '原创不易,完成人机检测,阅读全文' ) + // 验证一次后的有效时长,单位小时 + const cookieAge = siteConfig('OPEN_WRITE_VALIDITY_DURATION', 1) // 白名单 const whiteList = siteConfig('OPEN_WRITE_WHITE_LIST', '') const loadOpenWrite = async () => { const existWhite = existedWhiteList(router.asPath, whiteList) + // 如果当前页面在白名单中,则屏蔽加锁 if (existWhite) { return @@ -45,7 +48,8 @@ const OpenWrite = () => { name, btnText, keyword, - blogId + blogId, + cookieAge }) } } catch (error) {