function _loadJson var imgCards cardType10 jpg cardType30 jpg cardType

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
function _loadJson(){
var imgCards = ["cardType10.jpg","cardType30.jpg","cardType31.jpg","cardType32.jpg","cardType33.jpg","cardType34.jpg","cardType40.png"];
_.each(imgCards, function (imgCard) {
var remoteUrl = "https://vkusomania-backend.qtelecom.ru/assets/" + imgCard;//"https://vkusomania-backend.qtelecom.ru/api/vk/10/pos";
var cachePath = Titanium.Filesystem.resourcesDirectory + (Ti.Platform.osname == 'iphone' ? '' : '/') + 'data/assets/'+ imgCard;
Ti.API.info("CACHEPATH IS", cachePath);
Alloy.Globals.resourceDownloader.add({
url : remoteUrl,
path : cachePath
});
});
}