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
e4088969
Commit
e4088969
authored
Apr 21, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
老用户绑定手机号
parent
c18a4e42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
src/common/Captcha/index.js
+0
-1
src/components/passport/bindingTel/index.js
+22
-5
No files found.
src/common/Captcha/index.js
View file @
e4088969
...
...
@@ -24,7 +24,6 @@ class Captcha extends Component {
width
:
'auto'
,
onReady
:
function
(
instance
)
{
// 验证码一切准备就绪,此时可正常使用验证码的相关功能
console
.
log
(
_this
);
_this
.
setState
({
isReady
:
true
});
...
...
src/components/passport/bindingTel/index.js
View file @
e4088969
...
...
@@ -39,6 +39,9 @@ class BindingTel extends Component {
}
}
componentDidMount
()
{
console
.
log
(
this
.
props
.
location
.
state
)
}
render
()
{
const
{
...
...
@@ -148,17 +151,23 @@ const formikConfig = {
}
})
}
else
{
http
.
post
(
`
${
API
[
'passport-api'
]}
/bind_mobile`
,
{
const
uid
=
getParam
(
'uid'
)
const
params
=
{
phone_num
:
values
.
tel
,
phone_code
:
values
.
veriCode
,
mkey
:
getParam
(
'mkey'
),
area_code
:
'00'
+
props
.
country
.
num
,
plat
:
5
}).
then
(
res
=>
{
plat
:
5
,
type
:
uid
?
1
:
2
}
if
(
uid
)
{
params
.
uid
=
uid
}
http
.
post
(
`
${
API
[
'passport-api'
]}
/bind_mobile`
,
params
).
then
(
res
=>
{
const
data
=
res
.
data
if
(
data
.
errno
==
200
)
{
const
{
history
}
=
props
if
(
data
.
data
[
'is_set_pwd'
])
{
const
{
history
}
=
props
history
.
replace
(
`/passport/set-password`
,
{
user
:
{
hasError
:
false
,
...
...
@@ -170,7 +179,15 @@ const formikConfig = {
}
})
}
else
{
location
.
assign
(
data
.
data
[
'jump_url'
])
if
(
uid
)
{
const
redirect
=
localStorage
.
getItem
(
'binding_redirect'
)
if
(
redirect
)
{
localStorage
.
removeItem
(
'binding_redirect'
)
history
.
replace
(
JSON
.
parse
(
redirect
))
}
else
{
location
.
assign
(
data
.
data
[
'jump_url'
])
}
}
}
...
...
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