Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
9e71650b
提交
9e71650b
authored
11月 03, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 修改商务数据分析师的登录地址
上级
d8153f73
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
9 行增加
和
10 行删除
+9
-10
.env
.env
+1
-0
Header.vue
src/components/layout/Header.vue
+2
-7
useAppConfig.ts
src/composables/useAppConfig.ts
+2
-1
401.vue
src/modules/error/views/401.vue
+0
-0
axios.ts
src/utils/axios.ts
+4
-2
没有找到文件。
.env
浏览文件 @
9e71650b
...
...
@@ -6,3 +6,4 @@ VITE_SAAS_LEARN_URL=https://saas-learn.ezijing.com
VITE_QA_CENTER_URL=https://qa-center.ezijing.com
VITE_X_LEARNING_URL=https://x-learning.ezijing.com
VITE_EXAM_SHOW_URL=https://exam-show.ezijing.com
VITE_SWSJFXS_LOGIN_URL=https://login.ezijing.com/swsjfxs/login/index
src/components/layout/Header.vue
浏览文件 @
9e71650b
...
...
@@ -41,7 +41,7 @@ const defaultActive = computed(() => {
})
const
logout
=
async
()
=>
{
await
userStore
.
logout
()
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
origin
)}
`
location
.
href
=
`
${
appConfig
.
loginURL
||
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
origin
)}
`
}
function
isUrl
(
path
:
string
)
{
...
...
@@ -73,12 +73,7 @@ function handleClick(path: string) {
<div
class=
"app-header-nav"
>
<el-menu
mode=
"horizontal"
router
:default-active=
"defaultActive"
>
<
template
v-for=
"item in menus"
:key=
"item.path"
>
<el-sub-menu
:index=
"item.path"
:popper-offset=
"0"
popper-class=
"sub-menu-popper"
v-permission=
"item.tag"
v-if=
"item.children"
>
<el-sub-menu
:index=
"item.path"
:popper-offset=
"0"
popper-class=
"sub-menu-popper"
v-permission=
"item.tag"
v-if=
"item.children"
>
<template
#
title
>
{{
item
.
name
}}
</
template
>
...
...
src/composables/useAppConfig.ts
浏览文件 @
9e71650b
...
...
@@ -57,7 +57,8 @@ const appConfigList = [
xTrainLabel
:
'商务数据分析理论训练'
,
labTrainLabel
:
'商务数据分析实操训练'
,
xExamLabel
:
'商务数据分析理论考试'
,
labExamLabel
:
'商务数据分析实操考试'
labExamLabel
:
'商务数据分析实操考试'
,
loginURL
:
import
.
meta
.
env
.
VITE_SWSJFXS_LOGIN_URL
}
]
...
...
src/modules/error/views/401.vue
浏览文件 @
9e71650b
差异被折叠。
点击展开。
src/utils/axios.ts
浏览文件 @
9e71650b
import
axios
from
'axios'
import
{
ElMessage
}
from
'element-plus'
import
router
from
'@/router'
import
{
useAppConfig
}
from
'@/composables/useAppConfig'
const
appConfig
=
useAppConfig
()
const
httpRequest
=
axios
.
create
({
timeout
:
60000
,
...
...
@@ -37,7 +39,7 @@ httpRequest.interceptors.response.use(
const
{
data
}
=
response
// 未登录
if
(
data
.
code
===
4001
)
{
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
location
.
href
=
`
${
appConfig
.
loginURL
||
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
return
Promise
.
reject
(
data
)
}
if
(
data
.
code
===
1
)
{
...
...
@@ -51,7 +53,7 @@ httpRequest.interceptors.response.use(
const
{
status
,
message
}
=
error
.
response
.
data
// 未登录
if
(
status
===
403
)
{
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
location
.
href
=
`
${
appConfig
.
loginURL
||
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
location
.
href
)}
`
}
else
if
(
status
===
401
||
status
===
402
)
{
// 未授权
router
.
push
(
'/401'
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论