提交 均价 和 当前城市相等 显示高零元

This commit is contained in:
raoyanhui
2018-04-16 15:36:35 +08:00
parent 2fc1970d68
commit c616419ca4
@@ -247,7 +247,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
//取得对应城市的value
var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey];
if(!isNaN(cityAvgPriceValue) && result.price>0){
if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){
if(parseInt(cityAvgPriceValue)>parseInt(result.price)){
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>低"+(parseInt(cityAvgPriceValue)-parseInt(result.price))+"元</em></div>";
}else{
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>高"+(parseInt(result.price)-parseInt(cityAvgPriceValue))+"元</em></div>";