$().ready(function() { var articleType = null; articleType = $(".categories .pinka").attr("type"); if (articleType == null || articleType == '' || articleType == undefined) { articleType = 0; } localStorage.setItem("articlePage", 1); localStorage.setItem("articleType", articleType); initArticle(); }); function initArticle() { var page = localStorage.getItem("articlePage"); var type = localStorage.getItem("articleType"); var url = "/ht/article/news"; $.ajax({ type: 'GET', url: url, async: false, data: { type: type, limit: 10, page: page }, dataType: 'json', timeout: 5000, success: function(result) { if (result.code === 0) { var body = ""; var ckickName = "goArticleInfo"; $.each(result.data, function(fi, obj) { var bodyHtml = "" + "
" + getTypeName(obj.type) + "
\n" + "" + obj.assistant + "
\n" + "