aa
This commit is contained in:
@@ -118,7 +118,7 @@
|
||||
<div class="content-block-title cardNearbyName" id="nearAddress"><i class="icon icon-address02"></i><span id="nearDistrictSpan"></span><i class="icon arrow-up"></i></div>
|
||||
<div class="cardNearbyBox" id="nearDistricts">
|
||||
</div>
|
||||
<div class="content-block-title recommend" id="todayNews">今日推荐</div>
|
||||
<div class="content-block-title recommend dn" id="todayNews">今日推荐</div>
|
||||
<div id="newsList">
|
||||
|
||||
</div>
|
||||
@@ -1221,6 +1221,7 @@ var lat = 0;
|
||||
var lng = 0;
|
||||
var address = "";
|
||||
var cat;
|
||||
var todayDeployFlag = true;
|
||||
var timestamp1 = new Date().getTime();
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
//扩展API加载完毕,现在可以正常调用扩展API
|
||||
@@ -1228,7 +1229,6 @@ function onPlusReady(){
|
||||
getPosition();
|
||||
versionUpdate();
|
||||
}
|
||||
|
||||
// 获取当前用户位置
|
||||
function getPosition(){
|
||||
plus.geolocation.getCurrentPosition(function(p){
|
||||
@@ -1257,7 +1257,7 @@ function getPosition(){
|
||||
$("#input_city").text(city);
|
||||
}
|
||||
localStorage.setItem("init_city", city);
|
||||
addLocation(lat,lng);
|
||||
//addLocation(lat,lng);
|
||||
$(".nowCity").text(city);
|
||||
/*city="北京";
|
||||
region="";
|
||||
@@ -1281,7 +1281,7 @@ function getPosition(){
|
||||
$("#input_city").text(city);
|
||||
initRegionSelect(city);
|
||||
localStorage.setItem("init_city", city);
|
||||
addLocation(lat,lng);
|
||||
//addLocation(lat,lng);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
@@ -1556,12 +1556,18 @@ function initNews(page){
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
}
|
||||
|
||||
if(page==1 && response.data.data.list.length == 0){
|
||||
$("#todayNews").hide();
|
||||
}else{
|
||||
$("#todayNews").show();
|
||||
}
|
||||
|
||||
for(var i in response.data.data.list){
|
||||
if(dataObj[i].todayDeploy && todayDeployFlag){
|
||||
todayDeployFlag = false;
|
||||
$("#todayNews").show();
|
||||
}
|
||||
dataObj.push(response.data.data.list[i])
|
||||
}
|
||||
lastIndex = $('.cardInfo').length;
|
||||
|
||||
Reference in New Issue
Block a user