bug
This commit is contained in:
+107
-36
@@ -64,21 +64,28 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner">{{momAvgPrice}}<span>元/㎡</span></div>
|
||||
<div class="card-content-inner" id="momAvgPriceId_noData">暂无数据</div>
|
||||
<div class="card-content-inner" id="momAvgPriceId">{{momAvgPrice}}<span>元/㎡</span></div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span>
|
||||
<em><strong>{{momRate}}</strong>%
|
||||
<em id="momRateId_noData">暂无数据
|
||||
</em>
|
||||
<em id="momRateId"><strong>{{momRate}}</strong>%
|
||||
<i class="icon" id="momRateTypeClass"></i>
|
||||
</em>
|
||||
<label>环比上月</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>{{regionRank}}</strong></em>
|
||||
<em id="regionRankId_noData">暂无数据
|
||||
</em>
|
||||
<em id="regionRankId"><strong>{{regionRank}}</strong></em>
|
||||
<label>区域均价排名</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>{{priceRate}}</strong>%<i class="icon" id="priceRateTypeClass"></i></em>
|
||||
<em id="priceRateId_noData">暂无数据
|
||||
</em>
|
||||
<em id="priceRateId"><strong>{{priceRate}}</strong>%<i class="icon" id="priceRateTypeClass"></i></em>
|
||||
<label id="priceInfo">下跌概率</label>
|
||||
</span>
|
||||
</div>
|
||||
@@ -124,7 +131,7 @@
|
||||
|
||||
<!-- 加载提示符 -->
|
||||
<div id="otherCityDiv">
|
||||
<div class="card cardList">
|
||||
<div class="selectContainer">
|
||||
<div class="selectBox row">
|
||||
<div class="region col-25 theme"><a>区域</a><i class="icon icon-down"></i></div>
|
||||
<div class="price col-25 theme" id="select_price_div"><a>均价</a><i class="icon icon-down"></i></div>
|
||||
@@ -132,7 +139,7 @@
|
||||
<div class="order col-25 theme"><a>距离近优先</a><i class="icon icon-down"></i></div>
|
||||
</div>
|
||||
|
||||
<div class="card-footer selectContent dn">
|
||||
<div class="selectContent dn">
|
||||
<div class="topic dn" id="select_region">
|
||||
<div class="topicContent" style="padding:0.2rem 0.75rem;" id="regionDiv">
|
||||
</div>
|
||||
@@ -1173,9 +1180,8 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="js/mui.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="config.js"></script>
|
||||
|
||||
|
||||
<script type='text/javascript' src="js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="js/axiosPlugin.js"></script>
|
||||
|
||||
<script type='text/javascript' src='js/city-app.js?version=${version!}' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='js/searchDistrict-app.js?' charset='utf-8'></script>
|
||||
@@ -1282,7 +1288,6 @@ var baseInfo = new Vue({
|
||||
topMonth:"",
|
||||
momAvgPrice: "",
|
||||
momRate: "",
|
||||
dealCount:"",
|
||||
priceRate:"",
|
||||
priceRateType:1,
|
||||
isLogin:"",
|
||||
@@ -1307,7 +1312,7 @@ function initBaseInfo(city,region,address,lat,lng){
|
||||
var regionParam = region;
|
||||
var latParam = lat;
|
||||
var lngParam = lng;
|
||||
axios.get(BASE_PATH+"/rest/index/home", {
|
||||
axios.get("/rest/index/home", {
|
||||
params: {
|
||||
city: cityParam,
|
||||
region:regionParam
|
||||
@@ -1316,13 +1321,42 @@ function initBaseInfo(city,region,address,lat,lng){
|
||||
.then(function (response) {
|
||||
baseInfo.region = response.data.data.region;
|
||||
baseInfo.topMonth = response.data.data.topMonth;
|
||||
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||
baseInfo.momRate = (response.data.data.momRate*100).toFixed(2);
|
||||
baseInfo.dealCount = response.data.data.dealCount;
|
||||
baseInfo.priceRate = response.data.data.priceRate;
|
||||
baseInfo.priceRateType = response.data.data.priceRateType;
|
||||
if(response.data.data.momAvgPrice=='暂无数据'){
|
||||
$("#momAvgPriceId").hide();
|
||||
$("#momAvgPriceId_noData").show();
|
||||
}else{
|
||||
$("#momAvgPriceId").show();
|
||||
$("#momAvgPriceId_noData").hide();
|
||||
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||
}
|
||||
if(response.data.data.momRate=='暂无数据'){
|
||||
$("#momRateId").hide();
|
||||
$("#momRateId_noData").show();
|
||||
}else{
|
||||
$("#momRateId").show();
|
||||
$("#momRateId_noData").hide();
|
||||
baseInfo.momRate = (response.data.data.momRate*100).toFixed(2);
|
||||
}
|
||||
if(response.data.data.regionRank=='暂无数据'){
|
||||
$("#regionRankId").hide();
|
||||
$("#regionRankId_noData").show();
|
||||
}else{
|
||||
$("#regionRankId").show();
|
||||
$("#regionRankId_noData").hide();
|
||||
baseInfo.regionRank = response.data.data.regionRank;
|
||||
}
|
||||
if(response.data.data.priceRate=='暂无数据'){
|
||||
$("#priceRateId").hide();
|
||||
$("#priceRateId_noData").show();
|
||||
}else{
|
||||
$("#priceRateId").show();
|
||||
$("#priceRateId_noData").hide();
|
||||
//baseInfo.dealCount = response.data.data.dealCount;
|
||||
baseInfo.priceRate = response.data.data.priceRate;
|
||||
baseInfo.priceRateType = response.data.data.priceRateType;
|
||||
}
|
||||
baseInfo.isLogin = response.data.data.isLogin;
|
||||
baseInfo.regionRank = response.data.data.regionRank;
|
||||
|
||||
if(response.data.data.isLogin){
|
||||
$("#addHouseDiv").hide();
|
||||
$("#detailHouseDiv").show();
|
||||
@@ -1415,7 +1449,7 @@ $("body").delegate("#regionStatusButton", "click", function (){
|
||||
})
|
||||
|
||||
function initNearDistricts(cityParam,latParam,lngParam,regionParam,order,minPrice,maxPrice,tag){
|
||||
axios.get(BASE_PATH+"/rest/index/districtList", {
|
||||
axios.get("/rest/index/districtList", {
|
||||
params: {
|
||||
city: cityParam,
|
||||
region:regionParam,
|
||||
@@ -1468,7 +1502,7 @@ function initNearDistricts(cityParam,latParam,lngParam,regionParam,order,minPric
|
||||
|
||||
function initNews(page){
|
||||
//资讯列表
|
||||
axios.get(BASE_PATH+"/rest/news/list", {
|
||||
axios.get("/rest/news/list", {
|
||||
params: {
|
||||
city: $("#input_city").text(),
|
||||
page:page
|
||||
@@ -1543,7 +1577,7 @@ $("body").delegate(".icon-light-grey", "click", function () {
|
||||
});
|
||||
|
||||
function doVote(id,flag){
|
||||
axios.get(BASE_PATH+"/rest/news/vote", {
|
||||
axios.get("/rest/news/vote", {
|
||||
params: {
|
||||
newsId: id,
|
||||
type:flag
|
||||
@@ -1557,7 +1591,7 @@ function doVote(id,flag){
|
||||
}
|
||||
|
||||
function changeRegion(){
|
||||
axios.get(BASE_PATH+"/rest/index/home", {
|
||||
axios.get("/rest/index/home", {
|
||||
params: {
|
||||
city: $("#input_city").text(),
|
||||
region:$("#region").val(),
|
||||
@@ -1568,12 +1602,41 @@ function changeRegion(){
|
||||
.then(function (response) {
|
||||
baseInfo.region = response.data.data.region;
|
||||
baseInfo.topMonth = response.data.data.topMonth;
|
||||
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||
baseInfo.momRate = (response.data.data.momRate*100).toFixed(2);
|
||||
baseInfo.dealCount = response.data.data.dealCount;
|
||||
baseInfo.priceRate = response.data.data.priceRate;
|
||||
baseInfo.priceRateType = response.data.data.priceRateType;
|
||||
baseInfo.regionRank = response.data.data.regionRank;
|
||||
if(response.data.data.momAvgPrice=='暂无数据'){
|
||||
$("#momAvgPriceId").hide();
|
||||
$("#momAvgPriceId_noData").show();
|
||||
}else{
|
||||
$("#momAvgPriceId").show();
|
||||
$("#momAvgPriceId_noData").hide();
|
||||
baseInfo.momAvgPrice = response.data.data.momAvgPrice;
|
||||
}
|
||||
if(response.data.data.momRate=='暂无数据'){
|
||||
$("#momRateId").hide();
|
||||
$("#momRateId_noData").show();
|
||||
}else{
|
||||
$("#momRateId").show();
|
||||
$("#momRateId_noData").hide();
|
||||
baseInfo.momRate = (response.data.data.momRate*100).toFixed(2);
|
||||
}
|
||||
if(response.data.data.regionRank=='暂无数据'){
|
||||
$("#regionRankId").hide();
|
||||
$("#regionRankId_noData").show();
|
||||
}else{
|
||||
$("#regionRankId").show();
|
||||
$("#regionRankId_noData").hide();
|
||||
baseInfo.regionRank = response.data.data.regionRank;
|
||||
}
|
||||
if(response.data.data.priceRate=='暂无数据'){
|
||||
$("#priceRateId").hide();
|
||||
$("#priceRateId_noData").show();
|
||||
}else{
|
||||
$("#priceRateId").show();
|
||||
$("#priceRateId_noData").hide();
|
||||
//baseInfo.dealCount = response.data.data.dealCount;
|
||||
baseInfo.priceRate = response.data.data.priceRate;
|
||||
baseInfo.priceRateType = response.data.data.priceRateType;
|
||||
}
|
||||
baseInfo.isLogin = response.data.data.isLogin;
|
||||
|
||||
regionChange(response.data.data.region);
|
||||
if(response.data.data.momRateType>0){
|
||||
@@ -1612,6 +1675,7 @@ var itemsPerLoad2 = 5;
|
||||
var dataObj = [];
|
||||
var dataObj2 = [];
|
||||
var page = 1;
|
||||
var yesterDayDeployFlag = true;
|
||||
function addItems(number, lastIndex) {
|
||||
// 生成新条目的HTML
|
||||
|
||||
@@ -1628,7 +1692,8 @@ function addItems(number, lastIndex) {
|
||||
for(var i in dataObj){
|
||||
if(i>=lastIndex){
|
||||
if((dataObj.length<lastIndex + number) || (i < lastIndex + number)){
|
||||
if(dataObj[i].yesterDayDeploy){
|
||||
if(dataObj[i].yesterDayDeploy && yesterDayDeployFlag){
|
||||
yesterDayDeployFlag = false;
|
||||
html += '<div class="content-block-title recommend" style="border-top:solid 0.5rem #f3f3f3;">历史推荐</div>';
|
||||
}
|
||||
if(dataObj[i].type=="专题"){
|
||||
@@ -1638,7 +1703,7 @@ function addItems(number, lastIndex) {
|
||||
'<div class="card-footer">'+
|
||||
'<span>'+
|
||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i>'+dataObj[i].recommendCommentCount+'条'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
@@ -1738,15 +1803,22 @@ function addItems(number, lastIndex) {
|
||||
dataObj[i].title+'</div></div>'+
|
||||
'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></div>'+
|
||||
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i>'+dataObj[i].recommendCommentCount+'条</span></div></div>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</span></div></div>'+
|
||||
'<div class="item-media"><img src='+dataObj[i].coverImg+'></div>'+
|
||||
'</li></ul></div></div></div>';
|
||||
}
|
||||
if(dataObj[i].type=="投票"){
|
||||
var voteFavorCount = dataObj[i].voteFavorCount;
|
||||
var voteNoFavorCount = dataObj[i].voteNoFavorCount;
|
||||
var voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
|
||||
var voteNoFavorCountRate = 100-voteFavorCountRate;
|
||||
var voteFavorCountRate = 50
|
||||
var voteNoFavorCountRate = 50
|
||||
if(voteFavorCount == 0 && voteNoFavorCount==0){
|
||||
|
||||
}else{
|
||||
voteFavorCountRate = Math.round((voteFavorCount*100)/(voteFavorCount+voteNoFavorCount));
|
||||
voteNoFavorCountRate = 100-voteFavorCountRate;
|
||||
}
|
||||
|
||||
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">'+
|
||||
'<i class="icon icon-light-red" data-val="'+dataObj[i].id+'"></i><span>'+dataObj[i].voteFavorText+'</span>'+
|
||||
@@ -1792,7 +1864,6 @@ function addItems(number, lastIndex) {
|
||||
}
|
||||
tagStr += '</span></div>';
|
||||
}
|
||||
|
||||
html += '<li>'+
|
||||
'<a onclick="openUrl(\''+BASE_PATH+'/district/details?city='+dataObj2[i].city+'®ion='+dataObj2[i].region+'&name='+dataObj2[i].districtName+'\')" class="external item-content">'+
|
||||
'<div class="item-inner"><div class="item-title-row"><div class="item-title">'+
|
||||
@@ -2329,7 +2400,7 @@ $("#select_order li").on("click", function () {
|
||||
|
||||
//查询城市价格区间
|
||||
function getCityPriceLevel(cityParam){
|
||||
axios.get(BASE_PATH+"/house/getCityPriceLevel", {
|
||||
axios.get("/house/getCityPriceLevel", {
|
||||
params: {
|
||||
city: cityParam
|
||||
}
|
||||
@@ -2410,7 +2481,7 @@ function getDistrictList(cityParam,latParam,lngParam,regionParam,order,minPrice,
|
||||
$("#nearDistrictContainer").hide();
|
||||
latParam=0;
|
||||
lngParam=0;
|
||||
axios.get(BASE_PATH+"/rest/index/districtList", {
|
||||
axios.get("/rest/index/districtList", {
|
||||
params: {
|
||||
city: cityParam,
|
||||
lat:latParam,
|
||||
@@ -2455,7 +2526,7 @@ function openNewsView(newId) {
|
||||
}
|
||||
});
|
||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user