Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7113ab52
authored
Mar 27, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 页面请求错误处理
1 parent
e2656bc1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
aus-admin/src/main/resources/templates/main/index.html
aus-front/admin/src/common/CustomTokenInterceptor.ts
aus-admin/src/main/resources/templates/main/index.html
View file @
7113ab5
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<link
rel=
"icon"
href=
"/favicon/favicon.ico"
type=
"image/x-icon"
>
<link
rel=
"icon"
href=
"/favicon/favicon.ico"
type=
"image/x-icon"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<title>
专电优拍
</title>
<title>
专电优拍
</title>
<script
type=
"module"
crossorigin
src=
"https://aus.test.glsx.com.cn/assets/index-
B5NhE1Tg
.js"
></script>
<script
type=
"module"
crossorigin
src=
"https://aus.test.glsx.com.cn/assets/index-
_7c6x44N
.js"
></script>
<link
rel=
"stylesheet"
crossorigin
href=
"https://aus.test.glsx.com.cn/assets/index-CAAxcolk.css"
>
<link
rel=
"stylesheet"
crossorigin
href=
"https://aus.test.glsx.com.cn/assets/index-CAAxcolk.css"
>
<!-- <script type="module" crossorigin src="https://aus.glsx.com.cn/assets/index-pxQEYXWe.js"></script>
<!-- <script type="module" crossorigin src="https://aus.glsx.com.cn/assets/index-pxQEYXWe.js"></script>
<link rel="stylesheet" crossorigin href="https://aus.glsx.com.cn/assets/index-CAAxcolk.css"> -->
<link rel="stylesheet" crossorigin href="https://aus.glsx.com.cn/assets/index-CAAxcolk.css"> -->
...
...
aus-front/admin/src/common/CustomTokenInterceptor.ts
View file @
7113ab5
...
@@ -67,6 +67,18 @@ export class CustomTokenInterceptor {
...
@@ -67,6 +67,18 @@ export class CustomTokenInterceptor {
if
(
error
)
{
if
(
error
)
{
// 请求已发出,但是不在2xx的范围
// 请求已发出,但是不在2xx的范围
this
.
handleError
(
error
);
this
.
handleError
(
error
);
if
(
error
?.
config
?.
url
==
'security/getUserAuthentication'
){
console
.
log
(
'token过期了重新登录'
,
error
);
//获取报错端口
const
windowOrigin
=
window
.
location
.
origin
;
if
(
windowOrigin
==
"https://aus.test.glsx.com.cn"
){
window
.
location
.
href
=
"https://aus.test.glsx.com.cn/admin/login"
;
}
else
if
(
windowOrigin
==
"https://aus.glsx.com.cn"
){
window
.
location
.
href
=
"https://aus.glsx.com.cn/admin/login"
;
}
else
{
console
.
log
(
'windowOrigin'
,
windowOrigin
);
}
}
return
Promise
.
reject
(
error
.
response
);
return
Promise
.
reject
(
error
.
response
);
}
else
{
}
else
{
// 处理断网的情况
// 处理断网的情况
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment