Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
banma_credit
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
hik_rn
project
banma_credit
Commits
8e5424ed
Commit
8e5424ed
authored
Oct 08, 2020
by
CaryaLiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改昵称回调修改成promise
parent
e074d974
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ios
+1
-1
src/pages/ChangeNickname/index.js
+2
-2
No files found.
ios
@
4c6dc36d
Subproject commit
52515a17713d3f4a76798790f902077d2b4f1e07
Subproject commit
4c6dc36d53d2b30b24ac6b0a0e7a1ce51a7dea63
src/pages/ChangeNickname/index.js
View file @
8e5424ed
...
...
@@ -9,7 +9,7 @@ import { TextInput, Text, TouchableHighlight, View, NativeModules, StatusBar, Pl
import
{
user
as
userServices
}
from
'../../services'
;
import
styles
from
'./style'
;
const
{
BMCInfo
:
{
getUserInfo
},
BMCUI
,
BMCAction
:
{
exit
,
setNiceN
ame
}
}
=
NativeModules
;
const
{
BMCInfo
:
{
getUserInfo
},
BMCUI
,
BMCAction
:
{
exit
,
updateNickn
ame
}
}
=
NativeModules
;
const
Equipment
=
()
=>
{
const
[
nickname
,
setNickName
]
=
useState
(
''
);
...
...
@@ -26,8 +26,8 @@ const Equipment = () => {
const
handleSave
=
async
()
=>
{
if
(
/^
[
a-zA-Z|0123456789|_
\\
-|
\u
4e00-
\u
9fa5
]
+$/
.
test
(
nickname
))
{
const
data
=
await
userServices
.
setNickName
({
nickname
});
setNiceName
(
nickname
)
BMCUI
.
showToast
(
'修改昵称成功!'
);
await
updateNickname
(
nickname
);
exit
();
}
else
{
BMCUI
.
showToast
(
'请输入1-20个字符作为昵称'
);
...
...
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