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
2387309f
Commit
2387309f
authored
Sep 17, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定手机号bug
parent
84bcf595
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
src/components/passport/bindingTel/index.js
+3
-2
src/components/passport/index.js
+6
-4
src/components/passport/setPassword/index.js
+2
-7
No files found.
src/components/passport/bindingTel/index.js
View file @
2387309f
...
...
@@ -123,7 +123,6 @@ const formikConfig = {
plat
:
5
}).
then
(
res
=>
{
const
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
data
[
'is_set_pwd'
])
{
...
...
@@ -132,8 +131,10 @@ const formikConfig = {
data
:
{
uid
:
data
.
data
.
uid
},
msg
:
data
.
data
.
msg
msg
:
data
.
data
.
msg
,
stage
:
'binding'
})
alert
(
'replace'
)
props
.
history
.
replace
(
`/passport/set-password`
)
}
else
{
location
.
assign
(
data
.
data
[
'jump_url'
])
...
...
src/components/passport/index.js
View file @
2387309f
...
...
@@ -67,12 +67,14 @@ class Passport extends Component {
let
{
history
,
location
}
=
this
.
props
let
{
data
}
=
this
.
props
.
user
if
(
data
&&
Object
.
values
(
data
).
filter
(
item
=>
!!
item
).
length
)
{
if
(
history
.
action
===
'POP'
&&
history
.
length
<=
3
)
{
if
(
history
.
action
===
'POP'
&&
history
.
length
<=
3
)
{
history
.
push
(
'/'
)
}
else
{
const
{
from
}
=
location
.
state
||
{
from
:
{
pathname
:
'/'
,
search
:
''
}};
const
redirectURI
=
getParam
(
'redirect'
)
redirectURI
?
(
window
.
location
.
href
=
redirectURI
)
:
history
.
replace
(
from
);
if
(
!
(
this
.
props
.
user
&&
this
.
props
.
user
.
stage
))
{
const
from
=
location
.
state
&&
location
.
state
.
from
||
{
pathname
:
'/'
,
search
:
''
};
const
redirectURI
=
getParam
(
'redirect'
)
redirectURI
?
(
window
.
location
.
href
=
redirectURI
)
:
history
.
replace
(
from
);
}
}
}
}
...
...
src/components/passport/setPassword/index.js
View file @
2387309f
...
...
@@ -16,11 +16,6 @@ import { connect } from "react-redux";
class
SetPassword
extends
Component
{
componentDidMount
()
{
// console.log(this.props.location);
}
render
()
{
let
{
values
,
errors
,
location
}
=
this
.
props
let
{
from
}
=
location
.
state
||
{
from
:
{
pathname
:
'/'
}}
...
...
@@ -75,7 +70,7 @@ const formikConfig = {
},
handleSubmit
:
(
values
,
{
props
})
=>
{
let
{
from
}
=
props
.
location
.
state
||
{
from
:
{
pathname
:
'/'
}
}
let
from
=
props
.
location
.
state
&&
props
.
location
.
state
.
from
||
{
pathname
:
'/'
}
if
(
from
.
pathname
.
includes
(
'forgot-password'
))
{
forgotPasswordReset
(
values
,
props
);
}
else
{
...
...
@@ -129,7 +124,7 @@ function bindMobileSetPassword(values, props) {
.
then
(
res
=>
{
if
(
res
.
data
.
errno
==
200
)
{
Toast
.
info
(
'密码设置成功'
)
let
{
from
}
=
location
.
state
||
{
from
:
{
pathname
:
'/'
}
}
let
from
=
props
.
location
.
state
&&
props
.
location
.
state
.
from
||
{
pathname
:
'/'
}
setTimeout
(
function
()
{
props
.
history
.
replace
(
from
.
pathname
)
},
1000
)
...
...
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