Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
frontend
/
qqxb-self-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
081427b3
authored
Jun 19, 2020
by
cocomilk2012
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
9aee35cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
7 deletions
src/router/index.ts
src/views/SelectIdentity.vue
src/router/index.ts
View file @
081427b3
...
@@ -97,8 +97,6 @@ function getPathByTo(to, authcode_key) {
...
@@ -97,8 +97,6 @@ function getPathByTo(to, authcode_key) {
}
}
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
'开始路由'
);
console
.
log
(
'to.fullpath='
,
to
.
fullPath
);
if
(
isOpenHttps
===
'true'
&&
location
.
href
.
startsWith
(
'http://'
))
{
if
(
isOpenHttps
===
'true'
&&
location
.
href
.
startsWith
(
'http://'
))
{
location
.
href
=
location
.
href
.
replace
(
'http://'
,
'https://'
);
location
.
href
=
location
.
href
.
replace
(
'http://'
,
'https://'
);
}
}
...
@@ -110,18 +108,13 @@ router.beforeEach((to, from, next) => {
...
@@ -110,18 +108,13 @@ router.beforeEach((to, from, next) => {
const
authcode
=
to
.
query
.
authCode
||
to
.
query
.
authcode
;
const
authcode
=
to
.
query
.
authCode
||
to
.
query
.
authcode
;
console
.
log
(
'authcode='
,
authcode
);
if
(
!!
authcode
)
{
if
(
!!
authcode
)
{
getAccessToken
(
authcode
)
getAccessToken
(
authcode
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
redirectPath
=
getPathByTo
(
to
,
'authcode'
);
const
redirectPath
=
getPathByTo
(
to
,
'authcode'
);
console
.
log
(
'redirectPath='
,
redirectPath
);
//@ts-ignore
//@ts-ignore
const
accessToken
:
string
=
res
;
const
accessToken
:
string
=
res
;
localStorage
.
setItem
(
'token'
,
accessToken
);
localStorage
.
setItem
(
'token'
,
accessToken
);
console
.
log
(
'redirectPath='
,
redirectPath
);
window
.
location
.
href
=
redirectPath
;
window
.
location
.
href
=
redirectPath
;
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
...
...
src/views/SelectIdentity.vue
View file @
081427b3
...
@@ -84,6 +84,7 @@ export default class SelectIdentity extends Vue {
...
@@ -84,6 +84,7 @@ export default class SelectIdentity extends Vue {
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
&&
res
.
data
.
uthStatus
&&
res
.
data
.
uthStatus
>
0
)
{
if
(
res
.
data
&&
res
.
data
.
uthStatus
&&
res
.
data
.
uthStatus
>
0
)
{
this
.
id_no
=
res
.
data
.
personalIdCardNo
;
this
.
id_no
=
res
.
data
.
personalIdCardNo
;
localStorage
.
setItem
(
"id_no"
,
res
.
data
.
personalIdCardNo
);
localStorage
.
setItem
(
"name"
,
res
.
data
.
personalName
);
localStorage
.
setItem
(
"name"
,
res
.
data
.
personalName
);
localStorage
.
setItem
(
"birthday"
,
res
.
data
.
birthday
);
localStorage
.
setItem
(
"birthday"
,
res
.
data
.
birthday
);
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment