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-08 16:19:00 +08:00
11 changed files with 130 additions and 42 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
</button>
</header>
<div class="content contentError">
<img src="img/errorInternet.png">
<img src="images/errorInternet.png">
<em>网络加载异常</em>
<p>请返回重试或检查网络设置</p>
<div class="content-block">
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

+15 -4
View File
@@ -542,11 +542,22 @@ function showRentChart2(categories, series, roomDatas){
fontSize: 12
},
formatter: function (params) {
if(params[0].value){
var res = params[0].name + ' <br/>' + "租金:"+params[0].value + '元/月';
return res;
if(params && params.length>0){
var s = "";
for(var i in params){
var ob = params[i]
if(i == 0){
s += ob.name+"<br/>";
}
if(ob.value){
s += ob.seriesName+ ": "+ ob.value + '元/月<br/>';
}
}
if(s){
return s;
}
}
}
},
grid:{
+8
View File
@@ -5,6 +5,10 @@
document.addEventListener("plusready", function() {
// 监听点击消息事件
plus.push.addEventListener("click", function(msg) {
//刷新个人中心
if (plus.webview.getWebviewById('views/user/userInfo.html') != null) {
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
// 判断是从本地创建还是离线推送的消息
var payload = msg.payload;
var title = msg.title;
@@ -87,6 +91,10 @@ document.addEventListener("plusready", function() {
// 监听在线消息事件, iOS透传消息在线时会进入这里进行处理
plus.push.addEventListener("receive", function(msg) {
//刷新个人中心
if (plus.webview.getWebviewById('views/user/userInfo.html') != null) {
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
var title = msg.title;
var content = msg.content;
var payload = msg.payload;
+52 -12
View File
@@ -44,7 +44,7 @@ $(document).on('click','.modal01 .cancel_btn', function () {
$('.modal01').hide();
$('.modal01-overlay').hide();
//清空对于的输入框
$("#input_time").val('');
// $("#input_time").val('');
$("#input_price").val('');
});
@@ -53,7 +53,7 @@ $(document).on('click','.modal01 .close', function () {
$('.modal01').hide();
$('.modal01-overlay').hide();
//清空对于的输入框
$("#input_time").val('');
// $("#input_time").val('');
$("#input_price").val('');
});
@@ -380,9 +380,9 @@ function getAnalysisDetail(){
//增长率及收益跳转链接是否显示
if(resultsMap.ad!=null){
$('#showAdBox1').show();
$('#showAdBox1Content').html(resultsMap.ad.content + "<i class='icon icon-right icon-right01'></i>");
//如果link有值,添加调整路径
if(resultsMap.ad.link!=null && resultsMap.ad.link.length>0){
if(resultsMap.ad.link!=null && resultsMap.ad.link.length>0 && resultsMap.ad.content!=null && resultsMap.ad.content.length>0){
$('#showAdBox1Content').html(resultsMap.ad.content + "<i class='icon icon-right icon-right01'></i>");
$("#showAdBox1").click(function(){
clicked('../../views/webview_embed.html', true,false,{},{url:resultsMap.ad.link})
})
@@ -403,9 +403,9 @@ function getAnalysisDetail(){
//挂牌建议跳转链接是否显示
if(resultsMap.ad1!=null){
$('#showAdBox2').show();
$('#showAdBox2Content').html(resultsMap.ad1.content + "<i class='icon icon-right icon-right01'></i>");
//如果link有值,添加调整路径
if(resultsMap.ad1.link!=null && resultsMap.ad1.link.length>0){
if(resultsMap.ad1.link!=null && resultsMap.ad1.link.length>0 && resultsMap.ad1.content!=null && resultsMap.ad1.content.length>0){
$('#showAdBox2Content').html(resultsMap.ad1.content + "<i class='icon icon-right icon-right01'></i>");
$("#showAdBox2").click(function(){
clicked('../../views/webview_embed.html', true,false,{},{url:resultsMap.ad1.link})
})
@@ -460,8 +460,24 @@ function addItemsGuaPai(resultsMap){
htmlGuaPai += "<div class='item-title'><span class='c3 c3a'>"+resultsMap.houses[i].district_name+"</span><span class='c6 c6a'>"+resultsMap.houses[i].area+"㎡</span></div>";
var tempTotalPrice = resultsMap.houses[i].total_price == 0?"暂无":(parseFloat(resultsMap.houses[i].total_price)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.houses[i].avg_price == 0?"暂无":resultsMap.houses[i].avg_price+"元/㎡";
var roomHallDirectionFitment = "";
if(resultsMap.houses[i].room != undefined && resultsMap.houses[i].room != 0 && resultsMap.houses[i].hall != undefined && resultsMap.houses[i].hall != 0){
roomHallDirectionFitment += resultsMap.houses[i].room+"室"+resultsMap.houses[i].hall+"厅";
if((resultsMap.houses[i].direction != undefined && resultsMap.houses[i].direction != "") || (resultsMap.houses[i].fitment != undefined && resultsMap.houses[i].fitment != "")){
roomHallDirectionFitment += "/";
}
}
if(resultsMap.houses[i].direction != undefined && resultsMap.houses[i].direction != ""){
roomHallDirectionFitment += resultsMap.houses[i].direction;
if(resultsMap.houses[i].fitment != undefined && resultsMap.houses[i].fitment != ""){
roomHallDirectionFitment += "/";
}
}
if(resultsMap.houses[i].fitment != undefined && resultsMap.houses[i].fitment != ""){
roomHallDirectionFitment += resultsMap.houses[i].fitment;
}
htmlGuaPai += "<div class='item-after'><em>"+tempTotalPrice+"</em></div></div><div class='item-title-row'>";
htmlGuaPai += "<div class='item-title'><span>"+resultsMap.houses[i].room+"室"+resultsMap.houses[i].hall+"厅/"+resultsMap.houses[i].direction+"/"+resultsMap.houses[i].fitment+"</span></div>";
htmlGuaPai += "<div class='item-title'><span>"+roomHallDirectionFitment+"</span></div>";
htmlGuaPai += "<div class='item-after''><span>"+tempAvgPrice+"</span></div></div></div></a></li>";
}
htmlGuaPai += '</ul></div></div>';
@@ -477,8 +493,24 @@ function addItemsGuaPai(resultsMap){
htmlGuaPai += "<div class='item-title'><span class='c3 c3a'>"+resultsMap.disHouses[i].districtName+"</span><span class='c6 c6a'>"+resultsMap.disHouses[i].area+"㎡</span></div>";
var tempTotalPrice = resultsMap.disHouses[i].totalPrice == 0?"暂无":(parseFloat(resultsMap.disHouses[i].totalPrice)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.disHouses[i].avgPrice == 0?"暂无":resultsMap.disHouses[i].avgPrice+"元/㎡";
var roomHallDirectionFitment = "";
if(resultsMap.disHouses[i].room != undefined && resultsMap.disHouses[i].room != 0 && resultsMap.disHouses[i].hall != undefined && resultsMap.disHouses[i].hall != 0){
roomHallDirectionFitment += resultsMap.disHouses[i].room+"室"+resultsMap.disHouses[i].hall+"厅";
if((resultsMap.disHouses[i].direction != undefined && resultsMap.disHouses[i].direction != "") || (resultsMap.disHouses[i].fitment != undefined && resultsMap.disHouses[i].fitment != "")){
roomHallDirectionFitment += "/";
}
}
if(resultsMap.disHouses[i].direction != undefined && resultsMap.disHouses[i].direction != ""){
roomHallDirectionFitment += resultsMap.disHouses[i].direction;
if(resultsMap.disHouses[i].fitment != undefined && resultsMap.disHouses[i].fitment != ""){
roomHallDirectionFitment += "/";
}
}
if(resultsMap.disHouses[i].fitment != undefined && resultsMap.disHouses[i].fitment != ""){
roomHallDirectionFitment += resultsMap.disHouses[i].fitment;
}
htmlGuaPai += "<div class='item-after'><em>"+tempTotalPrice+"</em></div></div><div class='item-title-row'>";
htmlGuaPai += "<div class='item-title'><span>"+resultsMap.disHouses[i].room+"室"+resultsMap.disHouses[i].hall+"厅/"+resultsMap.disHouses[i].direction+"/"+resultsMap.disHouses[i].fitment+"</span></div>";
htmlGuaPai += "<div class='item-title'><span>"+roomHallDirectionFitment+"</span></div>";
htmlGuaPai += "<div class='item-after'><span>"+tempAvgPrice+"</span></div></div></div></a></li>";
}
htmlGuaPai += '</ul></div></div>';
@@ -516,9 +548,13 @@ function addItemsChengJiao(resultsMap){
htmlChengJiao += "<div class='item-title'><span class='c3 c3a'>"+resultsMap.sells[i].district_name+"</span></div>";
var tempTotalPrice = resultsMap.sells[i].total_price == 0?"暂无":(parseFloat(resultsMap.sells[i].total_price)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.sells[i].avg_price == 0?"暂无":resultsMap.sells[i].avg_price+"元/㎡";
var tradeDate = resultsMap.sells[i].trade_date == null?"暂无":formatTime(resultsMap.sells[i].trade_date)+"签约";
var tradeDate = (resultsMap.sells[i].trade_date == undefined || resultsMap.sells[i].trade_date == null)?"暂无":formatTime(resultsMap.sells[i].trade_date)+"签约";
var direction_floor = (resultsMap.sells[i].direction == undefined || resultsMap.sells[i].direction == "")?"":resultsMap.sells[i].direction;
direction_floor += (resultsMap.sells[i].floor == undefined || resultsMap.sells[i].floor == "")?"":resultsMap.sells[i].floor + "层";
//如果direction/floor同时存在, 中间加一个"/"
if(resultsMap.sells[i].direction != undefined && resultsMap.sells[i].direction != "" && resultsMap.sells[i].floor != undefined && resultsMap.sells[i].floor != 0){
direction_floor += "/";
}
direction_floor += (resultsMap.sells[i].floor == undefined || resultsMap.sells[i].floor == 0)?"":resultsMap.sells[i].floor + "层";
htmlChengJiao += "<div class='item-after'><em>"+tempTotalPrice+"</em></div></div>";
htmlChengJiao += "<div class='item-title-row'><div class='item-title'><span>"+direction_floor+"</span></div>";
htmlChengJiao += "<div class='item-after'><span>"+tempAvgPrice+"</span></div></div>";
@@ -537,9 +573,13 @@ function addItemsChengJiao(resultsMap){
htmlChengJiao += "<div class='item-title'><span class='c3 c3a'>"+resultsMap.disSellHouses[i].districtName+"</span></div>";
var tempTotalPrice = resultsMap.disSellHouses[i].totalPrice == 0?"暂无":(parseFloat(resultsMap.disSellHouses[i].totalPrice)/10000).toFixed(2)+"万";
var tempAvgPrice = resultsMap.disSellHouses[i].avgPrice == 0?"暂无":resultsMap.disSellHouses[i].avgPrice+"元/㎡";
var tradeDate = resultsMap.disSellHouses[i].tradeDate == null?"暂无":formatTime(resultsMap.disSellHouses[i].tradeDate)+"签约";
var tradeDate = (resultsMap.disSellHouses[i].tradeDate == undefined || resultsMap.disSellHouses[i].tradeDate == null)?"暂无":formatTime(resultsMap.disSellHouses[i].tradeDate)+"签约";
var direction_floor = (resultsMap.disSellHouses[i].direction == undefined || resultsMap.disSellHouses[i].direction == "")?"":resultsMap.disSellHouses[i].direction;
direction_floor += (resultsMap.disSellHouses[i].floor == undefined || resultsMap.disSellHouses[i].floor == "")?"":resultsMap.disSellHouses[i].floor + "层";
//如果direction/floor同时存在, 中间加一个"/"
if(resultsMap.disSellHouses[i].direction != undefined && resultsMap.disSellHouses[i].direction != "" && resultsMap.disSellHouses[i].floor != undefined && resultsMap.disSellHouses[i].floor != 0){
direction_floor += "/";
}
direction_floor += (resultsMap.disSellHouses[i].floor == undefined || resultsMap.disSellHouses[i].floor == 0)?"":resultsMap.disSellHouses[i].floor + "层";
htmlChengJiao += "<div class='item-after'><em>"+tempTotalPrice+"</em></div></div>";
htmlChengJiao += "<div class='item-title-row'><div class='item-title'><span>"+direction_floor+"</span></div>";
htmlChengJiao += "<div class='item-after'><span>"+tempAvgPrice+"</span></div></div>";
+18 -8
View File
@@ -257,7 +257,7 @@
<div class="content-block content-block01 content">
<div class="container" style="top:0;">
<div class="list-block media-list" style="margin-bottom:0;">
<div class="searchHistory">房产列表</div>
<div class="searchHistory">房产列表<a class="close-popup">取消</a></div>
<ul>
<li v-for="house in houses" @click="addMyHouseInfo(house)">
<a class="item-link item-content close-popup">
@@ -1247,6 +1247,8 @@ $.config = {router: false}
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script type='text/javascript' src='../../js/searchDistrict-app.js?' charset='utf-8'></script>
<script type="text/javascript" src="../../js/city.js" ></script>
<script type="text/javascript">
var jQuery = $;
$.config = {router: false}
@@ -1254,7 +1256,7 @@ $.config = {router: false}
<script type='text/javascript' src='../../js/jquery.cookie.js?version=${version!}' charset='utf-8'></script>
<script>
var dCity = "上海"
var dCity = "北京"
var hsId = ""
var baseInfo = new Vue({
el: '#step1',
@@ -1294,6 +1296,8 @@ var houseListData = new Vue({
},
created:function(){
this.loadHouses();
}
})
@@ -1307,21 +1311,24 @@ var step2Vue = new Vue({
//加载第二步的区域列表
loadRegion: function(){
this.defaultCity = dCity
loadingRegion(dCity);
/*plus.geolocation.getCurrentPosition(function(p){
//this.defaultCity = dCity
//loadingRegion(dCity);
plus.geolocation.getCurrentPosition(function(p){
city = p.address.city;
var formatCity = formatBaiduCity(city);
step2Vue.defaultCity = formatCity
loadingRegion(formatCity);
}, function(e){
loadingRegion(city);
step2Vue.defaultCity = dCity
loadingRegion(dCity);
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);*/
);
},
clickTags: function(e){
@@ -1363,6 +1370,7 @@ function onPlusReady() {
//小区报告页带入
fillHouseInfo(houseId);
}
}
//修改置换建议填充默认值
@@ -1848,7 +1856,9 @@ $("#citySearchInp").bind('keyup', function() {
});
function openAddHouse(){
clicked('/views/house/add.html',true,false,{},{});
clicked('/views/house/add.html',true,false,{},{source:"changeHouse"},function(){
houseListData.loadHouses();
});
}
/* 定位城市 */
+1 -1
View File
@@ -285,7 +285,7 @@ $.config = {router: false}
var sharehrefTitle = "小区名";
var sharehrefDes = "小区详情介绍!";
var shareId='';
var picUrl = '../../img/default_share.png';
var picUrl = '../../images/default_share.png';
// baseInfo = new Vue({
// el: '#districtBaseInfo',
@@ -152,7 +152,7 @@ $.config = {router: false}
var sharehrefTitle = "小区名";
var sharehrefDes = "小区详情介绍!";
var shareId='';
var picUrl = '../../img/default_share.png';
var picUrl = '../../images/default_share.png';
var hid = "";
document.addEventListener('plusready', onPlusReady, false);
+32 -13
View File
@@ -1246,10 +1246,12 @@ $.config = {router: false}
document.addEventListener('plusready', onPlusReady, false);
var houseStatus; //= "186182250936643584";
//扩展API加载完毕,现在可以正常调用扩展API
var type = 1;
var type = 1;
var source = ""
function onPlusReady(){
var self = plus.webview.currentWebview();
type = self.type; //type为1时是我的房产
source = self.source
if(type==0){
$("#liveStatusDiv").show();
}else{
@@ -1875,6 +1877,7 @@ function checkIsLogin(){
function addEvaluation(){
var data={};
if(type==0){
data={id:requestId,cityDisplay: $("#input_city").val(),
region:$("input[name=region]").val(),
@@ -1892,6 +1895,12 @@ function addEvaluation(){
lastRentDate:$("#input_time03").val(),
houseStatus:0}
}else{
houseStatus = 1;
if(source=="changeHouse"){
houseStatus = 0;
}
data={id:requestId,cityDisplay: $("#input_city").val(),
region:$("input[name=region]").val(),
district:$("#input_address").val(),
@@ -1900,7 +1909,7 @@ function addEvaluation(){
loudongName:$("#input_building").val(),
floorName:$("#input_floor").val(),
area:$("#input_area").val(),
houseStatus:1}
houseStatus:houseStatus}
}
var eventType = "evaluateSubmitClick";
saveBehaviorLog(eventType,data); //保存用户点击事件
@@ -1910,19 +1919,29 @@ function addEvaluation(){
})
.then(function (response) {
if(response.data.data!=null && response.data.data.success){
$("#evaluation_btn").removeAttr("disabled");
var id = response.data.data.id;
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
if(source=="changeHouse"){
back(),plus.nativeUI.closeWaiting();
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
}else{
$("#evaluation_btn").removeAttr("disabled");
var id = response.data.data.id;
if(plus.webview.getWebviewById('views/house/houseManageList.html') != null) {
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){
getRequestId();
})
}
if(plus.webview.getWebviewById('views/user/userInfo.html')!= null){
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){
getRequestId();
})
}else{
$("#evaluation_btn").removeAttr("disabled");
$.toast(response.data.message);
+1 -1
View File
@@ -1223,7 +1223,7 @@ $.config = {router: false}
var sharehrefTitle = "房产行情,小区价格,房租信息全掌握";
var sharehrefDes = "客观里面请!";
//var shareId='全国';
var picUrl = '_www/img/default_share.png';
var picUrl = '_www/images/default_share.png';
var date = new Date();
var year = date.getFullYear()+'年';
+1 -1
View File
@@ -144,7 +144,7 @@ var city;
var region;
//var picUrl = '_www/logo.png';
var picUrl = '_www/img/default_share.png';
var picUrl = '_www/images/default_share.png';
//新闻评论列表