代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/authHub 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 75cf241f76913a8e1a7e81962225aa73b2314008 Mon Sep 17 00:00:00 2001
From: hugang <18768366022@163.com>
Date: Sat, 14 Sep 2024 11:11:02 +0800
Subject: [PATCH] fix the router redirect error
---
oauth2_web/deploy/authhub.nginx.conf | 4 ++--
oauth2_web/src/api/request.ts | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/oauth2_web/deploy/authhub.nginx.conf b/oauth2_web/deploy/authhub.nginx.conf
index f9720c3..a38eb1f 100644
--- a/oauth2_web/deploy/authhub.nginx.conf
+++ b/oauth2_web/deploy/authhub.nginx.conf
@@ -14,8 +14,8 @@ server {
root /opt/authhub/web/dist;
expires 30d;
}
- location /authhub {
- alias /opt/authhub/web/dist
+ location / {
+ root /opt/authhub/web/dist;
try_files $uri $uri/ /index.html;
if (!-e $request_filename){
rewrite ^(.*)$ /index.html last;
diff --git a/oauth2_web/src/api/request.ts b/oauth2_web/src/api/request.ts
index 526323f..e50e308 100644
--- a/oauth2_web/src/api/request.ts
+++ b/oauth2_web/src/api/request.ts
@@ -15,6 +15,7 @@ import type {
} from 'axios'
import axios from 'axios'
import { ElMessage, ElNotification } from 'element-plus'
+import router from '@/conf/router'
export interface Result<T = any> {
@@ -62,7 +63,7 @@ request.interceptors.response.use(
message: response.data.message,
})
setTimeout(() => {
- window.location.href = '/oauth/authorize/login'
+ router.replace('/oauth/authorize/login')
}, 1000)
break
default:
--
2.43.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。