更新头像的函数检测如果缺数据就跳过流程

框架跟进
This commit is contained in:
MrZ_26
2022-10-28 16:33:19 +08:00
parent e291a070f3
commit e4c786a5d4
2 changed files with 3 additions and 3 deletions

View File

@@ -379,7 +379,7 @@ function NET.getUserInfo(uid)
path='/techmino/api/v1/player/info?playerId='..uid,
},6.26)
if res and res.code==200 then
if res and res.code==200 and type(res.data)=='table' then
USERS.updateUserData(res.data)
end
end)
@@ -391,7 +391,7 @@ function NET.getAvatar(uid)
path='/techmino/api/v1/player/avatar?playerId='..uid,
},6.26)
if res and res.code==200 then
if res and res.code==200 and type(res.data)=='string' then
USERS.updateAvatar(uid,res.data)
end
end)