Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
c8199db5
提交
c8199db5
authored
5月 13, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(login): 勤策 PC 端也跳转到链路中心_免登录实现
同上
上级
b74ff104
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
5 行删除
+8
-5
main.js
src/main.js
+2
-1
login.vue
src/views/login.vue
+6
-4
没有找到文件。
src/main.js
浏览文件 @
c8199db5
...
...
@@ -20,7 +20,7 @@ import { download } from '@/utils/request'
import
SvgIcon
from
'@/components/SvgIcon'
import
elementIcons
from
'@/components/SvgIcon/svgicon'
import
{
useDict
}
from
'@/utils/dict'
import
{
parseTime
,
resetForm
,
addDateRange
,
handleTree
,
selectDictLabel
,
selectDictLabels
}
from
'@/utils'
import
{
parseTime
,
resetForm
,
addDateRange
,
handleTree
,
selectDictLabel
,
selectDictLabels
,
isMobile
}
from
'@/utils'
/****************** 移动端 ******************/
import
registerMobile
from
"@/mobile/main.js"
...
...
@@ -72,6 +72,7 @@ app.config.globalProperties.handleTree = handleTree
app
.
config
.
globalProperties
.
addDateRange
=
addDateRange
app
.
config
.
globalProperties
.
selectDictLabel
=
selectDictLabel
app
.
config
.
globalProperties
.
selectDictLabels
=
selectDictLabels
app
.
config
.
globalProperties
.
isMobile
=
isMobile
// 全局组件
app
.
component
(
'svg-icon'
,
SvgIcon
)
...
...
src/views/login.vue
浏览文件 @
c8199db5
...
...
@@ -151,14 +151,16 @@ checkFsLoginAuth()
// 检查-是否勤策回跳,并客户端登录
const
checkQcLoginAuth
=
async
()
=>
{
isShowLogin
.
value
=
false
// 勤策的 state 取值比较特殊
// ?redirect=/promotion?state=STATE&code=CODE 这个格式
const
url
=
window
.
location
.
href
.
split
(
'?'
)[
2
]
// 勤策 App 中移动端跳转 https://sfa-qa.wxl66.cn/link/#/m (会被路由拦截打回到登录页面,变成如下参数的格式)- 正确做法是跳转到登录页面(在登录页面判断当前设备是移动端则跳转到 /m 路由)但是频繁让人家改跳转地址不好,所以自己做判断吧
// 移动端:?redirect=/m?state=STATE&code=CODE 这个格式
// PC 端:?state=STATE&code=CODE
const
url
=
proxy
.
isMobile
()
?
window
.
location
.
href
.
split
(
'?'
)[
2
]
:
window
.
location
.
href
.
split
(
'?'
)[
1
]
if
(
url
)
{
const
params
=
new
URLSearchParams
(
url
);
const
state
=
params
.
get
(
'state'
);
if
(
state
===
'STATE'
)
{
loginByType
(
'qc'
,
window
.
location
.
href
.
split
(
'?'
)[
2
]
)
loginByType
(
'qc'
,
url
)
}
else
{
isShowLogin
.
value
=
true
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论