fix: 补上清单里还没对上的登录拒绝、会话回退和代理清理
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { apiFetch } from "../../shared/http";
|
||||
import { onMounted, onUnmounted, ref } from "vue";
|
||||
import { NAlert, NButton, NForm, NFormItem, NInput, NInputNumber, NRadioButton, NRadioGroup, NSwitch } from "naive-ui";
|
||||
|
||||
@@ -54,7 +55,7 @@ onUnmounted(() => window.clearTimeout(savedTimer));
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const response = await fetch("/api/admin/settings");
|
||||
const response = await apiFetch("/api/admin/settings");
|
||||
const payload = await response.json().catch(() => ({}));
|
||||
if (!response.ok || !payload || typeof payload !== "object") {
|
||||
errorText.value = detailOf(payload, "系统配置没有获取到。");
|
||||
@@ -151,7 +152,7 @@ async function save() {
|
||||
}
|
||||
saving.value = true;
|
||||
try {
|
||||
const response = await fetch("/api/admin/settings", {
|
||||
const response = await apiFetch("/api/admin/settings", {
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(body),
|
||||
|
||||
Reference in New Issue
Block a user