From c1f0505fb903db78ffef46b8431168acb047af90 Mon Sep 17 00:00:00 2001
From: laozt <2721205210@qq.com>
Date: Tue, 17 Oct 2023 14:52:03 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=80=80=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env.development | 2 +-
.env.production | 2 +-
src/layout/components/Navbar.vue | 33 +++-----------------------------
src/layout/newyjLayout.vue | 22 ++++++---------------
src/permission.js | 11 +++--------
5 files changed, 14 insertions(+), 56 deletions(-)
diff --git a/.env.development b/.env.development
index ab0b6d5..176715a 100644
--- a/.env.development
+++ b/.env.development
@@ -18,7 +18,7 @@ VUE_APP_BASE_API = 'http://180.108.205.123:13002'
# 政务网
# VUE_APP_LOCATION = 'http://2.46.4.197:8090'
# 外网
-VUE_APP_LOCATION = 'http://180.108.205.123:8090'
+VUE_APP_LOCATION = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 路由懒加载
diff --git a/.env.production b/.env.production
index 35c93e9..e31be43 100644
--- a/.env.production
+++ b/.env.production
@@ -9,7 +9,7 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://39.101.188.84:9033'
VUE_APP_BASE_API = 'http://180.108.205.123:13002'
-VUE_APP_LOCATION = 'http://2.46.4.197:8090'
+VUE_APP_LOCATION = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code'
# 路由懒加载
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 8a61dca..0b74a9f 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -51,23 +51,6 @@
-
-
@@ -138,23 +121,13 @@ export default {
})
.then(() => {
this.$store.dispatch("LogOut").then(() => {
- // location.href = process.env.NODE_ENV === "production"
- // ? "/demo/suzhouyingjiPC/"
- // : "/";
-
let isGovernmentAffairsNetwork = localStorage.getItem(
"isGovernmentAffairsNetwork"
);
- if (process.env.NODE_ENV === "production") {
- if (isGovernmentAffairsNetwork == "1") {
- location.href =
- process.env.VUE_APP_LOCATION +
- "/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code";
- } else {
- location.href = "/login";
- }
+ if (isGovernmentAffairsNetwork == "1") {
+ location.href = process.env.VUE_APP_LOCATION;
} else {
- location.href = "/";
+ location.href = "/login?redirect=%2Findex";
}
});
})
diff --git a/src/layout/newyjLayout.vue b/src/layout/newyjLayout.vue
index 308e474..6849077 100644
--- a/src/layout/newyjLayout.vue
+++ b/src/layout/newyjLayout.vue
@@ -51,13 +51,13 @@