PDA

瀏覽完整版本 : [求助] iOS7 Lockscreen Pack天氣地區修改問題



chevalerie
02-22-2014, 15:17
小弟是IOS7.0.4 JB
日前使用groovylock修改了鎖定頁面
主題包名ios7 lockscreen pack
以下為本主題包的weather.js檔
小弟百思不得其解要從何處更改天氣地區代碼
特上站求助各位
謝謝

===============================================================
var weather = {};
var TO, toShow;
var currentZip;
var locationName;
var temp;
var conditions;
var useWindChill;


function loadingAnimation(fadeOut, zip)
{
if(fadeOut){
$('#loader').addClass('visible');
renderWeather(zip);
}
else
$('#loader').removeClass('visible');
}
function renderWeather(z)
{
currentZip = z;
if(TO)
clearTimeout(TO);
$.simpleWeather({
zipcode: currentZip,
unit: temp,
success: function(weatherData) {
weather = weatherData;
var region = ', ' + weather.region;
if(region == ', ')
{
region = ', ' + weather.country;
}
var curr0 = (conditions) ? conditions[weather.code].toLowerCase() : weather.currently;
var curr1 = (conditions) ? conditions[weather.today.code].toLowerCase() : weather.forecast;
var curr2 = (conditions) ? conditions[weather.tomorrow.code].toLowerCase() : weather.tomorrow.forecast;
TO = setTimeout('getWeather()', 6000000);
setTimeout(function(){loadingAnimation(false);},500);
updateWeather();
$('.weather').removeClass('hidden');
},
error: function(error) {

TO = setTimeout('getWeather()',1000);
}
});
}
function getWeather(){
loadingAnimation(false);
temp = weatherDataSettings.units.substr(0,1).toLowerCase();
var lang = "en-us";
currentZip = weatherDataSettings.location;
locationName = weatherDataSettings.locationName;
useWindChill = weatherDataSettings.windChill;
renderWeather(currentZip);
}