up
This commit is contained in:
@@ -41,6 +41,7 @@ function CSPTasks.setData(paras)
|
||||
headData.company_id = companyInfro.company_id
|
||||
headData.company_name = companyInfro.company_name
|
||||
if user then
|
||||
headData.loginNo = user.loginNo
|
||||
headData.loginName = user.loginName
|
||||
headData.imageUrl = user.imageUrl
|
||||
else
|
||||
@@ -74,25 +75,12 @@ end
|
||||
|
||||
function CSPTasks.setHeadInfor()
|
||||
uiobjs.Top:setValue(headData)
|
||||
if not isNilOrEmpty(headData.imageurl) then
|
||||
if uiobjs.HeadIcon.mainTexture == nil or uiobjs.HeadIcon.mainTexture.name ~= headData.imageurl then
|
||||
WWWEx.get(
|
||||
headData.imageurl,
|
||||
nil,
|
||||
CLAssetType.texture,
|
||||
function(content, orgs)
|
||||
content.name = headData.imageurl
|
||||
uiobjs.HeadIcon.mainTexture = content
|
||||
end,
|
||||
function()
|
||||
printe("取得头像失败")
|
||||
end,
|
||||
nil,
|
||||
true,
|
||||
2
|
||||
)
|
||||
DBUser.getIcon(
|
||||
headData.loginNo,
|
||||
function(content)
|
||||
uiobjs.HeadIcon.mainTexture = content
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
-- 关闭页面
|
||||
|
||||
Reference in New Issue
Block a user