Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
高淑倩
7-Eleven
Commits
76e9b200
Commit
76e9b200
authored
Jun 26, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 添加登录限制_getUserInfoLimitCount:重试次数
parent
6d786a86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
wxService.js
src/utils/wxService.js
+16
-2
No files found.
src/utils/wxService.js
View file @
76e9b200
...
@@ -54,8 +54,22 @@ class WXService extends Http {
...
@@ -54,8 +54,22 @@ class WXService extends Http {
wxService
.
router
(
'/pages/userCenter/userCenter'
).
replace
()
wxService
.
router
(
'/pages/userCenter/userCenter'
).
replace
()
return
false
return
false
}
}
// 重新登陆 更新缓存
// 条件限制 getUserInfoLimitCount:重试次数
this
.
reLogin
()
if
(
!
this
.
getUserInfoLimitCount
)
{
this
.
getUserInfoLimitCount
=
1
}
else
{
this
.
getUserInfoLimitCount
++
}
if
(
this
.
getUserInfoLimitCount
>
3
)
{
wx
.
showToast
({
title
:
'登录超出重试次数!'
,
icon
:
'none'
})
}
else
{
// 重新登陆 更新缓存
this
.
reLogin
()
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
pages
=
getCurrentPages
()
const
pages
=
getCurrentPages
()
const
perpage
=
pages
[
pages
.
length
-
1
]
const
perpage
=
pages
[
pages
.
length
-
1
]
...
...
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