Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -738,7 +738,7 @@ input::-webkit-input-placeholder{
|
||||
.topic .topicContent .topicContent_bottom p em{color:#F18D00;font-size:0.8rem;}
|
||||
.topic .topicContent .topicContent_bottom p a{float:right;color:#333;}
|
||||
.topic .topicContent .topicContent_bottom font{width:100%;height:16px;background:#eee;border-radius:50px;display:block;margin-top:-10px;}
|
||||
.topic .topicContent .topicContent_bottom font i{display:block;height:16px;background:#45b9fc;border:solid 3px #eee;border-radius:50px;}
|
||||
.topic .topicContent .topicContent_bottom font i{display:block;height:10px;background:#F18D00;border:solid 1px #e7e7e7;border-radius:50px;}
|
||||
.topic .topicContent .topicContent_bottom .rankingNote{overflow:hidden;display:block;height:26px;}
|
||||
.topic .topicContent .topicContent_bottom .rankingNote span{font-size:0.65rem;line-height:26px;color:#999;}
|
||||
.topic .topicContent .topicContent_bottom .rankingNote span.rankingNoteLeft{float:left;}
|
||||
|
||||
@@ -70,27 +70,33 @@ $("#login_btn").on("click", function () {
|
||||
$.toast("请同意服务协议");
|
||||
return false;
|
||||
}
|
||||
axios.post("/rest/user/smsLogin", {mobile: phoneNum,smsCode:code})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
// 用户登录成功的TOKEN
|
||||
var data = resData.data;
|
||||
localStorage.setItem("user_token", data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
$.toast(resData.message);
|
||||
if (data.firstLogin) {
|
||||
// 显示设置密码页面
|
||||
clicked('../user/updatePass.html',true,false,{},{},function(){
|
||||
back();
|
||||
})
|
||||
} else {
|
||||
back();
|
||||
}
|
||||
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
})
|
||||
plus.nativeUI.showWaiting();
|
||||
axios.post("/rest/user/smsLogin",
|
||||
{mobile: phoneNum,smsCode:code,province:province,city:city,region:region,pushClientId:getPushInfo(),deviceId:plus.device.uuid}
|
||||
).then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
// 用户登录成功的TOKEN
|
||||
var data = resData.data;
|
||||
localStorage.setItem("user_token", data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
$.toast(resData.message);
|
||||
if (data.firstLogin) {
|
||||
// 显示设置密码页面
|
||||
clicked('../user/updatePass.html',true,false,{},{},function(){
|
||||
back();
|
||||
})
|
||||
} else {
|
||||
back();
|
||||
}
|
||||
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
plus.nativeUI.closeWaiting();
|
||||
}).catch(function (error) {
|
||||
$.toast(error);
|
||||
plus.nativeUI.closeWaiting();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -72,7 +72,28 @@ function userinfo(a){
|
||||
});
|
||||
}
|
||||
|
||||
function utf16toEntities(str) {
|
||||
var patt = /[\ud800-\udbff][\udc00-\udfff]/g; // 检测utf16字符正则
|
||||
str = str.replace(patt, function(char) {
|
||||
var H, L, code;
|
||||
if (char.length === 2) {
|
||||
H = char.charCodeAt(0);
|
||||
// 取出高位
|
||||
L = char.charCodeAt(1);
|
||||
// 取出低位
|
||||
code = (H - 0xD800) * 0x400 + 0x10000 + L - 0xDC00;
|
||||
//转换算法
|
||||
return "&#" + code + ";";
|
||||
} else {
|
||||
return char;
|
||||
}
|
||||
});
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
function login(openid, unionid, accessToken, nickname, headImg, loginFrom, uri) {
|
||||
nickname = utf16toEntities(nickname)
|
||||
axios.post(uri, {loginFrom:loginFrom,openid:openid, unionid:unionid, accessToken: accessToken, nickname:nickname,headImg:headImg})
|
||||
.then(function (response) {
|
||||
$.hidePreloader();
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
var mc_uid = "162167854504869888";
|
||||
// 加载flag
|
||||
var mc_loading = false;
|
||||
//空置第一次显示
|
||||
var mc_yesterDayDeployFlag = true;
|
||||
|
||||
//分页部分参数定义
|
||||
var mc_page;
|
||||
var mc_pageSize;
|
||||
@@ -85,7 +82,7 @@ function selectNewsCollectList(){
|
||||
mc_totalPages = response.data.data.totalPages;
|
||||
mc_totalRecords = response.data.data.totalRecords;
|
||||
tab.mc_num = mc_totalRecords;
|
||||
addItems(mc_itemsPerLoad, mc_lastIndex, dataObj);
|
||||
mcAddItems(mc_itemsPerLoad, mc_lastIndex, dataObj);
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
@@ -117,13 +114,9 @@ function openNewsView(newId) {
|
||||
}
|
||||
|
||||
/* 分页构造数据 */
|
||||
function addItems(itemsPerLoad, lastIndex, dataObj) {
|
||||
function mcAddItems(itemsPerLoad, lastIndex, dataObj) {
|
||||
var html = '';
|
||||
for(var i in dataObj) {
|
||||
/*if(dataObj[i].yesterDayDeploy && yesterDayDeployFlag) {
|
||||
yesterDayDeployFlag = false;
|
||||
html += '<div class="content-block-title recommend" style="border-top:solid 0.5rem #f3f3f3;">历史推荐</div>';
|
||||
}*/
|
||||
if(dataObj[i].type == "专题") {
|
||||
html += '<div class="card cardInfo cardInfo01" onclick="openNewsView(\'' + dataObj[i].id + '\')">' +
|
||||
'<div class="card-header">' + dataObj[i].title + '</div>' +
|
||||
|
||||
@@ -12,7 +12,7 @@ var mf_curpage = 1;
|
||||
var mf_totalCount = 0;
|
||||
function addEstate(number, lastIndex) {
|
||||
mf_curpage = mf_lastIndex/mf_itemsPerLoad + 1;
|
||||
axios.get("/myCollection/loadCollections",{params:{pageSize:mf_itemsPerLoad,page:mf_curpage}}).then(function(response){
|
||||
axios.get("/rest/myCollection/loadCollections",{params:{pageSize:mf_itemsPerLoad,page:mf_curpage}}).then(function(response){
|
||||
data = response.data;
|
||||
//data = eval( '(' + data + ')' );
|
||||
if(data['results']==null || data['results'].length==0) {
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
var mh_uid = "162167854504869888";
|
||||
// 加载flag
|
||||
var mh_loading = false;
|
||||
|
||||
//分页部分参数定义
|
||||
var mh_page;
|
||||
var mh_pageSize;
|
||||
var mh_totalPages;
|
||||
var mh_totalRecords;
|
||||
|
||||
// 上次加载的序号
|
||||
var mh_lastIndex;
|
||||
// 每次加载添加多少条目
|
||||
var mh_itemsPerLoad;
|
||||
// 最多可加载的条目
|
||||
var mh_maxItems = 100;
|
||||
|
||||
//初始化init
|
||||
$.init();
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
/*$(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
// 如果正在加载,则退出
|
||||
if(loading) return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(page >= totalPages) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
page = page + 1;
|
||||
selectHouseInfoList();
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
//$.refreshScroller();
|
||||
}, 1000);
|
||||
});*/
|
||||
|
||||
//我的收藏查询请求
|
||||
function selectHouseInfoList(){
|
||||
axios.get(BASE_PATH + "/rest/index/ourHouseInfoList",
|
||||
{
|
||||
params: {
|
||||
uid: mh_uid,
|
||||
page: mh_page,
|
||||
pageSize: mh_pageSize
|
||||
}
|
||||
}).then(function (response) {
|
||||
var resultsMap = response.data.data;
|
||||
var resultList = resultsMap.houseInfoPageList.list;
|
||||
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
|
||||
var xqPotentialIndexMap = resultsMap.xqPotentialIndexMap;
|
||||
var houseInfoTotalMap = resultsMap.houseInfoTotalMap;
|
||||
if(resultList != null && resultList.length == 0){
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
//$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
return;
|
||||
}
|
||||
if(resultsMap.houseInfoPageList.currentPage == resultsMap.houseInfoPageList.totalPages){
|
||||
//如果此次查询刚好是page = totalPages
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
//$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
}
|
||||
//封装list数据
|
||||
var dataObj = [];
|
||||
for(var i in resultList){
|
||||
dataObj.push(resultList[i])
|
||||
}
|
||||
// 上次加载的序号
|
||||
mh_lastIndex = $('.cardInfo').length;
|
||||
//每次加载添加多少条目
|
||||
mh_itemsPerLoad = resultList.length;
|
||||
//请求后对page进行赋值
|
||||
mh_page = resultsMap.houseInfoPageList.currentPage;
|
||||
mh_pageSize = resultsMap.houseInfoPageList.limit;
|
||||
mh_totalPages = resultsMap.houseInfoPageList.totalPages;
|
||||
mh_totalRecords = resultsMap.houseInfoPageList.totalRecords;
|
||||
tab.mh_num = mh_totalRecords;
|
||||
mhAddItems(mh_itemsPerLoad, mh_lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap);
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//界面加载
|
||||
$(document).ready(function () {
|
||||
selectHouseInfoList();
|
||||
});
|
||||
|
||||
/* 分页构造数据 */
|
||||
function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap) {
|
||||
var html = '';
|
||||
for(var i in dataObj) {
|
||||
var result = dataObj[i];
|
||||
var tempTotalPrice = result.totalPrice;
|
||||
//可抵押贷额度
|
||||
var tempTotalPricePercent;
|
||||
//考虑是否为数字,加强逻辑判断
|
||||
if(!isNaN(tempTotalPrice)){
|
||||
//转换成元,四舍五入
|
||||
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
||||
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
||||
}
|
||||
html += "<li><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'>";
|
||||
|
||||
//对应城市地区小区30天涨跌幅
|
||||
var xqOneMonthUpDownRangeKey = result.city+"-"+result.region +"-"+result.name;
|
||||
var xqOneMonthUpDownRangeValue = xqOneMonthUpDownRangeMap[xqOneMonthUpDownRangeKey];
|
||||
if(!isNaN(xqOneMonthUpDownRangeValue)){
|
||||
//涨跌幅大于零
|
||||
if(parseFloat(xqOneMonthUpDownRangeValue)>=0){
|
||||
html += "<div>近30天涨跌幅: <em class='up'>"+xqOneMonthUpDownRangeValue+"%<i class='icon icon-arrow-red'></i></em></div>";
|
||||
}else{
|
||||
html += "<div>近30天涨跌幅: <em class='down'>"+Math.abs(xqOneMonthUpDownRangeValue)+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>近30天涨跌幅: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
|
||||
//下跌概率
|
||||
var xqPotentialIndexValue = xqPotentialIndexMap[xqOneMonthUpDownRangeKey];
|
||||
if(!isNaN(xqPotentialIndexValue)){
|
||||
//涨跌幅大于零
|
||||
if(parseInt(xqPotentialIndexValue)>=50){
|
||||
html += "<div>下跌概率: <em class='up'>"+xqPotentialIndexValue+"%<i class='icon icon-arrow-red'></i></em></div>";
|
||||
}else{
|
||||
html += "<div>下跌概率: <em class='down'>"+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>下跌概率: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
|
||||
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"万</em></div></div></div></a>";
|
||||
|
||||
if(result.level!=null && result.level == 1){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>豪宅级</a>";
|
||||
}else if(result.level!=null && result.level == 2){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>公寓级</a>";
|
||||
}else if(result.level!=null && result.level == 3){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>平房级</a>";
|
||||
}else if(result.level!=null && result.level == 4){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>草屋级</a>";
|
||||
}else if(result.level!=null && result.level == 5){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>山洞级</a>";
|
||||
}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>";
|
||||
}
|
||||
$('#myhouse').append(html);
|
||||
}
|
||||
|
||||
/* 说明-房产等级 */
|
||||
$(document).on('click','.alert-text-title', function () {
|
||||
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
||||
});
|
||||
@@ -92,7 +92,7 @@ $.init()
|
||||
$(document).on('click','.open-vertical-modal', function () {
|
||||
//获取对应<li>栏目存储的houseinfo id
|
||||
var id = $(this).attr("id");
|
||||
var houseStatus = $(this).attr("houseStatus");
|
||||
var houseStatus = 0;
|
||||
$.modal({
|
||||
title: '房产用途',
|
||||
verticalButtons: true,
|
||||
|
||||
@@ -1575,14 +1575,20 @@ function addEvaluation(){
|
||||
address:$("input[name=address]").val(),
|
||||
estateType:$("#input_houseType").val(),
|
||||
loudongName:$("#input_building").val(),
|
||||
floorName:$("input[name=floorName]").val(),
|
||||
floors:$("#input_floor").val(),
|
||||
floorName:$("#input_floor").val(),
|
||||
area:$("#input_area").val()
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data!=null && response.data.data.success){
|
||||
alert("添加成功!");
|
||||
var id = response.data.data.id;
|
||||
mui.openWindow({
|
||||
url: 'detail.html',
|
||||
id:'detail.html',
|
||||
extras:{
|
||||
id:id
|
||||
}
|
||||
});
|
||||
}else{
|
||||
$.toast(response.data.message);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>龙盛佳苑</title>
|
||||
<title></title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
@@ -28,6 +28,7 @@
|
||||
.cardPrice01 .card-footer span label{display:inline-block;}
|
||||
.cardPrice01 .card-footer span em{display:inline-block;color:#F18D00;}
|
||||
.cardPrice01 .card-footer span em strong{font-size:0.8rem;}
|
||||
.list-block .item-title small label{color: #999;font-size: 0.7rem;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -35,12 +36,12 @@
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<div class="page page-current" id="baseInfo">
|
||||
<header class="bar bar-nav barBorder">
|
||||
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
|
||||
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">龙盛佳苑</h1>
|
||||
<h1 class="title">{{name}}</h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="list-block media-list topList">
|
||||
@@ -49,29 +50,29 @@
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><b>龙盛佳苑</b><span class="span01">上海-静安</span></div>
|
||||
<div class="item-title"><b>{{name}}</b><span class="span01">{{cityRegion}}</span></div>
|
||||
</div>
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><small>2室1厅 60m 1/6层</small></div>
|
||||
<div class="item-title"><small><label v-if="roomCount > 0">{{roomCount}}室</label><label v-if="hallCount > 0">{{hallCount}}厅</label> {{area}}m <label v-if="floor > 0 && height">{{floor}}/{{height}}层</label></small></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="add add01 button theme open-vertical-modal">自住</a>
|
||||
<a class="add add01 button theme open-vertical-modal" v-bind="{ id: id}">{{liveStatus}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card cardPrice cardPrice01">
|
||||
<div class="card-header">
|
||||
<span>房屋估价</span>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>{{estatetype}}</a>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner">391<span>万</span></div>
|
||||
<div class="card-content-inner">{{Math.round(totalPrice/10000)}}<span>万</span></div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span>
|
||||
<label>单价:</label>
|
||||
<em><strong>65079</strong>元/㎡</em>
|
||||
<em><strong>{{price}}</strong>元/㎡</em>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,38 +98,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic rentBox dn">
|
||||
<div class="topicContent" style="padding:0.5rem 0;">
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">目前状态</div>
|
||||
<div class="item-after">出租</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">出租日期</div>
|
||||
<div class="item-after">2018/02/01 - 2018/07/31</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">每期租金</div>
|
||||
<div class="item-after">5,000元 (1月/次)</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">下次收租</div>
|
||||
<div class="item-after">3月1日</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div class="topicContent" style="padding:0.5rem 0;">
|
||||
<div class="list-block">
|
||||
@@ -136,13 +105,58 @@
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">市场交易活跃度</div>
|
||||
<div class="item-after">较差</div>
|
||||
<div class="item-after" v-if="totalScore <=26">
|
||||
很差
|
||||
</div>
|
||||
<div class="item-after" v-else-if="totalScore>26 && totalScore <=38">
|
||||
较差
|
||||
</div>
|
||||
<div class="item-after" v-else-if="totalScore>38 && totalScore <=70">
|
||||
良好
|
||||
</div>
|
||||
<div class="item-after" v-else>
|
||||
很好
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title" style="color:#666;">小区潜力指数</div>
|
||||
<div class="item-after"><span class="star"><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i></span></div>
|
||||
<div class="item-after">
|
||||
<span class="star" v-if="index <=4">
|
||||
<i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=5 && index<15">
|
||||
<i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=15 && index<25">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=25 && index<35">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=35 && index<45">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=45 && index<55">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=55 && index<65">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=65 && index<75">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=75 && index<85">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star"></i>
|
||||
</span>
|
||||
<span class="star" v-else-if="index >=85 && index<95">
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star02"></i>
|
||||
</span>
|
||||
<span class="star" v-else>
|
||||
<i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i><i class="icon icon-star01"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -151,20 +165,20 @@
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div class="topicContent">
|
||||
<div class="topicTitle01">龙盛佳苑在上海市:</div>
|
||||
<div class="topicTitle01">{{name}}在{{city}}市:</div>
|
||||
<div class="topicContent_bottom" style="border-bottom:solid 1px #e7e7e7;padding-bottom:0.5rem;">
|
||||
<p style="margin-bottom:20px;">涨幅(近12个月)超过了<em>69.7%</em>的住宅</p>
|
||||
<font><i style="width:69.7%;"></i></font>
|
||||
<p style="margin-bottom:20px;">涨幅(近12个月)超过了<em>{{roseRanking}}%</em>的住宅</p>
|
||||
<font><i :style="{width:roseRanking+'%'}"></i></font>
|
||||
<small class="rankingNote"><span class="rankingNoteLeft" style="line-height:17px;margin-top:7px;">0%</span><span class="rankingNoteRight" style="line-height:17px;margin-top:7px;text-align:right;">100%</span></small>
|
||||
</div>
|
||||
<div class="topicContent_bottom">
|
||||
<p>均价超过了<em>64.14%</em>的住宅</p>
|
||||
<div class="slider_note" style="left:50.14%;">
|
||||
<p>均价超过了<em>{{avgpriceRanking}}%</em>的住宅</p>
|
||||
<div class="slider_note" :style="{left:priceRateContent+'%'}">
|
||||
<img src="../../images/arrow_note_down.png">
|
||||
<span>65,241元/㎡</span>
|
||||
<span>{{price}}元/㎡</span>
|
||||
</div>
|
||||
<font><i style="width:64.14%;"></i></font>
|
||||
<small class="rankingNote" style="height:45px;"><span class="rankingNoteLeft" style="line-height:17px;margin-top:7px;">相对最低<br>9,290元/㎡</span><span class="rankingNoteRight" style="line-height:17px;margin-top:7px;text-align:right;">相对最高<br>194,953元/㎡</span></small>
|
||||
<font><i :style="{width:rate+'%'}"></i></font>
|
||||
<small class="rankingNote" style="height:45px;"><span class="rankingNoteLeft" style="line-height:17px;margin-top:7px;">相对最低<br>{{minSellPrice}}元/㎡</span><span class="rankingNoteRight" style="line-height:17px;margin-top:7px;text-align:right;">相对最高<br>{{maxSellPrice}}元/㎡</span></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,33 +214,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div class="topic" v-show="rentRooms.length>0">
|
||||
<div class="topicTitle" style="border-bottom:solid 1px #e7e7e7;">小区本月租金</div>
|
||||
<div class="topicContent" style="padding:0.5rem 0;">
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<li class="item-content">
|
||||
<li class="item-content" v-for="rentRoom in rentRooms">
|
||||
<div class="item-inner">
|
||||
<div class="item-title">一居室</div>
|
||||
<div class="item-after">1729-3228 元/月</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title">二居室</div>
|
||||
<div class="item-after">2355-3974 元/月</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title">三居室</div>
|
||||
<div class="item-after">2772-4990 元/月</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title">四居室</div>
|
||||
<div class="item-after">3987-6449 元/月</div>
|
||||
<div class="item-title">{{rentRoom.houseType}}居室</div>
|
||||
<div class="item-after">{{Math.round(rentRoom.avgPrice*0.75)}}-{{Math.round(rentRoom.avgPrice*1.4)}} 元/月</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -276,25 +272,98 @@ Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.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/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
<script>
|
||||
|
||||
var id = "189809200048635904";
|
||||
/* 获取title字数,截取title前12字,并添加... */
|
||||
$(document).ready(function () {
|
||||
var text = $("header .title").text();
|
||||
var length = $("header .title").text().length;
|
||||
var textStr = "";
|
||||
if(length > 12){
|
||||
textStr = text.substr(0,12);
|
||||
$("header .title").text(textStr + "...");
|
||||
}
|
||||
axios.get("/rest/index/resultDetail", {
|
||||
params: {
|
||||
houseId: id
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data.data);
|
||||
if(response.data.data){
|
||||
var houseInfo = response.data.data.houseInfo;
|
||||
var text = houseInfo.name;
|
||||
var length = text.length;
|
||||
var textStr = "";
|
||||
if(length > 12){
|
||||
textStr = text.substr(0,12);
|
||||
$("header .title").text(textStr + "...");
|
||||
}
|
||||
var index = 0;
|
||||
if(response.data.data.index){
|
||||
index = response.data.data.index;
|
||||
}
|
||||
|
||||
var priceRate = houseInfo.avgpriceRanking;
|
||||
var priceRateContent = 0;
|
||||
if(priceRate<14){
|
||||
priceRateContent = 0;
|
||||
}else if(priceRate > 85){
|
||||
priceRateContent = 80;
|
||||
}else{
|
||||
priceRateContent = priceRate - 14;
|
||||
}
|
||||
var rate = 0;
|
||||
if(priceRate<3){
|
||||
rate = 3;
|
||||
}else{
|
||||
rate = priceRate;
|
||||
}
|
||||
var rentRooms=[];
|
||||
if(response.data.data.rentRooms){
|
||||
rentRooms = response.data.data.rentRooms;
|
||||
}
|
||||
var baseInfo = new Vue({
|
||||
el: '#baseInfo',
|
||||
data: {
|
||||
id:houseInfo.id,
|
||||
city : houseInfo.city,
|
||||
name : houseInfo.name,
|
||||
cityRegion:houseInfo.city+"-"+houseInfo.region,
|
||||
roomCount: houseInfo.roomCount,
|
||||
hallCount: houseInfo.hallCount,
|
||||
area: houseInfo.area,
|
||||
floor: houseInfo.floor,
|
||||
height: houseInfo.height,
|
||||
liveStatus:houseInfo.liveStatus,
|
||||
estatetype:houseInfo.estatetype,
|
||||
totalPrice:houseInfo.totalPrice,
|
||||
price:houseInfo.price,
|
||||
totalScore:houseInfo.totalScore,
|
||||
index:index,
|
||||
roseRanking:houseInfo.roseRanking,
|
||||
avgpriceRanking:houseInfo.avgpriceRanking,
|
||||
priceRateContent:priceRateContent,
|
||||
rate:rate,
|
||||
minSellPrice:houseInfo.minSellPrice,
|
||||
maxSellPrice:houseInfo.maxSellPrice,
|
||||
rentRooms:rentRooms
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
|
||||
/* 房产用途 */
|
||||
$(document).on('click','.open-vertical-modal', function () {
|
||||
//获取对应<li>栏目存储的houseinfo id
|
||||
var id = $(this).attr("id");
|
||||
var houseStatus = 0;
|
||||
$.modal({
|
||||
title: '房产用途',
|
||||
verticalButtons: true,
|
||||
@@ -303,21 +372,21 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
text: '自住',
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('自住');
|
||||
$('.rentBox').hide();
|
||||
addManagement(id, houseStatus, "自住");
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '出租',
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('出租');
|
||||
$('.rentBox').show();
|
||||
addManagement(id, houseStatus, "出租");
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '空置',
|
||||
onClick: function() {
|
||||
$('.open-vertical-modal').text('空置');
|
||||
$('.rentBox').hide();
|
||||
addManagement(id, houseStatus, "空置");
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -326,7 +395,25 @@ $(document).on('click','.open-vertical-modal', function () {
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
//添加管理AJAX请求
|
||||
function addManagement(id, houseStatus, liveStatus){
|
||||
axios.post("/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);
|
||||
});
|
||||
}
|
||||
/* 说明-房产等级 */
|
||||
$(document).on('click','.alert-text-title', function () {
|
||||
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
||||
|
||||
@@ -37,82 +37,39 @@
|
||||
</button>
|
||||
<h1 class="title">我的房产</h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="card cardPrice cardPrice01">
|
||||
<div class="content infinite-scroll infinite-scroll-bottom">
|
||||
<div class="card cardPrice cardPrice01" id="houseInfo">
|
||||
<div class="card-header">
|
||||
<span>房产总值</span>
|
||||
<a class="button theme" href="#">添加房产</a>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-content-inner">5000<span>万</span></div>
|
||||
<div class="card-content-inner">{{totalPrice}}<span>万</span></div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span>
|
||||
<em><strong>11.84</strong>%<i class="icon icon-arrow-red"></i></em>
|
||||
<em><strong>{{oneYearUpDownRange}}</strong>%<i id ="oneYearUpDownRange" class="icon icon-arrow-red"></i></em>
|
||||
<label>近1年涨跌幅</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>41.45</strong>万<i class="icon icon-arrow-red"></i></em>
|
||||
<em><strong>{{oneYearUpDownPrice}}</strong>万<i id="oneYearUpDownPrice" class="icon icon-arrow-red"></i></em>
|
||||
<label>近1年升值额</label>
|
||||
</span>
|
||||
<span>
|
||||
<em><strong>12</strong><i class="icon icon-arrow-red"></i></em>
|
||||
<em><strong>待定</strong><i class="icon icon-arrow-red"></i></em>
|
||||
<label>资产排名</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-block media-list">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">龙盛佳苑 <em>391万</em><span class="tag"><small>空置</small></span></div>
|
||||
</div>
|
||||
<div class="item-subtitle">
|
||||
<div>近30天涨跌幅: <em class="down">3.37%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>下跌概率: <em class="down">12%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>抵押可贷额度: <em style="color:#EB5F34;">391万</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="button theme add add01 add01a" href="#">立即申请</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">龙盛佳苑 <em>391万</em><span class="tag"><small>空置</small></span></div>
|
||||
</div>
|
||||
<div class="item-subtitle">
|
||||
<div>近30天涨跌幅: <em class="down">3.37%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>下跌概率: <em class="down">12%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>抵押可贷额度: <em style="color:#EB5F34;">391万</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="button theme add add01 add01a" href="#">立即申请</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">龙盛佳苑 <em>391万</em><span class="tag"><small>空置</small></span></div>
|
||||
</div>
|
||||
<div class="item-subtitle">
|
||||
<div>近30天涨跌幅: <em class="down">3.37%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>下跌概率: <em class="down">12%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>抵押可贷额度: <em style="color:#EB5F34;">391万</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="button theme add add01 add01a" href="#">立即申请</a>
|
||||
</li>
|
||||
<ul class="list-container">
|
||||
<!-- 动态拼接内容 -->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 分页加载效果, 默认不显示, 和 加载loading页区分开-->
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -140,6 +97,201 @@ $.config = {router: false}
|
||||
//初始化init
|
||||
$.init();
|
||||
|
||||
//定义对象
|
||||
var baseInfo = new Vue({
|
||||
el: '#houseInfo',
|
||||
data: {
|
||||
totalPrice : "",
|
||||
oneYearUpDownRange:"",
|
||||
oneYearUpDownPrice: ""
|
||||
}
|
||||
})
|
||||
|
||||
var uid = "162167854504869888";
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
|
||||
//分页部分参数定义
|
||||
var page;
|
||||
var pageSize;
|
||||
var totalPages;
|
||||
var totalRecords;
|
||||
|
||||
// 上次加载的序号
|
||||
var lastIndex;
|
||||
// 每次加载添加多少条目
|
||||
var itemsPerLoad;
|
||||
// 最多可加载的条目
|
||||
var maxItems = 100;
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
// 如果正在加载,则退出
|
||||
if(loading) return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(page >= totalPages) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
page = page + 1;
|
||||
selectHouseInfoList();
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
//$.refreshScroller();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
//我的收藏查询请求
|
||||
function selectHouseInfoList(){
|
||||
axios.get(BASE_PATH + "/rest/index/ourHouseInfoList",
|
||||
{
|
||||
params: {
|
||||
uid: uid,
|
||||
page: page,
|
||||
pageSize: pageSize
|
||||
}
|
||||
}).then(function (response) {
|
||||
var resultsMap = response.data.data;
|
||||
var resultList = resultsMap.houseInfoPageList.list;
|
||||
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
|
||||
var xqPotentialIndexMap = resultsMap.xqPotentialIndexMap;
|
||||
var houseInfoTotalMap = resultsMap.houseInfoTotalMap;
|
||||
if(resultList != null && resultList.length == 0){
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
return;
|
||||
}
|
||||
if(resultsMap.houseInfoPageList.currentPage == resultsMap.houseInfoPageList.totalPages){
|
||||
//如果此次查询刚好是page = totalPages
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
}
|
||||
//封装list数据
|
||||
var dataObj = [];
|
||||
for(var i in resultList){
|
||||
dataObj.push(resultList[i])
|
||||
}
|
||||
// 上次加载的序号
|
||||
lastIndex = $('.cardInfo').length;
|
||||
//每次加载添加多少条目
|
||||
itemsPerLoad = resultList.length;
|
||||
//请求后对page进行赋值
|
||||
page = resultsMap.houseInfoPageList.currentPage;
|
||||
pageSize = resultsMap.houseInfoPageList.limit;
|
||||
totalPages = resultsMap.houseInfoPageList.totalPages;
|
||||
totalRecords = resultsMap.houseInfoPageList.totalRecords;
|
||||
addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap);
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//界面加载
|
||||
$(document).ready(function () {
|
||||
selectHouseInfoList();
|
||||
});
|
||||
|
||||
/* 分页构造数据 */
|
||||
function addItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, xqPotentialIndexMap, houseInfoTotalMap) {
|
||||
var html = '';
|
||||
//控制总产值部分显示
|
||||
baseInfo.totalPrice = houseInfoTotalMap["totalPrice"];
|
||||
baseInfo.oneYearUpDownRange = Math.abs(houseInfoTotalMap["oneYearUpDownRange"]);
|
||||
baseInfo.oneYearUpDownPrice = Math.abs(houseInfoTotalMap["oneYearUpDownPrice"]);
|
||||
if(!isNaN(houseInfoTotalMap["oneYearUpDownRange"])){
|
||||
//涨跌幅大于零
|
||||
if(parseFloat(houseInfoTotalMap["oneYearUpDownRange"])>=0){
|
||||
$('#oneYearUpDownRange').attr("class", "icon icon-arrow-red");
|
||||
}else{
|
||||
//涨跌幅小于零
|
||||
$('#oneYearUpDownRange').attr("class", "icon icon-arrow-green");
|
||||
}
|
||||
}
|
||||
if(!isNaN(houseInfoTotalMap["oneYearUpDownPrice"])){
|
||||
//涨跌幅大于零
|
||||
if(parseFloat(houseInfoTotalMap["oneYearUpDownPrice"])>=0){
|
||||
$('#oneYearUpDownPrice').attr("class", "icon icon-arrow-red");
|
||||
}else{
|
||||
//涨跌幅小于零
|
||||
$('#oneYearUpDownPrice').attr("class", "icon icon-arrow-green");
|
||||
}
|
||||
}
|
||||
for(var i in dataObj) {
|
||||
var result = dataObj[i];
|
||||
var tempTotalPrice = result.totalPrice;
|
||||
//可抵押贷额度
|
||||
var tempTotalPricePercent;
|
||||
//考虑是否为数字,加强逻辑判断
|
||||
if(!isNaN(tempTotalPrice)){
|
||||
//转换成元,四舍五入
|
||||
tempTotalPricePercent = (parseFloat(tempTotalPrice)*0.7/10000).toFixed(2);
|
||||
tempTotalPrice = (parseFloat(tempTotalPrice)/10000).toFixed(2);
|
||||
}
|
||||
html += "<li><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'>";
|
||||
|
||||
//对应城市地区小区30天涨跌幅
|
||||
var xqOneMonthUpDownRangeKey = result.city+"-"+result.region +"-"+result.name;
|
||||
var xqOneMonthUpDownRangeValue = xqOneMonthUpDownRangeMap[xqOneMonthUpDownRangeKey];
|
||||
if(!isNaN(xqOneMonthUpDownRangeValue)){
|
||||
//涨跌幅大于零
|
||||
if(parseFloat(xqOneMonthUpDownRangeValue)>=0){
|
||||
html += "<div>近30天涨跌幅: <em class='up'>"+xqOneMonthUpDownRangeValue+"%<i class='icon icon-arrow-red'></i></em></div>";
|
||||
}else{
|
||||
html += "<div>近30天涨跌幅: <em class='down'>"+Math.abs(xqOneMonthUpDownRangeValue)+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>近30天涨跌幅: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
|
||||
//下跌概率
|
||||
var xqPotentialIndexValue = xqPotentialIndexMap[xqOneMonthUpDownRangeKey];
|
||||
if(!isNaN(xqPotentialIndexValue)){
|
||||
//涨跌幅大于零
|
||||
if(parseInt(xqPotentialIndexValue)>=50){
|
||||
html += "<div>下跌概率: <em class='up'>"+xqPotentialIndexValue+"%<i class='icon icon-arrow-red'></i></em></div>";
|
||||
}else{
|
||||
html += "<div>下跌概率: <em class='down'>"+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
}else{
|
||||
html += "<div>下跌概率: <em class='down'> %<i class='icon icon-arrow-green'></i></em></div>";
|
||||
}
|
||||
|
||||
html += "<div>抵押可贷额度: <em style='color:#EB5F34;'>"+tempTotalPricePercent+"万</em></div></div></div></a>";
|
||||
|
||||
if(result.level!=null && result.level == 1){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>豪宅级</a>";
|
||||
}else if(result.level!=null && result.level == 2){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>公寓级</a>";
|
||||
}else if(result.level!=null && result.level == 3){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>平房级</a>";
|
||||
}else if(result.level!=null && result.level == 4){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>草屋级</a>";
|
||||
}else if(result.level!=null && result.level == 5){
|
||||
html += "<a class='add alert-text-title'><i class='icon icon-houseLevel'></i>山洞级</a>";
|
||||
}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>";
|
||||
}
|
||||
$('.infinite-scroll-bottom .list-container').append(html);
|
||||
}
|
||||
|
||||
/* 说明-房产等级 */
|
||||
$(document).on('click','.alert-text-title', function () {
|
||||
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
|
||||
|
||||
@@ -262,10 +262,7 @@ function addItems(number, lastIndex) {
|
||||
if(!id){
|
||||
return;
|
||||
}
|
||||
|
||||
curpage = lastIndex/itemsPerLoad + 1;
|
||||
|
||||
|
||||
axios.get("/rest/news/comment", {
|
||||
params: {
|
||||
newsId: id,
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>出租管理</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||
<link rel="stylesheet" href="../../css/main.css">
|
||||
<link rel="stylesheet" href="../../css/city.css">
|
||||
<link rel="stylesheet" href="../../css/theme-orange.css">
|
||||
|
||||
<style>
|
||||
.picker-item{padding:0 1rem;font-size:18px;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<header class="bar bar-nav">
|
||||
<button class="button button-link button-nav pull-left" onclick="history.go(-1)">
|
||||
<span class="icon icon-left"></span>
|
||||
</button>
|
||||
<h1 class="title">出租管理</h1>
|
||||
</header>
|
||||
<div class="content" id="edit">
|
||||
<div class="list-block media-list">
|
||||
<ul>
|
||||
<li>
|
||||
<a class="item-link item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">起租日期</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_time01" class="textAlignLeft" v-bind:value="leaseStartDate" placeholder="请选择起租日期" readonly>
|
||||
<input type="hidden" id="nowDay" name="nowDay" v-bind:value="nowDay">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">到期日期</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_time02" class="textAlignLeft" v-bind:value="leaseEndDate" placeholder="请选择到期日期" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">收租周期</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_cycle" class="textAlignLeft" v-bind:value="cycle" value="1 月 /次" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content">
|
||||
<div class="item-inner item-inner01">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">每期租金</div>
|
||||
<div class="item-after">
|
||||
<input type="number" id="input_rent01" class="textAlignLeft" v-bind:value="rent" placeholder="请输入每期租金">
|
||||
<label>元</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="item-link item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">下次收租日期</div>
|
||||
<div class="item-after">
|
||||
<input type="text" id="input_time03" class="textAlignLeft textAlignLeft01" v-bind:value="lastRentDate" placeholder="请选择下次收租日期" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<p><a class="button button-big button-fill theme" id="confirm_btn">确定</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>
|
||||
|
||||
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||
Zepto = $
|
||||
$.config = {router: false}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
// 获取周期 1-30
|
||||
function getnumber(){
|
||||
var data = new Array();
|
||||
for(var i=1;i<31;i++){
|
||||
data.push(i);
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
///* 错误提示 */
|
||||
//$("#confirm_btn").on("click", function () {
|
||||
// var a = $("#input_time01").val();
|
||||
// var b = $("#input_time02").val();
|
||||
// var c = $("#input_rent01").val();
|
||||
// var d = $("#input_time03").val();
|
||||
// if(a == ""){
|
||||
// $.toast("请选择起租日期");
|
||||
// return false;
|
||||
// }
|
||||
// else if(b == ""){
|
||||
// $.toast("请选择到期日期");
|
||||
// return false;
|
||||
// }
|
||||
// else if(c == ""){
|
||||
// $.toast("请输入每期租金");
|
||||
// return false;
|
||||
// }
|
||||
// else if(d == ""){
|
||||
// $.toast("请选择下次收租日期");
|
||||
// return false;
|
||||
// }
|
||||
//});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
var edit = new Vue({
|
||||
el:"#edit",
|
||||
data:{liveStatus:"",leaseStartDate:"",leaseEndDate:"",lastRentDate:"",nowDay:"",rent:"",cycle:""}
|
||||
});
|
||||
function getNowFormatDate(time) {
|
||||
if(typeof(time)=="undefined"||time==null){
|
||||
return ""
|
||||
}
|
||||
var date = new Date(time)
|
||||
var seperator1 = "-";
|
||||
var year = date.getFullYear();
|
||||
var month = date.getMonth() + 1;
|
||||
var strDate = date.getDate();
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
if (strDate >= 0 && strDate <= 9) {
|
||||
strDate = "0" + strDate;
|
||||
}
|
||||
var currentdate = year + seperator1 + month + seperator1 + strDate;
|
||||
return currentdate;
|
||||
}
|
||||
var id="165878889770385408"
|
||||
$(function (){
|
||||
//var self = plus.webview.currentWebview();
|
||||
// id = self.newsId;
|
||||
axios.get('/rest/rent/queryHouseRent',{params:{id:id}}).then(function(response){
|
||||
var data = response.data.data.houses;
|
||||
$.each(data,function(i){
|
||||
var active = "";
|
||||
var houseRoomNum = "";
|
||||
if(this.id == id){
|
||||
active = "active"
|
||||
}
|
||||
if(this.houseRoomNum){
|
||||
houseRoomNum = '<small>'+this.houseRoomNum+'</small>';
|
||||
}
|
||||
$("#titleList").append('<a v-bind:val="'+this.id+'" class="tab-link button '+active+'">'+
|
||||
'<label>'+this.name+'</label>'+houseRoomNum+'</a>')
|
||||
$(".buttons-tab01 a").click(function(){
|
||||
var id = $(this).attr("val")
|
||||
window.location.href = "index?id="+id;
|
||||
});
|
||||
})
|
||||
var houseInfo = response.data.data.houseInfo;
|
||||
edit.liveStatus=houseInfo.liveStatus;
|
||||
edit.leaseStartDate=getNowFormatDate(houseInfo.leaseStartDate);
|
||||
edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate);
|
||||
edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate);
|
||||
edit.nowDay = getNowFormatDate(response.data.data.nowDay);
|
||||
edit.rent = houseInfo.rent;
|
||||
edit.cycle = response.data.data.cycle;
|
||||
/* 选择-起租日期 */
|
||||
$("#input_time01").datetimePicker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
|
||||
<button class="button button-link pull-right close-picker">确定</button>\
|
||||
<h1 class="title">起租日期</h1>\
|
||||
</header>'
|
||||
});
|
||||
|
||||
/* 选择-到期日期 */
|
||||
$("#input_time02").datetimePicker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
|
||||
<button class="button button-link pull-right close-picker">确定</button>\
|
||||
<h1 class="title">到期日期</h1>\
|
||||
</header>'
|
||||
});
|
||||
|
||||
/* 选择-下次收租日期 */
|
||||
$("#input_time03").datetimePicker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
|
||||
<button class="button button-link pull-right close-picker">确定</button>\
|
||||
<h1 class="title">下次收租日期</h1>\
|
||||
</header>'
|
||||
});
|
||||
|
||||
/* 选择-收租周期 */
|
||||
$("#input_cycle").picker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01 bar-nav01a">\
|
||||
<button class="button button-link pull-right close-picker">确定</button>\
|
||||
<h1 class="title">收租周期</h1>\
|
||||
</header>',
|
||||
cols: [
|
||||
{
|
||||
textAlign: 'center',
|
||||
values: getnumber()
|
||||
},
|
||||
{
|
||||
textAlign: 'center',
|
||||
values: ["年", "季", "月"]
|
||||
},
|
||||
{
|
||||
textAlign: 'center',
|
||||
values: ["/次"]
|
||||
}
|
||||
]
|
||||
});
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
})
|
||||
/* 编辑状态-确定 */
|
||||
$(document).on('click','#confirm_btn', function () {
|
||||
|
||||
// var status = $('#input_status').val();
|
||||
var status = "出租";
|
||||
var rent_start = $('#input_time01').val();
|
||||
var rent_end = $('#input_time02').val();
|
||||
var rent_cycle = $('#input_cycle').val();
|
||||
var rent_price = $('#input_rent01').val();
|
||||
var next_rent = $('#input_time03').val();
|
||||
var nowDay = $('#nowDay').val();
|
||||
d = {
|
||||
"id":id,
|
||||
"liveStatus": status,
|
||||
"leaseStartDate":rent_start,
|
||||
"leaseEndDate":rent_end,
|
||||
"rent":rent_price,
|
||||
"lastRentDate":next_rent
|
||||
};
|
||||
|
||||
if (status == "出租" )
|
||||
{
|
||||
if (rent_price == "") {
|
||||
$.toast("请输入每期租金");
|
||||
return false;
|
||||
}
|
||||
if(rent_start == ""){
|
||||
$.toast("请选择起租日期");
|
||||
return false;
|
||||
}
|
||||
if(rent_end == ""){
|
||||
$.toast("请选择到期日期");
|
||||
return false;
|
||||
}
|
||||
if(next_rent == ""){
|
||||
$.toast("请选择下次收租日期");
|
||||
return false;
|
||||
}
|
||||
if(rent_cycle == ""){
|
||||
$.toast("请选择收租周期");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(Number(rent_price)<100 || Number(rent_price)>200000){
|
||||
$.toast("租金范围100-200000元");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(parseInt(rent_price)<Number(rent_price)){
|
||||
$.toast("租金请输入整数");
|
||||
return false;
|
||||
}
|
||||
if(rent_end<nowDay){
|
||||
$.toast("到期日期不能早于今天");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (rent_start > rent_end) {
|
||||
$.toast("到期日期必须晚于起租日期");
|
||||
return false;
|
||||
}
|
||||
if (next_rent > rent_end) {
|
||||
$.toast("收租日期不能晚于到期日期");
|
||||
return false;
|
||||
}
|
||||
if(next_rent<nowDay){
|
||||
$.toast("下次收租日期不能早于今天");
|
||||
return false;
|
||||
}
|
||||
if (rent_cycle != ""){
|
||||
var a = rent_cycle.split(" ");
|
||||
var b = a[1].split("/");
|
||||
d["rentCycle"] = a[0];
|
||||
d["rentCycleUnit"] = b[0];
|
||||
}
|
||||
}
|
||||
|
||||
axios.post("/rest/rent/changeStatus",d).then(function(response){
|
||||
//$.toast(response.data.data);
|
||||
console.log(1);
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -176,6 +176,7 @@ var vue = new Vue({
|
||||
// 绑定手机
|
||||
binding: function() {
|
||||
if (this.checkMobile() && this.checkSmsCode()) {
|
||||
plus.nativeUI.showWaiting();
|
||||
axios.post("/rest/user/bindMobile", {
|
||||
mobile:this.mobile,
|
||||
smsCode:this.smsCode,
|
||||
@@ -195,15 +196,17 @@ var vue = new Vue({
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
$.toast(resData.message);
|
||||
localStorage.setItem("user_token", resData.data);
|
||||
localStorage.setItem("user_token", resData.data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
back();
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
plus.nativeUI.closeWaiting();
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
plus.nativeUI.closeWaiting();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ $.config = {router: false}
|
||||
<script src="../../config.js"></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/plus.info.js"></script>
|
||||
<script type="text/javascript" src="../../js/login/codeSms.js" ></script>
|
||||
<script type="text/javascript" src="../../js/login/thirdLogin.js" ></script>
|
||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||
|
||||
@@ -124,6 +124,7 @@ new Vue({
|
||||
$.toast("请输入密码");
|
||||
return;
|
||||
}
|
||||
plus.nativeUI.showWaiting();
|
||||
axios.post("/rest/user/passLogin", {mobile:this.mobile, pass: $.md5(this.pass), pushClientId:getPushInfo()})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
@@ -137,9 +138,11 @@ new Vue({
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
plus.nativeUI.closeWaiting();
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
plus.nativeUI.closeWaiting();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -115,6 +115,7 @@ new Vue({
|
||||
$.toast("请输入6位以上数字或字母");
|
||||
return;
|
||||
}
|
||||
plus.nativeUI.showWaiting();
|
||||
axios.post("/rest/user/upass", {newPass: $.md5(this.pass)})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
@@ -124,9 +125,11 @@ new Vue({
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
plus.nativeUI.closeWaiting();
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
plus.nativeUI.closeWaiting();
|
||||
});
|
||||
},
|
||||
/* 密码显示&隐藏 */
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="content">
|
||||
<div class="topBg01">
|
||||
<img src="../../images/headPortrait.png">
|
||||
<p>137****6586<br><span class="tag"><small>土豪</small></span></p>
|
||||
<p>137****6586<br><span class="tag"><!--<small>土豪</small>--></span></p>
|
||||
</div>
|
||||
<div class="topic">
|
||||
<div class="topicContent" style="padding-left:0;padding-right:0;">
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons-tab fixed-tab theme" data-offset="44" id="tab">
|
||||
<a href="#tabList1" class="tab-link button active">房产(3)</a>
|
||||
<a href="#tabList1" class="tab-link button active">房产({{mh_num}})</a>
|
||||
<a href="#tabList2" class="tab-link button">关注({{mf_num}})</a>
|
||||
<a href="#tabList3" class="tab-link button">收藏({{mc_num}})</a>
|
||||
<a href="#tabList4" class="tab-link button">消息(2)</a>
|
||||
@@ -81,70 +81,30 @@
|
||||
<div class="contentBox">
|
||||
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="100">
|
||||
<div class="tabs">
|
||||
<!-- 我的房产 -->
|
||||
<div id="tabList1" class="tab active">
|
||||
<div class="list-block media-list">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">龙盛佳苑 <em>391万</em><span class="tag"><small>空置</small></span></div>
|
||||
</div>
|
||||
<div class="item-subtitle">
|
||||
<div>近30天涨跌幅: <em class="down">3.37%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>下跌概率: <em class="down">12%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>抵押可贷额度: <em style="color:#EB5F34;">391万</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="button theme add add01 add01a" href="">立即申请</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">龙盛佳苑 <em>391万</em><span class="tag"><small>空置</small></span></div>
|
||||
</div>
|
||||
<div class="item-subtitle">
|
||||
<div>近30天涨跌幅: <em class="down">3.37%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>下跌概率: <em class="down">12%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>抵押可贷额度: <em style="color:#EB5F34;">391万</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="button theme add add01 add01a" href="">立即申请</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">龙盛佳苑 <em>391万</em><span class="tag"><small>空置</small></span></div>
|
||||
</div>
|
||||
<div class="item-subtitle">
|
||||
<div>近30天涨跌幅: <em class="down">3.37%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>下跌概率: <em class="down">12%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div>抵押可贷额度: <em style="color:#EB5F34;">391万</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="add alert-text-title"><i class="icon icon-houseLevel"></i>公寓</a>
|
||||
<a class="button theme add add01 add01a" href="">立即申请</a>
|
||||
</li>
|
||||
<ul class="list-container" id="myhouse">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 分页加载效果, 默认不显示, 和 加载loading页区分开-->
|
||||
<div id="loadTip1" class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 我的关注 -->
|
||||
<div id="tabList2" class="tab">
|
||||
<div class="list-block media-list">
|
||||
<ul class="list-container" id="mf_ul">
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 分页加载效果, 默认不显示, 和 加载loading页区分开-->
|
||||
<div id="loadTip2" class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 我的收藏 -->
|
||||
<div id="tabList3" class="tab">
|
||||
<div class="list-block" >
|
||||
<ul class="list-container" id="myColect">
|
||||
@@ -212,6 +172,7 @@ $.config = {router: false}
|
||||
|
||||
<script type="text/javascript" src="../../js/user/myFocus.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/user/myCollect.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/user/myHouse.js" charset="utf-8"></script>
|
||||
<script>
|
||||
/* 说明-房产等级 */
|
||||
$(document).on('click','.alert-text-title', function () {
|
||||
@@ -223,13 +184,10 @@ $(".cardInfo01,.cardInfo02").on("click", function(){
|
||||
window.location.href = "#";
|
||||
});
|
||||
|
||||
//$(document).on("pageInit", function() {
|
||||
// $('.buttons-tab').fixedTab({offset:325});
|
||||
// });
|
||||
|
||||
var tab = new Vue({
|
||||
el:"#tab",
|
||||
data:{
|
||||
mh_num:"0",
|
||||
mf_num:"0",
|
||||
mc_num:"0"
|
||||
}
|
||||
@@ -237,8 +195,32 @@ var tab = new Vue({
|
||||
|
||||
//注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.infinite-scroll',function() {
|
||||
console.log(1)
|
||||
if($("#tabList2").hasClass("active"))
|
||||
if($("#tabList1").hasClass("active"))
|
||||
{
|
||||
// 如果正在加载,则退出
|
||||
if(mh_loading) return;
|
||||
// 设置flag
|
||||
mh_loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
mh_loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(mh_page >= mh_totalPages) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
mh_page = mh_page + 1;
|
||||
selectHouseInfoList();
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
//$.refreshScroller();
|
||||
}, 1000);
|
||||
}
|
||||
if($("#tabList2").hasClass("active"))
|
||||
{
|
||||
// 如果正在加载,则退出
|
||||
if (mf_loading) return;
|
||||
@@ -252,7 +234,7 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
mf_lastIndex = $('#mf_ul').find('li').length;
|
||||
if (mf_lastIndex >= mf_totalCount) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip2').remove();
|
||||
return;
|
||||
@@ -263,7 +245,7 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
// $.refreshScroller();
|
||||
}, 1000);
|
||||
}
|
||||
if($("#tabList3").hasClass("active"))
|
||||
if($("#tabList3").hasClass("active"))
|
||||
{
|
||||
// 如果正在加载,则退出
|
||||
if(mc_loading) return;
|
||||
@@ -275,8 +257,8 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
mc_loading = false;
|
||||
//如果当前页大于等于总页数
|
||||
if(mc_page >= mc_totalPages) {
|
||||
// // 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
// $.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip3').remove();
|
||||
return;
|
||||
@@ -289,6 +271,7 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user