change to next

This commit is contained in:
xiongxiao
2026-01-15 12:32:07 +08:00
parent 62b5c5841a
commit b2f315a459
122 changed files with 9396 additions and 9354 deletions

View File

@@ -0,0 +1,13 @@
// @ts-ignore
export const basename = BASE_NAME;
console.log(basename);
export const wrapBasename = (path: string) => {
const hasEnd = path.endsWith('/')
if (basename) {
return `${basename}${path}` + (hasEnd ? '' : '/');
} else {
return path;
}
}

View File

@@ -0,0 +1,19 @@
import { QueryClient } from '@kevisual/query'
const getUrl = () => {
const host = window.location.host
const isKevisual = host.includes('kevisual');
if (isKevisual) {
return '/api/router'
}
return '/client/router'
}
export const query = new QueryClient({
url: '/api/router',
});
export const queryClient = new QueryClient({
url: getUrl(),
});