diff --git a/public/site/js/ad.js b/public/site/js/ad.js index 7fee3513b..e607ab1f7 100644 --- a/public/site/js/ad.js +++ b/public/site/js/ad.js @@ -7,7 +7,7 @@ document.addEventListener("DOMContentLoaded", function () { // 获取当前页面路径 const currentPath = window.location.pathname; // 判断是否为广告页面 - const isAdPage = currentPath.includes("ad.html"); + const isAdPage = currentPath.endsWith("/ad.html"); // 获取URL对象 const url = new URL(window.location.href);