【修复】修复用户未定义性别的情况下,导致前端修改个人资料默认头像异常的情况。#I56WBO

This commit is contained in:
大灰灰
2022-05-11 20:34:46 +08:00
parent f9c23221d4
commit fb60a05e02
2 changed files with 10 additions and 1 deletions

View File

@@ -210,7 +210,12 @@
_this.birthdayTemporary = _this.model.birthday;
_this.model.nickname = res.data.nickName;
_this.model.mobile = res.data.mobile;
_this.model.sex = _this.actionSheetList[res.data.sex - 1].name;
if (res.data.sex && res.data.sex == 0) {
_this.model.sex = _this.actionSheetList[2].name;
} else {
_this.model.sex = _this.actionSheetList[res.data.sex - 1].name;
}
_this.model.avatar = res.data.avatarImage;
} else {
//报错了