feat: 前端支持平台子路径,托管时从平台登录进入
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user