refactor: review

This commit is contained in:
meilin.huang
2023-09-26 17:38:52 +08:00
parent a1eca3d691
commit 92dff6fdc3
38 changed files with 479 additions and 388 deletions

View File

@@ -0,0 +1,13 @@
const mode = import.meta.env.VITE_ROUTER_MODE;
/**
* @description 获取不同路由模式所对应的 url
* @returns {String}
*/
export function getNowUrl() {
const url = {
hash: location.hash.substring(1),
history: location.pathname + location.search,
};
return url[mode];
}