Commit 2e3b59bf authored by Van's avatar Van

fix #17

parent 212dd23a
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<script src="https://cdn.jsdelivr.net/npm/uvstat@v1.0.1/dist/index.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/uvstat@v1.0.2/dist/index.min.js"></script>
<script> <script>
var Label = { var Label = {
servePath: "${servePath}", servePath: "${servePath}",
......
...@@ -106,5 +106,8 @@ No Result, Return to <a href="${servePath}">Index</a> or <a href="https://hacpai ...@@ -106,5 +106,8 @@ No Result, Return to <a href="${servePath}">Index</a> or <a href="https://hacpai
Powered by <a href="https://b3log.org" target="_blank">B3log 开源</a> • Solo ${version} Powered by <a href="https://b3log.org" target="_blank">B3log 开源</a> • Solo ${version}
</div> </div>
</div> </div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" charset="utf-8"></script>
<#include 'label.ftl'/>
</body> </body>
</html> </html>
...@@ -142,6 +142,8 @@ admin.articleList = { ...@@ -142,6 +142,8 @@ admin.articleList = {
that.tablePagination.updateTablePagination(articleData, pageNum, that.tablePagination.updateTablePagination(articleData, pageNum,
result.pagination) result.pagination)
Util.uvstat.renderStat()
$('#loadMsg').text('') $('#loadMsg').text('')
}, },
}) })
......
...@@ -99,7 +99,7 @@ admin.draftList = { ...@@ -99,7 +99,7 @@ admin.draftList = {
} }
that.tablePagination.updateTablePagination(articleData, pageNum, result.pagination); that.tablePagination.updateTablePagination(articleData, pageNum, result.pagination);
Util.uvstat.renderStat()
$("#loadMsg").text(""); $("#loadMsg").text("");
} }
}); });
......
...@@ -28,13 +28,14 @@ ...@@ -28,13 +28,14 @@
* @static * @static
*/ */
var Util = { var Util = {
uvstat: undefined,
/** /**
* 初始化浏览数 * 初始化浏览数
*/ */
initViewCnt: function () { initViewCnt: function () {
const uvstat = new Uvstat({loading:'<span>0</span>'}) Util.uvstat = new Uvstat({loading:'<span>0</span>'})
uvstat.setStat() Util.uvstat.setStat()
uvstat.renderStat() Util.uvstat.renderStat()
}, },
/** /**
* 是否为文章页面 * 是否为文章页面
...@@ -106,6 +107,7 @@ var Util = { ...@@ -106,6 +107,7 @@ var Util = {
callback: function () { callback: function () {
Util.parseMarkdown() Util.parseMarkdown()
Util.parseLanguage() Util.parseLanguage()
Util.uvstat.renderStat()
cb && cb() cb && cb()
}, },
}) })
......
...@@ -325,6 +325,8 @@ var timeline = { ...@@ -325,6 +325,8 @@ var timeline = {
$(".module img").imagesLoaded(function() { $(".module img").imagesLoaded(function() {
$(window).resize(); $(window).resize();
}); });
Util.uvstat.renderStat()
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment