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
eaf50798
Commit
eaf50798
authored
Mar 05, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分接口
parent
2766a416
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
58 deletions
+48
-58
vcode.ts
src/api/vcode.ts
+22
-0
wx.ts
src/api/wx.ts
+0
-53
Modal.tsx
src/components/Modal/Modal.tsx
+3
-0
Vcode.scss
src/components/Vcode/Vcode.scss
+11
-0
Vcode.tsx
src/components/Vcode/Vcode.tsx
+3
-3
ResetPwd.tsx
src/pages/ResetPwd/ResetPwd.tsx
+9
-2
No files found.
src/api/vcode.ts
0 → 100644
View file @
eaf50798
import
{
baseFetch
}
from
'.'
;
type
ImageVcodePramas
=
{
effective
?:
number
;
loginName
:
string
;
codeNum
?:
number
;
};
export
const
getImageVcode
=
(
data
:
ImageVcodePramas
)
=>
baseFetch
({
url
:
`/common/getCode?loginName=
${
data
.
loginName
}
&codeNum=4`
,
method
:
'POST'
,
data
:
data
,
});
type
VcodePramas
=
{
cellphone
:
string
;
};
export
const
getVcode
=
(
entity
:
VcodePramas
)
=>
baseFetch
({
url
:
`/common/sendMsgCode?cellphone=
${
entity
.
cellphone
}
&codeNum=6`
,
method
:
'POST'
,
data
:
entity
,
});
src/api/wx.ts
deleted
100644 → 0
View file @
2766a416
import
{
oldBaseFetch
,
baseFetch
,
ResponseDataEntity
}
from
'./index'
;
import
{
UserState
}
from
'../store/rootReducers/userinfo'
;
type
LoginPramas
=
{
code
:
string
;
};
type
LoginReponseData
=
{
register
:
boolean
;
wxToken
:
string
;
}
&
UserState
;
export
interface
LoginReponse
extends
ResponseDataEntity
<
LoginReponseData
>
{
data
:
LoginReponseData
;
}
export
const
login
=
(
data
:
LoginPramas
)
=>
oldBaseFetch
({
url
:
'/wx/api/user/login2'
,
data
:
data
,
});
export
const
fetchValidateCode
=
()
=>
oldBaseFetch
({
url
:
'/wx/api/getValidateCode'
,
});
type
ImageVcodePramas
=
{
effective
?:
number
;
loginName
:
string
;
codeNum
?:
number
;
};
export
const
getImageVcode
=
(
data
:
ImageVcodePramas
)
=>
baseFetch
({
url
:
`/common/getCode?loginName=
${
data
.
loginName
}
&codeNum=4`
,
method
:
'POST'
,
data
:
data
,
});
export
const
getVcode
=
entity
=>
oldBaseFetch
({
url
:
'/wx/api/getValidateCode'
,
method
:
'POST'
,
data
:
entity
,
});
type
RegisiterPramas
=
{};
// type RegisiterReponseData = {};
export
const
fetchWxUserRegister
=
(
entity
:
RegisiterPramas
)
=>
baseFetch
({
url
:
'/dcxy/wechat/applet/register/'
,
method
:
'POST'
,
data
:
entity
,
});
src/components/Modal/Modal.tsx
View file @
eaf50798
...
...
@@ -20,6 +20,9 @@ interface Modal {
class
Modal
extends
Component
{
static
externalClasses
=
[
'body-class'
];
static
options
=
{
addGlobalClass
:
true
,
};
static
defaultProps
=
{
visiabled
:
false
,
title
:
'提示'
,
...
...
src/components/Vcode/Vcode.scss
View file @
eaf50798
...
...
@@ -19,6 +19,17 @@
border-radius
:
12px
;
overflow
:
hidden
;
}
.mask
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
width
:
100%
;
height
:
100%
;
background-color
:
rgba
(
25
,
25
,
25
,
0
.2
);
z-index
:
99
;
}
}
.Vcode.Counting
{
color
:
#999
;
...
...
src/components/Vcode/Vcode.tsx
View file @
eaf50798
import
{
ComponentClass
}
from
'react'
;
import
Taro
,
{
Component
}
from
'@tarojs/taro'
;
import
{
View
,
Input
,
Canvas
}
from
'@tarojs/components'
;
import
{
getVcode
,
getImageVcode
}
from
'../../api/
wx
'
;
import
{
getVcode
,
getImageVcode
}
from
'../../api/
vcode
'
;
import
Modal
from
'../Modal/Modal'
;
import
'./Vcode.scss'
;
import
{
ResponseDataEntity
}
from
'src/api'
;
...
...
@@ -66,7 +66,7 @@ class Vcode extends Component {
this
.
setState
({
showImgBox
:
true
,
});
this
.
renderImg
(
1234
);
//
this.renderImg(1234);
}
else
{
Taro
.
showToast
({
title
:
'输入正确的手机号'
,
...
...
@@ -102,7 +102,7 @@ class Vcode extends Component {
const
{
cellphone
}
=
this
.
props
;
getVcode
({
tel
:
cellphone
,
cellphone
:
cellphone
,
})
.
then
(
res
=>
{
this
.
countStart
();
...
...
src/pages/ResetPwd/ResetPwd.tsx
View file @
eaf50798
...
...
@@ -31,7 +31,7 @@ class ResetPwd extends Component {
constructor
(
props
:
PageOwnProps
)
{
super
(
props
);
this
.
state
=
{
cellphone
:
'
18108096099
'
,
cellphone
:
''
,
vcode
:
''
,
pwd
:
''
,
checkPwd
:
''
,
...
...
@@ -111,7 +111,14 @@ class ResetPwd extends Component {
}
}
render
()
{
const
{
cellphone
,
vcode
,
showPwd
,
pwd
,
showCheckPwd
,
checkPwd
}
=
this
.
state
;
const
{
cellphone
,
vcode
,
showPwd
,
pwd
,
showCheckPwd
,
checkPwd
,
}
=
this
.
state
;
return
(
<
View
className=
'ResetPwd'
>
<
ToastBox
ref=
'ToastBox'
/>
...
...
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