admin_new P0+P1 全批次合并 (84 commits) #2

Merged
direv merged 85 commits from develop into main 2026-08-07 11:27:17 +08:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 675d27dd2f - Show all commits

View File

@ -224,7 +224,8 @@ const badges = ref<Record<string, string>>({})
async function loadBadges() { async function loadBadges() {
try { try {
const data = await fetch('/sys/openapi/inquiry/list?page=1&limit=1', { const data = await fetch('/sys/openapi/inquiry/list?page=1&limit=1', {
headers: { Authorization: `Bearer ${userStore.token}` } headers: { Authorization: `Bearer ${userStore.token}` },
credentials: 'omit'
}).then(r => r.json()).catch(() => null) }).then(r => r.json()).catch(() => null)
if (data?.code === 0) { if (data?.code === 0) {
const total = data.total ?? data.data?.length ?? 0 const total = data.total ?? data.data?.length ?? 0

View File

@ -83,7 +83,8 @@ async function checkApi() {
return return
} }
const res = await fetch(apiUrl.value, { const res = await fetch(apiUrl.value, {
headers: { Authorization: `Bearer ${token}` } headers: { Authorization: `Bearer ${token}` },
credentials: 'omit'
}) })
// W4.19 修复:nginx 没代理的业务模块会返 404 HTML 页, 不是 JSON // W4.19 修复:nginx 没代理的业务模块会返 404 HTML 页, 不是 JSON
// 检测 content-type 防止误判 // 检测 content-type 防止误判