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 13:17:58 +08:00
8 changed files with 121 additions and 41 deletions
+17 -15
View File
@@ -489,19 +489,6 @@ $.config = {router: false}
<script>
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
var city = "";
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'
}
);
var myFocus = new Vue({
el:"#myFocus"
})
@@ -514,9 +501,24 @@ $.config = {router: false}
var cityChoose = new Vue({
el:"#cityChoose",
data:{
city:city
city:''
}
})
plus.geolocation.getCurrentPosition(function(p){
//province = p.address.province;
var cityStr = p.address.city;
if(cityStr){
cityChoose.city = cityStr.endsWith("市")?cityStr.substring(0,cityStr.length-1):cityStr;
}
//region = p.address.district;
}, function(e){
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
$(this).hide();
@@ -565,6 +567,7 @@ $.config = {router: false}
$("#input_city").val($(this).find("p").text());
$(".cityChoice a").text($(this).find("p").text());
$(".popup-about01 p").removeClass("active");
addFocus($(this).find("p").text())
});
$(".popup-about01 p").on("click", function () {
$("#input_city").val($(this).text());
@@ -704,7 +707,6 @@ function markFocus(){
function addFocus(city){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
//reloadMyFocus()
}).catch(function(error){
console.log(error)
})
+39 -4
View File
@@ -93,6 +93,30 @@
</div>
</div>
<div class="page-group" style="display: none;" id="page-group-login-temp">
<div class="page page-current">
<!-- 加载loading页 -->
<div class="loadingBg">
<div class="infinite-scroll-preloader">
<div class="preloader"></div>
</div>
</div>
<div class="content">
<div class="list-block media-list">
<!-- 动态封装部分 begin -->
<ul>
</ul>
<!-- 动态封装部分 end -->
</div>
<div class="content-block" style="display: none;">
<p><a onclick="openaddWindow()" class="button button-big button-fill theme">立即评估</a></p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
<script>
@@ -168,7 +192,6 @@ $(document).on('infinite', '.infinite-scroll-bottom', function() {
}, 1000);
});
//我的收藏查询请求
function selectHouseInfoList(){
axios.get(BASE_PATH + "/rest/index/ourHouseInfoList",
@@ -186,7 +209,7 @@ function selectHouseInfoList(){
// 上次加载的序号
lastIndex = $('.list-container li').length;
//登录状态,但没有数据
if(lastIndex == 0 && resultList.length ==0){
if(lastIndex == 0 && (resultList != null && resultList.length == 0)){
//控制显示
$('#page-group-nologin').show();
$('#page-group-login').hide();
@@ -238,12 +261,24 @@ function checkIsLogin(){
}
}
//跳转添加房产
function gotoAddHouse(){
clicked('/views/house/add.html',true,false,{},{type:0},function(){
checkIsLogin();
})
}
//跳转房产详情
function gotoHouseDetail(id){
clicked('/views/house/detail.html',true,false,{},{houseId:id},function(){
})
}
//跳转房产申请贷款
function gotoLoanApply(houseId, city){
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: ""},function(){})
}
//界面加载
$(document).ready(function () {
checkIsLogin();
@@ -285,7 +320,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
}
html += "<li><a href='#' class='item-content'>";
html += '<li onclick="gotoHouseDetail(\''+result.id+'\')"><a href="#" class="item-content">';
html += "<div class='item-inner'><div class='item-title-row'>";
html += "<div class='item-title'>"+result.name+" <em>"+tempTotalPrice+"万</em><span class='tag'><small>"+result.liveStatus+"</small></span></div>";
html += "</div><div class='item-subtitle'>";
@@ -332,7 +367,7 @@ function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xq
}else{
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>其他</a>";
}
html += "<a class='button theme add add01 add01a' href='#'>立即申请</a></li>";
html += '<a class="button theme add add01 add01a" href="#" onclick="gotoLoanApply(\''+result.id+'\', \''+result.city+'\')">立即申请</a></li>';
}
$('.infinite-scroll-bottom .list-container').append(html);
}