Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app
Project
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
姜雷
wx-school-app
Commits
c79ad344
Commit
c79ad344
authored
Mar 22, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取验证码方式
parent
ab50e845
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
vcode.ts
src/api/vcode.ts
+5
-4
Vcode.tsx
src/components/Vcode/Vcode.tsx
+3
-1
Register.tsx
src/pages/Register/Register.tsx
+1
-0
ResetPwd.tsx
src/pages/ResetPwd/ResetPwd.tsx
+1
-0
No files found.
src/api/vcode.ts
View file @
c79ad344
import
{
baseFetch
}
from
'.'
;
import
{
baseFetch
,
customerFetch
}
from
'.'
;
type
ImageVcodePramas
=
{
type
ImageVcodePramas
=
{
effective
?:
number
;
effective
?:
number
;
...
@@ -12,11 +12,12 @@ export const getImageVcode = (data: ImageVcodePramas) =>
...
@@ -12,11 +12,12 @@ export const getImageVcode = (data: ImageVcodePramas) =>
data
:
data
,
data
:
data
,
});
});
type
VcodePramas
=
{
type
VcodePramas
=
{
businessNum
:
string
;
codeNum
?:
number
;
cellphone
:
string
;
cellphone
:
string
;
};
};
export
const
getVcode
=
(
entity
:
VcodePramas
)
=>
export
const
getVcode
=
(
entity
:
VcodePramas
)
=>
baseFetch
({
customerFetch
({
url
:
`/common/sendMsgCode?cellphone=
${
entity
.
cellphone
}
&codeNum=6`
,
url
:
'/app/customer/phone/message'
,
method
:
'POST'
,
data
:
entity
,
data
:
entity
,
});
});
src/components/Vcode/Vcode.tsx
View file @
c79ad344
...
@@ -7,6 +7,7 @@ import './Vcode.scss';
...
@@ -7,6 +7,7 @@ import './Vcode.scss';
import
{
ResponseDataEntity
}
from
'src/api'
;
import
{
ResponseDataEntity
}
from
'src/api'
;
type
PageOwnProps
=
{
type
PageOwnProps
=
{
positionNum
:
string
;
text
?:
string
;
text
?:
string
;
cellphone
:
string
;
cellphone
:
string
;
};
};
...
@@ -99,10 +100,11 @@ class Vcode extends Component {
...
@@ -99,10 +100,11 @@ class Vcode extends Component {
clickHandle
()
{
clickHandle
()
{
const
{
vcode
,
inputCode
}
=
this
.
state
;
const
{
vcode
,
inputCode
}
=
this
.
state
;
if
(
vcode
&&
vcode
.
toString
()
==
inputCode
)
{
if
(
vcode
&&
vcode
.
toString
()
==
inputCode
)
{
const
{
cellphone
}
=
this
.
props
;
const
{
cellphone
,
positionNum
}
=
this
.
props
;
getVcode
({
getVcode
({
cellphone
:
cellphone
,
cellphone
:
cellphone
,
businessNum
:
positionNum
,
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
countStart
();
this
.
countStart
();
...
...
src/pages/Register/Register.tsx
View file @
c79ad344
...
@@ -318,6 +318,7 @@ class Register extends Component {
...
@@ -318,6 +318,7 @@ class Register extends Component {
/>
/>
<
Vcode
<
Vcode
vcode
-
classname=
'registerBox-getVcode'
vcode
-
classname=
'registerBox-getVcode'
positionNum=
'2'
ref=
'Vcode'
ref=
'Vcode'
cellphone=
{
cellphone
}
cellphone=
{
cellphone
}
/>
/>
...
...
src/pages/ResetPwd/ResetPwd.tsx
View file @
c79ad344
...
@@ -167,6 +167,7 @@ class ResetPwd extends Component {
...
@@ -167,6 +167,7 @@ class ResetPwd extends Component {
/>
/>
<
Vcode
<
Vcode
vcode
-
classname=
'registerBox-getVcode'
vcode
-
classname=
'registerBox-getVcode'
positionNum=
'3'
ref=
'Vcode'
ref=
'Vcode'
cellphone=
{
cellphone
}
cellphone=
{
cellphone
}
/>
/>
...
...
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