diff --git a/fangija-zsyf/js/user/myCollect.js b/fangija-zsyf/js/user/myCollect.js
index 3c69504..613345e 100644
--- a/fangija-zsyf/js/user/myCollect.js
+++ b/fangija-zsyf/js/user/myCollect.js
@@ -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 += '
历史推荐
';
- }*/
if(dataObj[i].type == "专题") {
html += '' +
'' +
diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js
new file mode 100644
index 0000000..9de6fcc
--- /dev/null
+++ b/fangija-zsyf/js/user/myHouse.js
@@ -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 += "
";
+ html += "";
+ html += "
"+result.name+" "+tempTotalPrice+"万"+result.liveStatus+"
";
+ html += "
";
+
+ //对应城市地区小区30天涨跌幅
+ var xqOneMonthUpDownRangeKey = result.city+"-"+result.region +"-"+result.name;
+ var xqOneMonthUpDownRangeValue = xqOneMonthUpDownRangeMap[xqOneMonthUpDownRangeKey];
+ if(!isNaN(xqOneMonthUpDownRangeValue)){
+ //涨跌幅大于零
+ if(parseFloat(xqOneMonthUpDownRangeValue)>=0){
+ html += "
近30天涨跌幅: "+xqOneMonthUpDownRangeValue+"%
";
+ }else{
+ html += "
近30天涨跌幅: "+Math.abs(xqOneMonthUpDownRangeValue)+"%
";
+ }
+ }else{
+ html += "
近30天涨跌幅: %
";
+ }
+
+ //下跌概率
+ var xqPotentialIndexValue = xqPotentialIndexMap[xqOneMonthUpDownRangeKey];
+ if(!isNaN(xqPotentialIndexValue)){
+ //涨跌幅大于零
+ if(parseInt(xqPotentialIndexValue)>=50){
+ html += "
下跌概率: "+xqPotentialIndexValue+"%
";
+ }else{
+ html += "
下跌概率: "+(parseInt(100)-parseInt(xqPotentialIndexValue))+"%
";
+ }
+ }else{
+ html += "
下跌概率: %
";
+ }
+
+ html += "
抵押可贷额度: "+tempTotalPricePercent+"万
";
+
+ if(result.level!=null && result.level == 1){
+ html += "豪宅级";
+ }else if(result.level!=null && result.level == 2){
+ html += "公寓级";
+ }else if(result.level!=null && result.level == 3){
+ html += "平房级";
+ }else if(result.level!=null && result.level == 4){
+ html += "草屋级";
+ }else if(result.level!=null && result.level == 5){
+ html += "山洞级";
+ }else{
+ html += "其他";
+ }
+ html += "立即申请";
+ }
+ $('#myhouse').append(html);
+}
+
+/* 说明-房产等级 */
+$(document).on('click','.alert-text-title', function () {
+ $.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
+});
\ No newline at end of file
diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html
index 8ad0ed2..bdd7a49 100644
--- a/fangija-zsyf/views/user/userInfo.html
+++ b/fangija-zsyf/views/user/userInfo.html
@@ -48,7 +48,7 @@

-
137****6586
土豪
+
137****6586