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

This commit is contained in:
zongzhimin
2018-04-02 16:30:05 +08:00
6 changed files with 83 additions and 45 deletions
+1 -1
View File
@@ -538,7 +538,7 @@ input::-webkit-input-placeholder{
.list-block.commentList .item-text{height:auto;min-height:1.5rem;} .list-block.commentList .item-text{height:auto;min-height:1.5rem;}
.commentBox{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;} .commentBox{height:66px;background:#fff;position:absolute;right:0;left:0;bottom:0;z-index:10;}
.commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #DCDCDC;position:absolute;right:0;left:0;bottom:0;z-index:10;} .commentBox .searchbar{padding:0.75rem 0.5rem;padding-left:0;margin:0;height:66px;background:#fff;border-top:solid 1px #e7e7e7;position:absolute;right:0;left:0;bottom:0;z-index:10;}
.commentBox .searchbar .search-input{line-height:36px;} .commentBox .searchbar .search-input{line-height:36px;}
.commentBox .searchbar .search-input input{height:36px;background:#EFEFEF;} .commentBox .searchbar .search-input input{height:36px;background:#EFEFEF;}
.commentBox .searchbar.commentInputBox .search-input input{padding-left:1.8rem;} .commentBox .searchbar.commentInputBox .search-input input{padding-left:1.8rem;}
+22 -4
View File
@@ -7,22 +7,40 @@ document.addEventListener('touchstart',shield,false);//取消浏览器的所有
document.oncontextmenu=shield;//屏蔽选择函数 document.oncontextmenu=shield;//屏蔽选择函数
// H5 plus事件处理 // H5 plus事件处理
var ws=null,as='pop-in'; var ws=null,as='pop-in';
(function() {
var first = null;
mui.back = function() { //首次按键,提示‘再按一次退出应用’
if (!first) {
first = new Date().getTime();
mui.toast('再按一次退出应用');
setTimeout(function() {
first = null;
}, 1000);
} else {
if (new Date().getTime() - first > 1000) {
plus.runtime.quit();
}
}
};
})
function plusReady(){ function plusReady(){
ws=plus.webview.currentWebview(); /*ws=plus.webview.currentWebview();
// Android处理返回键 // Android处理返回键
plus.key.addEventListener('backbutton',function(){ plus.key.addEventListener('backbutton',function(){
/*if (ws.id == 'yfindex.html') { if (ws.id == 'yfindex.html') {
alert("aa")
plus.nativeUI.confirm("确认退出",function(e) { plus.nativeUI.confirm("确认退出",function(e) {
alert(e.index);
if(e.index == 0) { if(e.index == 0) {
plus.runtime.quit(); plus.runtime.quit();
} }
}); });
} else { } else {
back(); back();
}*/ }
back(); back();
},false); },false);
compatibleAdjust(); compatibleAdjust();*/
} }
if(w.plus){ if(w.plus){
plusReady(); plusReady();
+30 -12
View File
@@ -13,9 +13,6 @@
<link rel="stylesheet" href="../../css/theme-orange.css"> <link rel="stylesheet" href="../../css/theme-orange.css">
<style> <style>
/*em{font-style:normal;}
em.up{color:#ff1100;}
em.down{color:#2cb66a;}*/
.list-block .item-title{font-size:0.85rem;} .list-block .item-title{font-size:0.85rem;}
.list-block .item-title span.span01{font-size:0.7rem;color:#666;margin-left:0.3rem;} .list-block .item-title span.span01{font-size:0.7rem;color:#666;margin-left:0.3rem;}
.icon-add{width:0.6rem;height:0.6rem;background:url(../../images/icon-add.png) no-repeat center center;background-size:100%;margin-right:0.3rem;} .icon-add{width:0.6rem;height:0.6rem;background:url(../../images/icon-add.png) no-repeat center center;background-size:100%;margin-right:0.3rem;}
@@ -89,6 +86,9 @@ var uid = "162167854504869888";
/* 房产用途 */ /* 房产用途 */
$(document).on('click','.open-vertical-modal', function () { $(document).on('click','.open-vertical-modal', function () {
//获取对应<li>栏目存储的houseinfo id
var id = $(this).attr("id");
var houseStatus = $(this).attr("houseStatus");
$.modal({ $.modal({
title: '房产用途', title: '房产用途',
verticalButtons: true, verticalButtons: true,
@@ -96,21 +96,19 @@ $(document).on('click','.open-vertical-modal', function () {
{ {
text: '自住', text: '自住',
onClick: function() { onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html"; addManagement(id, houseStatus, "自住");
} }
}, },
{ {
text: '出租', text: '出租',
onClick: function() { onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html"; addManagement(id, houseStatus, "出租");
} }
}, },
{ {
text: '空置', text: '空置',
onClick: function() { onClick: function() {
//window.location.href = "01_index01_myHouse01_index.html"; addManagement(id, houseStatus, "空置");
} }
}, },
{ {
@@ -120,7 +118,27 @@ $(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);
});
}
//查询房产评估列表AJAX请求
function selectEvaluateList(){ function selectEvaluateList(){
//先清空列表 //先清空列表
$('.list-block ul').html(""); $('.list-block ul').html("");
@@ -189,9 +207,9 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey]; var cityAvgPriceValue = cityAvgPriceMap[cityAvgPriceKey];
if(!isNaN(cityAvgPriceValue)){ if(!isNaN(cityAvgPriceValue)){
if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){ if(parseInt(cityAvgPriceValue)>=parseInt(result.price)){
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>"+'高'+(parseInt(cityAvgPriceValue)-parseInt(result.price))+'元'+"</em></div>"; htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='up'>高"+(parseInt(cityAvgPriceValue)-parseInt(result.price))+"元</em></div>";
}else{ }else{
htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>"+'低'+(parseInt(result.price)-parseInt(cityAvgPriceValue))+'元'+"</em></div>"; htmlContent = htmlContent + "<div>相比"+result.city+"均价: <em class='down'>低"+(parseInt(result.price)-parseInt(cityAvgPriceValue))+"元</em></div>";
} }
}else{ }else{
//为非数字清空放空格 //为非数字清空放空格
@@ -199,7 +217,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
} }
htmlContent = htmlContent + "<div>均价: <em class='em02'>"+result.price+"元/㎡</em></div>"; htmlContent = htmlContent + "<div>均价: <em class='em02'>"+result.price+"元/㎡</em></div>";
htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</strong>万</em></div>"; htmlContent = htmlContent + "<div class='price'><em><strong>"+tempTotalPrice+"</strong>万</em></div>";
htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal'><i class='icon icon-add' id="+result.id+" uid="+result.uid+"></i>添加管理</a>" htmlContent = htmlContent + "</div></div></a><a class='add open-vertical-modal' id="+result.id+" uid="+result.uid+" houseStatus="+result.houseStatus+"><i class='icon icon-add'></i>添加管理</a>"
htmlContent = htmlContent +"</li>"; htmlContent = htmlContent +"</li>";
} }
} }
+3 -17
View File
@@ -47,7 +47,7 @@
<div class="item-title-row"> <div class="item-title-row">
<div class="item-title">城<small class="spacing">&nbsp;</small>市</div> <div class="item-title">城<small class="spacing">&nbsp;</small>市</div>
<div class="item-after"> <div class="item-after">
<input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" value="上海"> <input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" readonly="readonly" value="上海">
</div> </div>
</div> </div>
</div> </div>
@@ -89,20 +89,6 @@
</div> </div>
</a> </a>
</li> </li>
<!--
<li>
<a class="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_building01" class="textAlignLeft" placeholder="请输入楼栋室号">
</div>
</div>
</div>
</a>
</li>
-->
<li> <li>
<a class="item-link item-content"> <a class="item-link item-content">
<div class="item-inner"> <div class="item-inner">
@@ -135,7 +121,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="popover"> <!--<div class="popover">
<div class="popover-angle"></div> <div class="popover-angle"></div>
<div class="popover-inner"> <div class="popover-inner">
<div class="list-block"> <div class="list-block">
@@ -147,7 +133,7 @@
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>-->
</div> </div>
<!-- About Popup --> <!-- About Popup -->
+27 -10
View File
@@ -71,7 +71,7 @@
<div class="bar commentBox"> <div class="bar commentBox">
<div class="searchbar row commentInputBox"> <div class="searchbar row commentInputBox">
<div class="search-input col-66"> <div class="search-input col-60">
<label class="icon icon-comments" for="search"></label> <label class="icon icon-comments" for="search"></label>
<input type="text" placeholder="我也说两句"> <input type="text" placeholder="我也说两句">
</div> </div>
@@ -80,7 +80,7 @@
<a class="collection collection01"><i class="icon icon-collection01"></i></a> <a class="collection collection01"><i class="icon icon-collection01"></i></a>
</span>--> </span>-->
<span class="praise col-15"> <span class="praise col-20">
<i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font> <i class="icon icon-praise-grey02"></i><font id="newsPraise">{{ newsDzCount }}</font>
</span> </span>
<span class="collection collection01 col-15"> <span class="collection collection01 col-15">
@@ -125,7 +125,7 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/shara/sharaMine.js" ></script> <script type="text/javascript" src="../../js/shara/sharaMine.js" ></script>
<script> <script>
document.addEventListener('plusready', onPlusReady, false); document.addEventListener('plusready', onPlusReady, false);
var id;//= "186182250936643584"; var id; //= "186182250936643584";
var shareUrl = BASE_PATH+"/news/newDetail?newsId="; var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花"; var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
var sharehrefDes = "客观里面请!"; var sharehrefDes = "客观里面请!";
@@ -187,7 +187,7 @@ function onPlusReady() {
$("#create_time").text(dateStr) $("#create_time").text(dateStr)
$("#content").html(data.content) $("#content").html(data.content)
//$("#newsPraise").text(data.thumbsUpCount); //$("#newsPraise").text(data.thumbsUpCount);
vm.newsDzCount = data.thumbsUpCount vm.newsDzCount = numberConver(data.thumbsUpCount)
//预先加载20条 //预先加载20条
sharehrefTitle = data.title sharehrefTitle = data.title
@@ -208,6 +208,16 @@ function onPlusReady() {
updateSerivces(); updateSerivces();
} }
//数量进行转换
function numberConver(thumbsUpCount){
var thumbsUpCountStr = ""
if(thumbsUpCount>=10000){
thumbsUpCountStr = (thumbsUpCount/10000).toFixed(1)+"万"
}else{
thumbsUpCountStr = thumbsUpCount
}
return thumbsUpCountStr;
}
function isCollect(){ function isCollect(){
@@ -297,7 +307,7 @@ function addItems(number, lastIndex) {
} }
html = html + "<div class='item-title-row'>"+ html = html + "<div class='item-title-row'>"+
"<div class='item-title'>"+name+"</div>"+ "<div class='item-title'>"+name+"</div>"+
"<div class='item-after'><span data-cid='"+vo.id+"'><i class='icon icon-praise-grey01'></i><label>"+vo.praiseCount+"</label></span></div>"+ "<div class='item-after'><span data-cid='"+vo.id+"'><i class='icon icon-praise-grey01'></i><label>"+numberConver(vo.praiseCount)+"</label></span></div>"+
"</div>"+ "</div>"+
"<div class='item-title-row'>"; "<div class='item-title-row'>";
var address = ""; var address = "";
@@ -421,7 +431,7 @@ function getDateDiff(curTime, publishTime){
/* 评论点赞 */ /* 评论点赞 */
$("body").delegate(".commentList span .icon-praise-grey01", "click", function () { $("body").delegate(".commentList span .icon-praise-grey01", "click", function () {
$(this).find(".icon").addClass("icon-praise-orange01"); $(this).addClass("icon-praise-orange01");
var cid = $(this).parent().attr("data-cid") var cid = $(this).parent().attr("data-cid")
$(this).attr("disabled","disabled"); $(this).attr("disabled","disabled");
var text = $(this).parent().text(); var text = $(this).parent().text();
@@ -579,20 +589,27 @@ function utf16toEntities(str) {
return str; return str;
} }
//$(window).bind('resize',_funResize);
var _funResize = function(){
document.body.scrollTop = document.body.scrollHeight;
target.scrollIntoView(true);
}
$(function() { $(function() {
$('#commentInput').on('click', function () { $('#commentInput').on('click', function () {
var target = this; var target = this;
// 使用定时器是为了让输入框上滑时更加自然 // 使用定时器是为了让输入框上滑时更加自然
/*setTimeout(function(){
target.scrollIntoView(true);
},100);*/
setTimeout(function(){ setTimeout(function(){
document.body.scrollTop = document.body.scrollHeight; document.body.scrollTop = document.body.scrollHeight;
target.scrollIntoView(true); target.scrollIntoView(true);
},100); },100);
}); });
}) })
</script> </script>
</body> </body>
</html> </html>
-1
View File
@@ -1197,7 +1197,6 @@ String.prototype.endWith = function(str) {
var reg = new RegExp(str + "$"); var reg = new RegExp(str + "$");
return reg.test(this); return reg.test(this);
} }
/** /**
* 获取手机上的信息,比如位置,手机ID * 获取手机上的信息,比如位置,手机ID
* @author yinjihuan * @author yinjihuan