feat: 前端支持平台子路径,托管时从平台登录进入

This commit is contained in:
2026-11-03 12:30:24 +08:00
parent c38e649904
commit 5d4b86c558
17 changed files with 271 additions and 53 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
import { onMounted, onUnmounted, ref } from "vue";
import { NButton, NDatePicker, NInput, NModal, NSelect } from "naive-ui";
import Shell from "../../shell/Shell.vue";
import { appUrl } from "../../shared/base";
import { api, token } from "../../shared/http";
import { useToast } from "../../shared/toast";
@@ -116,7 +117,7 @@ async function submit() {
async function download(row: Task) {
try {
const response = await fetch(`/api/tasks/${row.id}/file`, { headers: { Authorization: `Bearer ${token()}` } });
const response = await fetch(appUrl(`/api/tasks/${row.id}/file`), { headers: { Authorization: `Bearer ${token()}` } });
if (!response.ok) {
toast.error("结果还不能下载,请等状态变成可下载");
return;