From 6d2aee2f9fd49550b8b93ff412a9be7681a3635c Mon Sep 17 00:00:00 2001 From: zhuzhenchao Date: Sat, 12 Nov 2016 15:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/tpl.js | 46 +---------------- templates/index.html | 137 +++++++++++++++++++++----------------------------- templates/webapp.html | 6 +-- 3 files changed, 62 insertions(+), 127 deletions(-) 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 @@