Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
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
刘文虎
account-book
Commits
dfd27b57
Commit
dfd27b57
authored
Aug 28, 2023
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 自动登录之后首页刷新
parent
393e866b
Pipeline
#6651
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
index.vue
pages/index/index.vue
+5
-0
login.js
store/modules/login.js
+1
-0
No files found.
pages/index/index.vue
View file @
dfd27b57
...
...
@@ -282,6 +282,10 @@ export default {
this
.
initInfo
();
},
1500
);
});
uni
.
$on
(
'login-success'
,
res
=>
{
this
.
initInfo
();
});
this
.
systemInfo
=
uni
.
getSystemInfoSync
();
},
onShow
()
{
...
...
@@ -303,6 +307,7 @@ export default {
},
onUnload
()
{
uni
.
$off
(
'bill-list-reload'
);
uni
.
$off
(
'login-success'
);
},
methods
:
{
getShareUserId
(
q
)
{
...
...
store/modules/login.js
View file @
dfd27b57
...
...
@@ -194,6 +194,7 @@ const actions = {
}
=
res
.
data
let
timestamp
=
res
.
timestamp
setToken
(
token
)
uni
.
$emit
(
'login-success'
);
setRefreshToken
(
refreshToken
)
dispatch
(
"Set_auto_login"
,
true
)
await
dispatch
(
'Get_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