{配置兼容性}

This commit is contained in:
tangly1024
2024-06-15 10:34:55 +08:00
parent 2e983e4876
commit 19d9d896c4
5 changed files with 69 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
/**
* 文章相关工具
*/
import { checkContainHttp } from '.'
import { checkStartWithHttp } from '.'
/**
* 获取文章的关联推荐文章列表,目前根据标签关联性筛选
@@ -50,7 +50,7 @@ export function checkSlugHasNoSlash(row) {
}
return (
(slug.match(/\//g) || []).length === 0 &&
!checkContainHttp(slug) &&
!checkStartWithHttp(slug) &&
row.type.indexOf('Menu') < 0
)
}
@@ -67,7 +67,7 @@ export function checkSlugHasOneSlash(row) {
}
return (
(slug.match(/\//g) || []).length === 1 &&
!checkContainHttp(slug) &&
!checkStartWithHttp(slug) &&
row.type.indexOf('Menu') < 0
)
}
@@ -85,6 +85,6 @@ export function checkSlugHasMorThanTwoSlash(row) {
return (
(slug.match(/\//g) || []).length >= 2 &&
row.type.indexOf('Menu') < 0 &&
!checkContainHttp(slug)
!checkStartWithHttp(slug)
)
}