@@ -166,7 +166,8 @@ $.config = {router: false}
compare_word:"",
compare_money:"",
words:"",
- p:""
+ p:"",
+ w:""
}
})
// var evaluate_msg = new Vue({
@@ -221,9 +222,14 @@ $.config = {router: false}
h = response.data.data
house_info.name = h.name
house_info.city_region = h.city+"-"+h.region
- house_info.house_type = (h.roomCount==0?"":h.roomCount+"室")+(h.hallCount==0?"":h.hallCount+"厅 ")+(h.area==0?"":h.area+"m ")+((h.floor==0||h.height==0)?"":h.floor+"/"+h.height+"层")
- house_price.total_price = h.totalPrice==0?"暂无":(h.totalPrice/10000).toFixed(0)
- house_price.avg_price = h.avgPrice==0?"暂无":h.avgPrice
+ house_info.house_type = (h.roomCount==0?"":h.roomCount+"室")+(h.hallCount==0?"":h.hallCount+"厅 ")+(h.area==0?"":h.area+"㎡ ")+((h.floor==0||h.height==0)?"":h.floor+"/"+h.height+"层")
+ if(h.totalPrice==0){
+ house_price.total_price = "暂无";
+ }else{
+ house_price.total_price = (h.totalPrice/10000).toFixed(0)
+ house_price.w = "万"
+ }
+ house_price.avg_price = h.avgPrice==0?"暂无":h.avgPrice+"元/㎡"
house_price.percentage_30=h.oneMonthUpDownRange==0?"暂无":h.oneMonthUpDownRange
if(h.oneMonthUpDownRange<0){
house_price.arrow="icon icon-arrow-green"
@@ -260,10 +266,12 @@ $.config = {router: false}
// evaluate_msg.evaluate_words="暂无"
// }
// evaluate_msg.msg=h.evaluateMsg
- $("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
- $("#img").click(function(){
- clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){})
- })
+ if(typeof(h.imgId)!="undefined"&&h.imgId!=null&&$.trim(h.imgId)!=""){
+ $("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
+ $("#img").click(function(){
+ clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){})
+ })
+ }
loadingChart(h.city,h.region,h.name,2)
//按照时间范围加载数据
$(".avgPriceTrend a").click(function(){
@@ -277,6 +285,39 @@ $.config = {router: false}
}).catch(function(error){
console.log(error)
})
+
+ /* 房产用途 */
+ $(document).on('click','.open-vertical-modal', function () {
+ var houseStatus = 0;
+ $.modal({
+ title: '房产用途',
+ verticalButtons: true,
+ buttons: [
+ {
+ text: '自住',
+ onClick: function() {
+
+ addManagement(hid, houseStatus, "自住");
+ }
+ },
+ {
+ text: '出租',
+ onClick: function() {
+ addManagement(hid, houseStatus, "自住");
+ }
+ },
+ {
+ text: '空置',
+ onClick: function() {
+ addManagement(hid, houseStatus, "自住");
+ }
+ },
+ {
+ text: '取消'
+ }
+ ]
+ })
+ });
}
@@ -292,7 +333,6 @@ function addManagement(id, houseStatus, liveStatus){
var status = response.data.status;
if(status){
$.toast(response.data.data);
- window.location.reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseList.html').reload();
@@ -319,37 +359,7 @@ $(".content-block .button").on("click", function () {
$(this).addClass("active");
});
-/* 房产用途 */
-$(document).on('click','.open-vertical-modal', function () {
- var houseStatus = 0;
- $.modal({
- title: '房产用途',
- verticalButtons: true,
- buttons: [
- {
- text: '自住',
- onClick: function() {
- addManagement(hid, houseStatus, "自住");
- }
- },
- {
- text: '出租',
- onClick: function() {
- addManagement(hid, houseStatus, "自住");
- }
- },
- {
- text: '空置',
- onClick: function() {
- addManagement(hid, houseStatus, "自住");
- }
- },
- {
- text: '取消'
- }
- ]
- })
-});
+
diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html
index 309833f..c91d8dc 100644
--- a/fangija-zsyf/views/house/add.html
+++ b/fangija-zsyf/views/house/add.html
@@ -1742,13 +1742,14 @@ $("#evaluation_btn").on("click", function () {
}
}
}
- if(c && c.indexOf("别墅")>-1){
+ if(c && c.indexOf("别墅")<0){
var num = e.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
if(parseInt(num[0])>parseInt(num[1])){
$.toast("总楼层选择错误!")
return false
}
}
+
if($("#cityAddress").val() != "" && $("#cityAddress").val() != $("#input_city").val()){
$.toast("城市和房屋地址不匹配")
return false
@@ -1785,7 +1786,7 @@ $("#evaluation_btn").on("click", function () {
//var loginFlag=false;
function checkIsLogin(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
- clicked('/views/user/passLogin.html',true,false,{},{},function(){
+ clicked('/views/user/codeSms.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{
diff --git a/fangija-zsyf/views/house/detail.html b/fangija-zsyf/views/house/detail.html
index 7d4a77a..15563a9 100644
--- a/fangija-zsyf/views/house/detail.html
+++ b/fangija-zsyf/views/house/detail.html
@@ -61,7 +61,7 @@
-
{{name}}{{cityRegion}}
+
{{cityRegion}}