mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 15:10:19 +00:00
搜索bug
This commit is contained in:
@@ -101,7 +101,7 @@ const ExternalPlugin = (props) => {
|
|||||||
{ANALYTICS_51LA_ID && ANALYTICS_51LA_CK && <LA51/>}
|
{ANALYTICS_51LA_ID && ANALYTICS_51LA_CK && <LA51/>}
|
||||||
|
|
||||||
{ANALYTICS_51LA_ID && ANALYTICS_51LA_CK && (<>
|
{ANALYTICS_51LA_ID && ANALYTICS_51LA_CK && (<>
|
||||||
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js" defer/>
|
<script id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js" defer/>
|
||||||
{/* <script async dangerouslySetInnerHTML={{
|
{/* <script async dangerouslySetInnerHTML={{
|
||||||
__html: `
|
__html: `
|
||||||
LA.init({id:"${ANALYTICS_51LA_ID}",ck:"${ANALYTICS_51LA_CK}",hashMode:true,autoTrack:true})
|
LA.init({id:"${ANALYTICS_51LA_ID}",ck:"${ANALYTICS_51LA_CK}",hashMode:true,autoTrack:true})
|
||||||
@@ -139,7 +139,7 @@ const ExternalPlugin = (props) => {
|
|||||||
/>
|
/>
|
||||||
</>)}
|
</>)}
|
||||||
|
|
||||||
{AD_WWADS_ID && <script type="text/javascript" charSet="UTF-8" src="https://cdn.wwads.cn/js/makemoney.js" async></script>}
|
{AD_WWADS_ID && <script type="text/javascript" src="https://cdn.wwads.cn/js/makemoney.js" async></script>}
|
||||||
|
|
||||||
{COMMENT_TWIKOO_ENV_ID && <script defer src={COMMENT_TWIKOO_CDN_URL} />}
|
{COMMENT_TWIKOO_ENV_ID && <script defer src={COMMENT_TWIKOO_CDN_URL} />}
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ const isIterable = obj =>
|
|||||||
async function filterByMemCache(allPosts, keyword) {
|
async function filterByMemCache(allPosts, keyword) {
|
||||||
const filterPosts = []
|
const filterPosts = []
|
||||||
if (keyword) {
|
if (keyword) {
|
||||||
keyword = keyword.trim()
|
keyword = keyword.trim().toLowerCase()
|
||||||
}
|
}
|
||||||
for (const post of allPosts) {
|
for (const post of allPosts) {
|
||||||
const cacheKey = 'page_block_' + post.id
|
const cacheKey = 'page_block_' + post.id
|
||||||
@@ -131,7 +131,7 @@ async function filterByMemCache(allPosts, keyword) {
|
|||||||
if (!c) {
|
if (!c) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const index = c.toLowerCase().indexOf(keyword.toLowerCase())
|
const index = c.toLowerCase().indexOf(keyword)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
hit = true
|
hit = true
|
||||||
hitCount += 1
|
hitCount += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user