This commit is contained in:
2026-03-25 23:34:45 +08:00
parent bb3aa6ead7
commit 060c95bc64
5 changed files with 27 additions and 9 deletions

View File

@@ -194,14 +194,13 @@
<!-- vConsole 调试控制台 - 仅在开发环境启用 -->
<script>
// 检测是否为开发环境localhost 或特定端口
// 检测是否为开发环境localhost 或 127.0.0.1
var isDev = window.location.hostname === 'localhost' ||
window.location.hostname === '127.0.0.1' ||
window.location.port !== '' && window.location.port !== '80' && window.location.port !== '443';
window.location.hostname === '127.0.0.1';
if (isDev) {
var script = document.createElement('script');
script.src = 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js';
script.src = 'vconsole.min.js';
script.onload = function() {
new VConsole();
};