From 575fcc0572a7fac4b50401d7750f0b4b607f06b2 Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Thu, 12 Apr 2018 09:30:48 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E8=B4=B7=E6=AC=BEjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/js/loan/loanInfo.js | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) 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 From 89fd6814d27f622c4f83303fbeccb1200549a41f Mon Sep 17 00:00:00 2001 From: raoyanhui Date: Thu, 12 Apr 2018 09:31:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E8=B4=B7=E6=AC=BE=20=E6=88=90=E5=8A=9F=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/views/loan/loanSuccess.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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} - + + + + + + + + + + + \ No newline at end of file From 2219d23dacb105ac264fb43a2204558022a92c94 Mon Sep 17 00:00:00 2001 From: zongzhimin Date: Thu, 12 Apr 2018 09:41:10 +0800 Subject: [PATCH 3/3] YOUFANG1.1 --- .../component/cityIncreaseRankingComponent.js | 12 +- .../cityPotentialRankingComponent.js | 15 +- .../views/component/myFocusComponent.js | 15 +- fangija-zsyf/views/house/houseDetail.html | 193 +++++++++--------- 4 files changed, 124 insertions(+), 111 deletions(-) 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}