正在为您随机选择一篇文章...
-请稍候,正在跳转中...
-diff --git a/assets/js/puock.js b/assets/js/puock.js index c06d494..7821139 100644 --- a/assets/js/puock.js +++ b/assets/js/puock.js @@ -1041,6 +1041,13 @@ class Puock { const title = el.attr("title") || el.data("title") || '提示'; const url = el.data("url"); const onceLoad = el.data("once-load") + + // 检查 url 是否存在,避免 SparkMD5 错误 + if (!url) { + console.warn('Modal toggle: url is undefined'); + return; + } + const id = SparkMD5.hash(url) if (onceLoad && this.data.modalStorage[id]) { this.modalLoadRender(id, this.data.modalStorage[id], title, noTitle, noPadding) diff --git a/footer.php b/footer.php index f543bfc..069ff68 100644 --- a/footer.php +++ b/footer.php @@ -68,7 +68,7 @@ © options->title(); ?>
老孙博客制作
diff --git a/page-random.php b/page-random.php index 0069a61..5c925b4 100644 --- a/page-random.php +++ b/page-random.php @@ -52,67 +52,14 @@ function getRandomPost() { // 获取随机文章链接 $randomPostUrl = getRandomPost(); -$this->need('header.php'); -?> - -