Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vanke
h5
Commits
45822924
Commit
45822924
authored
Sep 01, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiket登录统一处理
parent
4ee25aa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
index.vue
src/views/Home/index.vue
+15
-5
No files found.
src/views/Home/index.vue
View file @
45822924
...
...
@@ -31,12 +31,22 @@ export default {
mounted
()
{
this
.
jobNo
=
this
.
$route
.
query
.
jobNo
this
.
ticket
=
this
.
$route
.
query
.
ticket
// this.getToken()
this
.
getTicketLogin
()
this
.
init
()
},
methods
:
{
/* eslint-disable */
init
()
{
if
(
this
.
jobNo
==
'12345'
)
{
this
.
getToken
()
}
else
{
if
(
this
.
jobNo
)
{
this
.
ticket
=
this
.
$route
.
query
.
jobNo
}
this
.
getTicketLogin
()
}
},
getToken
()
{
this
.
$store
.
dispatch
(
'Login'
,
{
jobNo
:
this
.
$route
.
query
.
jobNo
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'Login'
,
{
jobNo
:
this
.
jobNo
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'GetUserInfo'
).
then
(
res
=>
{
// res.data.accouuntType = 0
this
.
userInfo
=
res
.
data
...
...
@@ -47,11 +57,11 @@ export default {
})
},
getTicketLogin
()
{
if
(
!
this
.
$route
.
query
.
ticket
)
{
if
(
!
this
.
ticket
)
{
this
.
$toast
(
'该用户不存在'
)
return
}
this
.
$store
.
dispatch
(
'getTicketLogin'
,
{
ticket
:
this
.
$route
.
query
.
ticket
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'getTicketLogin'
,
{
ticket
:
this
.
ticket
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'GetUserInfo'
).
then
(
res
=>
{
this
.
userInfo
=
res
.
data
console
.
log
(
'userInof'
,
res
.
data
,
this
.
userInfo
)
...
...
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