Skip to content

Commit

Permalink
feat(front): 成功登录页面静态路径更改
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 9923
  • Loading branch information
hyunfa authored and wyyalt committed Jun 17, 2024
1 parent 81174f8 commit 4bdf14e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,15 @@ function handleReject(error, config) {
if (status === 401) {
// 未登录, o.a 登录弹窗有问题先不做弹窗
let siteLoginUrl = window.PROJECT_CONFIG.LOGIN_URL;
// 设置login_success.html文件路径
let successBaseUrl = '';
if (NODE_ENV === 'development') {
successBaseUrl = window.location.origin;
} else {
successBaseUrl = window.PROJECT_CONFIG.BK_STATIC_URL;
}
// 登录成功之后的回调地址,用于执行关闭登录窗口或刷新父窗口页面等动作
const successUrl = `${window.location.origin}/login_success.html`;
const successUrl =`${successBaseUrl}/login_success.html`;
if (!siteLoginUrl) {
console.error('Login URL not configured!')
return
Expand Down

0 comments on commit 4bdf14e

Please sign in to comment.