feat(auth): 添加调试日志并优化卡片背景样式

This commit is contained in:
JiaJun
2026-04-22 10:59:09 +08:00
parent a071d07a7c
commit d1ee6413a5
5 changed files with 35 additions and 19 deletions

View File

@@ -182,6 +182,9 @@
const reloadButton = document.getElementById('reload')
const logNode = document.getElementById('log')
const iframeOrigin = window.location.origin
const apiBaseUrl = ['127.0.0.1', 'localhost'].includes(window.location.hostname)
? `${window.location.origin}/api`
: 'https://playx-api.cjdhr.top/api'
const maxLogEntries = 80
const logEntries = []
const heightLogDelay = 300
@@ -236,7 +239,7 @@
return existingToken
}
const response = await fetch(`/api/v1/temLogin?username=${encodeURIComponent(username)}`, {
const response = await fetch(`${apiBaseUrl}/v1/temLogin?username=${encodeURIComponent(username)}`, {
method: 'GET',
})