资讯加载

This commit is contained in:
2018-05-18 10:38:09 +08:00
parent 13aaa16f15
commit 4fd63752e3
+11 -9
View File
@@ -133,8 +133,8 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/city.js" ></script> <script type="text/javascript" src="../../js/city.js" ></script>
<script> <script>
document.addEventListener('plusready', onPlusReady, false); //document.addEventListener('plusready', onPlusReady, false);
var id; //= "186182250936643584"; var id = "202852336950816768";
var shareUrl = BASE_PATH+"/news/newDetail?newsId="; var shareUrl = BASE_PATH+"/news/newDetail?newsId=";
var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花"; var sharehrefTitle = "停车坐爱枫林晚,霜叶红于二月花";
var sharehrefDes = "客观里面请!"; var sharehrefDes = "客观里面请!";
@@ -175,11 +175,11 @@ var vm = new Vue({
}) })
function onPlusReady() { //function onPlusReady() {
var self = plus.webview.currentWebview(); // var self = plus.webview.currentWebview();
id = self.newsId; // id = self.newsId;
shareId = id // shareId = id
shareUrl = shareUrl+id // shareUrl = shareUrl+id
axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){ axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){
if(response.data.code==200){ if(response.data.code==200){
@@ -211,7 +211,7 @@ function onPlusReady() {
}); });
getPosition(); getPosition();
updateSerivces(); updateSerivces();
} //}
//数量进行转换 //数量进行转换
function numberConver(thumbsUpCount){ function numberConver(thumbsUpCount){
@@ -358,7 +358,7 @@ function addItems(number, lastIndex) {
// 添加新条目 // 添加新条目
$('.commentList ul').append(html); $('.commentList ul').append(html);
if($('.commentList li').length== totalCount+1){ if(curPageSize!=itemsPerLoad){
// 加载完毕,则注销无限加载事件,以防不必要的加载 // 加载完毕,则注销无限加载事件,以防不必要的加载
$.detachInfiniteScroll($('.infinite-scroll')); $.detachInfiniteScroll($('.infinite-scroll'));
// 删除加载提示符 // 删除加载提示符
@@ -566,12 +566,14 @@ function collect(){
/* 发布评论 */ /* 发布评论 */
$(".commentInputBox input").focus(function () { $(".commentInputBox input").focus(function () {
alert("dddddd");
$(".commentInputBox").hide(); $(".commentInputBox").hide();
$(".commentReleaseBox").show(); $(".commentReleaseBox").show();
$(".commentReleaseBox input").focus(); $(".commentReleaseBox input").focus();
$(".commentReleaseBox input").val(""); $(".commentReleaseBox input").val("");
}); });
$(".commentReleaseBox a").on("click", function () { $(".commentReleaseBox a").on("click", function () {
alert("ccccc");
$(".commentReleaseBox").hide(); $(".commentReleaseBox").hide();
$(".commentInputBox").show(); $(".commentInputBox").show();
var content = $(".commentReleaseBox input").val(); var content = $(".commentReleaseBox input").val();