function App.createHeadSprite(url,userID)
local name = md5.sumhexa(url)
local headPicName = name..".png"
local filepath = cc.FileUtils:getInstance():getWritablePath()
filepath = filepath.."UserFaceImage"
local imgFile = filepath.."/"..headPicName
if App.fileExist(imgFile) then
ls.TextureCache:removeTextureForKey(imgFile)
ls.TextureCache:addImage(imgFile)
return;
end
if url ~= nil and string.len(url) > 0 then
App.downHeadByUrl(url,userID,updateHeadImage)
end
end
-- 下载头像
function App.downHeadByUrl(url,userID)
if url == nil then
return
end
--存储名字
local name = md5.sumhexa(url)
local headPicName = name..".png"
--存储路径
local filepath = cc.FileUtils:getInst