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
c163b7b2
Commit
c163b7b2
authored
Sep 29, 2020
by
leiyongsheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rn昵称修改
parent
a959c1b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
ios
+1
-1
src/pages/ChangeNickname/index.js
+4
-4
yarn.lock
+8
-0
No files found.
ios
@
068d46e2
Subproject commit
3922333e6e0f904d6ff344620db7d35c95ae3694
Subproject commit
068d46e210861b0b45160b9696df3031527cd46d
src/pages/ChangeNickname/index.js
View file @
c163b7b2
...
@@ -24,12 +24,12 @@ const Equipment = () => {
...
@@ -24,12 +24,12 @@ const Equipment = () => {
const
handleSave
=
async
()
=>
{
const
handleSave
=
async
()
=>
{
if
(
/^
[
\w\d
_-
]{4,20}
$/
.
test
(
nickname
))
{
if
(
/^
[
a-zA-Z|0123456789|_
\\
-|
\u
4e00-
\u
9fa5
]
+
$/
.
test
(
nickname
))
{
const
data
=
await
userServices
.
setNickName
({
nickname
});
const
data
=
await
userServices
.
setNickName
({
nickname
});
BMCUI
.
show
(
'修改昵称成功!'
);
BMCUI
.
show
(
'修改昵称成功!'
);
exit
();
exit
();
}
else
{
}
else
{
BMCUI
.
show
(
'
昵称不合法!
'
);
BMCUI
.
show
(
'
请输入1-20个字符作为昵称
'
);
}
}
};
};
...
@@ -39,12 +39,12 @@ const Equipment = () => {
...
@@ -39,12 +39,12 @@ const Equipment = () => {
<
TextInput
<
TextInput
style
=
{
styles
.
input
}
style
=
{
styles
.
input
}
value
=
{
nickname
}
value
=
{
nickname
}
onChangeText
=
{(
text
)
=>
{
setNickName
(
text
);
}}
onChangeText
=
{(
text
)
=>
{
setNickName
(
text
);
}}
placeholder
=
"请输入昵称"
placeholder
=
"请输入昵称"
/>
/>
<
/View
>
<
/View
>
<
Text
style
=
{
styles
.
tip
}
>
4
-
20
个字符,可由中英文、数字、“
-
”、“
_
”组成
<
/Text
>
<
Text
style
=
{
styles
.
tip
}
>
1
-
20
个字符,可由中英文、数字、“
-
”、“
_
”组成
<
/Text
>
<
View
style
=
{
styles
.
submit
}
>
<
View
style
=
{
styles
.
submit
}
>
<
TouchableHighlight
onPress
=
{
handleSave
}
>
<
TouchableHighlight
onPress
=
{
handleSave
}
>
...
...
yarn.lock
View file @
c163b7b2
...
@@ -1149,6 +1149,14 @@
...
@@ -1149,6 +1149,14 @@
resolved "https://registry.npm.taobao.org/@react-native-community/masked-view/download/@react-native-community/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401"
resolved "https://registry.npm.taobao.org/@react-native-community/masked-view/download/@react-native-community/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401"
integrity sha1-XdpkPhnlh3k7wgNN2b9zmK1D1AE=
integrity sha1-XdpkPhnlh3k7wgNN2b9zmK1D1AE=
"@react-navigation/bottom-tabs@^5.8.0":
version "5.9.1"
resolved "https://registry.npm.taobao.org/@react-navigation/bottom-tabs/download/@react-navigation/bottom-tabs-5.9.1.tgz#68d50e301d06f97f83a785f5acdf2c50e9600053"
integrity sha1-aNUOMB0G+X+Dp4X1rN8sUOlgAFM=
dependencies:
color "^3.1.2"
react-native-iphone-x-helper "^1.2.1"
"@react-navigation/core@^5.12.4":
"@react-navigation/core@^5.12.4":
version "5.12.4"
version "5.12.4"
resolved "https://registry.npm.taobao.org/@react-navigation/core/download/@react-navigation/core-5.12.4.tgz#1bd0c81d098895c8ffe49f8624fae60c9abc5684"
resolved "https://registry.npm.taobao.org/@react-navigation/core/download/@react-navigation/core-5.12.4.tgz#1bd0c81d098895c8ffe49f8624fae60c9abc5684"
...
...
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