Пример #1
0
 /**
  * 列表
  */
 public function index()
 {
     \Core\View::css('/manage/tablescroll/css/style.css');
     \Core\View::script('/manage/tablescroll/js/jquery.tablescroll.js');
     $this->view->content = view('goods/index.php');
     $rows = \DB\Mall\Goods::fetch(null, 0, 0, array('goods_order' => 'desc'));
     $data = array();
     foreach ($rows as $row) {
         $data[$row->store_id][] = $row;
     }
     $this->view->content->data = $data;
     //dump($data);exit();
 }
Пример #2
0
 public function tab3_part()
 {
     $limit = 5;
     $page = \Core\URI::kv('page', 1);
     $start = ($page - 1) * $limit;
     $rows = \DB\Mall\Goods::fetch(array('goods_status' => 1, 'category_id' => 3), $limit, $start, array('goods_order' => 'desc'));
     $v = new \Model\Validation();
     if (!empty($rows)) {
         $view = view('main/tab3_part.php');
         $view->rows = $rows;
         $view->user = $this->user;
         $rs = $view->__toString();
         $v->set_data($rs);
     } else {
         $v->required(false)->message('没有更多了...');
     }
     $v->send();
 }