diff --git a/docker/kicc-ui.conf b/docker/kicc-ui.conf index 9d9f46f..18eaa00 100644 --- a/docker/kicc-ui.conf +++ b/docker/kicc-ui.conf @@ -46,4 +46,10 @@ server { rewrite ^/prod-upload(.*)$ /system_proxy/system/file/upload break; proxy_pass http://kicc-gateway:9999; } + + # 代理访问后端微服务表报地址 + location ^~/ureport/ { + rewrite ^/(.*)$ /$1 break; + proxy_pass http://kicc-gateway:9999/report_proxy; + } } diff --git a/src/router/index.ts b/src/router/index.ts index 5d00912..ce0fb46 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,7 +7,7 @@ import type { RouteRecordRaw } from 'vue-router'; import type { App } from 'vue'; -import { createRouter, createWebHashHistory } from 'vue-router'; +import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'; import { basicRoutes } from './routes'; import { formatUrlParamsMenu } from '/@/router/helper/menuHelper'; import { useUserStore } from '/@/store/modules/user'; @@ -21,7 +21,7 @@ const getRouteNames = (array: any[]) => array.forEach((item) => { /** 应用配置的静态路由 */ export const router = createRouter({ - history: createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH), + history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH), routes: basicRoutes as unknown as RouteRecordRaw[], strict: true, scrollBehavior: () => ({ left: 0, top: 0 }), @@ -42,7 +42,7 @@ export function setupRouter(app: App) { app.use(router); } -/** 解析格式化路由占位符 */ +/** 解析格式化路由占位符 */ export function formatRouterPlaceholder(path: string) { const userStore = useUserStore(); return formatUrlParamsMenu(path, {