diff --git a/static/js/tpl.js b/static/js/tpl.js index 17b87fd..d4c4874 100644 --- a/static/js/tpl.js +++ b/static/js/tpl.js @@ -84,50 +84,8 @@ $(".banner-wrap").height(window.innerWidth * 430 / 2732); }) - function getCategory(){ - $ajax('/index.php?r=pc/AppData/AppCategoryList','get',{type : 0},'json', - function(data){ - if (data.status === 0) { - var categorys = data.data, - contentsStr = '', - firstCateStr = ''; - if(categorys.length){ - $(categorys).each(function(index, item) { - var secCates = item.cate, - contentStr = '
', - secCatesStr = ''; - - if(secCates.length > 0){ - secCatesStr += '全部'; - $(secCates).each(function(index, el) { - secCatesStr += ''+el.name+''; - }); - } - - firstCateStr += ''+item.name+'' - contentStr += secCatesStr + '
'; - contentsStr += contentStr; - pages.push(1); - }); - - $('#first-navs').append(firstCateStr); - $('body').append(contentsStr); - if (window.location.hash == '#single') { - // 线上data-cate = 12 - $('#first-navs span[data-cate="12"]').trigger('click'); - }; - getTpls(categorys[0].id , 0); - }else{ - // 没有分类时 - $('#first-navs span').eq(0).trigger('click'); - } - }else{ - alertTip(data.data); - } - },function(data){ - alertTip(data.data); - }); - } + function getCategory(){} + function getTpls(cate, index){ var $container = $('.tpl-container').eq(index), diff --git a/templates/index.html b/templates/index.html index f9b8ed0..793621d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15,6 +15,7 @@ + @@ -24,7 +25,7 @@