bug
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
|
||||
<div class="searchbar row commentReleaseBox dn">
|
||||
<div class="search-input col-85">
|
||||
<input type="text" maxlength="250">
|
||||
<input type="text" maxlength="250" id="commentInput">
|
||||
</div>
|
||||
<a class="col-15" id="publishBtn">发布</a>
|
||||
</div>
|
||||
@@ -538,17 +538,21 @@ function addComment(){
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
mui.init({
|
||||
beforeback: function() {
|
||||
//获得父页面的webview
|
||||
var list = plus.webview.getWebviewById('yfindex.html');
|
||||
//触发父页面的自定义事件(refresh),从而进行刷新
|
||||
mui.fire(list, 'refresh');
|
||||
//返回true,继续页面关闭逻辑
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$('#commentInput').on('click', function () {
|
||||
var target = this;
|
||||
// 使用定时器是为了让输入框上滑时更加自然
|
||||
/*setTimeout(function(){
|
||||
target.scrollIntoView(true);
|
||||
},100);*/
|
||||
setTimeout(function(){
|
||||
document.body.scrollTop = document.body.scrollHeight;
|
||||
target.scrollIntoView(true);
|
||||
},100);
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+18
-13
@@ -1253,7 +1253,6 @@ function getPosition(){
|
||||
$("#input_city").text("北京");
|
||||
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
||||
|
||||
|
||||
initBaseInfo(city,region,address,lat,lng);
|
||||
if(city!="上海"){
|
||||
initRegionSelect(city);
|
||||
@@ -1269,7 +1268,9 @@ function getPosition(){
|
||||
initRegionSelect(city);
|
||||
localStorage.setItem("init_city", city);
|
||||
addLocation(lat,lng);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
},
|
||||
{
|
||||
provider:'baidu',
|
||||
@@ -1703,7 +1704,7 @@ function addItems(number, lastIndex) {
|
||||
'<div class="card-footer">'+
|
||||
'<span>'+
|
||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</label>'+
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
@@ -1803,7 +1804,7 @@ function addItems(number, lastIndex) {
|
||||
dataObj[i].title+'</div></div>'+
|
||||
'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></div>'+
|
||||
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</span></div></div>'+
|
||||
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+dataObj[i].recommendCommentCount+'条</label></span></div></div>'+
|
||||
'<div class="item-media"><img src='+dataObj[i].coverImg+'></div>'+
|
||||
'</li></ul></div></div></div>';
|
||||
}
|
||||
@@ -2250,7 +2251,7 @@ $("body").delegate("#select_region .button", "click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2325,7 +2326,7 @@ $(".confirm_btn").on("click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2378,7 +2379,7 @@ $("#select_order li").on("click", function () {
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2448,7 +2449,7 @@ function getCityPriceLevel(cityParam){
|
||||
var minPrice = 0;
|
||||
var maxPrice = 0;
|
||||
if(select_price.indexOf("以上")!=-1){
|
||||
select_price = select_price.replaceAll("以上","");
|
||||
select_price = select_price.replace("以上","");
|
||||
minPrice = parseInt(select_price);
|
||||
maxPrice = 0;
|
||||
}else if(select_price.indexOf("不限")!=-1){
|
||||
@@ -2531,16 +2532,20 @@ function openNewsView(newId) {
|
||||
// }
|
||||
// });
|
||||
clicked('views/news/newsDetail.html',true,false,{},{newsId:newId},function(newId){
|
||||
alert(newId);
|
||||
axios.post("/rest/comment/getCommentCount",{commentObjId : newId}).then(function (response) {
|
||||
var msg = response.data.message
|
||||
if(response.data.status){
|
||||
$("#visitComment_"+newId).text(response.data.data+"条");
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},newId);
|
||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||
$("#visitCount_"+newId).text(count+'人');
|
||||
}
|
||||
|
||||
window.addEventListener('refresh', function(e){//执行刷新
|
||||
alert("aa");
|
||||
});
|
||||
|
||||
</script>
|
||||
<script>
|
||||
/* 获取附近小区名称字数,截取附近小区名称前5字,并添加... */
|
||||
|
||||
Reference in New Issue
Block a user