aa
This commit is contained in:
@@ -693,7 +693,7 @@ input::-webkit-input-placeholder{
|
|||||||
.topic .topicContent .topicContent_center div .icon.icon-menu04a{background:url(../images/icon-menu04a.png) no-repeat center center;background-size:100%;}
|
.topic .topicContent .topicContent_center div .icon.icon-menu04a{background:url(../images/icon-menu04a.png) no-repeat center center;background-size:100%;}
|
||||||
.topic .topicContent .topicContent_center div .icon.icon-menu05a{background:url(../images/icon-menu05a.png) no-repeat center center;background-size:100%;}
|
.topic .topicContent .topicContent_center div .icon.icon-menu05a{background:url(../images/icon-menu05a.png) no-repeat center center;background-size:100%;}
|
||||||
|
|
||||||
.topic .topicContent .topicContent_center.home div{width:25%;border-left:none;}
|
.topic .topicContent .topicContent_center.home div{width:33%;border-left:none;}
|
||||||
|
|
||||||
.topic .topicContent .topicContent_center.home div .icon{width:45px;height:45px;display:block;margin:0 auto;}
|
.topic .topicContent .topicContent_center.home div .icon{width:45px;height:45px;display:block;margin:0 auto;}
|
||||||
.topic .topicContent .topicContent_center.home div .icon.icon-home01{background:url(../images/icon-home01.png) no-repeat center center;background-size:100%;}
|
.topic .topicContent .topicContent_center.home div .icon.icon-home01{background:url(../images/icon-home01.png) no-repeat center center;background-size:100%;}
|
||||||
|
|||||||
+91
-54
@@ -94,10 +94,10 @@
|
|||||||
<i class="icon icon-home03"></i>
|
<i class="icon icon-home03"></i>
|
||||||
<span>房价查询</span>
|
<span>房价查询</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="open-about02">
|
<!--<div class="open-about02">
|
||||||
<i class="icon icon-home04"></i>
|
<i class="icon icon-home04"></i>
|
||||||
<span>房租查询</span>
|
<span>房租查询</span>
|
||||||
</div>
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1553,8 +1553,17 @@ function getPosition(){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* 获取#region字数,截取#region前4字,并添加... */
|
/* 获取#region字数,截取#region前4字,并添加... */
|
||||||
/*city="上海"
|
city="上海"
|
||||||
init();*/
|
init();
|
||||||
|
var baseInfo = new Vue({
|
||||||
|
el: '#baseInfo',
|
||||||
|
data: {
|
||||||
|
region : "",
|
||||||
|
topMonth:"",
|
||||||
|
momAvgPrice: "",
|
||||||
|
momRate: ""
|
||||||
|
}
|
||||||
|
})
|
||||||
function init(){
|
function init(){
|
||||||
//显示附近地址
|
//显示附近地址
|
||||||
var nearAddressParam = address;
|
var nearAddressParam = address;
|
||||||
@@ -1579,19 +1588,16 @@ function init(){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
new Vue({
|
baseInfo.region = response.data.data.region;
|
||||||
el: '#baseInfo',
|
baseInfo.topMonth = response.data.data.topMonth;
|
||||||
data: {
|
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||||
region: response.data.data.region,
|
baseInfo.momRate = response.data.data.momRate;
|
||||||
topMonth:response.data.data.topMonth,
|
regionChange(response.data.data.region);
|
||||||
momAvgPrice: response.data.data.momAvgPrice,
|
|
||||||
momRate: response.data.data.momRate
|
new Vue({
|
||||||
}
|
|
||||||
})
|
|
||||||
new Vue({
|
|
||||||
el: '#todayDate',
|
el: '#todayDate',
|
||||||
data: {
|
data: {
|
||||||
todayDate:response.data.data.todayDate
|
todayDate : response.data.data.todayDate
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$("#region").picker({
|
$("#region").picker({
|
||||||
@@ -1606,7 +1612,7 @@ function init(){
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
regionChange();
|
|
||||||
|
|
||||||
if(response.data.data.dtos.length==0){
|
if(response.data.data.dtos.length==0){
|
||||||
$("#nearAddress").css("display",none);
|
$("#nearAddress").css("display",none);
|
||||||
@@ -1625,16 +1631,17 @@ function init(){
|
|||||||
html += '</div>';
|
html += '</div>';
|
||||||
$("#nearDistricts").html(html);
|
$("#nearDistricts").html(html);
|
||||||
$("#nearbyDistrictList").css("width",(7.5*response.data.data.dtos.length)+"rem");
|
$("#nearbyDistrictList").css("width",(7.5*response.data.data.dtos.length)+"rem");
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
initNews();
|
||||||
|
}
|
||||||
|
function initNews(){
|
||||||
//资讯列表
|
//资讯列表
|
||||||
axios.get(BASE_PATH+"/rest/news/list", {
|
axios.get(BASE_PATH+"/rest/news/list", {
|
||||||
params: {
|
params: {
|
||||||
city: cityParam,
|
city: $("input_city").val(),
|
||||||
page:1
|
page:1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -1653,8 +1660,7 @@ function init(){
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/*$("#region").click(function(e){
|
||||||
$("#region").click(function(e){
|
|
||||||
$(document).click(function(e){
|
$(document).click(function(e){
|
||||||
alert($("#region").val());
|
alert($("#region").val());
|
||||||
var region_copy = $("#region_copy").val();
|
var region_copy = $("#region_copy").val();
|
||||||
@@ -1664,9 +1670,9 @@ $("#region").click(function(e){
|
|||||||
changeRegion();
|
changeRegion();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})*/
|
||||||
|
|
||||||
$("#regionStatusButton").click(function(e){
|
/*$("#regionStatusButton").click(function(e){
|
||||||
var region_copy = $("#region_copy").val();
|
var region_copy = $("#region_copy").val();
|
||||||
var value = $(".picker-selected").text();
|
var value = $(".picker-selected").text();
|
||||||
alert($("#region").val());
|
alert($("#region").val());
|
||||||
@@ -1674,33 +1680,60 @@ $("#regionStatusButton").click(function(e){
|
|||||||
alert($("#region").val());
|
alert($("#region").val());
|
||||||
changeRegion();
|
changeRegion();
|
||||||
}
|
}
|
||||||
})
|
})*/
|
||||||
|
$("body").delegate("#regionStatusButton", "click", function () {
|
||||||
|
var region_copy = $("#region_copy").val();
|
||||||
|
var value = $(".picker-selected").text();
|
||||||
|
if(region_copy != value && value!="" && value!=null){
|
||||||
|
changeRegion();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").delegate(".icon-light-red", "click", function () {
|
||||||
|
var id = $(this).attr("data-val");
|
||||||
|
doVote(id,0);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").delegate(".icon-light-grey", "click", function () {
|
||||||
|
var id = $(this).attr("data-val");
|
||||||
|
doVote(id,1);
|
||||||
|
});
|
||||||
|
function doVote(id,flag){
|
||||||
|
axios.get(BASE_PATH+"/rest/news/vote", {
|
||||||
|
params: {
|
||||||
|
newsId: id,
|
||||||
|
type:flag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
$("#newsList").html('');
|
||||||
|
initNews();
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function changeRegion(){
|
function changeRegion(){
|
||||||
axios.get(BASE_PATH+"/houseApi/home", {
|
axios.get(BASE_PATH+"/houseApi/home", {
|
||||||
params: {
|
params: {
|
||||||
city: $("#input_city").text(),
|
city: $("#input_city").text(),
|
||||||
region:$("#region").val(),
|
region:$("#region").val(),
|
||||||
lat:0,
|
lat:0,
|
||||||
lng:0
|
lng:0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
new Vue({
|
baseInfo.region = response.data.data.region;
|
||||||
el: '#baseInfo',
|
baseInfo.topMonth = response.data.data.topMonth;
|
||||||
data: {
|
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||||
region: response.data.data.region,
|
baseInfo.momRate = response.data.data.momRate;
|
||||||
topMonth:response.data.data.topMonth,
|
regionChange(response.data.data.region);
|
||||||
momAvgPrice: response.data.data.momAvgPrice,
|
$("#region_copy").val(response.data.data.region);
|
||||||
momRate: response.data.data.momRate
|
})
|
||||||
}
|
.catch(function (error) {
|
||||||
})
|
console.log(error);
|
||||||
$("#region_copy").val(response.data.data.region);
|
});
|
||||||
})
|
|
||||||
.catch(function (error) {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
/* 页面底部无限加载事件 */
|
/* 页面底部无限加载事件 */
|
||||||
$.init();
|
$.init();
|
||||||
@@ -1788,16 +1821,21 @@ function addItems(number, lastIndex) {
|
|||||||
'</div></div></li></ul></div></div></div>';
|
'</div></div></li></ul></div></div></div>';
|
||||||
}
|
}
|
||||||
if(dataObj[i].type=="投票"){
|
if(dataObj[i].type=="投票"){
|
||||||
|
var voteFavorCount = dataObj[i].voteFavorCount;
|
||||||
|
var voteNoFavorCount = dataObj[i].voteNoFavorCount;
|
||||||
|
var voteFavorCountRate = (voteFavorCount/(voteFavorCount+voteNoFavorCount)).toFixed(2);
|
||||||
|
var voteNoFavorCountRate = 1-voteFavorCountRate;
|
||||||
html += '<div class="card cardInfo cardInfo03"><div class="card-header">'+dataObj[i].title+
|
html += '<div class="card cardInfo cardInfo03"><div class="card-header">'+dataObj[i].title+
|
||||||
'</div><div class="card-content"><div class="card-content-inner row"><div class="vote01 col-50">'+
|
'</div><div class="card-content"><div class="card-content-inner row"><div class="vote01 col-50">'+
|
||||||
'<i class="icon icon-light-grey icon-light-red"></i><span>同意</span>'+
|
'<i class="icon icon-light-red" data-val="'+dataObj[i].id+'"></i><span>同意</span>'+
|
||||||
'<font style="width:62%;"></font><label>198票 62%</label></div>'+
|
'<font style="width:'+voteFavorCountRate*100+'%;"></font><label>'+voteFavorCount+'票 '+voteFavorCountRate*100+'%</label></div>'+
|
||||||
'<div class="vote02 col-50"><i class="icon icon-light-grey"></i><span>反对</span>'+
|
'<div class="vote02 col-50"><i class="icon icon-light-grey" data-val="'+dataObj[i].id+'"></i><span>反对</span>'+
|
||||||
'<font style="width:38%;"></font><label>121票 38%</label></div><em>V.S</em></div></div></div>';
|
'<font style="width:'+voteNoFavorCountRate*100+'%;"></font><label>'+voteNoFavorCount+'票 '+voteNoFavorCountRate*100+'%</label></div><em>V.S</em></div></div></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dataObj.length<=(lastIndex + number)){
|
if(dataObj.length<=(lastIndex + number)){
|
||||||
$(".infinite-scroll-preloader").hide();
|
$(".infinite-scroll-preloader").hide();
|
||||||
}
|
}
|
||||||
@@ -1810,7 +1848,6 @@ function addItems(number, lastIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 上次加载的序号
|
// 上次加载的序号
|
||||||
|
|
||||||
var lastIndex = 5;
|
var lastIndex = 5;
|
||||||
|
|
||||||
// 注册'infinite'事件处理函数
|
// 注册'infinite'事件处理函数
|
||||||
@@ -1831,9 +1868,9 @@ $(document).on('infinite', '.infinite-scroll-bottom',function() {
|
|||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
function regionChange(){
|
function regionChange(region){
|
||||||
var text = $("#region").val();
|
var text = region;
|
||||||
var length = $("#region").val().length;
|
var length = region.length;
|
||||||
var textStr = "";
|
var textStr = "";
|
||||||
if(length > 4){
|
if(length > 4){
|
||||||
textStr = text.substr(0,4);
|
textStr = text.substr(0,4);
|
||||||
|
|||||||
Reference in New Issue
Block a user