Merge branch 'YOUFANGAPP1.1.1' of http://192.168.0.27/dev0/youfang-app into YOUFANGAPP1.1.1

This commit is contained in:
bayi
2018-05-10 10:03:07 +08:00
13 changed files with 186 additions and 137 deletions
+10 -16
View File
@@ -1315,19 +1315,13 @@ input[type=range]::-webkit-slider-thumb {
.contentStart .startImg{width:100%;}
/* 引导页 */
.swiper-container{width:100%;height:100%;background:#fff;z-index:10000;}
.swiper-slide img{margin:0 auto;margin-top:7rem;}
.swiper-slide img.guideImg01{width:90%;}
.swiper-slide img.guideImg02{width:85%;}
.swiper-slide img.guideImg03{width:55%;}
.swiper-slide div{position:absolute;bottom:5rem;width:100%;}
.swiper-slide p{text-align:center;padding:0 1rem;}
.swiper-slide p label{font-size:1rem;}
.swiper-slide p small{font-size:0.7rem;color:#999;}
.swiper-slide div.content-block{bottom:0.5rem;}
.swiper-slide div.content-block .button{width:50%;margin:0 auto;height:2.1rem;line-height:2rem;}
.swiper-pagination-bullet{width:10px;height:10px;background:#D7D7D7;opacity:1;}
.swiper-pagination-bullet-active{width:22px;height:10px;background:#F18D00;border-radius:0.3rem;}
.guideSwiper.swiper-container{width:100%;height:100%;background:#fff;z-index:10000;}
.guideSwiper .swiper-slide img{width:100%;}
.guideSwiper .swiper-slide div{position:absolute;bottom:5rem;width:100%;}
.guideSwiper .swiper-slide div.content-block{bottom:0.5rem;}
.guideSwiper .swiper-slide div.content-block .button{width:50%;margin:0 auto;height:2.1rem;line-height:2rem;}
.guideSwiper .swiper-pagination-bullet{width:10px;height:10px;background:#D7D7D7;opacity:1;}
.guideSwiper .swiper-pagination-bullet-active{width:22px;height:10px;background:#F18D00;border-radius:0.3rem;}
/* 字体图标 */
@font-face {font-family: "iconfont";
@@ -1423,9 +1417,9 @@ input[type=range]::-webkit-slider-thumb {
@media(min-height:750px){
.bar-tab{bottom:1.7rem;}
.bar-tab ~ .content{bottom:4.2rem;}
.swiper-slide div{bottom:12rem;}
.swiper-slide div.content-block{bottom:5rem;}
.swiper-container-horizontal>.swiper-pagination{bottom:4rem;}
.guideSwiper .swiper-slide div{bottom:12rem;}
.guideSwiper .swiper-slide div.content-block{bottom:5rem;}
.guideSwiper.swiper-container-horizontal >.swiper-pagination{bottom:4rem;}
}
@media only screen and (-webkit-min-device-pixel-ratio:2){
.list-block .item-inner:after{-webkit-transform:scaleY(1);transform:scaleY(1);}
+34 -42
View File
@@ -27,60 +27,52 @@ document.addEventListener("plusready", function() {
if (payload.type == "0") {
plus.ui.alert(title+"\n"+content);
} else if (payload.type == "1") {
plus.ui.alert(title+"\n"+content,function(){
if (payload.url == '/house/index') {
plus.webview.show('yfindex.html');
} else {
plus.webview.show(BASE_PATH + payload.url);
}
//切换选项卡高亮
var defaultTab = document.getElementById("defaultTab");
var quotations = document.getElementById("quotations");
var selfInfo = document.getElementById("selfInfo");
defaultTab.classList.remove("mui-active");
quotations.classList.remove("mui-active");
selfInfo.classList.remove("mui-active");
if (payload.url == '/quotations/index') {
quotations.classList.add("mui-active");
} else if(payload.url == '/selfInfo/index') {
selfInfo.classList.add("mui-active");
} else {
defaultTab.classList.add("mui-active");
plus.ui.alert(title+"\n"+content,function(){
if(plus.webview.getWebviewById('H5693FF3D')==null){
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
}else{
plus.webview.show(plus.webview.getWebviewById("H5693FF3D"));
}
var targetTab = payload.url+".html";
var defaultTab = document.getElementById(targetTab);
//模拟首页点击
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');
}
});
});
} else if (payload.type == "2") {
plus.ui.alert(title+"\n"+content,function(){
openUrl(BASE_PATH+'/message/openView?url='+payload.url);
clicked('views/webview_embed.html', true,false,{},{url:payload.url})
});
}
} else {
if (payload.type == "0") {
plus.ui.alert(content);
} else if (payload.type == "1") {
plus.ui.alert(content,function(){
if (payload.url == '/house/index') {
plus.webview.show('yfindex.html');
} else {
plus.webview.show(BASE_PATH + payload.url);
}
//切换选项卡高亮
var defaultTab = document.getElementById("defaultTab");
var quotations = document.getElementById("quotations");
var selfInfo = document.getElementById("selfInfo");
defaultTab.classList.remove("mui-active");
quotations.classList.remove("mui-active");
selfInfo.classList.remove("mui-active");
if (payload.url == '/quotations/index') {
quotations.classList.add("mui-active");
} else if(payload.url == '/selfInfo/index') {
selfInfo.classList.add("mui-active");
} else {
defaultTab.classList.add("mui-active");
plus.ui.alert(title+"\n"+content,function(){
if(plus.webview.getWebviewById('H5693FF3D')==null){
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
}else{
plus.webview.show(plus.webview.getWebviewById("H5693FF3D"));
}
var targetTab = payload.url+".html";
var defaultTab = document.getElementById(targetTab);
//模拟首页点击
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');
}
});
});
} else if (payload.type == "2") {
plus.ui.alert(content,function(){
openUrl(BASE_PATH+'/message/openView?url='+payload.url);
clicked('views/webview_embed.html', true,false,{},{url:payload.url})
});
}
}
@@ -397,6 +397,8 @@ function getAnalysisDetail(){
})
}
}
//当前小区在当前城市占比情况
houseInfo.city = _houseInfo.city;
houseInfo.roseRanking = _houseInfo.roseRanking;
houseInfo.avgpriceRanking = _houseInfo.avgpriceRanking;
@@ -406,6 +408,16 @@ function getAnalysisDetail(){
$('#roseRankingPercent').css("width", houseInfo.roseRanking+"%");
$('#sliderNotePercent').css("left", resultsMap.priceRateContent+"%");
$('#curRatePercent').css("width", resultsMap.curRate+"%");
if((_houseInfo.roseRanking == 0) && (_houseInfo.avgpriceRanking == 0 || resultsMap.priceRateContent == 0 || _houseInfo.price == 0 || _houseInfo.minSellPrice == 0 || _houseInfo.maxSellPrice == 0 || resultsMap.curRate == 0)){
$('#rankingAndPriceContent').hide();
}
if(_houseInfo.roseRanking == 0){
$('#rankingAndPriceContentRanking').hide();
}
if(_houseInfo.avgpriceRanking == 0 || resultsMap.priceRateContent == 0 || _houseInfo.price == 0 || _houseInfo.minSellPrice == 0 || _houseInfo.maxSellPrice == 0 || resultsMap.curRate == 0){
$('#rankingAndPriceContentPrice').hide();
}
//挂牌建议
houseInfo.minAndMaxTotalPrice = (resultsMap.minTotalPrice==0 || resultsMap.maxTotalPrice==0)?"暂无":(parseFloat(resultsMap.minTotalPrice)/10000).toFixed(2)+"万"+" - "+(parseFloat(resultsMap.maxTotalPrice)/10000).toFixed(2)+"万";
houseInfo.minAndMaxPrice = (resultsMap.minPrice==0 || resultsMap.maxPrice==0)?"暂无":(parseFloat(resultsMap.minPrice)/10000).toFixed(2)+"万/㎡"+" - "+(parseFloat(resultsMap.maxPrice)/10000).toFixed(2)+"万/㎡";
@@ -437,6 +449,8 @@ function getAnalysisDetail(){
//控制周边中介量在当前城市排名显示
if(resultsMap.maxCityAgency == 0 || resultsMap.agencyLevel == 0 ){
$('#maxCityAgencyContent').hide();
//添加此topic, 控制结构显示
$('#maxCityAgencyContent_').show();
}
//周边房产中介显示
if(resultsMap.agencyCount == 0){
+7 -1
View File
@@ -80,9 +80,15 @@ function messageGoto(_this,operation,operationPage,mid){
// plus.webview.create(pages, pages, subpage_style);
// }
// plus.webview.show(pages);
mui.fire(plus.webview.getWebviewById('HBuilder'),'switchView',{
if(plus.webview.getWebviewById('H5693FF3D')==null){
mui.fire(plus.webview.getWebviewById('HBuilder'),'switchView',{
name:pages
});
}else{
mui.fire(plus.webview.getWebviewById('H5693FF3D'),'switchView',{
name:pages
});
}
}
if(operation==2){
if (operationPage != null && operationPage != "") {
+9 -24
View File
@@ -216,38 +216,23 @@
// 推送消息跳转页面
window.addEventListener('switchView',function(event){
var self = plus.webview.currentWebview();
console.log(event.detail.name)
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
var targetTab = event.detail.name;
if (targetTab == activeTab) {
console.log(event.detail.name);
if(plus.webview.getWebviewById('H5693FF3D')==null){
plus.webview.show(plus.webview.getWebviewById("HBuilder"));
}else{
plus.webview.show(plus.webview.getWebviewById("H5693FF3D"));
}
var targetTab = event.detail.name;
if (targetTab == activeTab) {
plus.webview.show(targetTab);
return;
}
//若为iOS平台或非首次显示,则直接显示
if(mui.os.ios||aniShow[targetTab]){
if(plus.webview.getWebviewById(targetTab)==null){
var sub = plus.webview.create(targetTab, targetTab, subpage_style)
self.append(sub);
}
plus.webview.show(targetTab);
}else{
//否则,使用fade-in动画,且保存变量
var temp = {};
temp[targetTab] = "true";
mui.extend(aniShow,temp);
plus.webview.show(targetTab,"fade-in",300);
}
//隐藏当前;
plus.webview.hide(activeTab);
//更改当前活跃的选项卡
activeTab = targetTab;
var defaultTab = document.getElementById(targetTab);
//模拟首页点击
mui.trigger(defaultTab, 'tap');
//切换选项卡高亮
var current = document.querySelector(".mui-bar-tab>.mui-tab-item.mui-active");
if (defaultTab !== current) {
if (defaultTab != current) {
current.classList.remove('mui-active');
defaultTab.classList.add('mui-active');
}
+7 -7
View File
@@ -20,16 +20,16 @@
<div class="page-group" id="app">
<div class="swiper-container guideSwiper dn" data-space-between="10">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(img,index) in guideImgs">
<img v-bind:src="img" class="guideImg01">
<div class="content-block" v-if="index==guideImgs.length-1">
<p><a class="button button-big theme">开启有房之旅</a></p>
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(img,index) in guideImgs">
<img v-bind:src="img">
<div class="content-block" v-if="index==guideImgs.length-1">
<p><a class="button button-big theme">开启有房之旅</a></p>
</div>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
<div class="swiper-pagination"></div>
</div>
<div class="page page-current">
<div class="content contentStart">
<a class="time" @click="skip()">跳过 <span id="time">5</span></a>
+1 -1
View File
@@ -264,7 +264,7 @@
<div class="item-inner">
<div class="item-title-row">
<div class="item-title">
<font>{{house.name}} {{house.houseNum+"号"}}{{house.roomNum+"室"}}</font><br>
<font>{{house.name}} {{house.houseRoomNum}}</font><br>
<small>{{house.city}}{{house.region}}{{house.address}}</small>
</div>
</div>
+2 -2
View File
@@ -38,7 +38,7 @@
</button>
<h1 class="title">置换方案建议</h1>
</header>
<div class="content contentSuggest" id="resultDiv" v-cloak>
<div class="content contentSuggest infinite-scroll infinite-scroll-bottom" data-distance="50" id="resultDiv" v-cloak>
<p>匹配出满足需求的<em>{{matchCount}}</em>个小区,智能推荐以下最合适的:</p>
<div class="selectContainer">
<div class="selectBox row">
@@ -92,7 +92,7 @@
</ul>
</div>
</div>
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
<div>
<div class="list-block media-list">
<ul class="list-container">
@@ -1278,6 +1278,11 @@ $.config = {router: false}
hotCitys : []
},methods: {
openHotCity:function(index) {
var eventType = "hotCityClick";
var dataMap = {};
dataMap["city"]=this.hotCitys[index].city;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
clicked('../house/cityDetail.html',true,false,{},{city:this.hotCitys[index].city},function(){
});
}
@@ -190,6 +190,12 @@ function addManagement(id, houseStatus, liveStatus){
}).then(function (response) {
var status = response.data.status;
if(status){
var eventType = "addEvaluateManageClick";
var dataMap = {};
dataMap["hid"]=id;
dataMap["liveStatus"]=liveStatus;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
$.toast(response.data.data);
$('.loadingBgDiv').show();
checkIsLogin();
@@ -95,22 +95,28 @@
</div>
</div>
<div class="topic">
<div class="topic" id="rankingAndPriceContent">
<div class="topicContent">
<div class="topicTitle01">{{name}}在{{city}}:</div>
<div class="topicContent_bottom" style="border-bottom:solid 1px #e7e7e7;padding-bottom:0.5rem;">
<div class="topicContent_bottom" id="rankingAndPriceContentRanking" style="border-bottom:solid 1px #e7e7e7;padding-bottom:0.5rem;">
<p style="margin-bottom:20px;">涨幅(近12个月)超过了<em>{{roseRanking}}%</em>的住宅</p>
<font><i id="roseRankingPercent" style=""></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>
<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">
<div class="topicContent_bottom" id="rankingAndPriceContentPrice">
<p>均价超过了<em>{{avgpriceRanking}}%</em>的住宅</p>
<div class="slider_note" id="sliderNotePercent" style="">
<img src="../../images/arrow_note_down.png">
<span>{{price}}元/㎡</span>
</div>
<font><i id="curRatePercent" style=""></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>
<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>
@@ -170,10 +176,16 @@
<div class="topicContent_bottom">
<p style="margin-bottom:20px;margin-top:0;color:#333;">周边中介量在{{city}}排名:<em style="float:right;">{{agencyLevel}}%</em></p>
<font><i style="" id="agencyLevelPercent"></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;">最高:{{maxCityAgency}}</span></small>
<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;">最高:{{maxCityAgency}}</span>
</small>
</div>
</div>
</li>
<li class="topic" style="display:none; border-top:none;" id="maxCityAgencyContent_">
<!-- 当 maxCityAgencyContent 不显示结构会乱, 添加次处控制 -->
</li>
</ul>
</div>
+7 -2
View File
@@ -118,7 +118,7 @@
<span class="icon icon-set"></span>
</button>
</header>
<div class="content">
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
<div class="topBg01">
<!-- 目前是登录后点击个人头像设置密码 -->
<img src="../../images/headPortrait.png" id="user_headImg" onclick="gotoUpdatePass()">
@@ -157,7 +157,7 @@
<a href="#tabList4" class="tab-link button">消息({{mm_num}})</a>
</div>
<div class="contentBox">
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
<div>
<div class="tabs">
<!-- 我的房产 -->
<div id="tabList1" class="tab active">
@@ -451,6 +451,11 @@ $(document).on("click",".confirm-ok", function () {
}).then(function (response) {
var status = response.data.status;
if(status){
var eventType = "deleteMyHouseClick";
var dataMap = {};
dataMap["hid"]=id;
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
$.toast(response.data.data);
//删除后,如果需要调用checkIsLogin,需要所有的参数初始化
//checkIsLogin();
+66 -36
View File
@@ -1248,48 +1248,60 @@ function getPosition(){
plus.geolocation.getCurrentPosition(function(p){
if(p.address.city==undefined){
city = "上海";
$("#input_city").text(city);
initData();
}else{
address = p.address.street;
province = p.address.province;
city = p.address.city;
region = p.address.district;
lng = p.coords.longitude;//获取到当前位置的经度
lat = p.coords.latitude;//获取到当前位置的纬度;
oriLng = p.coords.longitude;
oriLat = p.coords.latitude;
//alert("4"+oriLng);
if(city){
city = formatBaiduCity(city);
}
if(region.endWith("区")){
region = region.substring(0, region.length-1);
}
oriRegion = region;
oriCity = city;
$("#input_city").text(city);
axios.get("/rest/index/isChinaCity", {
params: {
city: city
}
})
.then(function (response) {
if(response.data.data.status==1){
address = p.address.street;
province = p.address.province;
region = p.address.district;
lng = p.coords.longitude;//获取到当前位置的经度
lat = p.coords.latitude;//获取到当前位置的纬度;
oriLng = p.coords.longitude;
oriLat = p.coords.latitude;
if(region.endWith("区")){
region = region.substring(0, region.length-1);
}
oriRegion = region;
oriCity = city;
}else{
city = "上海";
$("#input_city").text(city);
initRegionSelect(city);
localStorage.setItem("init_city", city);
//addLocation(lat,lng);
initBaseInfo(city,"","",0,0);
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
}
initData();
})
.catch(function (error) {
setTimeout(function(){
mui.init();
mui.openWindow({
url: 'error.html',
id:'error.html',
extras:{
//扩展参数
}
});
},10000)
console.log(error);
});
}
localStorage.setItem("init_city", city);
//addLocation(lat,lng);
$(".nowCity").text(city);
/*city="北京";
region="";
$("#input_city").text("北京");
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
initBaseInfo(city,region,address,lat,lng);
if(city!="上海"){
//$(".content").removeClass("pull-to-refresh-content");
$.destroyPullToRefresh(".content")
initRegionSelect(city);
$("#ShangHaiDiv").hide();
$("#otherCityDiv").show();
}else{
$.initPullToRefresh(".content")
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
}
}, function(e){
city = "上海";
$("#input_city").text(city);
@@ -1308,6 +1320,24 @@ function getPosition(){
);
}
function initData(){
$("#input_city").text(city);
localStorage.setItem("init_city", city);
//addLocation(lat,lng);
$(".nowCity").text(city);
initBaseInfo(city,region,address,lat,lng);
if(city!="上海"){
$.destroyPullToRefresh(".content")
initRegionSelect(city);
$("#ShangHaiDiv").hide();
$("#otherCityDiv").show();
}else{
$.initPullToRefresh(".content")
$("#ShangHaiDiv").show();
$("#otherCityDiv").hide();
}
}
/* 获取#region字数,截取#region前4字,并添加... */
var baseInfo = new Vue({
@@ -1326,7 +1356,7 @@ var baseInfo = new Vue({
function initBaseInfo(city,region,address,lat,lng){
//显示附近地址
if(address!=""){
if(address!="" || address!=undefined){
var nearAddressParam = address;
var length = address.length;
var textStr = "";