diff --git a/fangija-zsyf/views/news/newsDetail.html b/fangija-zsyf/views/news/newsDetail.html index a7884c1..6e7ff56 100644 --- a/fangija-zsyf/views/news/newsDetail.html +++ b/fangija-zsyf/views/news/newsDetail.html @@ -81,7 +81,7 @@
@@ -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); + }); + }) +