Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
52ae730d
Commit
52ae730d
authored
Dec 08, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改更改手机号
parent
72746710
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
src/modules/personalInfo/ChangePhoneModal.tsx
+3
-1
src/modules/personalInfo/index.tsx
+6
-2
src/modules/root/Login.jsx
+1
-0
No files found.
src/modules/personalInfo/ChangePhoneModal.tsx
View file @
52ae730d
...
...
@@ -8,10 +8,11 @@ import CheckBeforeSendCode from '@/components/CheckBeforeSendCode';
interface
changePhoneModalProps
{
onClose
:()
=>
void
,
onConfirm
:
any
}
function
ChangePhoneModal
(
props
:
changePhoneModalProps
)
{
const
{
onClose
}
=
props
;
const
{
onClose
,
onConfirm
}
=
props
;
const
[
newPhone
,
setNewPhone
]
=
useState
(
''
);
const
[
phoneVerify
,
setPhoneVerify
]
=
useState
(
''
);
const
[
codeText
,
setCodeText
]
=
useState
(
'发送验证码'
);
...
...
@@ -102,6 +103,7 @@ function ChangePhoneModal(props: changePhoneModalProps) {
}
BaseService
.
editUserPhone
(
param
).
then
((
res
)
=>
{
if
(
res
.
success
){
onConfirm
(
newPhone
)
onClose
();
}
else
{
setErrorMessageText
(
res
.
message
);
...
...
src/modules/personalInfo/index.tsx
View file @
52ae730d
...
...
@@ -2,7 +2,7 @@
* @Author: zhangleyuan
* @Date: 2020-11-27 15:06:31
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 17:
07:05
* @LastEditTime: 2020-12-08 17:
33:13
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -38,6 +38,7 @@ function PersonalInfoPage() {
const
storeUserId
=
User
.
getStoreUserId
()
const
ctx
:
any
=
useContext
(
XMContext
);
const
userId
=
User
.
getUserId
();
const
[
checkObject1
,
setCheckObject1
]
=
useState
({});
window
.
ctx
=
ctx
;
useEffect
(()
=>
{
storeUserId
&&
getUserInfo
();
...
...
@@ -100,6 +101,9 @@ function PersonalInfoPage() {
ctx
.
dispatch
(
setStoreList
(
storeVOS
));
});
}
function
changePhoneConfirm
(
phone
:
any
){
setPhone
(
phone
);
}
return
(
<
div
className=
"page personal-info-page"
>
<
div
className=
"page-content"
>
...
...
@@ -151,7 +155,7 @@ function PersonalInfoPage() {
}
{
changePhoneModalVisible
&&
<
ChangePhoneModal
onClose=
{
()
=>
{
setChangePhoneModalVisible
(
false
)}
}
/>
changePhoneModalVisible
&&
<
ChangePhoneModal
onClose=
{
()
=>
{
setChangePhoneModalVisible
(
false
)}
}
onConfirm=
{
changePhoneConfirm
}
/>
}
</
div
>
...
...
src/modules/root/Login.jsx
View file @
52ae730d
...
...
@@ -147,6 +147,7 @@ function Login(props) {
<
span
style=
{
{
fontSize
:
'12px'
,
color
:
'#999'
,
marginBottom
:
8
,
display
:
'block'
}
}
>
请完成安全验证
</
span
>
<
CheckBeforeSendCode
callback=
{
(
data
,
nc
)
=>
{
setCheckObject1
(
nc
);
checkAccount
(
1
,
(
userType
)
=>
{
handleSendSMSCode
(
data
,
userType
);
setTimeout
(()
=>
{
...
...
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