作者 anyv
1 个管道 的构建 通过 耗费 0 秒

分类页

<?php
// +----------------------------------------------------------------------
// | bronet [ 以客户为中心 以奋斗者为本 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.bronet.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
namespace app\portal\controller;
use cmf\controller\WeChatBaseController;
use think\Db;
class ClassifyController extends WeChatBaseController{
/**
* 显示分类页
*/
public function classify(){
return $this -> fetch();
}
}
\ No newline at end of file
... ...
... ... @@ -19,8 +19,8 @@ class IndexController extends WeChatBaseController
public function index(){
//显示分类
$data_classif_= Db::name('classification') -> select();
$this -> assign('data_classif_',$data_classif_);
$data_classif= Db::name('classification') -> select();
$this -> assign('data_classif',$data_classif);
return $this -> fetch();
}
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>学考无忧-分类</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
</head>
<body>
<div class="classification_box">
<!-- 顶部 -->
<div class="cl_top">
<!-- 分类 -->
<div class="cl_title">
<h1>分类</h1>
<div class="cl_titleImg">
<a href="search.html">
<img src="__TMPL__/public/assets/images/23.png" alt="">
</a>
</div>
</div>
<!-- 导航 -->
<div class="cl_nav">
<ul>
<li class="cl_navActive">幼儿</li>
<li>小学</li>
<li>中学</li>
<li>优品汇</li>
<li>校园团购</li>
</ul>
</div>
<!-- 分类2 -->
<div class="cl_list2">
<ul>
<li>绘本</li>
<li>国学经典</li>
<li>作文辅导</li>
<li>指定阅读</li>
<li>少儿英语</li>
</ul>
</div>
</div>
<!-- 搜索导航 -->
<div class="se_nav">
<ul>
<li>综合</li>
<li>销量
<img src="__TMPL__/public/assets/images/24.png" alt="">
</li>
<li>价格
<img src="__TMPL__/public/assets/images/24.png" alt="">
</li>
</ul>
</div>
<!-- 搜索内容 -->
<div class="in_hot_shop se_con">
<div class="in_hotLi">
<div class="in_hotImg">
<img src="__TMPL__/public/assets/images/9.png" alt="">
</div>
<div class="in_hotText">
<div class="in_hotName txt-cut"><span>小学</span>小学英语五年级下 册好用不贵经济实...</div>
<div class="in_cam_shopPrice">
<div class="in_hotPrice1"><span>265</span>.00</div>
<div class="in_cam_shopY">¥200.00</div>
</div>
</div>
</div>
<div class="in_hotLi">
<div class="in_hotImg">
<img src="__TMPL__/public/assets/images/9.png" alt="">
</div>
<div class="in_hotText">
<div class="in_hotName txt-cut"><span>小学</span>小学英语五年级下 册好用不贵经济实...</div>
<div class="in_cam_shopPrice">
<div class="in_hotPrice1"><span>265</span>.00</div>
<div class="in_cam_shopY">¥200.00</div>
</div>
</div>
</div>
<div class="in_hotLi">
<div class="in_hotImg">
<img src="__TMPL__/public/assets/images/9.png" alt="">
</div>
<div class="in_hotText">
<div class="in_hotName txt-cut"><span>小学</span>小学英语五年级下 册好用不贵经济实...</div>
<div class="in_cam_shopPrice">
<div class="in_hotPrice1"><span>265</span>.00</div>
<div class="in_cam_shopY">¥200.00</div>
</div>
</div>
</div>
</div>
<!-- 底部更多 -->
<div class="in_what">—— 已经到底了哦 ——</div>
<!-- 底部一级导航 -->
<div class="in_bottom">
<ul>
<li>
<img src="__TMPL__/public/assets/images/22.png" alt="">
<p>首页</p>
</li>
<li>
<img src="__TMPL__/public/assets/images/21.png" alt="">
<p style="color:#FF7700;">分类</p>
</li>
<li>
<img src="__TMPL__/public/assets/images/17.png" alt="">
<p>购物车</p>
</li>
<li>
<img src="__TMPL__/public/assets/images/18.png" alt="">
<p>我的</p>
</li>
</ul>
</div>
</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
$('.cl_nav ul li').click(function() {
$(this).addClass('cl_navActive').siblings().removeClass('cl_navActive');
})
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -39,7 +39,7 @@
<!-- nav -->
<div class="in_nav">
<ul>
<volist name="data_classif_" id="vo">
<volist name="data_classif" id="vo">
<if condition="empty($vo.thumbnail)">
<else/>
<a href="nav_class.html">
... ... @@ -52,12 +52,14 @@
</a>
</if>
</volist>
<li>
<div class="in_navImg">
<img src="__TMPL__/public/assets/images/7.png" alt="">
</div>
<p class="in_navTxt">更多</p>
</li>
<a href="{:url('/')}">
<li>
<div class="in_navImg">
<img src="__TMPL__/public/assets/images/7.png" alt="">
</div>
<p class="in_navTxt">更多</p>
</li>
</a>
</ul>
</div>
<!-- 校园团购 -->
... ...