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
39c074c4
Commit
39c074c4
authored
Nov 04, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微博登录绑定手机号
parent
27c875f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
src/App.js
+3
-0
src/components/passport/bindingTel/index.js
+3
-2
src/components/passport/setPassword/index.js
+9
-2
No files found.
src/App.js
View file @
39c074c4
...
@@ -63,6 +63,9 @@ class App extends Component {
...
@@ -63,6 +63,9 @@ class App extends Component {
if
(
cookie
.
get
(
'uid'
)
&&
this
.
props
.
user
.
hasError
)
{
if
(
cookie
.
get
(
'uid'
)
&&
this
.
props
.
user
.
hasError
)
{
this
.
getUser
()
this
.
getUser
()
}
}
if
(
location
.
pathname
===
'/passport'
){
window
.
localStorage
.
setItem
(
'binding_redirect'
,
JSON
.
stringify
(
this
.
previousLocation
))
}
const
{
pathname
,
state
}
=
location
const
{
pathname
,
state
}
=
location
if
(
pathname
.
startsWith
(
'/passport'
))
{
if
(
pathname
.
startsWith
(
'/passport'
))
{
location
.
state
=
{
location
.
state
=
{
...
...
src/components/passport/bindingTel/index.js
View file @
39c074c4
...
@@ -127,9 +127,10 @@ const formikConfig = {
...
@@ -127,9 +127,10 @@ const formikConfig = {
plat
:
5
plat
:
5
}).
then
(
res
=>
{
}).
then
(
res
=>
{
const
data
=
res
.
data
const
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
if
(
data
.
errno
==
200
)
{
if
(
data
.
data
[
'is_set_pwd'
])
{
if
(
data
.
data
[
'is_set_pwd'
])
{
props
.
history
.
replace
(
`/passport/set-password`
,
{
const
{
history
}
=
props
history
.
replace
(
`/passport/set-password`
,
{
user
:
{
user
:
{
hasError
:
false
,
hasError
:
false
,
data
:
{
data
:
{
...
...
src/components/passport/setPassword/index.js
View file @
39c074c4
...
@@ -122,10 +122,17 @@ function bindMobileSetPassword(values, props) {
...
@@ -122,10 +122,17 @@ function bindMobileSetPassword(values, props) {
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
errno
==
200
)
{
if
(
res
.
data
.
errno
==
200
)
{
const
{
location
,
history
}
=
props
Toast
.
info
(
'密码设置成功'
)
Toast
.
info
(
'密码设置成功'
)
let
from
=
props
.
location
.
state
&&
props
.
location
.
state
.
from
||
{
pathname
:
'/'
}
let
from
=
location
.
state
&&
location
.
state
.
from
||
{
pathname
:
'/'
}
let
local_redirect_url
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'binding_redirect'
))
setTimeout
(
function
()
{
setTimeout
(
function
()
{
props
.
history
.
replace
(
from
.
pathname
)
if
(
local_redirect_url
)
{
const
{
pathname
,
search
,
hash
}
=
local_redirect_url
history
.
replace
(
pathname
+
search
+
hash
)
}
else
{
history
.
replace
(
from
.
pathname
)
}
},
1000
)
},
1000
)
}
else
{
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
,
null
,
false
)
Toast
.
info
(
res
.
data
.
msg
,
2
,
null
,
false
)
...
...
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