Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -1,8 +1,39 @@
|
|||||||
|
var auths = {}
|
||||||
|
function plusReady() {
|
||||||
|
plus.oauth.getServices(function(services) {
|
||||||
|
alert("111111111111111111111111")
|
||||||
|
auths = services;
|
||||||
|
}, function(e) {
|
||||||
|
alert("获取登录服务列表失败:" + e.message + " - " + e.code);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
document.addEventListener('plusready',plusReady,false);
|
||||||
|
// 登录认证
|
||||||
|
function webChatLogin(){
|
||||||
|
var auth=auths['weixin'];
|
||||||
|
if(auth){
|
||||||
|
var w=null;
|
||||||
|
if(plus.os.name=="Android"){
|
||||||
|
w=plus.nativeUI.showWaiting();
|
||||||
|
}
|
||||||
|
document.addEventListener("pause",function(){
|
||||||
|
setTimeout(function(){
|
||||||
|
w&&w.close();w=null;
|
||||||
|
},2000);
|
||||||
|
}, false );
|
||||||
|
auth.login(function(){
|
||||||
|
w&&w.close();w=null;
|
||||||
|
userinfo(auth);
|
||||||
|
},function(e){
|
||||||
|
w&&w.close();w=null;
|
||||||
|
$.toast("登录认证失败:["+e.code+"]:"+e.message);
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
$.toast("无效的登录认证通道!");
|
||||||
|
$.toast("无效的登录认证通道!",null,"登录");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$("#wxLogin").addEventListener('tap',function() {
|
|
||||||
console.log("微信");
|
|
||||||
authLogin('weixin');
|
|
||||||
})
|
|
||||||
function authLogin(type) {
|
function authLogin(type) {
|
||||||
console.log("hhhhhhhhhhhhhhhhhhh")
|
console.log("hhhhhhhhhhhhhhhhhhh")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.list-block .item-text{-webkit-line-clamp:unset;}
|
.list-block .item-text{-webkit-line-clamp:unset;}
|
||||||
|
.content-padded img {width: auto;}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
|
|
||||||
<div class="searchbar row commentReleaseBox dn">
|
<div class="searchbar row commentReleaseBox dn">
|
||||||
<div class="search-input col-85">
|
<div class="search-input col-85">
|
||||||
<input type="text" maxlength="250">
|
<input type="text" maxlength="250" id="commentInput">
|
||||||
</div>
|
</div>
|
||||||
<a class="col-15" id="publishBtn">发布</a>
|
<a class="col-15" id="publishBtn">发布</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -116,7 +117,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//= "183627425584775168";
|
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 = "客观里面请!";
|
||||||
@@ -549,17 +550,21 @@ function addComment(){
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
mui.init({
|
$(function() {
|
||||||
beforeback: function() {
|
$('#commentInput').on('click', function () {
|
||||||
//获得父页面的webview
|
var target = this;
|
||||||
var list = plus.webview.getWebviewById('yfindex.html');
|
// 使用定时器是为了让输入框上滑时更加自然
|
||||||
//触发父页面的自定义事件(refresh),从而进行刷新
|
/*setTimeout(function(){
|
||||||
mui.fire(list, 'refresh');
|
target.scrollIntoView(true);
|
||||||
//返回true,继续页面关闭逻辑
|
},100);*/
|
||||||
return true;
|
setTimeout(function(){
|
||||||
}
|
document.body.scrollTop = document.body.scrollHeight;
|
||||||
});
|
target.scrollIntoView(true);
|
||||||
|
},100);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<span>第三方登录</span>
|
<span>第三方登录</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a class="icon icon-loginMode01" id="wxLogin"></a>
|
<a class="icon icon-loginMode01" id="wxLogin" onclick="webChatLogin()"></a>
|
||||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode02"></a>
|
<a href="05_mine00_login04_set.html" class="icon icon-loginMode02"></a>
|
||||||
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03" id="qqLogin"></a>
|
<a href="05_mine00_login04_set.html" class="icon icon-loginMode03" id="qqLogin"></a>
|
||||||
</p>
|
</p>
|
||||||
@@ -101,14 +101,6 @@ $.config = {router: false}
|
|||||||
<script type="text/javascript" src="../../js/common.js" ></script>
|
<script type="text/javascript" src="../../js/common.js" ></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var auths = ''
|
|
||||||
mui.plusReady(function() {
|
|
||||||
plus.oauth.getServices(function(services) {
|
|
||||||
auths = services;
|
|
||||||
}, function(e) {
|
|
||||||
alert("获取登录服务列表失败:" + e.message + " - " + e.code);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
/* 勾选-已阅读 */
|
/* 勾选-已阅读 */
|
||||||
|
|||||||
+18
-13
@@ -1253,7 +1253,6 @@ function getPosition(){
|
|||||||
$("#input_city").text("北京");
|
$("#input_city").text("北京");
|
||||||
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
||||||
|
|
||||||
|
|
||||||
initBaseInfo(city,region,address,lat,lng);
|
initBaseInfo(city,region,address,lat,lng);
|
||||||
if(city!="上海"){
|
if(city!="上海"){
|
||||||
initRegionSelect(city);
|
initRegionSelect(city);
|
||||||
@@ -1269,7 +1268,9 @@ function getPosition(){
|
|||||||
initRegionSelect(city);
|
initRegionSelect(city);
|
||||||
localStorage.setItem("init_city", city);
|
localStorage.setItem("init_city", city);
|
||||||
addLocation(lat,lng);
|
addLocation(lat,lng);
|
||||||
initBaseInfo(city,"","",0,0);
|
initBaseInfo(city,"","",0,0);
|
||||||
|
$("#ShangHaiDiv").show();
|
||||||
|
$("#otherCityDiv").hide();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provider:'baidu',
|
provider:'baidu',
|
||||||
@@ -1703,7 +1704,7 @@ function addItems(number, lastIndex) {
|
|||||||
'<div class="card-footer">'+
|
'<div class="card-footer">'+
|
||||||
'<span>'+
|
'<span>'+
|
||||||
'<i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+dataObj[i].visitCount+'人</label>'+
|
'<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>'+
|
'</span>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>';
|
'</div>';
|
||||||
@@ -1803,7 +1804,7 @@ function addItems(number, lastIndex) {
|
|||||||
dataObj[i].title+'</div></div>'+
|
dataObj[i].title+'</div></div>'+
|
||||||
'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></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>'+
|
'<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>'+
|
'<div class="item-media"><img src='+dataObj[i].coverImg+'></div>'+
|
||||||
'</li></ul></div></div></div>';
|
'</li></ul></div></div></div>';
|
||||||
}
|
}
|
||||||
@@ -2250,7 +2251,7 @@ $("body").delegate("#select_region .button", "click", function () {
|
|||||||
var minPrice = 0;
|
var minPrice = 0;
|
||||||
var maxPrice = 0;
|
var maxPrice = 0;
|
||||||
if(select_price.indexOf("以上")!=-1){
|
if(select_price.indexOf("以上")!=-1){
|
||||||
select_price = select_price.replaceAll("以上","");
|
select_price = select_price.replace("以上","");
|
||||||
minPrice = parseInt(select_price);
|
minPrice = parseInt(select_price);
|
||||||
maxPrice = 0;
|
maxPrice = 0;
|
||||||
}else if(select_price.indexOf("不限")!=-1){
|
}else if(select_price.indexOf("不限")!=-1){
|
||||||
@@ -2325,7 +2326,7 @@ $(".confirm_btn").on("click", function () {
|
|||||||
var minPrice = 0;
|
var minPrice = 0;
|
||||||
var maxPrice = 0;
|
var maxPrice = 0;
|
||||||
if(select_price.indexOf("以上")!=-1){
|
if(select_price.indexOf("以上")!=-1){
|
||||||
select_price = select_price.replaceAll("以上","");
|
select_price = select_price.replace("以上","");
|
||||||
minPrice = parseInt(select_price);
|
minPrice = parseInt(select_price);
|
||||||
maxPrice = 0;
|
maxPrice = 0;
|
||||||
}else if(select_price.indexOf("不限")!=-1){
|
}else if(select_price.indexOf("不限")!=-1){
|
||||||
@@ -2378,7 +2379,7 @@ $("#select_order li").on("click", function () {
|
|||||||
var minPrice = 0;
|
var minPrice = 0;
|
||||||
var maxPrice = 0;
|
var maxPrice = 0;
|
||||||
if(select_price.indexOf("以上")!=-1){
|
if(select_price.indexOf("以上")!=-1){
|
||||||
select_price = select_price.replaceAll("以上","");
|
select_price = select_price.replace("以上","");
|
||||||
minPrice = parseInt(select_price);
|
minPrice = parseInt(select_price);
|
||||||
maxPrice = 0;
|
maxPrice = 0;
|
||||||
}else if(select_price.indexOf("不限")!=-1){
|
}else if(select_price.indexOf("不限")!=-1){
|
||||||
@@ -2448,7 +2449,7 @@ function getCityPriceLevel(cityParam){
|
|||||||
var minPrice = 0;
|
var minPrice = 0;
|
||||||
var maxPrice = 0;
|
var maxPrice = 0;
|
||||||
if(select_price.indexOf("以上")!=-1){
|
if(select_price.indexOf("以上")!=-1){
|
||||||
select_price = select_price.replaceAll("以上","");
|
select_price = select_price.replace("以上","");
|
||||||
minPrice = parseInt(select_price);
|
minPrice = parseInt(select_price);
|
||||||
maxPrice = 0;
|
maxPrice = 0;
|
||||||
}else if(select_price.indexOf("不限")!=-1){
|
}else if(select_price.indexOf("不限")!=-1){
|
||||||
@@ -2531,16 +2532,20 @@ function openNewsView(newId) {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
clicked('views/news/newsDetail.html',true,false,{},{newsId:newId},function(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);
|
},newId);
|
||||||
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
var count = parseInt($("#visitCount_"+newId).text().replace("人",""))+1;
|
||||||
$("#visitCount_"+newId).text(count+'人');
|
$("#visitCount_"+newId).text(count+'人');
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('refresh', function(e){//执行刷新
|
|
||||||
alert("aa");
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
/* 获取附近小区名称字数,截取附近小区名称前5字,并添加... */
|
/* 获取附近小区名称字数,截取附近小区名称前5字,并添加... */
|
||||||
|
|||||||
Reference in New Issue
Block a user