From 4552f36e6ae23e76ea1ce05a5ae4cd28ce8f3a05 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Thu, 13 Jul 2023 15:35:30 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B7=AF=E7=94=B1=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/kicc-ui.conf | 6 ++++++ src/router/index.ts | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) 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, {