mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 20:03:26 +08:00
uniapp【优化】: 个人资料昵称长度提示优化
This commit is contained in:
@@ -143,7 +143,7 @@
|
||||
|
||||
/** 修改昵称 */
|
||||
const hanldeChangeNickName= (e:any)=>{
|
||||
state.nickname = e.detail.value;
|
||||
state.nickname = e.detail?.value?.trim();
|
||||
}
|
||||
|
||||
/** 获取用户信息 */
|
||||
@@ -157,7 +157,7 @@
|
||||
}
|
||||
if (userInfo?.data?.nickName) {
|
||||
state.percentage += 25;
|
||||
state.nickname = userInfo?.data?.nickName;
|
||||
state.nickname = userInfo?.data?.nickName?.trim();
|
||||
}
|
||||
if (userInfo?.data?.avatarImage) {
|
||||
state.percentage += 25;
|
||||
@@ -205,9 +205,6 @@
|
||||
if (!state.nickname) {
|
||||
handleShowToast('请输入昵称'); return;
|
||||
}
|
||||
if (state.nickname.length < 2 || state.nickname.length > 16) {
|
||||
handleShowToast('称长度在2到16个长度'); return;
|
||||
}
|
||||
if (!state.sex) {
|
||||
handleShowToast('请选择性别'); return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user