Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
baiguangyao
mr-julyedu
Commits
c17f261e
Commit
c17f261e
authored
Jul 20, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信登录无痕验证
parent
f1b49594
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
src/store/no-trace-validation/reducer.js
+60
-0
No files found.
src/store/no-trace-validation/reducer.js
0 → 100644
View file @
c17f261e
const
UPDATE_CAPTCHA_STATE
=
'UPDATE_CAPTCHA_STATE'
export
const
updateCaptchaState
=
payload
=>
{
return
{
type
:
UPDATE_CAPTCHA_STATE
,
payload
,
}
}
const
SHOW_CAPTCHA_MODAL
=
'SHOW_CAPTCHA_MODAL'
export
const
showCaptchaModal
=
()
=>
{
return
{
type
:
SHOW_CAPTCHA_MODAL
,
}
}
const
CLOSE_CAPTCHA_MODAL
=
'CLOSE_CAPTCHA_MODAL'
export
const
closeCaptchaModal
=
()
=>
{
return
{
type
:
CLOSE_CAPTCHA_MODAL
,
}
}
const
VALIDATION_PASSED
=
'VALIDATION_PASSED'
export
const
validationPassed
=
()
=>
{
return
{
type
:
VALIDATION_PASSED
,
}
}
const
initialState
=
{
isShowCaptcha
:
false
,
isNeedValidation
:
false
,
}
export
default
function
noTraceValidation
(
state
=
initialState
,
action
)
{
switch
(
action
.
type
)
{
case
UPDATE_CAPTCHA_STATE
:
return
{
...
state
,
...
action
.
payload
,
}
case
SHOW_CAPTCHA_MODAL
:
return
{
...
state
,
...{
isShowCaptcha
:
true
},
}
case
CLOSE_CAPTCHA_MODAL
:
return
{
...
state
,
...{
isShowCaptcha
:
false
},
}
case
VALIDATION_PASSED
:
return
{
isNeedValidation
:
false
,
isShowCaptcha
:
false
,
}
default
:
return
state
}
}
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