Merge branch 'YOUFANGAPP1.1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.0.4
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**服务端地址**/
|
||||
//var BASE_PATH = "http://youfang.fangjia.com";
|
||||
//var BASE_PATH = "http://192.168.10.128:8084";
|
||||
var BASE_PATH = "http://192.168.10.47:8086";
|
||||
//var BASE_PATH = "http://192.168.10.53:8084";
|
||||
//var BASE_PATH = "http://192.168.10.47:8086";
|
||||
var BASE_PATH = "http://192.168.10.53:8084";
|
||||
//var BASE_PATH = "http://192.168.10.161:8084";
|
||||
//var BASE_PATH = "http://192.168.10.170:8084";
|
||||
//var BASE_PATH = "http://192.168.10.171:8084";
|
||||
|
||||
@@ -542,8 +542,11 @@ function showRentChart2(categories, series, roomDatas){
|
||||
fontSize: 12
|
||||
},
|
||||
formatter: function (params) {
|
||||
var res = params[0].name + ' <br/>' + "租金:"+params[0].value + '元/月';
|
||||
return res;
|
||||
if(params[0].value){
|
||||
var res = params[0].name + ' <br/>' + "租金:"+params[0].value + '元/月';
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
grid:{
|
||||
|
||||
@@ -28,9 +28,14 @@ function selectHouseInfoList(){
|
||||
var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap;
|
||||
var xqPotentialIndexMap = resultsMap.xqPotentialIndexMap;
|
||||
var houseInfoTotalMap = resultsMap.houseInfoTotalMap;
|
||||
//调整统计num的顺序
|
||||
mh_totalRecords = resultsMap.houseInfoPageList.totalRecords;
|
||||
tab.mh_num = mh_totalRecords;
|
||||
|
||||
if(resultList != null && resultList.length == 0){
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
$('#loadTip1').hide();
|
||||
//$('#loadTip1').remove();
|
||||
//$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
@@ -39,7 +44,8 @@ function selectHouseInfoList(){
|
||||
if(resultsMap.houseInfoPageList.currentPage == resultsMap.houseInfoPageList.totalPages){
|
||||
//如果此次查询刚好是page = totalPages
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
$('#loadTip1').hide();
|
||||
//$('#loadTip1').remove();
|
||||
//$('.infinite-scroll-preloader').remove();
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
@@ -57,8 +63,6 @@ function selectHouseInfoList(){
|
||||
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);
|
||||
|
||||
@@ -75,13 +75,13 @@ function messageGoto(_this,operation,operationPage,mid){
|
||||
clicked('/views/message/detail.html',true,false,{},{mid:mid},function(){})
|
||||
}
|
||||
if(operation==1){
|
||||
// var pages = operationPage+'.html';
|
||||
var pages = operationPage+'.html';
|
||||
// if(plus.webview.getWebviewById(pages)==null){
|
||||
// plus.webview.create(pages, pages, subpage_style);
|
||||
// }
|
||||
// plus.webview.show(pages);
|
||||
mui.fire(plus.webview.getWebviewById('HBuilder'),'switchView',{
|
||||
name:"views/house/houseDetail.html"
|
||||
name:pages
|
||||
});
|
||||
}
|
||||
if(operation==2){
|
||||
|
||||
+9
-14
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<nav class="mui-bar mui-bar-tab">
|
||||
<a class="mui-tab-item mui-active" id="defaultTab" href="yfindex.html">
|
||||
<a class="mui-tab-item mui-active" id="yfindex.html" href="yfindex.html">
|
||||
<span class="mui-icon iconfont icon-tab01"></span>
|
||||
<span class="mui-tab-label">首页</span>
|
||||
</a>
|
||||
@@ -132,8 +132,10 @@
|
||||
var title = document.getElementById("title");
|
||||
//选项卡点击事件
|
||||
mui('.mui-bar-tab').on('tap', 'a', function(e) {
|
||||
plus.nativeUI.showWaiting();
|
||||
var targetTab = this.getAttribute('href');
|
||||
if (targetTab == activeTab) {
|
||||
plus.nativeUI.closeWaiting();
|
||||
return;
|
||||
}
|
||||
//更换标题
|
||||
@@ -156,18 +158,7 @@
|
||||
plus.webview.hide(activeTab);
|
||||
//更改当前活跃的选项卡
|
||||
activeTab = targetTab;
|
||||
});
|
||||
//自定义事件,模拟点击“首页选项卡”
|
||||
document.addEventListener('gohome', function() {
|
||||
var defaultTab = document.getElementById("defaultTab");
|
||||
//模拟首页点击
|
||||
mui.trigger(defaultTab, 'tap');
|
||||
//切换选项卡高亮
|
||||
var current = document.querySelector(".mui-bar-tab>.mui-tab-item.mui-active");
|
||||
if (defaultTab !== current) {
|
||||
current.classList.remove('mui-active');
|
||||
defaultTab.classList.add('mui-active');
|
||||
}
|
||||
plus.nativeUI.closeWaiting();
|
||||
});
|
||||
|
||||
// 加载启动页信息
|
||||
@@ -193,7 +184,10 @@
|
||||
if (data.url != null) {
|
||||
localStorage.setItem("startPageClickUrl", data.url);
|
||||
}
|
||||
localStorage.setItem("guidePageUrls",JSON.stringify(data.guideImgs));
|
||||
if (data.guideImgs != null) {
|
||||
localStorage.setItem("guidePageUrls",JSON.stringify(data.guideImgs));
|
||||
}
|
||||
|
||||
//存入localStorage Boolean类型变成String
|
||||
//加载菜单信息,控制是否显示贷款菜单
|
||||
localStorage.setItem("showLoanMenu", data.showLoanMenu);
|
||||
@@ -223,6 +217,7 @@
|
||||
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
|
||||
var targetTab = event.detail.name;
|
||||
if (targetTab == activeTab) {
|
||||
plus.webview.show(targetTab);
|
||||
return;
|
||||
}
|
||||
//若为iOS平台或非首次显示,则直接显示
|
||||
|
||||
@@ -76,7 +76,7 @@ new Vue({
|
||||
methods: {
|
||||
skip: function() {
|
||||
isRun = true;
|
||||
if (localStorage.getItem("yf_guide_page_status") == null && JSON.parse(localStorage.getItem("guidePageUrls")).length > 0) {
|
||||
if (localStorage.getItem("yf_guide_page_status") == null && localStorage.getItem("guidePageUrls") != null && JSON.parse(localStorage.getItem("guidePageUrls")).length > 0) {
|
||||
$(".swiper-container").removeClass("dn");
|
||||
$(".swiper-container").swiper();
|
||||
localStorage.setItem("yf_guide_page_status", 1)
|
||||
@@ -137,7 +137,7 @@ function run(){
|
||||
if(time.innerHTML == 0 && isShow == false) {
|
||||
isShow = true;
|
||||
|
||||
if (localStorage.getItem("yf_guide_page_status") == null && JSON.parse(localStorage.getItem("guidePageUrls")).length > 0) {
|
||||
if (localStorage.getItem("yf_guide_page_status") == null && localStorage.getItem("guidePageUrls") != null && JSON.parse(localStorage.getItem("guidePageUrls")).length > 0) {
|
||||
$(".swiper-container").removeClass("dn");
|
||||
$(".swiper-container").swiper();
|
||||
localStorage.setItem("yf_guide_page_status", 1)
|
||||
@@ -148,7 +148,11 @@ function run(){
|
||||
}
|
||||
return false;
|
||||
}
|
||||
time.innerHTML = time.innerHTML * 1 - 1;
|
||||
var ntime = time.innerHTML * 1 - 1;
|
||||
if(ntime <= 0) {
|
||||
ntime = 0;
|
||||
}
|
||||
time.innerHTML = ntime;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1353,9 +1353,21 @@ document.addEventListener('plusready', onPlusReady, false);
|
||||
function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
hsId = self.hsId
|
||||
houseId = self.houseId
|
||||
if(hsId){
|
||||
//如果是修改置换建议,则默认将值填入
|
||||
axios.get(BASE_PATH + "/rest/changeHouse/loadHouseSubInfo",{
|
||||
updateChangeSubtation(hsId);
|
||||
}
|
||||
|
||||
if(houseId){
|
||||
//小区报告页带入
|
||||
fillHouseInfo(houseId);
|
||||
}
|
||||
|
||||
}
|
||||
//修改置换建议填充默认值
|
||||
function updateChangeSubtation(hsId){
|
||||
axios.get(BASE_PATH + "/rest/changeHouse/loadHouseSubInfo",{
|
||||
params:{
|
||||
hsId:hsId
|
||||
}
|
||||
@@ -1397,7 +1409,22 @@ function onPlusReady() {
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function fillHouseInfo(houseId){
|
||||
axios.get(BASE_PATH + "/rest/index/loadHouse",{
|
||||
params:{
|
||||
houseId:houseId
|
||||
}
|
||||
}).then(function (response) {
|
||||
var data = response.data.data;
|
||||
if(data){
|
||||
addBaseHouseInfo(data);
|
||||
baseInfo.houseId = hs.houseId
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//填充房产价格信息
|
||||
@@ -1818,7 +1845,6 @@ $("#citySearchInp").bind('keyup', function() {
|
||||
});
|
||||
|
||||
function openAddHouse(){
|
||||
alert("ssss")
|
||||
clicked('/views/house/add.html',true,false,{},{});
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<div class="noData">
|
||||
<img src="../../images/noData.png">
|
||||
<p>抱歉,没有找到适合您的小区</p>
|
||||
<a click="updateChangeHouse()">修改置换需求</a>
|
||||
<a onclick="updateChangeHouse()">修改置换需求</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -399,7 +399,7 @@ $(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
});
|
||||
|
||||
function updateChangeHouse(){
|
||||
clicked('views/changeHouse/index.html',true,false,{},{hsId:hsId});
|
||||
clicked('/views/changeHouse/index.html',true,false,{},{hsId:hsId});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -303,5 +303,6 @@ function addSubstitution(sr, hs, house){
|
||||
// <a <#if advertisement.link?? && advertisement.link?length gt 0>onclick="openUrl('${basePath}/message/openView?url=${basePath}/mad/adUrlLoad?adid=${advertisement.id!?c}')"</#if> ><#if advertisement.content??>${advertisement.content!}</#if><i class="icon icon-right icon-right01"></i></a></p>
|
||||
// </#if>
|
||||
$("#suggestDiv").text(s);
|
||||
$("#suggestDiv").show();
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<h1 class="title">{{name}}</h1>
|
||||
</header>
|
||||
<div class="content">
|
||||
<div class="topBg topBg02" id="suggestDiv">
|
||||
<div class="topBg topBg02 dn" id="suggestDiv">
|
||||
<p>购买 龙盛佳苑 90-110㎡ 的房子,总价预计约为<em>587-717万</em>。<br><a href="">查看详情<i class="icon icon-right icon-right01"></i></a></p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -64,8 +64,10 @@
|
||||
<div class="col-10">{{index+1}}</div>
|
||||
<div class="col-25">{{info.region}}</div>
|
||||
<div class="col-33">{{info.avgPrice}}元/㎡</div>
|
||||
<div class="col-25" v-if="info.oneMonthUpDownRange > 0"><em class="up">{{info.oneMonthUpDownRange}}%<i class="icon icon-arrow-red"></i></em></div>
|
||||
<div class="col-25" v-if="info.oneMonthUpDownRange < 0"><em class="down">{{info.oneMonthUpDownRange}}%<i class="icon icon-arrow-green"></i></em></div>
|
||||
|
||||
<div class="col-25" v-if="info.oneMonthUpDownRange && info.oneMonthUpDownRange >= 0"><em class="up">{{info.oneMonthUpDownRange}}%<i class="icon icon-arrow-red"></i></em></div>
|
||||
<div class="col-25" v-else-if="info.oneMonthUpDownRange && info.oneMonthUpDownRange < 0"><em class="down">{{info.oneMonthUpDownRange}}%<i class="icon icon-arrow-green"></i></em></div>
|
||||
<div class="col-25" v-else><em>暂无</em></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -137,7 +139,11 @@ $.config = {router: false}
|
||||
if(msg!=null && msg.length>0){
|
||||
for(var i in msg){
|
||||
var da = msg[i]
|
||||
da.oneMonthUpDownRange = (da.oneMonthUpDownRange*100).toFixed(2)
|
||||
if(da.oneMonthUpDownRange){
|
||||
da.oneMonthUpDownRange = (da.oneMonthUpDownRange*100).toFixed(2)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
regionsInfoVue.$data.regionInfos = msg;
|
||||
}else{
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
<span>算房贷</span>
|
||||
</div>-->
|
||||
<div v-for="(t,index) in merchantTools">
|
||||
<img v-bind:src="t.iconUrl" style="width:45px;height:45px;margin:0 auto;" v-on:click="goto(t.url,userId)">
|
||||
<img v-bind:src="t.iconUrl" style="width:45px;height:45px;margin:0 auto;" v-on:click="goto(t.url,userId,t.id)">
|
||||
<span>{{t.toolName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -337,7 +337,8 @@ $(document).on('infinite', '.infinite-scroll',function() {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
//$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').remove();
|
||||
//$('#loadTip1').remove();
|
||||
$('#loadTip1').hide();
|
||||
return;
|
||||
}
|
||||
//控制查询下一页的数据
|
||||
@@ -453,7 +454,8 @@ $(document).on("click",".confirm-ok", function () {
|
||||
$.toast(response.data.data);
|
||||
//删除后,如果需要调用checkIsLogin,需要所有的参数初始化
|
||||
//checkIsLogin();
|
||||
window.location.reload();
|
||||
//window.location.reload();
|
||||
initMyHouseParams();
|
||||
//删除房产会影响个人中心房产列表, 刷新
|
||||
/*if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
|
||||
plus.webview.getWebviewById('views/user/userInfo.html').reload();
|
||||
@@ -469,6 +471,24 @@ $(document).on("click",".confirm-ok", function () {
|
||||
$(".modal-text").css("text-align","center");
|
||||
});
|
||||
|
||||
//初始化分页参数, 防止回调时候重新请求出错
|
||||
function initMyHouseParams(){
|
||||
mh_loading = false;
|
||||
mh_page = undefined;
|
||||
var mh_pageSize = undefined;
|
||||
var mh_totalPages = undefined;
|
||||
var mh_totalRecords = undefined;
|
||||
var mh_lastIndex = undefined;
|
||||
var mh_itemsPerLoad = undefined;
|
||||
var mh_maxItems = 100;
|
||||
//清空构造的container
|
||||
$('#myhouse').html('');
|
||||
// 删除加载提示符
|
||||
$('#loadTip1').show();
|
||||
//加载我的房产
|
||||
selectHouseInfoList();
|
||||
}
|
||||
|
||||
function openSettingPage() {
|
||||
clicked('../setting/setting.html',true,false,{},{},function(){})
|
||||
}
|
||||
@@ -483,15 +503,19 @@ function onPlusReady(){
|
||||
userId:""
|
||||
},
|
||||
methods:{
|
||||
goto:function(url,userId){
|
||||
goto:function(url,userId,id){
|
||||
var deviceId = plus.device.uuid;
|
||||
if(url.indexOf("?")>0){
|
||||
url+=("&uid="+userId+"&deviceId="+deviceId)
|
||||
}else{
|
||||
url+=("?uid="+userId+"&deviceId="+deviceId)
|
||||
}
|
||||
alert(url)
|
||||
if (url != null && url != "") {
|
||||
axios.post(BASE_PATH + "/rest/usertool/merchantToolClick",{id:id}).then(function(response){
|
||||
|
||||
}).catch(function(error){
|
||||
|
||||
});
|
||||
clicked('../webview_embed.html', true,false,{},{url:url})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user