Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1

This commit is contained in:
xuhe@fangjia.com
2018-04-12 10:01:40 +08:00
6 changed files with 156 additions and 133 deletions
+21 -21
View File
@@ -1,11 +1,9 @@
/*
* 全局变量定义
*/
//短信验证类型 //短信验证类型
var APPLY_LOAN = "applyLoan"; var APPLY_LOAN = "applyLoan";
//如果是抵押贷款时候,需要上层页面传入houseId //如果是抵押贷款时候,需要上层页面传入houseId
var houseId; var houseId;
var _params = {};
document.addEventListener('plusready', onPlusReady, false); document.addEventListener('plusready', onPlusReady, false);
@@ -73,7 +71,7 @@ timer = {
/* 错误提示 */ /* 错误提示 */
$("#next_btn").on("click", function () { $("#next_btn").on("click", function () {
var city = $("#input_city").val(); var city = $("#input_city").val();
var moblie = $("#input_phoneNumber").val(); var mobile = $("#input_phoneNumber").val();
var code = $("#input_codeSms").val(); var code = $("#input_codeSms").val();
//申请金额(万元) //申请金额(万元)
var applyMoney = $("#input_price").val(); var applyMoney = $("#input_price").val();
@@ -84,7 +82,7 @@ $("#next_btn").on("click", function () {
$.toast("请选择城市"); $.toast("请选择城市");
return false; return false;
} }
if(!checkPhoneNum(moblie)){ if(!checkPhoneNum(mobile)){
return false; return false;
} }
if(code == ""){ if(code == ""){
@@ -106,22 +104,24 @@ $("#next_btn").on("click", function () {
return false; return false;
} }
} }
axios.post(BASE_PATH + "/rest/evaluate/addManagement", if(mortgage == "1"){
{ _params = {type: 1, city: city, applyMoney: applyMoney, mortgage: mortgage, hid: houseId, mobile: mobile, smsCode: code};
id: id, }else{
houseStatus: houseStatus, _params = {type: 1, city: city, applyMoney: applyMoney, mortgage: mortgage, mobile: mobile, smsCode: code};
liveStatus: liveStatus }
}).then(function (response) { axios.post(BASE_PATH + "/rest/loan/apply", _params).then(function (response) {
var status = response.data.status; var status = response.data.status;
if(status){ if(status){
$.toast(response.data.data); alert(response.data.data+ '===');
window.location.reload(); $.toast(response.data.data);
}else{ //直接定位到贷款success页面, 调用back()就只用返回一次
$.toast(response.data.message); window.location.href = "../../views/loan/loanSuccess.html";
} }else{
}).catch(function (error) { $.toast(response.data.message);
console.log(error); }
}); }).catch(function (error) {
console.log(error);
});
}); });
@@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?&quot;icon-arrow-red&quot;:&quot;&quot;,ci.oneMonthUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></i></em>'+ '<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?&quot;icon-arrow-red&quot;:&quot;&quot;,ci.oneMonthUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></i></em>'+
'</div>'+ '</div>'+
'<div class="col-20">'+ '<div class="col-20">'+
'<i class="button theme collection collection01" v-on:click="follow(ci.city)">关注</i>'+ '<i class="button theme collection collection01" v-on:click="follow(ci.city,$event)">关注</i>'+
'<i class="button collection collection02 dn" v-on:click="abolish(ci.city)">取消</i>'+ '<i class="button collection collection02 dn" v-on:click="abolish(ci.city,$event)">取消</i>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
@@ -47,14 +47,18 @@ Vue.component('city_increase_ranking',{
console.log(error) console.log(error)
}) })
}, },
follow:function(city){ follow:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
}, },
abolish:function(city){ abolish:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -33,8 +33,8 @@ Vue.component('city_potential_ranking',{
'</span>'+ '</span>'+
'</div>'+ '</div>'+
'<div class="col-20">'+ '<div class="col-20">'+
'<i class="button theme collection collection01" v-on:click="follow(cp.city)">关注</i>'+ '<i class="button theme collection collection01" v-on:click="follow(cp.city,$event)">关注</i>'+
'<i class="button collection collection02 dn" v-on:click="abolish(cp.city)">取消</i>'+ '<i class="button collection collection02 dn" v-on:click="abolish(cp.city,$event)">取消</i>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
@@ -48,7 +48,6 @@ Vue.component('city_potential_ranking',{
methods:{ methods:{
loadCityPotentialRanking:function(){ loadCityPotentialRanking:function(){
axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){ axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){
// alert(1)
list = response.data.data; list = response.data.data;
$(list).each(function(i){ $(list).each(function(i){
var index = this.index; var index = this.index;
@@ -66,14 +65,20 @@ Vue.component('city_potential_ranking',{
console.log(error) console.log(error)
}) })
}, },
follow:function(city){ follow:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ 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){ }).catch(function(error){
console.log(error) console.log(error)
}) })
}, },
abolish:function(city){ abolish:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ 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){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -26,7 +26,7 @@ Vue.component('my_focus',{
'<div class="col-20">{{mf.city}}</div>'+ '<div class="col-20">{{mf.city}}</div>'+
'<div class="col-25">{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.cityTopMonthAvgPrice+"元/㎡"}}</div>'+ '<div class="col-25">{{!mf.cityTopMonthAvgPrice||mf.cityTopMonthAvgPrice==""?"暂无":""+mf.cityTopMonthAvgPrice+"元/㎡"}}</div>'+
'<div class="col-25">'+ '<div class="col-25">'+
'<em class="up">{{!mf.oneMonthUpDownRange||mf.oneMonthUpDownRange==""?"暂无":Math.abs(mf.oneMonthUpDownRange*100).toFixed(2)+"%"}}<i class="icon" v-bind:class="[mf.oneMonthUpDownRange>0?&quot;icon-arrow-red&quot;:&quot;&quot;,cp.oneYearUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></i></em>'+ '<em class="up">{{!mf.oneMonthUpDownRange||mf.oneMonthUpDownRange==""?"暂无":Math.abs(mf.oneMonthUpDownRange*100).toFixed(2)+"%"}}<i class="icon" v-bind:class="[mf.oneMonthUpDownRange>0?&quot;icon-arrow-red&quot;:&quot;&quot;,mf.oneMonthUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></i></em>'+
'</div>'+ '</div>'+
'<div class="col-20">'+ '<div class="col-20">'+
'<em>{{mf.rangeLevel}}</em>'+ '<em>{{mf.rangeLevel}}</em>'+
@@ -44,22 +44,21 @@ Vue.component('my_focus',{
}, },
methods:{ methods:{
loadMyFocus:function(){ loadMyFocus:function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ // if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
$("#myFocusFirstPage").hide() // $("#myFocusFirstPage").hide()
$("#myFocus").hide(); // $("#myFocus").hide();
}else{ // }else{
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){ axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
if(response.data.data.length==0){ if(response.data.data.length==0){
alert("aa");
$("#myFocusFirstPage").hide(); $("#myFocusFirstPage").hide();
$("#myFocus").hide(); $("#myFocus").hide();
}else{ }else{
myFocusDatas.myFocusList = response.data.data; myFocusDatas.myFocusList = response.data.data;
} }
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
} // }
} }
},mounted:function(){ },mounted:function(){
this.loadMyFocus(); this.loadMyFocus();
+99 -94
View File
@@ -483,22 +483,89 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/log/log_stat.js" ></script> <script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script type="text/javascript" src="../component/cityChooseComponent.js"></script> <script type="text/javascript" src="../component/cityChooseComponent.js"></script>
<script> <script>
var city = "上海1"; document.addEventListener('plusready', onPlusReady, false);
var myFocus = new Vue({ function onPlusReady(){
el:"#myFocus" var city = "";
}) getPosition();
var cityIncreaseRanking = new Vue({ var myFocus = new Vue({
el:"#cityIncreaseRanking" el:"#myFocus"
}) })
var cityPotentialRanking = new Vue({ var cityIncreaseRanking = new Vue({
el:"#cityPotentialRanking" el:"#cityIncreaseRanking"
}) })
var cityChoose = new Vue({ var cityPotentialRanking = new Vue({
el:"#cityChoose", el:"#cityPotentialRanking"
data:{ })
city:city var cityChoose = new Vue({
} el:"#cityChoose",
}) data:{
city:city
}
})
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
$(this).hide();
$(this).next().show();
$.toast("已关注");
});
$(".collection02").on("click", function () {
$(this).hide();
$(this).prev().show();
$.toast("取消关注");
});
/* button状态切换 */
$(".content-block .button").on("click", function () {
$(this).parent().children().removeClass("active");
$(this).addClass("active");
});
/* 图表切换 */
$("#tabAvg").on("click", function () {
$("#tabChart1").css("z-index","1");
$("#tabChart2").css("z-index","-1");
});
$("#tabRent").on("click", function () {
$("#tabChart2").css("z-index","1");
$("#tabChart1").css("z-index","-1");
});
/* 弹出城市选择页面 */
$(document).on("click",".open-about01", function () {
markFocus();
$.popup(".popup-about01");
});
/* 定位城市 */
$("body").on("click", ".letter a", function () {
var s = $(this).html();
$(".popup-about01 .content").scrollTop(0);
$(".popup-about01 .content").scrollTop($("#" + s + "1").offset().top - 106);
});
$("#tabCity1 .content-block01").scroll(function () {
$("#tabCity1 .content-block01 .letter").css("position","absolute");
$("#tabCity1 .content-block01 .letter").css("top", 85 - $("#cityContainer").position().top);
});
/* 获取城市 */
$(".popup-about01 .cityGPS").on("click", function () {
$("#input_city").val($(this).find("p").text());
$(".cityChoice a").text($(this).find("p").text());
$(".popup-about01 p").removeClass("active");
});
$(".popup-about01 p").on("click", function () {
$("#input_city").val($(this).text());
$(".cityChoice a").text($(this).text());
$(".popup-about01 p").removeClass("active");
$(this).addClass("active");
var city = $(this).text()
addFocus(city)
});
/* 点击热门小区跳转到小区详情页 */
$(".cardNearby").on("click", function(){
window.location.href = "01_index04_districtDetail.html";
});
}
//加载首页全国数据 //加载首页全国数据
$(function() { $(function() {
var date=new Date; var date=new Date;
@@ -568,38 +635,8 @@ $(document).ready(function () {
}*/ }*/
}); });
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
$(this).hide();
$(this).next().show();
$.toast("已关注");
});
$(".collection02").on("click", function () {
$(this).hide();
$(this).prev().show();
$.toast("取消关注");
});
/* button状态切换 */
$(".content-block .button").on("click", function () {
$(this).parent().children().removeClass("active");
$(this).addClass("active");
});
/* 图表切换 */
$("#tabAvg").on("click", function () {
$("#tabChart1").css("z-index","1");
$("#tabChart2").css("z-index","-1");
});
$("#tabRent").on("click", function () {
$("#tabChart2").css("z-index","1");
$("#tabChart1").css("z-index","-1");
});
/* 点击热门小区跳转到小区详情页 */
$(".cardNearby").on("click", function(){
window.location.href = "01_index04_districtDetail.html";
});
/* 获取热门小区名称字数,截取热门小区名称前5字,并添加... */ /* 获取热门小区名称字数,截取热门小区名称前5字,并添加... */
$(document).ready(function () { $(document).ready(function () {
@@ -614,37 +651,24 @@ $(document).ready(function () {
}); });
}); });
/* 弹出城市选择页面 */
$(document).on("click",".open-about01", function () {
markFocus();
$.popup(".popup-about01");
});
/* 定位城市 */
$("body").on("click", ".letter a", function () {
var s = $(this).html();
$(".popup-about01 .content").scrollTop(0);
$(".popup-about01 .content").scrollTop($("#" + s + "1").offset().top - 106);
});
$("#tabCity1 .content-block01").scroll(function () {
$("#tabCity1 .content-block01 .letter").css("position","absolute");
$("#tabCity1 .content-block01 .letter").css("top", 85 - $("#cityContainer").position().top);
});
/* 获取城市 */
$(".popup-about01 .cityGPS").on("click", function () {
$("#input_city").val($(this).find("p").text());
$(".cityChoice a").text($(this).find("p").text());
$(".popup-about01 p").removeClass("active");
});
$(".popup-about01 p").on("click", function () {
$("#input_city").val($(this).text());
$(".cityChoice a").text($(this).text());
$(".popup-about01 p").removeClass("active");
$(this).addClass("active");
var city = $(this).text()
addFocus(city)
});
function getPosition(){
plus.geolocation.getCurrentPosition(function(p){
province = p.address.province;
city = p.address.city;
region = p.address.district;
}, function(e){
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
}
//$(document).on("click",".open-about01", function () { //$(document).on("click",".open-about01", function () {
// markFocus(); // markFocus();
// $.popup(".popup-about01"); // $.popup(".popup-about01");
@@ -690,25 +714,6 @@ function addFocus(city){
}) })
} }
//重新加载我的关注
function reloadMyFocus(){
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)
})
}
}
</script> </script>
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script> <script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>
+11 -1
View File
@@ -51,8 +51,18 @@ $.config = {router: false}
</script> </script>
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script> <script type="text/javascript" src="../../js/beacon_release.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/vue.js"></script>
<script type="text/javascript" src="../../js/light7-2.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script> <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/common.js' charset='utf-8'></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/shara/sharaMine.js" ></script>
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script type="text/javascript" src="../../js/loan/loanInfo.js" ></script>
</body> </body>
</html> </html>