From 29d43abb39dcfcdfd424799239a26c75e345d0f3 Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Thu, 5 May 2022 17:35:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9nginx=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/nginx.conf | 4 ++-- src/router/index.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/nginx.conf b/build/nginx.conf index 3adfa26..eb3cde4 100644 --- a/build/nginx.conf +++ b/build/nginx.conf @@ -28,11 +28,11 @@ http { # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; - location /klmy/ui { + location /apaas/ui { root /usr/share/nginx/html; index index.html index.htm; - try_files $uri $uri/ /klmy/ui/index.html; + try_files $uri $uri/ /apaas/ui/index.html; } } diff --git a/src/router/index.js b/src/router/index.js index 8e58b08..36d6030 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,7 @@ import Vue from "vue"; import Router from "vue-router"; import {getCookie} from '../utils/common' import store from "@/store"; +import ElementUI from 'element-ui'; Vue.use(Router); @@ -868,7 +869,7 @@ router.beforeEach(async (to, from, next) => { ) { next(); } else { - // ElementUI.Message.error(`未登录无法访问该页面`); + ElementUI.Message.error(`未登录无法访问该页面`); next("/"); } -- 2.26.0