Skip to content

Commit

Permalink
fix: 登录成功页路径错误问题修复 --ignore
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 7914
  • Loading branch information
ywywZhou authored and luofann committed May 15, 2024
1 parent 0436fc9 commit 54cf550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/pc/src/utils/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ instance.interceptors.response.use(
if (response.config.url === 'init/') {
if (response.status === 401) {
const { login_url } = response.data;
const successUrl = `${window.location.origin}/login_success.html`;
const successUrl = `${window.location.origin}${window.SITE_URL}static/assets/login_success.html`;
let [loginUrl] = login_url.split('?');
loginUrl = `${loginUrl}?c_url=${encodeURIComponent(successUrl)}`;

Expand Down Expand Up @@ -124,7 +124,7 @@ instance.interceptors.response.use(
case 401: {
// 登录控制
const data = response.data;
const successUrl = `${window.location.origin}/login_success.html`;
const successUrl = `${window.location.origin}${window.SITE_URL}static/assets/login_success.html`;
let [loginUrl] = data.login_url.split('?');
loginUrl = `${loginUrl}?c_url=${encodeURIComponent(successUrl)}`;

Expand Down

0 comments on commit 54cf550

Please sign in to comment.