This commit is contained in:
Viet An
2026-07-01 10:59:23 +07:00
parent e9e4fbe24f
commit 68872d3f06
12 changed files with 66 additions and 117 deletions

View File

@@ -10,7 +10,8 @@ export default defineNuxtPlugin((nuxtApp) => {
{ name: "local", url: "http://localhost:8000/" },
{ name: "prod", url: "https://erpapi.bigdatatech.vn/" },
];
const path = paths.find((v) => v.name === mode).url;
const store = useStore();
const { $copy, $updateSeriesFields, $snackbar, $store, $remove, $dialog } = nuxtApp;
const requestLogin = function () {
@@ -18,9 +19,8 @@ export default defineNuxtPlugin((nuxtApp) => {
window.location.href = `https://${mode === "dev" ? "dev." : ""}login.utopia.com.vn/signin?module=${module}&link=${window.location.origin}`;
};
const getpath = function (name = mode) {
return paths.find((v) => v.name === name).url;
};
const getpath = (name = mode) => paths.find((v) => v.name === name).url;
const path = getpath();
/**
* @param {ApiName | ApiName[]} name