Merge branch 'dev' into master-fetch-dev

This commit is contained in:
奔跑的面条
2023-03-16 20:02:18 +08:00
97 changed files with 1274 additions and 87 deletions
+7
View File
@@ -13,6 +13,13 @@ const routerAllowList = [
export function createRouterGuards(router: Router) {
// 前置
router.beforeEach(async (to, from, next) => {
// http://localhost:3000/#/chart/preview/792622755697790976?t=123
// 把外部动态参数放入window.route.params,后续API动态接口可以用window.route?.params?.t来拼接参数
// @ts-ignore
if (!window.route) window.route = {params: {}}
// @ts-ignore
Object.assign(window.route.params, to.query)
const Loading = window['$loading'];
Loading && Loading.start();
const isErrorPage = router.getRoutes().findIndex((item) => item.name === to.name);