fix: 上传baseUrl环境切换

This commit is contained in:
kun 2024-06-21 17:10:47 +08:00
parent 7ae3ba711e
commit 5e9d8ec143
8 changed files with 16 additions and 16 deletions

View File

@ -141,8 +141,8 @@ const columns: ColumnProps[] = [
{ prop: "operation", label: "操作" }
];
const store = GlobalStore();
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const headers = ref({ Authorization: "Bearer " + store.token });
const current = ref<any>([]);
const addDialogVisible = ref(false);

View File

@ -253,8 +253,8 @@ import { jxj_User } from "@/api/types";
import { useHandleData } from "@/hooks/useHandleData";
const route = useRoute();
const store = GlobalStore();
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const fileList = ref([]);
const fileList2 = ref([]);
const fileList3 = ref([]);

View File

@ -397,8 +397,8 @@ const pages = ref({
});
const records = ref([]);
const active = ref(1);
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const globalStore = GlobalStore();
const fileList = ref([] as any);
const fileList2 = ref([] as any);

View File

@ -210,8 +210,8 @@ const pages = ref({
});
const records = ref([]);
const active = ref(1);
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const globalStore = GlobalStore();
const fileList = ref([]);
const fileList1 = ref([]);

View File

@ -438,8 +438,8 @@ const pageable = ref({
pageSize: 12,
total: 0
});
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const props = defineProps({
detailsDialog: Boolean,
relativeId: String,

View File

@ -212,8 +212,8 @@ import { Base64 } from "js-base64";
const uplUrl = import.meta.env.VITE_ULD_API_URL;
const ruleFormRef = ref();
const route = useRoute();
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const fileList = ref([]);
const aproveVisible = ref(false);
const relativeId = ref("");

View File

@ -141,8 +141,8 @@ const columns: ColumnProps[] = [
{ prop: "operation", label: "操作" }
];
const store = GlobalStore();
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const headers = ref({ Authorization: "Bearer " + store.token });
const current = ref<any>([]);
const addDialogVisible = ref(false);

View File

@ -513,8 +513,8 @@ const dangerForm = ref({
image: []
});
const storeVisible = ref(false);
// const baseUrl = window.location.protocol + "//" + window.location.host;
const baseUrl = import.meta.env.VITE_API_URL;
const baseUrl = window.location.protocol + "//" + window.location.host;
// const baseUrl = import.meta.env.VITE_API_URL;
const props = defineProps({
orderDialog: Boolean
});