Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-vote
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6d58f127
authored
Nov 22, 2024
by
陆志强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复登录问题
parent
72058079
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
6 deletions
+29
-6
src/layouts/miniNavBar.vue
+11
-1
src/layouts/tabs.vue
+11
-1
src/main.js
+0
-1
src/plugins/UserAction/login.js
+6
-2
src/store/modules/vote.js
+1
-1
No files found.
src/layouts/miniNavBar.vue
View file @
6d58f127
...
...
@@ -53,12 +53,22 @@ export default {
mounted
()
{
this
.
initLoginCenter
()
Bus
.
$on
(
'showLogin'
,
this
.
toggleLogin
)
const
{
uin
}
=
this
.
$route
.
query
const
{
id
}
=
this
.
$route
.
params
this
.
$store
.
dispatch
(
'users/getUerInfo'
,
{
uin
})
setTimeout
(()
=>
{
this
.
$store
.
dispatch
(
'users/postInfo'
,
{
id
})
},
1000
)
},
destroyed
()
{
Bus
.
$off
(
'showLogin'
)
},
methods
:
{
...
mapActions
({
jumpToLogin
:
'users/jumpToLogin'
}),
...
mapActions
({
jumpToLogin
:
'users/jumpToLogin'
,
postInfo
:
'users/postInfo'
,
getUerInfo
:
'users/getUerInfo'
,
}),
// 云平台登录模块初始化
initLoginCenter
()
{
if
(
!
window
.
LoginCenter
)
return
...
...
src/layouts/tabs.vue
View file @
6d58f127
...
...
@@ -48,12 +48,22 @@ export default {
mounted
()
{
this
.
initLoginCenter
()
Bus
.
$on
(
'showLogin'
,
this
.
toggleLogin
)
const
{
uin
}
=
this
.
$route
.
query
const
{
id
}
=
this
.
$route
.
params
this
.
$store
.
dispatch
(
'users/getUerInfo'
,
{
uin
})
setTimeout
(()
=>
{
this
.
$store
.
dispatch
(
'users/postInfo'
,
{
id
})
},
1000
)
},
destroyed
()
{
Bus
.
$off
(
'showLogin'
)
},
methods
:
{
...
mapActions
({
jumpToLogin
:
'users/jumpToLogin'
}),
...
mapActions
({
jumpToLogin
:
'users/jumpToLogin'
,
postInfo
:
'users/postInfo'
,
getUerInfo
:
'users/getUerInfo'
,
}),
// 云平台登录模块初始化
initLoginCenter
()
{
if
(
!
window
.
LoginCenter
)
return
...
...
src/main.js
View file @
6d58f127
...
...
@@ -8,7 +8,6 @@ import '@/plugins/gtag'
import
'@/filters'
import
'@/plugins/vueClipboard'
import
'@/plugins/dmsService'
import
'@/plugins/pvStatisticalService'
import
'@/plugins/deviceId'
import
'@/plugins/hlsInstance'
...
...
src/plugins/UserAction/login.js
View file @
6d58f127
/* eslint-disable no-invalid-this */
import
Cookie
from
'js-cookie'
import
action
from
'../pvStatisticalService'
export
default
async
function
({
token
,
onFinished
}
=
{
token
:
''
})
{
const
{
uin
}
=
this
.
$route
.
query
const
{
id
}
=
this
.
$route
.
params
token
&&
Cookie
.
set
(
'token'
,
token
,
{
expires
:
10
});
await
action
()
this
.
$store
.
dispatch
(
'users/getUerInfo'
,
{
uin
})
setTimeout
(()
=>
{
this
.
$store
.
dispatch
(
'users/postInfo'
,
{
id
})
},
1000
)
onFinished
&&
onFinished
()
return
this
}
src/store/modules/vote.js
View file @
6d58f127
...
...
@@ -123,7 +123,7 @@ export const actions = {
}
else
{
Toast
.
fail
(
errorMessage
)
if
(
errorCode
===
9
)
{
this
.
app
.
context
.
error
({
statusCode
:
404
,
message
:
'This page could not be found'
}
)
this
.
$router
.
push
(
'error'
)
}
}
})
...
...
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