pull/8723/merge
dreamcc 2025-09-08 12:16:22 +08:00 committed by GitHub
commit 3ee4f52014
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 0 deletions

View File

@ -57,6 +57,26 @@ function asyncImportRoute(routes: AppRouteRecordRaw[] | undefined) {
}
// @ts-ignore
item.meta.ignoreKeepAlive = !item?.meta.keepAlive;
// query -
if (item.path && item.path.includes('?')) {
const [basePath, queryString] = item.path.split('?');
item.path = basePath; // Vue Routerpath
// querymeta使
if (queryString) {
const queryParams: Record<string, string> = {};
queryString.split('&').forEach((param) => {
const [key, value] = param.split('=');
if (key) {
queryParams[decodeURIComponent(key)] = decodeURIComponent(value || '');
}
});
item.meta = item.meta || {};
item.meta.queryParams = queryParams;
}
}
let token = getToken();
let tenantId = getTenantId();
// URL{{ window.xxx }}