Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj-simple
/
dj-admin
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 ada9144e
authored
Mar 28, 2025
by
huyue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改t
1 parent
22df88ad
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
src/views/accountCenter/components/iframeBox.vue
src/views/accountCenter/components/iframeBox.vue
View file @
ada9144
...
@@ -40,16 +40,16 @@ export default {
...
@@ -40,16 +40,16 @@ export default {
// 检查是否已经有 t 参数
// 检查是否已经有 t 参数
if
(
this
.
url
.
includes
(
'?t='
))
{
if
(
this
.
url
.
includes
(
'?t='
))
{
// 如果已经有 t 参数,替换它
// 如果已经有 t 参数,替换它
return
this
.
url
.
replace
(
/
(\?
|&
)
t=
[^
&
]
+/
,
'$1t='
+
this
.
SSOInfo
.
t
);
return
this
.
url
.
replace
(
/
(\?
|&
)
t=
[^
&
]
+/
,
'$1t='
+
this
.
scrmInfo
.
sessionId
);
}
else
{
}
else
{
// 如果没有 t 参数,添加它
// 如果没有 t 参数,添加它
return
this
.
url
.
includes
(
'?'
)
return
this
.
url
.
includes
(
'?'
)
?
this
.
url
+
'&t='
+
this
.
SSOInfo
.
t
?
this
.
url
+
'&t='
+
this
.
scrmInfo
.
sessionId
:
this
.
url
+
'?t='
+
this
.
SSOInfo
.
t
;
:
this
.
url
+
'?t='
+
this
.
scrmInfo
.
sessionId
;
}
}
},
},
...
mapState
({
...
mapState
({
SSOInfo
:
(
state
)
=>
state
.
d2admin
.
user
.
SSOInfo
,
scrmInfo
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
})
},
},
mounted
()
{
mounted
()
{
...
@@ -63,9 +63,9 @@ export default {
...
@@ -63,9 +63,9 @@ export default {
this
.
handleIframeLocationChange
(
event
.
data
.
url
);
this
.
handleIframeLocationChange
(
event
.
data
.
url
);
}
else
if
(
event
.
data
.
type
===
'logout'
)
{
}
else
if
(
event
.
data
.
type
===
'logout'
)
{
// 监听登录过期需要登出
// 监听登录过期需要登出
//
this.$router.push('/login')
this
.
$router
.
push
(
'/login'
)
//
this.logout()
this
.
logout
()
//
this.$StoreReset.call(this.$store) // 重置 store
this
.
$StoreReset
.
call
(
this
.
$store
)
// 重置 store
}
}
});
});
},
},
...
@@ -76,11 +76,11 @@ export default {
...
@@ -76,11 +76,11 @@ export default {
const
internalUrl
=
url
;
const
internalUrl
=
url
;
let
newInternalUrl
=
internalUrl
;
let
newInternalUrl
=
internalUrl
;
if
(
internalUrl
.
includes
(
'?t='
))
{
if
(
internalUrl
.
includes
(
'?t='
))
{
newInternalUrl
=
internalUrl
.
replace
(
/
(\?
|&
)
t=
[^
&
]
+/
,
'$1t='
+
this
.
SSOInfo
.
t
);
newInternalUrl
=
internalUrl
.
replace
(
/
(\?
|&
)
t=
[^
&
]
+/
,
'$1t='
+
this
.
scrmInfo
.
sessionId
);
}
else
{
}
else
{
newInternalUrl
=
internalUrl
.
includes
(
'?'
)
newInternalUrl
=
internalUrl
.
includes
(
'?'
)
?
internalUrl
+
'&t='
+
this
.
SSOInfo
.
t
?
internalUrl
+
'&t='
+
this
.
scrmInfo
.
sessionId
:
internalUrl
+
'?t='
+
this
.
SSOInfo
.
t
;
:
internalUrl
+
'?t='
+
this
.
scrmInfo
.
sessionId
;
}
}
console
.
log
(
'新的内部地址:'
,
newInternalUrl
);
console
.
log
(
'新的内部地址:'
,
newInternalUrl
);
this
.
url
=
newInternalUrl
this
.
url
=
newInternalUrl
...
...
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