diff --git a/fangija-zsyf/js/loan/loanInfo.js b/fangija-zsyf/js/loan/loanInfo.js
index 9988883..8e502e3 100644
--- a/fangija-zsyf/js/loan/loanInfo.js
+++ b/fangija-zsyf/js/loan/loanInfo.js
@@ -1,11 +1,9 @@
-/*
- * 全局变量定义
- */
//短信验证类型
var APPLY_LOAN = "applyLoan";
//如果是抵押贷款时候,需要上层页面传入houseId
var houseId;
+var _params = {};
document.addEventListener('plusready', onPlusReady, false);
@@ -73,7 +71,7 @@ timer = {
/* 错误提示 */
$("#next_btn").on("click", function () {
var city = $("#input_city").val();
- var moblie = $("#input_phoneNumber").val();
+ var mobile = $("#input_phoneNumber").val();
var code = $("#input_codeSms").val();
//申请金额(万元)
var applyMoney = $("#input_price").val();
@@ -84,7 +82,7 @@ $("#next_btn").on("click", function () {
$.toast("请选择城市");
return false;
}
- if(!checkPhoneNum(moblie)){
+ if(!checkPhoneNum(mobile)){
return false;
}
if(code == ""){
@@ -106,22 +104,24 @@ $("#next_btn").on("click", function () {
return false;
}
}
- axios.post(BASE_PATH + "/rest/evaluate/addManagement",
- {
- id: id,
- houseStatus: houseStatus,
- liveStatus: liveStatus
- }).then(function (response) {
- var status = response.data.status;
- if(status){
- $.toast(response.data.data);
- window.location.reload();
- }else{
- $.toast(response.data.message);
- }
- }).catch(function (error) {
- console.log(error);
- });
+ if(mortgage == "1"){
+ _params = {type: 1, city: city, applyMoney: applyMoney, mortgage: mortgage, hid: houseId, mobile: mobile, smsCode: code};
+ }else{
+ _params = {type: 1, city: city, applyMoney: applyMoney, mortgage: mortgage, mobile: mobile, smsCode: code};
+ }
+ axios.post(BASE_PATH + "/rest/loan/apply", _params).then(function (response) {
+ var status = response.data.status;
+ if(status){
+ alert(response.data.data+ '===');
+ $.toast(response.data.data);
+ //直接定位到贷款success页面, 调用back()就只用返回一次
+ window.location.href = "../../views/loan/loanSuccess.html";
+ }else{
+ $.toast(response.data.message);
+ }
+ }).catch(function (error) {
+ console.log(error);
+ });
});
\ No newline at end of file
diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js
index 8eb91d9..be7f94d 100644
--- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js
+++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js
@@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{
'{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}'+
''+
'
'+
- '关注'+
- '取消'+
+ '关注'+
+ '取消'+
'
'+
''+
''+
@@ -47,14 +47,18 @@ Vue.component('city_increase_ranking',{
console.log(error)
})
},
- follow:function(city){
+ follow:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
+ $(event.target).parent().children().removeClass("dn");
+ $(event.target).addClass("dn");
}).catch(function(error){
console.log(error)
})
},
- abolish:function(city){
+ abolish:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
+ $(event.target).parent().children().removeClass("dn");
+ $(event.target).addClass("dn");
}).catch(function(error){
console.log(error)
})
diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js
index 377b2c3..0ffe245 100644
--- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js
+++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js
@@ -33,8 +33,8 @@ Vue.component('city_potential_ranking',{
''+
''+
''+
- '关注'+
- '取消'+
+ '关注'+
+ '取消'+
'
'+
''+
''+
@@ -48,7 +48,6 @@ Vue.component('city_potential_ranking',{
methods:{
loadCityPotentialRanking:function(){
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
-// alert(1)
list = response.data.data;
$(list).each(function(i){
var index = this.index;
@@ -66,14 +65,20 @@ Vue.component('city_potential_ranking',{
console.log(error)
})
},
- follow:function(city){
+ follow:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
+ $(event.target).parent().children().removeClass("dn");
+ $(event.target).addClass("dn");
+ loadCityPotentialRanking()
}).catch(function(error){
console.log(error)
})
},
- abolish:function(city){
+ abolish:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
+ $(event.target).parent().children().removeClass("dn");
+ $(event.target).addClass("dn");
+ loadCityPotentialRanking()
}).catch(function(error){
console.log(error)
})
diff --git a/fangija-zsyf/views/component/myFocusComponent.js b/fangija-zsyf/views/component/myFocusComponent.js
index cbf3222..1ecb73f 100644
--- a/fangija-zsyf/views/component/myFocusComponent.js
+++ b/fangija-zsyf/views/component/myFocusComponent.js
@@ -26,7 +26,7 @@ Vue.component('my_focus',{
'{{mf.city}}
'+
'{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.cityTopMonthAvgPrice+"元/㎡"}}
'+
''+
- '{{!mf.oneMonthUpDownRange||mf.oneMonthUpDownRange==""?"暂无":Math.abs(mf.oneMonthUpDownRange*100).toFixed(2)+"%"}}'+
+ '{{!mf.oneMonthUpDownRange||mf.oneMonthUpDownRange==""?"暂无":Math.abs(mf.oneMonthUpDownRange*100).toFixed(2)+"%"}}'+
'
'+
''+
'{{mf.rangeLevel}}'+
@@ -44,22 +44,21 @@ Vue.component('my_focus',{
},
methods:{
loadMyFocus:function(){
- if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
- $("#myFocusFirstPage").hide()
- $("#myFocus").hide();
- }else{
+// if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
+// $("#myFocusFirstPage").hide()
+// $("#myFocus").hide();
+// }else{
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
if(response.data.data.length==0){
- alert("aa");
$("#myFocusFirstPage").hide();
$("#myFocus").hide();
}else{
myFocusDatas.myFocusList = response.data.data;
}
}).catch(function(error){
- console.log(error)
+ console.log(error)
})
- }
+// }
}
},mounted:function(){
this.loadMyFocus();
diff --git a/fangija-zsyf/views/house/houseDetail.html b/fangija-zsyf/views/house/houseDetail.html
index 7b52252..a55ccdb 100644
--- a/fangija-zsyf/views/house/houseDetail.html
+++ b/fangija-zsyf/views/house/houseDetail.html
@@ -483,22 +483,89 @@ $.config = {router: false}
diff --git a/fangija-zsyf/views/loan/loanSuccess.html b/fangija-zsyf/views/loan/loanSuccess.html
index 46580c2..4e7e5d5 100644
--- a/fangija-zsyf/views/loan/loanSuccess.html
+++ b/fangija-zsyf/views/loan/loanSuccess.html
@@ -51,8 +51,18 @@ $.config = {router: false}
-
+
+
+
+
+
+
+
+
+
+
+