mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
【修复】修复用户未定义性别的情况下,导致前端修改个人资料默认头像异常的情况。#I56WBO
This commit is contained in:
@@ -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 {
|
||||
//报错了
|
||||
|
||||
@@ -782,6 +782,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
//收藏
|
||||
var collectionCount = await _goodsCollectionServices.GetCountAsync(p => p.userId == user.id);
|
||||
|
||||
if (user.sex != (int)GlobalEnumVars.UserSexTypes.女 || user.sex != (int)GlobalEnumVars.UserSexTypes.男 || user.sex != (int)GlobalEnumVars.UserSexTypes.未知)
|
||||
{
|
||||
user.sex = (int)GlobalEnumVars.UserSexTypes.未知;
|
||||
}
|
||||
|
||||
jm.data = new
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user