1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * 小梦科技资源nanodreamtech.com
- *
- * ==========================================================================
- * @link https://www.nanodreamtech.com/
- * @copyright Copyright (c) 2015 liofis.com.
- * @license https://www.nanodreamtech.com/license.html License
- * ==========================================================================
- *
- * @author fish
- *
- */
- namespace Home\Controller;
- class SearchController extends CommonController {
-
-
- protected function _initialize()
- {
- parent::_initialize();
- $this->cur_page = 'search';
- }
-
-
- //进行中
- public function index(){
-
- $parent_list = M('goods_category')->where( array('pid' =>0, 'is_search' =>1) )->order('c_sort_order desc,sort_order desc')->select();
-
- foreach($parent_list as $key => $val)
- {
- $child_list = M('goods_category')->where( array('pid' => $val['id'], 'is_search' =>1) )->order('c_sort_order desc,sort_order desc')->select();
- $val['child_list'] = $child_list;
- $parent_list[$key] = $val;
- }
- $this->parent_list = $parent_list;
-
- $this->display();
- }
-
-
-
- }
|