Commit c163b7b2 by leiyongsheng

rn昵称修改

parent a959c1b5
ios @ 068d46e2
Subproject commit 3922333e6e0f904d6ff344620db7d35c95ae3694
Subproject commit 068d46e210861b0b45160b9696df3031527cd46d
......@@ -24,12 +24,12 @@ const Equipment = () => {
const handleSave = async () => {
if (/^[\w\d_-]{4,20}$/.test(nickname)) {
if (/^[a-zA-Z|0123456789|_\\-|\u4e00-\u9fa5]+$/.test(nickname)) {
const data = await userServices.setNickName({ nickname });
BMCUI.show('修改昵称成功!');
exit();
} else {
BMCUI.show('昵称不合法!');
BMCUI.show('请输入1-20个字符作为昵称');
}
};
......@@ -39,12 +39,12 @@ const Equipment = () => {
<TextInput
style={styles.input}
value={nickname}
onChangeText={(text) => {setNickName(text);}}
onChangeText={(text) => { setNickName(text); }}
placeholder="请输入昵称"
/>
</View>
<Text style={styles.tip}>4-20个字符,可由中英文、数字、“-”、“_”组成</Text>
<Text style={styles.tip}>1-20个字符,可由中英文、数字、“-”、“_”组成</Text>
<View style={styles.submit}>
<TouchableHighlight onPress={handleSave}>
......
......@@ -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"
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":
version "5.12.4"
resolved "https://registry.npm.taobao.org/@react-navigation/core/download/@react-navigation/core-5.12.4.tgz#1bd0c81d098895c8ffe49f8624fae60c9abc5684"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment